Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

ECMP

Direct answer

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.

When to use this

Use it when traffic should spread over equal-cost paths but uses only one link.

First 30 seconds

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.

Operational verification

equal-cost routes → hash per flow → path

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · Cisco IOS XE
Scope / prerequisiteUse it when traffic should spread over equal-cost paths but uses only one link.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

For multi-device behavior, enumerate every expected peer, path, route target, member, VLAN, tunnel endpoint, controller node or next hop rather than accepting one healthy instance as closure. Where ECMP or redundancy exists, verify path diversity and failure behavior as well as steady state.

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 references

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.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points
  • 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.
Key checks
  • show ip route <prefix> — multiple equal paths
  • show ip cef exact-route <src> <dst> — path for one flow
  • show 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

StepDetail
HashCalculated over header fields (typically source and destination IP, protocol, ports)
SelectHash modulo the number of next hops picks one path
Per flowAll packets of a flow take the same path, so no reordering

ECMP in a spine-leaf fabric

HopPaths
Leaf to spineOne per spine (four spines, four paths)
Spine to destination leafUsually one (direct link)
Overlay trafficVXLAN'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

LimitEffect
Per-flow hashingOne large flow ("elephant") can't use more than one path
Hash polarisationThe same hash at every tier sends flows down the same paths
Path countPlatform maximum (often 8, 16, 32 or 64)
FailuresA 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

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%
Embedded reference data

Quick lookup tables

ECMP · architecture reference

Compact architecture role, forwarding and failure-domain reference for fast lookup.

EvidenceMeaning
Equal routing costPaths eligible
RIB multipathMultiple control-plane next hops
CEF adjacency setForwarding paths programmed
Interface countersObserved distribution over time
Confirmation

Confirm action

Continue?