In This article I would like to discuss the unequal cost load balancing feature of EIGRP and how to calculate the ratio of traffic that will be sent over each connection.
EIGRP supports load sharing traffic over multiple unequal cost paths based on the composite metric of each path. In working on the CCIE exam it may be a requirement for you to configure both unequal cost load balancing and define the amount of traffic that should be load shared on each path. For instance a question may state ”send 66% of traffic thru the primary path and 33% on the secondary path”. Let’s work thru the process of calculating these ratios.
First and foremost you must know how to calculate the metric of EIGRP. Metric by default (As only K1 and K3 are not 0 by default) is calculated using the following formula:
Using this same formula, if we already know the metric we want to achieve, we can simply change this formula to obtain either the delay or bandwidth needed to achieve a required ratio. To calculate delay and bandwidth we simply change the formula as follows:
Delay:
Or for Bandwidth:
For memories sake you only need to remember the first formula, as the last two are just derivatives of the first. To test this concept let’s work thru a few examples and see what we can do to achieve unequal cost load balancing. We will be using the following topology:
As shown on this topology we have a network on R2, 200.0.0.2/32, that R5 and R6 are learning. We will first work on a requirement on R5.
We want to load share traffic to 200.0.0.2/32 from R5 to R2 using Serial0/1/0 and Serial0/2/0. The requirement is that for every 5 packets sent over Serial0/2/0 1 packet be sent over Serial0/1/0 (or achieve a 5 to 1 ratio). We are given a bandwidth of 100 MB and a delay of 100 microseconds for Serial0/2/0. We are not allowed to change the delay of Serial0/1/0 so we must determine the bandwidth to achieve a ratio of 5 to 1.
With this problem we will be using the bandwidth formula shown above. First we need to find out what the feasible distance is. Let’s look at the EIGRP topology for this route.
R5#show ip eigrp topology 200.0.0.2/32 IP-EIGRP (AS 1001): Topology entry for 200.0.0.2/32 State is Passive, Query origin flag is 1, 1 Successor(s), FD is 156160 Routing Descriptor Blocks: 150.100.25.2 (Serial0/2/0), from 150.100.25.2, Send flag is 0x0 Composite metric is (156160/128256), Route is Internal Vector metric: Minimum bandwidth is 100000 Kbit Total delay is 5100 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 1 150.100.100.2 (Serial0/1/0), from 150.100.100.2, Send flag is 0x0 Composite metric is (2297856/128256), Route is Internal Vector metric: Minimum bandwidth is 1544 Kbit Total delay is 25000 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 1 R5#
When the route is inserted into the routing table on R2 it automatically penalized with a 5 millisecond delay value. This is why we show a 5100 microsecond delay on the Serial0/2/0 interface. We also know the path thru Serial0/1/0 has a delay of 20000 microseconds, or an accumulitive delay of 25000 microseconds. The feasible distance (or lowest metric) for this route is 156160. To get a five to one ratio on this route the higher metric, (less preferred) needs to be five times the feasible distance (5×156160 = 780800).
To calculate the bandwidth Serial0/1/0 must have on R5 we need to plug these values into the formula:
10^7 / ( (780800/256) – (25000/10) ) = 18181.8 Kb
On R5 go into EIGRP 1001 and add the variance as 5 (5 to 1) and put 18182 Kb as the bandwidth on Serial0/1/0. By doing this I should achieve my 5 to 1 ratio.
R5#conf t Enter configuration commands, one per line. End with CNTL/Z. R5(config)#router eigrp 1001 R5(config-router)#variance 5 R5(config-router)#end R5# May 3 19:38:17.423: %SYS-5-CONFIG_I: Configured from console by console R5#show ip route 200.0.0.2 Routing entry for 200.0.0.2/32 Known via "eigrp 1001", distance 90, metric 156160, type internal Redistributing via eigrp 1001 Last update from 150.100.100.2 on Serial0/1/0, 00:00:01 ago Routing Descriptor Blocks: 150.100.100.2, from 150.100.100.2, 00:00:01 ago, via Serial0/1/0 Route metric is 780544, traffic share count is 1 Total delay is 25000 microseconds, minimum bandwidth is 18214 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 1 * 150.100.25.2, from 150.100.25.2, 00:00:01 ago, via Serial0/2/0 Route metric is 156160, traffic share count is 5 Total delay is 5100 microseconds, minimum bandwidth is 100000 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 1 R5#
Notice the traffic share count is exactly 5 to 1 over the two interfaces.
Now let’s move down the line to R6 and work on the next requirement. On R6 we have a requirement to load balance traffic between Fa0/0, Fa0/1, and Serial0/1/0. We should send traffic based on a ratio of 8/4/1; 8 packets on Fa0/0, 4 packets on Fa0/1, and 1 packet on Serial0/1/0. Again we need to start by determining our feasible distance and to begin the process of working thru our calculations.
R6#show ip eigrp topology 1001 200.0.0.2/32 IP-EIGRP (AS 1001): Topology entry for 200.0.0.2/32 State is Passive, Query origin flag is 1, 2 Successor(s), FD is 158720 Routing Descriptor Blocks: 150.100.220.5 (FastEthernet0/0), from 150.100.220.5, Send flag is 0x0 Composite metric is (158720/156160), Route is Internal Vector metric: Minimum bandwidth is 100000 Kbit Total delay is 5200 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 2 150.100.221.5 (FastEthernet0/1), from 150.100.221.5, Send flag is 0x0 Composite metric is (158720/156160), Route is Internal Vector metric: Minimum bandwidth is 100000 Kbit Total delay is 5200 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 2 150.100.100.2 (Serial0/1/0), from 150.100.100.2, Send flag is 0x0 Composite metric is (2297856/128256), Route is Internal Vector metric: Minimum bandwidth is 1544 Kbit Total delay is 25000 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 1 R6#
First let’s get the easier ratio. 8 to 4 is also the same as 1 to 2. Looking at our feasible distance of 158720 the metric for the path thru Fa0/1 would need to be two times this to achieve a 1 to 2 ratio: (2×158720 = 317440). We then need to plug this into our formula to get the value: (We have a delay of 5200 on both Fa0/0 and Fa0/1 and we want to figure out the bandwidth).
10^7 / ( (317440/256) – (5200/10) ) = 13888.8 Kb
OK so that gives us our bandwidth for Fa0/1. In the end we want to have a 8/4/1 ratio between these three paths so on R6 enter o variance of 8 for the routing process. And on Fa0/1 configure the bandwidth as 13889 Kb.
R6#conf t Enter configuration commands, one per line. End with CNTL/Z. R6(config)#router eigrp 1001 R6(config-router)#variance 8 R6(config)#int f0/1 R6(config-if)#band 13889 R6(config-if)#end R6# May 3 19:57:18.079: %SYS-5-CONFIG_I: Configured from console by console R6#show ip route 200.0.0.2 Routing entry for 200.0.0.2/32 Known via "eigrp 1001", distance 90, metric 158720, type internal Redistributing via eigrp 1001, eigrp 6009 Advertised by eigrp 6009 Last update from 150.100.221.5 on FastEthernet0/1, 00:00:06 ago Routing Descriptor Blocks: * 150.100.221.5, from 150.100.221.5, 00:00:06 ago, via FastEthernet0/1 Route metric is 317184, traffic share count is 1 Total delay is 5200 microseconds, minimum bandwidth is 13908 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 2 150.100.220.5, from 150.100.220.5, 00:00:06 ago, via FastEthernet0/0 Route metric is 158720, traffic share count is 2 Total delay is 5200 microseconds, minimum bandwidth is 100000 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 2 R6#
We now have a 1 to 2 ratio for these two paths. Let’s now add the third in. The delay is 25000 and the metric needs to be: (8×158720=1269760). Plug this into the formula Again.
10^7 / ( (1269760/256) – (25000/10) ) = 4065 Kb
R6#conf t Enter configuration commands, one per line. End with CNTL/Z. R6(config)#int s0/1/0 R6(config-if)#band 4065 R6(config-if)#end R6# May 3 20:01:39.759: %SYS-5-CONFIG_I: Configured from console by console R6#clear ip route * R6#show ip route 200.0.0.2 Routing entry for 200.0.0.2/32 Known via "eigrp 1001", distance 90, metric 158720, type internal Redistributing via eigrp 1001, eigrp 6009 Advertised by eigrp 6009 Last update from 150.100.100.2 on Serial0/1/0, 00:00:01 ago Routing Descriptor Blocks: 150.100.221.5, from 150.100.221.5, 00:00:01 ago, via FastEthernet0/1 Route metric is 317184, traffic share count is 4 Total delay is 5200 microseconds, minimum bandwidth is 13908 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 2 * 150.100.220.5, from 150.100.220.5, 00:00:01 ago, via FastEthernet0/0 Route metric is 158720, traffic share count is 8 Total delay is 5200 microseconds, minimum bandwidth is 100000 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 2 150.100.100.2, from 150.100.100.2, 00:00:01 ago, via Serial0/1/0 Route metric is 1269760, traffic share count is 1 Total delay is 25000 microseconds, minimum bandwidth is 4065 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 1 R6#
And there we have it. We have achieved an 8/4/1 ratio for load balancing traffic over these three paths.
Remembering the initial formula and how to convert it I believe is the hardest part of this task. The rest is pretty logical. We just need to have some basic algebra skills.
Regards,
Tyson Scott – CCIE # 13513 (R&S/Security/SP)
Senior Technical Instructor – IPexpert, Inc.
Senior Technical Instructor – IPexpert, Inc.