ECMP and CEF load sharing: per-destination, per-packet and why one flow uses one link
In short: When a router has several equal-cost routes to the same destination it can use all of them. CEF chooses a path per flow by hashing addresses (and optionally ports), so packets of one conversation stay in order on one path. This shares load across many flows but means a single large transfer only ever uses one link.
Several best routes
If OSPF finds two paths to 10.50.0.0/16 with exactly the same cost, it installs both. This is equal-cost multipath (ECMP). The default limit is usually four paths in IOS, and you can raise it with maximum-paths under the routing process (up to 16 or 32 depending on the platform). BGP installs only one path by default, so it needs maximum-paths configured explicitly. EIGRP can even use unequal-cost paths with the variance command.
Per-destination (per-flow) sharing
CEF's default is per-destination load sharing, which in practice means per flow. For each packet, the router hashes the source and destination IP addresses (and on many platforms the Layer 4 ports, with ip cef load-sharing algorithm include-ports source destination) together with a per-router unique ID. The result points to one of 16 hash buckets, each tied to a path. Every packet in the same flow produces the same hash, so it always goes the same way.
This keeps packets in order, which matters a lot for TCP: out-of-order packets look like loss and make TCP slow down.
Per-packet sharing
With ip load-sharing per-packet on an interface, the router sends packets in turn across the paths. Load is perfectly even, but packets of one flow arrive out of order whenever the paths have slightly different delays. Voice and TCP suffer. It is almost never recommended today.
The catch: one flow, one link
Because each flow sticks to one path, a single big file transfer or backup between two servers can only use one link, however many paths exist. Two 10 Gbps paths do not make one 20 Gbps transfer. Many small flows (users browsing, many servers talking) spread well; a few large "elephant" flows can leave one link full and another nearly empty.
Polarisation
If every router in a chain uses the same hash inputs, flows that went left at the first router all go left again at the next one, leaving some links unused. This is called CEF polarisation. The unique ID that modern IOS adds to the hash (the "universal" algorithm) avoids it, and the fast convergence note covers it in more depth.
Checking it
show ip route 10.50.0.0: lists every installed path and the traffic share count.show ip cef 10.50.0.0 internal: shows the hash buckets and which path each uses.show ip cef exact-route 10.10.1.5 10.50.1.20: tells you the exact path a flow between these two addresses will take.
Real-world example: the slow backup
A company upgraded its data centre interconnect from one 10 Gbps link to two, expecting nightly backups to finish twice as fast. They did not change at all. The backup used a single TCP session between two servers, so the hash put it on one link every night. Splitting the backup job into eight parallel streams, each with different source ports, spread it across both links and halved the backup window.
Practice
Why does CEF use per-flow rather than per-packet load sharing by default?
Why can a single large file transfer not use two equal-cost links at once?
Which BGP command is needed to install more than one equal path?
maximum-paths under the BGP address family.Key takeaways
- ECMP installs several equal-cost routes and shares load across them.
- CEF hashes each flow to one path, keeping packets in order.
- Per-packet sharing balances perfectly but reorders packets.
- One flow uses one link; spread large jobs across several flows.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.