Equal-cost multipath (ECMP) routing is a forwarding mechanism that uses multiple equal-cost next hops to reach a destination. By default, the forwarding hardware represents all next hops connected to the same border leaf switch as one ECMP path.
-
The forwarding hardware treats all next hops connected to the same border leaf switch as one ECMP path.
-
Border Gateway Protocol (BGP) redistributes recursive next hops. The local border leaf switch handles directly connected next hops.
ECMP path distribution and optimization
In Cisco Application Centric Infrastructure (ACI), the forwarding hardware represents all next hops connected to the same border leaf switch as one ECMP path. Cisco ACI redistributes ECMP paths into BGP for recursive next hops but not for directly connected next hops.
The following example shows the ECMP path distribution for the 10.1.1.0/24 route before you enable the next-hop propagate and redistribute attached host features:
10.1.1.0/24
through 192.168.1.1 (border leaf switch 1) -> ECMP path 1
through 192.168.1.2 (border leaf switch 1) -> ECMP path 1
through 192.168.1.3 (border leaf switch 1) -> ECMP path 1
through 192.168.1.4 (border leaf switch 2) -> ECMP path 2
-
ECMP path 1: Approximately 50% of the traffic for next hops 192.168.1.1, 192.168.1.2, and 192.168.1.3
-
ECMP path 2: Approximately 50% of the traffic for next hop 192.168.1.4
Note
The percentage of traffic assigned to each next hop by the hashing algorithm is approximate. The actual percentage can vary.
On a nonborder leaf switch, this route entry creates two ECMP paths, one to each border leaf switch. If the next hops are not distributed evenly across the border leaf switches that advertise the route, this behavior can cause uneven load balancing between the border leaf switches.
Beginning with Cisco ACI Release 6.0(2), you can enable the next-hop propagate and redistribute attached host features to prevent suboptimal routing in the Cisco ACI fabric. When these features are enabled, a nonborder leaf switch forwards packet flows directly to the leaf switch connected to the next-hop address. The forwarding hardware uses all next hops for ECMP forwarding. In addition, Cisco ACI redistributes ECMP paths into BGP for directly connected and recursive next hops.
The following example shows the ECMP path distribution for the 10.1.1.0/24 route after you enable the next-hop propagate and redistribute attached host features:
10.1.1.0/24
through 192.168.1.1 (border leaf switch 1) -> ECMP path 1
through 192.168.1.2 (border leaf switch 1) -> ECMP path 2
through 192.168.1.3 (border leaf switch 1) -> ECMP path 3
through 192.168.1.4 (border leaf switch 2) -> ECMP path 4
-
ECMP path 1: Approximately 25% of the traffic for next hop 192.168.1.1
-
ECMP path 2: Approximately 25% of the traffic for next hop 192.168.1.2
-
ECMP path 3: Approximately 25% of the traffic for next hop 192.168.1.3
-
ECMP path 4: Approximately 25% of the traffic for next hop 192.168.1.4