1. Introduction
Equal Cost Multi-Path (ECMP) is a routing technique that allows a router to use multiple paths to the same destination when they all have the same cost. Instead of keeping only one route, the router installs every equal-cost path into the routing table and shares the traffic between them.
To understand this concept, let’s use the following OSPF topology where every router advertises its directly connected networks.
Figure 1 – OSPF equal-cost paths from R1 to reach 192.168.2.0/24
In this case, R1 can reach the destination 192.168.2.0/24 using two different paths:
R1 → R2 → R4
R1 → R3 → R4
2. Route Selection Process
Before ECMP is applied, routers follow a strict order when selecting routes:
Prefix Length – The longest prefix match is always preferred. Example: a /24 is preferred over a /16.
Administrative Distance (AD) – If multiple routing protocols advertise the same prefix, the one with the lowest AD is selected. Example: OSPF (AD = 110) is preferred over RIP (AD = 120).
Metric – If the routes come from the same protocol and have the same AD, the lowest metric wins. Example: in OSPF, the cost is based on the bandwidth of the links.
Equal Cost – If multiple routes have the same prefix, the same AD, and the same metric, they are all installed → ECMP is applied.
3. How ECMP Works
Now let’s go back to our topology.
Since R1 learns two equal-cost routes to reach 192.168.2.0/24 through OSPF. Both routes have AD = 110 and a metric = 3, since they follow the route selection process, ECMP can be applied here and both routes can installed simultaneously in the routing table.
Figure 2 – Equal-cost OSPF routes to 192.168.2.0/24
We can confirm this by looking at the routing table:
R1# show ip route
Gateway of last resort is not set
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0
O 192.168.2.0/24 [110/3] via 192.168.10.2, 00:05:54, GigabitEthernet0/1
[110/3] via 192.168.20.2, 00:05:54, GigabitEthernet0/2
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
//output ommited
R1 can now use 2 different next hops to send traffic to 192.168.2.0/24.
Thanks to ECMP, the traffic is now load-balanced across the two paths, allowing R1 to make better use of the available bandwidth and distribute the load.
Figure 3 – ECMP applied: both OSPF routes installed in the routing table
All IGPs (RIP, OSPF, IS-IS) and static routes support ECMP by default.
EIGRP can also perform ECMP, but it requires the use of the variance command, which is outside the CCNA scope.
On Cisco IOS, up to 4 equal-cost routes can be installed by default (this can be increased on some platforms using the maximum-paths
command).
4. Conclusion
Equal Cost Multi-Path (ECMP) is a fundamental routing feature.
When multiple paths have the same prefix, administrative distance, and metric, they are all installed in the routing table and used simultaneously.
This provides two main benefits:
Traffic load is distributed across multiple paths.
Available bandwidth is better utilized, making the network more efficient.
At the CCNA level, remember:
Routers can use ECMP with IGPs such as RIP, OSPF, IS-IS, as well as with static routes.