Use it when traffic should spread over equal-cost paths but uses only one link.
ECMP
Equal-Cost Multi-Path (ECMP) installs several equal-cost routes to the same destination and spreads flows across them by hashing, which spine-leaf fabrics use to load-balance across all spines.
1. ECMP spreads flows across equal-cost paths.
2. Hashing per flow keeps order.
3. Polarisation can uneven load.
4. Max paths configurable.
5. Check utilisation across links.
equal-cost routes → hash per flow → path
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Step 2 Verification and forwarding interpretation Verify boundary
The forwarding plane normally hashes flows across the installed next-hop set. Equal route metrics are therefore only one prerequisite: the RIB/CEF entry must actually contain the expected paths, adjacency resolution must be valid, and the hash inputs determine which individual flow selects which next hop. ECMP design should preserve symmetric policy/MTU and comparable capacity across paths. Verify every leaf has the expected set of spine adjacencies and that equivalent prefixes install with the intended ECMP next-hop set. Inspect CEF/forwarding entries, interface counters and path diversity rather than relying on routing-neighbor state alone. For east-west flows, compare source and destination leaf reachability, underlay next-hop availability and observed load distribution over time; per-flow hashing can make one flow use a single path even when ECMP is healthy. If an overlay is present, verify VTEP/control-plane state separately from underlay routing so one layer does not falsely show the other.
Step 3 Common mistakes Narrow the fault
- Unequal-cost links breaking ECMP.
- Hash polarisation with identical hashing at every tier.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- ECMP spreads traffic across several equal-cost paths using a hash of packet fields.
- Each flow stays on one path to avoid reordering.
- It gives both load sharing and fast failover.
show ip route <prefix>— multiple equal pathsshow ip cef exact-route <src> <dst>— path for one flowshow ip cef <prefix> detail— load-share buckets
ReferenceImportant terms & boundaries4 sections · depth on demand
In depth
ECMP: using every path at once
Equal-cost multipath (ECMP) lets a router install several next hops for one prefix and share traffic between them. Cisco's MSDC white paper describes leaves and spines load-sharing across equal-cost paths, over Layer 3 leaf-spine links, for east-west and north-south traffic.
How ECMP chooses a path
| Step | Detail |
|---|---|
| Hash | Calculated over header fields (typically source and destination IP, protocol, ports) |
| Select | Hash modulo the number of next hops picks one path |
| Per flow | All packets of a flow take the same path, so no reordering |
ECMP in a spine-leaf fabric
| Hop | Paths |
|---|---|
| Leaf to spine | One per spine (four spines, four paths) |
| Spine to destination leaf | Usually one (direct link) |
| Overlay traffic | VXLAN's UDP source port is derived from the inner headers, giving entropy for the underlay hash |
LEAF101(config)# router bgp 65101
LEAF101(config-router)# address-family ipv4 unicast
LEAF101(config-router-af)# maximum-paths 8
LEAF101(config-router)# bestpath as-path multipath-relax
LEAF101# show ip route 10.102.0.0/24
10.102.0.0/24, ubest/mbest: 4/0
*via 10.1.1.0, [20/0], bgp-65101, external
*via 10.1.2.0, [20/0], bgp-65101, external
*via 10.1.3.0, [20/0], bgp-65101, external
*via 10.1.4.0, [20/0], bgp-65101, external
LEAF101# show routing hash 10.101.0.15 10.102.0.20 ip-proto 6 41000 443
bestpath as-path multipath-relax lets BGP install paths learned from different neighbour ASNs, which multi-AS designs need.
ECMP limits
| Limit | Effect |
|---|---|
| Per-flow hashing | One large flow ("elephant") can't use more than one path |
| Hash polarisation | The same hash at every tier sends flows down the same paths |
| Path count | Platform maximum (often 8, 16, 32 or 64) |
| Failures | A path removal rehashes some flows; resilient hashing limits that |
Dynamic load balancing (white paper)
The white paper notes Layer 3 ECMP Dynamic Load Balancing from NX-OS 10.5(1), supported for RoCEv2 leaf-spine topologies, which adapts path choice to link load rather than only a static hash.
ECMP in campus and WAN
The same idea applies in a routed campus (dual uplinks with OSPF or EIGRP equal costs) and in SD-WAN, where edges install up to four equal-cost overlay paths by default.
Documented example, not captured output.
Quick reference
ECMP (Equal-Cost Multi-Path) lets a router install several equal-cost routes to the same destination and spread traffic across them by hashing flow fields (addresses, ports, protocol). Each flow stays on one path, so packets of a flow are not reordered.
router ospf 1
maximum-paths 8
show ip route 10.60.0.0
show ip cef exact-route 10.20.0.15 10.60.0.10
Documented example, not captured output.
A few very large flows (elephant flows) can make links uneven, because the hash spreads flows, not bytes.
Architecture role and state model
The forwarding plane normally hashes flows across the installed next-hop set. Equal route metrics are therefore only one prerequisite: the RIB/CEF entry must actually contain the expected paths, adjacency resolution must be valid, and the hash inputs determine which individual flow selects which next hop. ECMP design should preserve symmetric policy/MTU and comparable capacity across paths. A spine-leaf fabric is a Clos-style routed topology in which leaf switches provide endpoint or service attachment and each leaf normally reaches every spine through routed links. Spines provide transit across the fabric and should not become endpoint attachment points. The topology is built to create many equal-cost paths and predictable hop count for east-west traffic. Underlay routing and ECMP distribute reachability, while any overlay or endpoint identity system is a separate layer. Physical connectivity, routing adjacency, ECMP installation and overlay state must therefore be interpreted independently.
Failure domains and technical boundaries
The forwarding plane normally hashes flows across the installed next-hop set. Equal route metrics are therefore only one prerequisite: the RIB/CEF entry must actually contain the expected paths, adjacency resolution must be valid, and the hash inputs determine which individual flow selects which next hop. ECMP design should preserve symmetric policy/MTU and comparable capacity across paths. Spine-leaf is not automatically non-blocking, lossless or free of bottlenecks. Oversubscription, failed uplinks, uneven hashing and asymmetric endpoint placement can still concentrate traffic. ECMP does not split every single flow across every path, and equal route count does not guarantee equal byte distribution. A leaf-to-spine adjacency being up does not show all prefixes, MTU-dependent traffic or overlays work. Keep topology symmetry, underlay route state, ECMP forwarding, capacity and overlay/service outcome as separate evidence layers.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration intent
The forwarding plane normally hashes flows across the installed next-hop set. Equal route metrics are therefore only one prerequisite: the RIB/CEF entry must actually contain the expected paths, adjacency resolution must be valid, and the hash inputs determine which individual flow selects which next hop. ECMP design should preserve symmetric policy/MTU and comparable capacity across paths. Build the fabric around symmetry and repeatability. Use consistent point-to-point addressing or unnumbered design, deterministic routing policy, identical MTU expectations and enough spine connectivity that a leaf can lose a path without partitioning the fabric. Keep endpoint VLAN/VRF or overlay functions at the leaf boundary rather than leaking attachment semantics into spines. ECMP should be enabled by equal routing cost and supported hashing, not by static assumptions about one preferred spine. Capacity planning must account for oversubscription, uplink count, failure scenarios and traffic locality rather than only aggregate port speed.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Architecture → Enterprise Network Design → Spine-Leaf → ECMP. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Quick lookup tables
ECMP · architecture reference
Compact architecture role, forwarding and failure-domain reference for fast lookup.
| Evidence | Meaning |
|---|---|
| Equal routing cost | Paths eligible |
| RIB multipath | Multiple control-plane next hops |
| CEF adjacency set | Forwarding paths programmed |
| Interface counters | Observed distribution over time |