Equal-Cost Multipath (ECMP) is a routing technique in which a router that has two or more paths of equal cost to the same destination uses all of them at once, instead of picking one and leaving the others idle. Each traffic flow, such as a single connection between two devices, is assigned to one of the paths, so many flows together spread across the available links. ECMP is supported by common routing protocols such as OSPF and BGP, and it is widely used in data centers, provider backbones and enterprise WANs.
At a glance
- ECMP lets a router use several equal-cost paths to the same destination at the same time.
- Traffic is split per flow, usually by hashing addresses and ports, so packets in one flow stay in order.
- A single large flow uses one path; the benefit comes from many flows together.
- If one path fails, its flows move to the remaining paths once routing updates.
- It is a routing feature, built into many routers and switches rather than sold as a separate product.
What problem it solves
Without ECMP, a router that learns two equally good paths to the same place installs one and keeps the other as a standby. That wastes capacity: a business paying for two links, or a data center with several uplinks, ends up using only part of what it has. Upgrading a single link to a much bigger one can be expensive or not available.
ECMP puts the parallel paths to work. Several smaller links can carry traffic together, adding capacity and spreading load, and the loss of one link reduces capacity instead of forcing a full failover. In modern data center designs, ECMP across many switch uplinks is a standard way to build large, resilient networks from smaller building blocks.
How it works
Equal cost. The routing protocol calculates a cost or preference for each path. When two or more paths to a destination tie, the router installs all of them, up to a hardware limit on the number of paths.
Hashing flows. For each packet, the router computes a hash, typically from the source and destination IP addresses, protocol and ports, and uses it to choose a path. Packets in the same flow get the same hash and take the same path, which keeps them in order.
Uneven results. Because the split is by flow, a few large flows, such as backups or replication, can land on the same path while another is lightly used. Some platforms offer more advanced hashing or flow rebalancing to reduce this.
Failure handling. When a path goes down, routing removes it and flows are redistributed across the remaining ones. How quickly depends on how fast the routing protocol detects the failure.
Weighted variants. Some equipment supports unequal-cost or weighted multipath, sending proportionally more traffic over larger links.
For WAN designs that combine several circuits, see our SD-WAN solution page.
When it matters for buyers
- Two circuits to the same place. If you buy two links between sites or to one provider, ask whether both will carry traffic or one will sit idle as backup.
- Data center and cloud designs. Leaf-and-spine networks and multiple cloud interconnects often rely on ECMP for capacity and redundancy.
- Large transfers. Backups and replication jobs may not get faster with more links, since each flow stays on one path.
- Troubleshooting. Intermittent problems that affect some users or connections but not others can come from one faulty path in an ECMP group.
Questions to ask vendors
- Will traffic be spread across all our links, or will some act only as standby?
- How is traffic hashed across paths, and can the hashing be tuned?
- How many equal-cost paths does the equipment support?
- What happens to active sessions when one path fails, and how fast is it detected?
- Is weighted or unequal-cost balancing available if our links differ in size?
- How will we see per-path utilization and errors?
How it differs from a load balancer
A load balancer distributes requests across a pool of servers for an application, often checking server health and making decisions based on the application traffic itself. ECMP distributes network flows across several routing paths, based on packet headers, without knowing anything about the applications. They often work together: ECMP can spread traffic across several load balancers, and the load balancers then spread it across servers. Similarly, SD-WAN path selection steers traffic by application and measured link quality, which goes beyond ECMP’s equal-cost split.
