Wednesday 7 November 2018

Route Redistribution


Route redistribution 
 when we take a route from one routing protocol and inject that route or distribute it into another routing protocol.  Routers by default only advertise and share routing information with other routers running the same protocol and in a same AS. If you have 2 routers and one runs EIGRP and the other runs OSPF and you want them to know about each other’s routes, by default, router do not share routes information because they are not running the same protocol. Here we need redistribution.

In short- Redistribution is the process of exchanging routing information between different routing protocols.

You can use redistribution when using multiple protocols, migrating to a more advance routing, you can use redistribution if you having mismatch between devices (vendors) or political boundaries.

Note: internal routes are routes advertised within the same protocol.
          External routes are routes which get redistributed.

To configure redistribution
Router must be running both protocols

Change metric.
RIPv2:   HOP COUNTS
OSPF:   COST
EIGRP:  BW + DELAY + LOAD + MTU + RELIABILITY

Configuration redistribution between RIP and EIGRP


Topology:



 GOAL: 
  • configure the interfaces as per the topology, advertise the interfaces with the same protocols defined as per the topology.
  • configure Redistribution on R2 and make sure the R1 and R3 exchange the routes using redistribution.



R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up
Serial3/0              1.1.1.1         YES manual up                    up

R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                    up
Serial3/0              1.1.1.2         YES manual up                    up
Serial3/1              2.2.2.1         YES manual up                    up

R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.1        YES manual up                    up
Serial3/1              2.2.2.2         YES manual up                    up

R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 10.0.0.0
R1(config-router)#network 1.0.0.0
R1(config-router)#no auto-summary
R1(config-router)#end

R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 1.0.0.0
R2(config-router)#network 20.0.0.0
R2(config-router)#no auto-summary
R2(config-router)#end

R2(config)#router eigrp 100
R2(config-router)#network 2.0.0.0
R2(config-router)#no auto-summary
R2(config-router)#end

R3(config)#router eigrp 100
R3(config-router)#network 30.0.0.0
R3(config-router)#network 2.0.0.0
R3(config-router)#no auto-summary
R3(config-router)#end

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set


      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.0.0.0/8 is directly connected, Serial3/0
L        1.1.1.1/32 is directly connected, Serial3/0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/8 is directly connected, FastEthernet0/0
L        10.1.1.1/32 is directly connected, FastEthernet0/0
R     20.0.0.0/8 [120/1] via 1.1.1.2, 00:00:15, Serial3/0

R3#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.0.0.0/8 is directly connected, Serial3/1
L        2.2.2.2/32 is directly connected, Serial3/1
      30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        30.0.0.0/8 is directly connected, FastEthernet0/0
L        30.1.1.1/32 is directly connected, FastEthernet0/0

R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.0.0.0/8 is directly connected, Serial3/0
L        1.1.1.2/32 is directly connected, Serial3/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.0.0.0/8 is directly connected, Serial3/1
L        2.2.2.1/32 is directly connected, Serial3/1
R     10.0.0.0/8 [120/1] via 1.1.1.1, 00:00:08, Serial3/0
      20.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        20.0.0.0/8 is directly connected, FastEthernet0/0
L        20.1.1.1/32 is directly connected, FastEthernet0/0
D     30.0.0.0/8 [90/2172416] via 2.2.2.2, 00:02:49, Serial3/1

  • The above outputs you can see R2 learn thee routes from R1 and R3 (10.0.0.0 and 30.0.0.0) networks respectively but R1 and R3 can't  exchange their routes, the reason is both routers running different routing protocols, we need to configure redistribution on router 2 because router is running both the protocol. 

R2(config)#router rip
R2(config-router)#redistribute eigrp 100 metric 5
R2(config-router)#exit

R2(config)#router eigrp 100
R2(config-router)#redistribute rip metric 1000 2000 255 100 1500
R2(config-router)#exit

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.0.0.0/8 is directly connected, Serial3/0
L        1.1.1.1/32 is directly connected, Serial3/0
R     2.0.0.0/8 [120/5] via 1.1.1.2, 00:00:09, Serial3/0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/8 is directly connected, FastEthernet0/0
L        10.1.1.1/32 is directly connected, FastEthernet0/0
R     20.0.0.0/8 [120/1] via 1.1.1.2, 00:00:09, Serial3/0
R     30.0.0.0/8 [120/5] via 1.1.1.2, 00:00:09, Serial3/0

R3#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

D EX  1.0.0.0/8 [170/3584000] via 2.2.2.1, 00:03:04, Serial3/1
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.0.0.0/8 is directly connected, Serial3/1
L        2.2.2.2/32 is directly connected, Serial3/1
D EX  10.0.0.0/8 [170/3584000] via 2.2.2.1, 00:03:04, Serial3/1
D EX  20.0.0.0/8 [170/3584000] via 2.2.2.1, 00:03:04, Serial3/1
      30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        30.0.0.0/8 is directly connected, FastEthernet0/0
L        30.1.1.1/32 is directly connected, FastEthernet0/0


Configure redistribution between RIP and OSPF




GOAL:
  • erase the previous routing configuration 
  • advertise the interface with the same protocol defined in our topology
R1(config)#no ip routing
R1(config)#ip routing

R2(config)#no ip routing
R2(config)#ip routing

R3(config)#no ip routing
R3(config)#ip routing


R1(config)#router rip
R1(config-router)#version  2
R1(config-router)#network 10.0.0.0
R1(config-router)#network 1.0.0.0
R1(config-router)#no auto-summary

R2(config)#router ospf 1
R2(config-router)#network 2.0.0.0 0.255.255.255 area 0
R2(config-router)#end

R3(config)#router ospf 1
R3(config-router)#network 30.0.0.0 0.255.255.255 area  0
R3(config-router)#network 2.0.0.0 0.255.255.255 area 0
R3(config-router)#end


R1#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

R     20.0.0.0/8 [120/1] via 1.1.1.2, 00:00:06, Serial3/0


R3#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set


      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.0.0.0/8 is directly connected, Serial3/1
L        2.2.2.2/32 is directly connected, Serial3/1
      30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        30.0.0.0/8 is directly connected, FastEthernet0/0
L        30.1.1.1/32 is directly connected, FastEthernet0/0

From the above outputs we can see R1 and R3 can't exchange their routes , the reason is they are using different routing protocols.


R2(config)#router rip
R2(config-router)#redistribute ospf 1 metric 5
R2(config-router)#exit

R2(config)#router ospf 1
R2(config-router)#redistribute rip subnets metric 100 metric-type 1
R2(config-router)#end

note: OE1 will add the individual metric, metric is added as move              from router to another router
         OE2 will not add the individual metric, the metric remain                  the same for all the routers default for external routes 


R3#show  ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

O E1  1.0.0.0/8 [110/164] via 2.2.2.1, 00:07:25, Serial3/1
O E1  10.0.0.0/8 [110/164] via 2.2.2.1, 00:07:25, Serial3/1
O E1  20.0.0.0/8 [110/164] via 2.2.2.1, 00:07:25, Serial3/1


R1#show ip route rip
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

R     2.0.0.0/8 [120/5] via 1.1.1.2, 00:00:14, Serial3/0
R     20.0.0.0/8 [120/1] via 1.1.1.2, 00:00:14, Serial3/0
R     30.0.0.0/8 [120/5] via 1.1.1.2, 00:00:14, Serial3/0

R1#ping 30.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/57/164 ms

R3#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/23/32 ms





 


 


Instagram

Facebook


Twitter



LINKEDIN








No comments:

What is Virtual Router Redundancy Protocol (VRRP)? How to configure Virtual Router Redundancy Protocol (VRRP)?

 Virtual Router Redundancy Protocol (VRRP) is a gateway redundancy networking protocol used to create a virtual gateway similar to HSRP . VR...