Equal-cost multi-path routing

The ECMP feature allows OSPFv3 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 2620:e::/64, these routes would appear similar to the following in the IPv6 Route Entries Table:

show ipv6 route command output with multiple next-hop routes

Switch(config)# show ipv6 route

IPv6 Route Entries

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

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

Destination : 2620:a::/64
Gateway : fe80::22:3%vlan22
Type: ospf3      Sub-Type: InterArea  Distance: 110 1
Metric: 2

Destination : 2620:a::/64
Gateway : fe80::22:5%vlan22
Type: ospf3      Sub-Type: InterArea  Distance: 110  Metric: 2

Destination : 2620:a::/64
Gateway : fe80::22:11%vlan22
Type: ospf3      Sub-Type: InterArea  Distance: 110  Metric: 2

Destination : 2620:b::/64
Gateway : VLAN22
Type: connected  Sub-Type: NA         Distance: 0    Metric: 1

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

For a given destination network in an OSPFv3 domain, multiple ECMP next-hop routes can be one of the following types.
  • Intra-area (routes to the destination in the same OSPFv3 area)

  • Inter-area (routes to the destination through another OSPFv3 area)

  • External (routes to the destination through another autonomous system)

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

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

  • Inter-area routes are preferred to external routes through a neighboring 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.