Equal-cost multipath routing (ECMP) lets a router use multiple routes to the same destination when they were learned through the same routing protocol with identical metrics. The router adds all qualifying routes to its routing table and load-balances traffic across them. section 17.3.2
Route selection happens in stages. Administrative distance compares routes learned from different protocols; the metric compares routes from the same protocol. ECMP applies only after routes reach the same destination network and prefix length, use the same protocol, and have equal metrics. section 17.3.2 section 17.3.3
Two equal OSPF paths
R1 learns two routes to 10.0.0.0/24 through OSPF: one through R2 and one through R4. Both have metric 4, so R1 installs both and distributes traffic across the paths. IOS uses up to four equal-cost routes by default; OSPF can change that limit with maximum-paths number. section 17.3.2 section 18.2.4
ECMP can produce poor results when routing costs hide bandwidth differences. With OSPF's 100-Mbps default reference bandwidth, FastEthernet and GigabitEthernet may receive equal costs, causing traffic to be balanced over links with very different capacities. section 18.1.3
Configure a consistent OSPF reference bandwidth with auto-cost reference-bandwidth mbps so higher-speed links receive distinguishable costs. Apply the same reference bandwidth on every router to maintain consistent route selection. section 18.1.3
Figure 18.4 Although the route to 10.1.3.0/24 via R2 is superior to the route via R4, the OSPF cost of both routes is the same. R1 adds both routes to the routing table and will load-balance over them with ECMP.
Compare two OSPF paths whose equal costs cause R1 to install both and load-balance with ECMP. section 18.1.3
