Routing Configuration 97
Using Equal Cost Multipath
The equal cost multipath (ECMP) feature allows a router to use more than one next hop to forward
packets to a given destination prefix. It can be used to promote a more optimal use of network resources
and bandwidth.
A router that does not use ECMP forwards all packets to a given destination through a single next hop.
This next hop may be chosen from among several next hops that provide equally good routes to the
destination. For example, in Figure 4-7, Router A sends all traffic to destinations in Network D through
next hop NH1, even though the route through NH2 is equally good. Forwarding all traffic via NH1 may
cause Link A to be overloaded while Link B is not used at all.
Figure 4-7. Forwarding Without ECMP
With ECMP, Router A can forward traffic to some destinations in Network D via Link A and traffic to
other destinations in Network D via Link B, thereby taking advantage of the bandwidth of both links. A
hash algorithm is applied to the destination IP addresses to provide a mechanism for selecting among the
available ECMP paths.
ECMP routes may be configured statically or learned dynamically. If a user configures multiple static
routes to the same destination but with different next hops, then those routes will be treated as a single
route with two next hops. For example, given the network in Figure 4-8, if the user configures the
following two static routes on Router A, the routing table will contain a single route to 20.0.0.0/8:
Figure 4-8. Next Hop with Two Static Routes