What is EIGRP load balancing and why to use it?
Load balancing is a standard functionality of the Cisco IOS router software, and is available across all router platforms. It is inherent to the forwarding process in the router and is automatically activated if the routing table has multiple paths to a destination. It is based on standard routing protocols, such as Routing Information Protocol (RIP), RIPv2, Enhanced Interior Gateway Routing Protocol (EIGRP), Open Shortest Path First (OSPF), and Interior Gateway Routing Protocol (IGRP), or derived from statically configured routes and packet forwarding mechanisms. It allows a router to use multiple paths to a destination when forwarding packets.
In the example below we will configure four routers and two end-user devices. In the event of a network outage computers must continue to have access to the server infrastructure. Each router will have a redundant connection to one or more network segments and run a EIGRP routing process. To accommodate network redundancy we must configure dynamic routing to install multiple paths that can be used to load balancing traffic. All paths but one path will use the same bandwidth and variance. No adjustments to k values will be made.
Steps to configure EIGRP load balancing
R1(config)#interface FastEthernet0/0 R1(config-if)#ip address 10.0.0.1 255.255.255.0 ! R1(config)#interface FastEthernet1/0 R1(config-if)#ip address 10.3.0.2 255.255.255.252 ! R1(config)#interface FastEthernet1/1 R1(config-if)#ip address 10.1.0.1 255.255.255.252
R2(config)#interface FastEthernet0/0 R2(config-if)#ip address 10.6.0.1 255.255.255.0 ! R2(config)#interface FastEthernet1/0 R2(config-if)#ip address 10.4.0.2 255.255.255.252 ! R2(config)#interface FastEthernet1/1 R2(config-if)#ip address 10.2.0.1 255.255.255.252
R3(config)#interface FastEthernet0/0 R3(config-if)#ip address 10.3.0.1 255.255.255.252 ! R3(config)#interface FastEthernet0/1 R3(config-if)#ip address 10.2.0.2 255.255.255.252 ! R3(config)#interface FastEthernet1/0 R3(config-if)#ip address 10.5.0.1 255.255.255.252
R4(config)#interface FastEthernet0/0 R4(config-if)#ip address 10.1.0.2 255.255.255.252 ! R4(config)#interface FastEthernet0/1 R4(config-if)#ip address 10.4.0.1 255.255.255.252 ! R4(config)#interface FastEthernet1/0 R4(config-if)#ip address 10.5.0.2 255.255.255.252
Step 2: Enable a EIGRP routing process with a common AS number and enable EIGRP routing on all applicable IP networks.
R1(config)#router eigrp 101 R1(config-router)#maximum-paths 2 R1(config-router)#network 10.0.0.0 0.0.0.255 R1(config-router)#network 10.1.0.0 0.0.0.3 R1(config-router)#network 10.3.0.0 0.0.0.3
R2(config)#router eigrp 101 R2(config-router)#maximum-paths 2 R2(config-router)#network 10.2.0.0 0.0.0.3 R2(config-router)#network 10.4.0.0 0.0.0.3 R2(config-router)#network 10.6.0.0 0.0.0.255
R3(config)#router eigrp 101 R3(config-router)#maximum-paths 2 R3(config-router)#network 10.2.0.0 0.0.0.3 R3(config-router)#network 10.3.0.0 0.0.0.3 R3(config-router)#network 10.5.0.0 0.0.0.3
R4(config)#router eigrp 101 R4(config-router)#maximum-paths 2 R4(config-router)#network 10.1.0.0 0.0.0.3 R4(config-router)#network 10.4.0.0 0.0.0.3 R4(config-router)#network 10.5.0.0 0.0.0.3
Steps to configure EIGRP unequal cost load balancing
R1(config)#interface FastEthernet1/1 R1(config-if)# bandwidth 50000
R4(config-if)#interface FastEthernet0/0 R4(config-if)# bandwidth 50000
Step 4: Review the EIGRP topology to verify the successors and feasible successors on R1. As show the successor to route to 10.6.0.0/24 is R3. We can also see that R4 is feasible successor.
Step 5: Per the EIGRP topology output we know R4 is feasible successor but we need to load balance across this route so unless R4 is a successor we cannot do that. A neighbor’s advertised distance (AD) for the route must be less than the successor’s feasible distance (FD) for that to happen. We need to use variance, but first let’s do some quick math.. Divide R3’s advertised distance (AD) of 33280 by the feasible distance (FD) for R4.
FD of successor / AD of feasible successor 33280 / 30720 = 1.083333333333333
Step 6: After dividing R3’s advertised distance (AD) of 33280 by the feasible distance (FD) for R4 to 10.6.0.0/24 we know that we must configure variance with a value greater than 1.083333333333333. Per the below configure
R1(config)#router eigrp 101 R1(config-router)#variance 2
Step 7: Use the show ip route command to verify multiple routes are install to 10.6.0.0/24.
Step 8: Repeat the above steps and math on R4 to ensure both routes are installed for 10.0.0.0/24.
Step 9: On R2 use the show ip eigrp topology and command. You will notice R4 does not show as a feasible successor and the route is not installed, but why? Reviewing the output from the show ip eigrp topology all-links command we can see that the advertised distance of 10.0.0.0/24 from R4 is greater than the feasible distance of 10.0.0.0/24 from R3.
Step 10: To accommodate R2 load balancing traffic to 10.0.0.0/24 through both R3 and R4 to R1 we need to alter the advertised distance of the router for 10.0.0.0/24 coming from R3. Because we cannot offset the routes coming from R4 for 10.0.0.0/24 as offset only adds to, you cannot subtract, we must increase the advertised distance of the routes for 10.0.0.0/24 coming from R3. The feasible distance for 10.0.0.0/24 from R3 is 33280 whereas the advertised distance for 10.0.0.0/24 from R4 is 58880. We will offset the routes for 10.0.0.0/24 from R3 by 25600 making the advertised distances for both routes the same.
R2(config)#access-list 1 permit 10.0.0.0 0.0.0.255 ! R2(config)#router eigrp 101 R2(config-router)#offset-list 1 in 25600 fa1/1
Verify the configuration
Now that the configuration is finished lets verify our neighbors and routes. Using the show ip eigrp neighbors, show ip route, and show ip cef commands you can verify the remote routes to which your router has formed and adjacency and verify the expected routes are being advertised. Use the ping command to verify connectivity.
As per the routing table we can confirm there are multiple redundant routes to 10.0.0.0 and 10.6.0.0. Using the show ip route 10.6.0.2 on R1 show ip route 10.0.0.2 on R2 we can further verify the routes are feasible. Use show ip cef 10.6.0.2 and show ip cef 10.0.0.2 to verify Cisco Express Forwarding table. For unequal cost load balancing to occur load must be observed on the line and at least two routes with the same metric, hop count, etc must be installed into the routing table.