Configuring Equal-Cost Multipath Load Sharing
Equal-cost multipath (ECMP) sets are formed when the router finds routing table entries for the same destination with equal cost. The router then balances traffic across these sets of equal-cost paths by using hashed mode.
Hashed Mode
Hashed mode uses hashing of source and destination addresses to determine which of the available paths in the ECMP set to use. Hashed mode is the default ECMP mode of operation.
Defining Maximum Paths
You can add routing table entries manually (as static routes), or they are formed as routers discover their neighbors and exchange routing tables (via OSPF, BGP, and other routing protocols).
The maximum paths command controls the maximum number of parallel routes that the routing protocol (BGP, IS-IS, OSPF, or RIP) can support.
maximum-paths
- Use to control the maximum number of parallel routes that the routing protocol supports.
- The maximum number of routes can be in the range 116 for BGP, IS-IS, OSPF, or RIP.
- Example
host1(config-router)#maximum-paths 2Use the no version to restore the default value, 1 for BGP or 4 for IS-IS, OSPF, or RIP. Fast Reroute Protection
If a link goes down, ECMP uses fast reroute protection to shift packet forwarding to use operational links, thereby decreasing packet loss. Fast reroute protection updates ECMP sets for the interface without having to wait for the route table update process. When the next route table update occurs, a new ECMP set can be added with fewer links or the route might point to a single next hop.