Saturday, October 1, 2011

Administrative Distance Load Balancing


The network setup above is being setup to answer an interesting question.
EIGRP is enabled for the upper path while OSPF is enabled for the lower path.
RT2 Lo0 is enabled for both EIGRP and OSPF.

Q: The administrative distance values for EIGRP and OSPF are 90 and 120 respectively. If the administrative distance of OSPF is modified to be the same as EIGRP – 90 on RT1, will RT1 insert both EIGRP and OSPF routes to 192.168.1.0/24 into its IP routing table?
A: No. If there are multiple routes with the same longest-match and same administrative distance but are learned from different routing protocols. Cisco IOS will consider the default administrative distance of the routing protocols and select the route with the lower default administrative distance.

A common question related to this topic is are we able to load balance across 2 different MPLS providers in which we run EBGP with the 1st provider and run OSPF with the 2nd provider?

Let the battle begins by first checking the routing table on RT1:
RT1#sh ip route

Gateway of last resort is not set

     22.0.0.0/30 is subnetted, 1 subnets
C       22.22.22.0 is directly connected, FastEthernet1/0
     11.0.0.0/30 is subnetted, 1 subnets
C       11.11.11.0 is directly connected, FastEthernet0/0
D    192.168.1.0/24 [90/156160] via 11.11.11.2, 00:01:30, FastEthernet0/0
RT1#

Let the battle begins by first checking the routing table on RT1:
RT1#debug ip routing
IP routing debugging is on
RT1#
RT1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT1(config)#router ospf 100
RT1(config-router)#distance 89
RT1(config-router)#
00:02:25: RT: closer admin distance for 192.168.1.0, flushing 1 routes
00:02:25: RT: NET-RED 192.168.1.0/24
00:02:25: RT: add 192.168.1.0/24 via 22.22.22.2, ospf metric [89/2]
00:02:25: RT: NET-RED 192.168.1.0/24
RT1(config-router)#
! OSPF wins!!! :-)
RT1(config-router)#do sh ip route

Gateway of last resort is not set

     22.0.0.0/30 is subnetted, 1 subnets
C       22.22.22.0 is directly connected, FastEthernet1/0
     11.0.0.0/30 is subnetted, 1 subnets
C       11.11.11.0 is directly connected, FastEthernet0/0
O    192.168.1.0/24 [89/2] via 22.22.22.2, 00:00:09, FastEthernet1/0
RT1(config-router)#
RT1(config-router)#distance 90
RT1(config-router)#
00:02:39: RT: delete route to 192.168.1.0/24
00:02:39: RT: NET-RED 192.168.1.0/24
00:02:39: RT: add 192.168.1.0/24 via 11.11.11.2, eigrp metric [90/156160]
00:02:39: RT: NET-RED 192.168.1.0/24
RT1(config-router)#
! EIGRP wins again!!! :-)
RT1(config-router)#do sh ip route

Gateway of last resort is not set

     22.0.0.0/30 is subnetted, 1 subnets
C       22.22.22.0 is directly connected, FastEthernet1/0
     11.0.0.0/30 is subnetted, 1 subnets
C       11.11.11.0 is directly connected, FastEthernet0/0
D    192.168.1.0/24 [90/156160] via 11.11.11.2, 00:00:05, FastEthernet0/0
RT1(config-router)#
RT1(config-router)#exit
! Static routing enters the battle!!! :-)
RT1(config)#ip route 192.168.1.0 255.255.255.0 22.22.22.2 90
RT1(config)#
00:03:07: RT: closer admin distance for 192.168.1.0, flushing 1 routes
00:03:07: RT: NET-RED 192.168.1.0/24
00:03:07: RT: add 192.168.1.0/24 via 22.22.22.2, static metric [90/0]
00:03:07: RT: NET-RED 192.168.1.0/24
RT1(config)#
! Here comes the final winner!!! :-)
RT1(config)#do sh ip route

Gateway of last resort is not set

     22.0.0.0/30 is subnetted, 1 subnets
C       22.22.22.0 is directly connected, FastEthernet1/0
     11.0.0.0/30 is subnetted, 1 subnets
C       11.11.11.0 is directly connected, FastEthernet0/0
S    192.168.1.0/24 [90/0] via 22.22.22.2
RT1(config)#

No comments:

Post a Comment