11-14-2008 12:17 PM - edited 03-04-2019 12:20 AM
If you have two links running EIGRP, and are unequal cost, how does CEF load balance when using per-destination-sharing? I think that with per-packet-sharing, the answer is more obvious.
And how does this change when you add a third unequal cost link?
11-14-2008 01:09 PM
Michael,
The CEF load-balancing is always per destination (really per flow) by default.
With eigrp unequal cost path, CEF will assign a number of buckets that is inversely proportional to the metric ratio. So if the metric is twice for one of the path it will get half the number of buckets that the other path gets. Remember that this is based on 16 buckets so will not always be as expected.
Here's an example:
r1#sh ip ro 2.0.0.0 255.0.0.0
Routing entry for 2.0.0.0/8
Known via "eigrp 1", distance 90, metric 409600, type internal
Redistributing via eigrp 1
Last update from 192.168.21.2 on Ethernet0/0, 00:00:23 ago
Routing Descriptor Blocks:
192.168.21.2, from 192.168.21.2, 00:00:23 ago, via Ethernet0/0
Route metric is 409600, traffic share count is 2
Total delay is 6000 microseconds, minimum bandwidth is 10000 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
* 192.168.12.2, from 192.168.12.2, 00:00:23 ago, via Ethernet1/0
Route metric is 819200, traffic share count is 1
Total delay is 12000 microseconds, minimum bandwidth is 5000 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
r1#sh ip cef 2.0.0.0 int
2.0.0.0/8, epoch 0, RIB[I], refcount 5, per-destination sharing
sources: RIB
feature space:
LFD: 2.0.0.0/8 1 local label
local label info: global/16
contains path extension list
disposition chain 0x03C25198
IPRM: 0x00038000
ifnums:
Ethernet0/0(2): 192.168.21.2
Ethernet1/0(6): 192.168.12.2
path 03C42F50, path list 03C390D8, share 1/1, type attached nexthop, for IPv4
MPLS short path extensions: MOI flags = 0x0 label none
nexthop 192.168.12.2 Ethernet1/0, adjacency IP adj out of Ethernet1/0, addr 192.168.12.2 0448F370
path 03C42FC8, path list 03C390D8, share 2/2, type attached nexthop, for IPv4
nexthop 192.168.21.2 Ethernet0/0, adjacency IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
output chain:
loadinfo 03C25258, per-session, 2 choices, flags 0003, 5 locks
flags: Per-session, for-rx-IPv4
15 hash buckets
< 0 > IP adj out of Ethernet1/0, addr 192.168.12.2 0448F370
< 1 > IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
< 2 > IP adj out of Ethernet1/0, addr 192.168.12.2 0448F370
< 3 > IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
< 4 > IP adj out of Ethernet1/0, addr 192.168.12.2 0448F370
< 5 > IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
< 6 > IP adj out of Ethernet1/0, addr 192.168.12.2 0448F370
< 7 > IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
< 8 > IP adj out of Ethernet1/0, addr 192.168.12.2 0448F370
< 9 > IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
<10 > IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
<11 > IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
<12 > IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
<13 > IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
<14 > IP adj out of Ethernet0/0, addr 192.168.21.2 0448F218
Subblocks:
None
r1#
Regards
11-14-2008 01:16 PM
So each flow takes up one bucket?
Thanks
Mike
11-14-2008 01:21 PM
Mike,
The hash algorithm is performed on the src+dst IP addresses and it results in one of the 16 buckets.
Regards
11-14-2008 01:53 PM
It used to be that the load-balancing would always happen over 16 buckets, which was kind of awkward if the number of paths didn't fit nicely in that number of buckets (i.e. 3 path over 16 buckets, where one path gets 4 buckets and the other paths just 3). We now adjust the number of buckets. That is why if you look at the example I provided, we only use 15 buckets (2 path, one with a ratio of 2 and the other with a ratio of 1), which results in a more proportional load-balancing.
Regards,
11-14-2008 01:33 PM
Info taken from Cisco page @http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094cb7.shtml#loadbalancing
EIGRP puts up to four routes of equal cost in the routing table, which the router then load-balances. The type of load balancing (per packet or per destination) depends on the type of switching being done in the router. EIGRP, however, can also load-balance over unequal cost links.
Note: Using max-paths, you can configure EIGRP to use up to six routes of equal cost.
Let us say there are four paths to a given destination, and the metrics for these paths are:
path 1: 1100
path 2: 1100
path 3: 2000
path 4: 4000
The router, by default, places traffic on both path 1 and 2. Using EIGRP, you can use the variance command to instruct the router to also place traffic on paths 3 and 4. The variance is a multiplier: traffic will be placed on any link that has a metric less than the best path multiplied by the variance. To load balance over paths 1, 2, and 3, use variance 2, because 1100 x 2 = 2200, which is greater than the metric through path 3. Similarly, to also add path 4, issue variance 4 under the router eigrp command. Refer to How Does Unequal Cost Path Load Balancing (Variance) Work in IGRP and EIGRP? for more information.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide