On this post, I will be solving sub-optimal routing issue by using administrative distance.
R1:
R1#sh run | sec ospf
router ospf 1
network 11.11.11.11 0.0.0.0 area 0
network 192.168.12.0 0.0.0.255 area 0
R2:
R2#sh run | sec ospf
router ospf 1
network 192.168.12.0 0.0.0.255 area 0
network 192.168.23.0 0.0.0.255 area 1
network 192.168.24.0 0.0.0.255 area 2
R3:
R3#sh run | sec ospf
redistribute ospf 1 metric 1 1 1 1 1
router ospf 1
redistribute eigrp 10 subnets
network 192.168.23.0 0.0.0.255 area 1
R3#sh run | sec eigrp
router eigrp 10
network 192.168.34.0
redistribute ospf 1 metric 1 1 1 1 1
redistribute eigrp 10 subnets
R4:
R4#sh run | sec ospf
redistribute ospf 1 metric 1 1 1 1 1
router ospf 1
redistribute eigrp 10 subnets
network 192.168.24.0 0.0.0.255 area 2
R4#sh run | sec eigrp
router eigrp 10
network 192.168.34.0
network 192.168.45.0
redistribute ospf 1 metric 1 1 1 1 1
redistribute eigrp 10 subnets
R5:
5#sh run | sec eigrp
router eigrp 10
network 55.55.55.55 0.0.0.0
network 192.168.45.0
R5#
Traceroute from R1 —-> R5:
R1#traceroute 55.55.55.55
Type escape sequence to abort.
Tracing the route to 55.55.55.55
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.12.2 64 msec 52 msec 52 msec
2 192.168.23.3 56 msec 60 msec 76 msec
3 192.168.34.4 80 msec 80 msec 80 msec
4 192.168.45.5 104 msec 80 msec 100 msec
Traceroute from R5 —-> R1
R5#traceroute 11.11.11.11
Type escape sequence to abort.
Tracing the route to 11.11.11.11
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.45.4 56 msec 60 msec 56 msec
2 192.168.24.2 60 msec 64 msec 52 msec
3 192.168.12.1 80 msec 88 msec 80 msec
Sub-optimal paths happen for traffic from R5 to R1:
Look at the routing table of R3:
R3#sh ip route
!
Gateway of last resort is not set
11.0.0.0/32 is subnetted, 1 subnets
O IA 11.11.11.11 [110/260] via 192.168.23.2, 00:07:04, Serial3/0 <<< R3 is learning the 11.11.11.11/32 via R2.
55.0.0.0/32 is subnetted, 1 subnets
D 55.55.55.55 [90/158720] via 192.168.34.4, 00:02:32, FastEthernet0/0
O IA 192.168.12.0/24 [110/259] via 192.168.23.2, 00:07:04, Serial3/0
192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.23.0/24 is directly connected, Serial3/0
L 192.168.23.3/32 is directly connected, Serial3/0
O IA 192.168.24.0/24 [110/585] via 192.168.23.2, 00:02:48, Serial3/0
192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.34.0/24 is directly connected, FastEthernet0/0
L 192.168.34.3/32 is directly connected, FastEthernet0/0
D 192.168.45.0/24 [90/30720] via 192.168.34.4, 00:02:32, FastEthernet0/0
R3#
R4#show ip route
!
Gateway of last resort is not set
11.0.0.0/32 is subnetted, 1 subnets
O IA 11.11.11.11 [110/129] via 192.168.24.2, 00:03:15, Serial3/2 <<< R4 is learning 11.11.11.11/32 via R2.
55.0.0.0/32 is subnetted, 1 subnets
D 55.55.55.55 [90/156160] via 192.168.45.5, 00:03:15, FastEthernet1/0
O IA 192.168.12.0/24 [110/128] via 192.168.24.2, 00:03:15, Serial3/2
O IA 192.168.23.0/24 [110/259] via 192.168.24.2, 00:03:15, Serial3/2
192.168.24.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.24.0/24 is directly connected, Serial3/2
L 192.168.24.4/32 is directly connected, Serial3/2
192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.34.0/24 is directly connected, FastEthernet0/0
L 192.168.34.4/32 is directly connected, FastEthernet0/0
192.168.45.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.45.0/24 is directly connected, FastEthernet1/0
L 192.168.45.4/32 is directly connected, FastEthernet1/0
*** Here what happens on R3 and R4: R3 redistribute the 11.11.11.11/32 into EIGRP which in turn will become external EIGRP routes with AD of 170. But since R4 is learning the same IP (11.11.11.11/32) via the direct link to R2 with an AD of 110, what R4 does is to choose the routes with the lowest AD (which is via the direct link to R2). This is the reason why the traffic path from R5 to R1 takes the following path : R5–>R4–> R2 –> R1
*** For the path from R1 to R5, it takes R1 —> R2 –> R3 –> R4 –R5, because the OSPF metric is lower from R2 to R3 as compared to R2 to R4 (bandwidth is higher between R2 to R3).
*** To settle this issue, we need to correct the AD on R4. We need to ensure that the network 11.11.11.11/32 should be learned via EIGRP from R4.
R4(config)#router eigrp 10
R4(config-router)#distance eigrp 90 109 <<< I need to change the external EIGRP AD to 109 (less than OSPF AD so it will choose EIGRP learned routes instead of OSPF).
R4(config-router)#^Z
R4#
R4 shows learned the IP 11.11.11.11/32 now as Exteranl EIGRP routes. No more OSPF.
R4#show ip route
!
Gateway of last resort is not set
11.0.0.0/32 is subnetted, 1 subnets
D EX 11.11.11.11
[109/2560002816] via 192.168.34.3, 00:03:39, FastEthernet0/0
55.0.0.0/32 is subnetted, 1 subnets
D 55.55.55.55 [90/156160] via 192.168.45.5, 00:03:43, FastEthernet1/0
D EX 192.168.12.0/24
[109/2560002816] via 192.168.34.3, 00:03:39, FastEthernet0/0
D EX 192.168.23.0/24
[109/2560002816] via 192.168.34.3, 00:03:39, FastEthernet0/0
192.168.24.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.24.0/24 is directly connected, Serial3/2
L 192.168.24.4/32 is directly connected, Serial3/2
192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.34.0/24 is directly connected, FastEthernet0/0
L 192.168.34.4/32 is directly connected, FastEthernet0/0
192.168.45.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.45.0/24 is directly connected, FastEthernet1/0
L 192.168.45.4/32 is directly connected, FastEthernet1/0
Traffic path is now Optimal:
R5#traceroute 11.11.11.11
Type escape sequence to abort.
Tracing the route to 11.11.11.11
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.45.4 56 msec 32 msec 52 msec
2 192.168.34.3 56 msec 56 msec 80 msec
3 192.168.23.2 76 msec 100 msec 84 msec
4 192.168.12.1 104 msec 104 msec 104 msec
R5#ping 11.11.11.11 source 55.55.55.55
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 11.11.11.11, timeout is 2 seconds:
Packet sent with a source address of 55.55.55.55
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 92/110/136 ms
R5#
Debug on R5:
R5#debug ip routing
IP routing debugging is on
R5#
*Sep 18 21:51:21.083: %DUAL-5-NBRCHANGE: EIGRP-IPv4 10: Neighbor 192.168.45.4 (FastEthernet1/0) is down: Inter face PEER-TERMINATION received
*Sep 18 21:51:21.087: RT: delete route to 192.168.23.0 via 192.168.45.4, eigrp metric [170/2560002816]
*Sep 18 21:51:21.087: RT: no routes to 192.168.23.0, delayed flush
*Sep 18 21:51:21.091: RT: delete network route to 192.168.23.0/24
*Sep 18 21:51:21.095: RT: delete route to 11.11.11.11 via 192.168.45.4, eigrp metric [170/2560002816]
*Sep 18 21:51:21.099: RT: no routes to 11.11.11.11, delayed flush
*Sep 18 21:51:21.103: RT: delete subnet route to 11.11.11.11/32
*Sep 18 21:51:21.107: RT: delete route to 192.168.24.0 via 192.168.45.4, eigrp metric [170/2560002816]
*Sep 18 21:51:21.111: RT: no routes to 192.168.24.0, delayed flush
*Sep 18 21:51:21.115: RT:
R5#delete network route to 192.168.24.0/24
*Sep 18 21:51:21.119: RT: delete route to 192.168.34.0 via 192.168.45.4, eigrp metric [90/30720]
*Sep 18 21:51:21.119: RT: no routes to 192.168.34.0, delayed flush
*Sep 18 21:51:21.123: RT: delete network route to 192.168.34.0/24
*Sep 18 21:51:21.131: RT: delete route to 192.168.12.0 via 192.168.45.4, eigrp metric [170/2560002816]
*Sep 18 21:51:21.135: RT: no routes to 192.168.12.0, delayed flush
*Sep 18 21:51:21.139: RT: delete network route to 192.168.12.0/24
R5#
*Sep 18 21:51:22.315: %DUAL-5-NBRCHANGE: EIGRP-IPv4 10: Neighbor 192.168.45.4 (FastEthernet1/0) is up: new adj acency
*Sep 18 21:51:22.387: RT: updating eigrp 192.168.24.0/24 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:22.391: RT: add 192.168.24.0/24 via 192.168.45.4, eigrp metric [170/2560002816]
*Sep 18 21:51:22.395: RT: updating eigrp 192.168.34.0/24 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:22.399: RT: add 192.168.34.0/24 via 192.168.45.4, eigrp metric [90/30720]
*Sep 18 21:51:22.403: RT: updating eigrp 192.168.12.0/24 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:22.407: RT: add 192.168.12.0/24 via 192.168.45.4, eigrp metric [170/2560002816]
*Sep 18 21:51:22.415: RT: updating eigrp 11.11.11.11/32 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:22.419: RT: add 11.11.11.11/32 via 192.168.45.4, eigrp metric [170/2560002816]
*Sep 18 21:51:22.423: RT: updating eigrp 192.168.23.0/24 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:22.427: RT: add 192.168.23.0/24 via 192.168.45.4, eigrp metric [170/2560002816]
R5#
*Sep 18 21:51:25.639: RT: delete route to 192.168.23.0 via 192.168.45.4, eigrp metric [170/2560002816]
*Sep 18 21:51:25.643: RT: no routes to 192.168.23.0, delayed flush
*Sep 18 21:51:25.643: RT: delete network route to 192.168.23.0/24
*Sep 18 21:51:25.647: RT: updating eigrp 192.168.23.0/24 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:25.651: RT: rib update return code: 5
*Sep 18 21:51:25.655: RT: delete route to 192.168.12.0 via 192.168.45.4, eigrp metric [170/2560002816]
*Sep 18 21:51:25.659: RT: no routes to 192.168.12.0, delayed flush
*Sep 18 21:51:25.663: RT: delete network route to 192.168.12.0/24
*Sep 18 21:51:25.663: RT: updating eigrp 192.168.12.0/24 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:25.667: RT: rib update return code: 5
*Sep 18 21:51:25.671: RT: delete route to 11.11.11.11 via 192.168.45.4, eigrp metric [170/2560002816]
*Sep 18 21:51:25.675: RT: no routes to 11.11.11.11, delayed flush
*Sep 18 21:51:25.679: RT: delete subnet route to 11
R5#.11.11.11/32
*Sep 18 21:51:25.679: RT: updating eigrp 11.11.11.11/32 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:25.683: RT: rib update return code: 5
*Sep 18 21:51:25.951: RT: updating eigrp 192.168.23.0/24 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:25.955: RT: add 192.168.23.0/24 via 192.168.45.4, eigrp metric [170/2560005376]
*Sep 18 21:51:25.963: RT: updating eigrp 192.168.12.0/24 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:25.967: RT: add 192.168.12.0/24 via 192.168.45.4, eigrp metric [170/2560005376]
*Sep 18 21:51:25.971: RT: updating eigrp 11.11.11.11/32 (0x0):
via 192.168.45.4 Fa1/0
*Sep 18 21:51:25.975: RT: add 11.11.11.11/32 via 192.168.45.4, eigrp metric [170/2560005376]
R5#
***********************END OF LABORATORY************************************
Leave a comment