Equal and Unequal Cost Traffic Distribution in EIGRP

Equal and Unequal Cost Traffic Distribution in EIGRP

Introduction

Within this article, we will look at equal cost and unequal cost traffic distribution in EIGRP.

Note: This article is written based upon Cisco IOS 15.x.

ECMP - Equal Cost

Out of the box, EIGRP provides ECMP, which can also be configured via the maximum-path command.

Via the show ip protocols command, we can view the maximum-paths EIGRP will use,

R1#show ip protocols  | section eigrp    
Routing Protocol is "eigrp 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Default networks flagged in outgoing updates
  Default networks accepted from incoming updates
  EIGRP-IPv4 Protocol for AS(1)
    Metric weight K1=1, K2=0, K3=1, K4=0, K5=0
    Soft SIA disabled
    NSF-aware route hold timer is 240
    Router-ID: 1.1.1.1
    Topology : 0 (base) 
      Active Timer: 3 min
      Distance: internal 90 external 170
      *Maximum path: 4*
      Maximum hopcount 100
      Maximum metric variance 1

Variance - Unequal Cost

The variance option of EIGRP provides a method for balancing traffic over non-equal cost paths, more specifically:

"Allows EIGRP to load-balance across a networks successor router and one or more feasible successor routes."[1]

The variance value is based on the following logic: Include any routes with a Feasible distance less than n times that of the successor routes feasible distance.

For example, say we have the following 3 routes:

R2#show ip eigrp topology 
EIGRP-IPv4 Topology Table for AS(1)/ID(192.168.0.3)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 10.0.0.12/30, 2 successors, FD is 3072
        via 10.0.0.17 (102072/2816), GigabitEthernet0/1 //Route A
        via 10.0.0.22 (113922/2816), GigabitEthernet0/2 //Route B
        via 10.0.0.22 (267922/2816), GigabitEthernet0/3 //Route C

Our successor is the route with an FD of 102072.

  • Variance = 2. 102072 * 2 = 204144 ; Include route A and B.
  • Variance = 3. 102072 * 2 = 306216 ; Include route A,B and C

To configure the variance command, you simply use the command variance. Like so,

router eigrp 1
  variance 2

CEF Caveat

When it comes to the balancing algorithm. There is a caveat,

"By default, CEF uses per-destination load balancing. If it is enabled on an interface, per-destination load balancing forwards packets based on the path to reach the destination. If two or more parallel paths exist for a destination, CEF takes the same path (single path) and avoids the parallel paths. This is a result of the default behavior of CEF. CEF takes the single path in cases when load sharing is done simultaneously on interfaces of different physical types, such as serial and tunnel. The hash algorithm determines the path to be chosen. In order to utilize all the parallel paths in CEF and load balance the traffic, you must enable per-packet load balancing when you have different physical interfaces like serial and tunnel. So, on the basis of the configuration and topology (serial or tunnel), load sharing can fail to work correctly with the default CEF load balancing mode."[2]

However, in the event of the routes using the same physical interface, the default balancing method can be updated to include the Layer4 ports within its hashing function. Like so,

ip cef load-sharing algorithm include-ports source

This is especially useful when dealing with VXLAN overlays, based on the VXLAN Frame Format as per RFC 7348:

"5. VXLAN Frame Format
...
Source Port:
It is recommended that the UDP source port number be calculated using a hash of fields from the inner packet one example being a hash of the inner Ethernet frame's headers.
This is to enable a level of entropy for the ECMP/load-balancing of the VM-to-VM traffic across the VXLAN overlay.
When calculating the UDP source port number in this manner, it is RECOMMENDED that the value be in the dynamic/private port range 49152-65535 [RFC6335]."[3]

https://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/13677-19.html

References


  1. "Safari Books Online." https://www.safaribooksonline.com/. Accessed 4 May. 2018. ↩︎

  2. "(Variance) Work in IGRP and EIGRP? - Cisco." 3 Jun. 2009, https://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/13677-19.html. Accessed 4 May. 2018. ↩︎

  3. "RFC 7348 - Virtual eXtensible Local Area Network ... - IETF Tools." https://tools.ietf.org/html/rfc7348. Accessed 4 May. 2018. ↩︎

Subscribe to our newsletter and stay updated.

Don't miss anything. Get all the latest posts delivered straight to your inbox.
Great! Check your inbox and click the link to confirm your subscription.
Error! Please enter a valid email address!