Equal-cost multipath routing (ECMP)

The ECMP feature allows the switch to add routes with multiple next-hop addresses and with equal costs to a given destination in the forwarding information base (FIB) on the routing switch. For example, if multiple, equal-cost, next-hop routes exist on a routing switch for a destination in a network with the prefix 2540:e::/64, these routes would appear similar to the following in the IPv6 Route Entries Table:

The show ipv6 route command with multiple next-hop routes

Multiple next-hop gateway addresses are displayed for the destination network 2540:a::/64

Switch(config)# show ipv6 route

               IPv6 Route Entries

Destination : ::1/128
Gateway : lo0
Type: connected  Sub–Type: NA         Distance: 0    Metric: 1

Destination : 2540:c::/64
Gateway : 2540:e::55:2
Type: static     Sub–Type: NA         Distance: 200  Metric: 1

Destination : 2540:a::/64
Gateway : fe80::22:3%vlan22

Destination : 2540:a::/64
Gateway : fe80::22:5%vlan22

Destination : 2540:a::/64
Gateway : fe80::22:11%vlan22

Multiple ECMP next-hop routes cannot be a mixture of intra-area, interarea, and external routes. In the above example, the multiple next-hop routes to network 2540:a::/64 are all interarea.

Also, according to the distributed algorithm used in the selection of ECMP next-hop routes:
  • Intra-area routes are preferred to interarea routes.

  • Interarea routes are preferred to external routes through a neighboring autonomous system (AS).

In addition, ECMP ensures that all traffic forwarded to a given host address follows the same path, which is selected from the possible next-hop routes.

ECMP load-sharing does not affect routed traffic to different hosts on the same subnet. That is, all traffic for different hosts on the same subnet will go through the same next-hop router. For example, if subnet 2001:db8:0:1f::/64 includes two servers at 2001:db8:0:1f::1ab.101 and 2001:db8:0:1f::1ab.93, all traffic from router "A" to these servers will go through the same next-hop router.

Syntax:

ip load-sharing <2–4>

no ip load-sharing <2–4>

The no form of the command disables this load-sharing so that only one route in a group of multiple, equal-cost, next-hop routes is used for traffic that could otherwise be load-shared across multiple routes.

NOTE:

Disabling load-sharing means that router "1" selects only one next-hop router for traffic that is actually eligible for load-sharing through different next-hop routers.

In the default configuration, load-sharing is enabled by default for both IPv4 and IPv6.

<2–4> : Specifies the maximum number of equal-cost next-hop paths the router allows. (Default: 4; Range: 2–4)