↓ Skip to main content
  1. Network Articles/
  2. IS-IS Articles/

IS-IS ECMP (Equal-Cost Multipath)

Table of Contents

IS-IS ECMP (Equal-Cost Multipath)

When several paths to the same destination have the same cost, IS-IS does not pick one of them: it installs the whole set in the routing table. This is ECMP, and it works by default with no extra configuration.

This article looks at how many paths can be installed, which paths survive when that limit is reached, and how packets are spread per destination, using a lab with six equal-cost paths.

The standard defines how equal-cost paths are handled

In the Decision Process of ISO/IEC 10589:2002 (second edition), each destination carries a set of adjacencies that lead to it (7.2.6, Annex C.2.1). Annex C.2 states that the original SPF algorithm does not support load splitting, whereas the algorithm in the standard permits it by identifying a set of equal-cost paths per destination.

The size of that set is bounded by the management parameter maximumPathSplits, whose default in the standard is 2, with a range of 1 to 32. Anything beyond the limit is pruned in the order given in 7.2.7. The precedence is fully deterministic so that implementations reach the same result.

OrderCriterion
1Adjacency type (End system / reachable address prefix adjacencies are kept first)
2Lower metric sum
3Lower neighbour ID
4Lower circuit ID
5Lower LAN address

Computing equal-cost paths is itself an optional capability in the conformance table (A.5.4). What is mandatory is computing a single minimum cost path for each supported metric; ECMP sits on top of that as an option.

IOS XR installs up to 8 by default

In IOS XR, maximum-paths is configured under the address family. The default is 8 and the range is 1 to 64 (ECMP was extended from 32 to 64 in IOS XR 5.3.0). Since that is larger than the standard’s default of 2, a topology with six equal-cost paths installs all six with no configuration at all.

ItemISO/IEC 10589:2002IOS XR
ParametermaximumPathSplitsmaximum-paths
Default28
Range1-321-64
Configuring maximum-paths (IOS XR)
router isis 1
 address-family ipv4 unicast
  maximum-paths 4

The limit applies to what gets installed in the routing table, not to the result of the SPF calculation. show isis topology lists every adjacency that reaches a given router regardless of the limit, while the limit shows up as the number of lines per prefix in show route isis.

Furthermore, in IS-IS on IOS XR, which paths survive the limit differs from prefix to prefix. Even with maximum-paths 1, traffic leaving the router does not collapse onto a single link: prefixes with different destinations land on different links. Other protocols with a maximum-paths command of their own do not necessarily behave the same way.

Forwarding is spread per destination

Several exits in the routing table do not mean packets are dealt out one by one. Packets of one flow taking different paths would arrive out of order, so the exit is chosen from a value computed over fields such as the source and destination addresses. show cef exact-route <source> <destination> reveals that choice without sending any traffic.

Lab setup

Lab: six equal-cost paths from R1 to R8 through P1-P6

All eight routers are level-2-only in area 49.0001 with metric-style wide, and every link is point-to-point.

ItemValue
PathsSix paths R1 - P1..P6 - R8. Every link has metric 10, so each path costs 20
DestinationsLoopback1-8 on R8 (192.168.8.1-.8/32), all passive and advertised into IS-IS
Observationping / traceroute from R1 to the eight destinations, show route isis / show cef exact-route on R1, input counters on P1-P6

The software is XRd 26.1.1. In every STEP the counters are cleared first, then ping is run, and show is collected last.

Overview of the STEPs

STEPActionWhat it shows
0Initial state (defaults)Whether all six equal-cost paths are installed, and which link each of the eight destinations takes
1maximum-paths 4 on R1The count drops to 4. Which combination survives per prefix
2maximum-paths 2 on R1The count drops to 2, with different survivors per prefix
3maximum-paths 1 on R1Only one path per prefix, yet several links are still in use device-wide
4maximum-paths removedBack to the default, six paths again
5metric 20 on both ends of R1-P6The path through P6 costs 30 and is no longer installed
6metric back to 10 (final state)Six paths again

The sections below are grouped by what they show rather than by STEP order.

STEP 0: all six paths are installed by default

This is R1’s routing table with no maximum-paths configured. R8’s loopbacks (192.168.8.1-.8) and its Lo0 (8.8.8.8) each carry six exits.

STEP 0: show route isis on R1
RP/0/RP0/CPU0:R1#show route isis
Sun Sep 27 13:14:48.622 UTC

i L2 2.2.2.2/32 [115/10] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
i L2 3.3.3.3/32 [115/10] via 10.0.12.3, 00:08:29, GigabitEthernet0/0/0/1
i L2 4.4.4.4/32 [115/10] via 10.0.13.4, 00:08:24, GigabitEthernet0/0/0/2
i L2 5.5.5.5/32 [115/10] via 10.0.14.5, 00:08:12, GigabitEthernet0/0/0/3
i L2 6.6.6.6/32 [115/10] via 10.0.15.6, 00:08:07, GigabitEthernet0/0/0/4
i L2 7.7.7.7/32 [115/10] via 10.0.16.7, 00:07:57, GigabitEthernet0/0/0/5
i L2 8.8.8.8/32 [115/20] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
                [115/20] via 10.0.12.3, 00:07:31, GigabitEthernet0/0/0/1
                [115/20] via 10.0.13.4, 00:07:31, GigabitEthernet0/0/0/2
                [115/20] via 10.0.14.5, 00:07:31, GigabitEthernet0/0/0/3
                [115/20] via 10.0.15.6, 00:07:31, GigabitEthernet0/0/0/4
                [115/20] via 10.0.16.7, 00:07:31, GigabitEthernet0/0/0/5
i L2 10.0.81.0/24 [115/20] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
i L2 10.0.82.0/24 [115/20] via 10.0.12.3, 00:08:29, GigabitEthernet0/0/0/1
i L2 10.0.83.0/24 [115/20] via 10.0.13.4, 00:08:24, GigabitEthernet0/0/0/2
i L2 10.0.84.0/24 [115/20] via 10.0.14.5, 00:08:12, GigabitEthernet0/0/0/3
i L2 10.0.85.0/24 [115/20] via 10.0.15.6, 00:08:07, GigabitEthernet0/0/0/4
i L2 10.0.86.0/24 [115/20] via 10.0.16.7, 00:07:57, GigabitEthernet0/0/0/5
i L2 192.168.8.1/32 [115/20] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:07:31, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:07:31, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:07:31, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:07:31, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:07:31, GigabitEthernet0/0/0/5
i L2 192.168.8.2/32 [115/20] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:07:31, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:07:31, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:07:31, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:07:31, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:07:31, GigabitEthernet0/0/0/5
i L2 192.168.8.3/32 [115/20] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:07:31, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:07:31, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:07:31, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:07:31, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:07:31, GigabitEthernet0/0/0/5
i L2 192.168.8.4/32 [115/20] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:07:31, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:07:31, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:07:31, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:07:31, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:07:31, GigabitEthernet0/0/0/5
i L2 192.168.8.5/32 [115/20] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:07:31, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:07:31, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:07:31, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:07:31, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:07:31, GigabitEthernet0/0/0/5
i L2 192.168.8.6/32 [115/20] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:07:31, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:07:31, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:07:31, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:07:31, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:07:31, GigabitEthernet0/0/0/5
i L2 192.168.8.7/32 [115/20] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:07:31, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:07:31, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:07:31, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:07:31, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:07:31, GigabitEthernet0/0/0/5
i L2 192.168.8.8/32 [115/20] via 10.0.11.2, 00:07:31, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:07:31, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:07:31, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:07:31, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:07:31, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:07:31, GigabitEthernet0/0/0/5

The SPF result appears in show isis topology. Six adjacencies reach R8, from P6 down to P1, all with metric 20.

STEP 0: show isis topology on R1
RP/0/RP0/CPU0:R1#show isis topology
Sun Sep 27 13:14:49.421 UTC

IS-IS 1 paths to IPv4 Unicast (Level-2) routers
System Id          Metric    Next-Hop           Interface       SNPA          
R1                 --      
P1                 10        P1                 Gi0/0/0/0       *PtoP*        
P2                 10        P2                 Gi0/0/0/1       *PtoP*        
P3                 10        P3                 Gi0/0/0/2       *PtoP*        
P4                 10        P4                 Gi0/0/0/3       *PtoP*        
P5                 10        P5                 Gi0/0/0/4       *PtoP*        
P6                 10        P6                 Gi0/0/0/5       *PtoP*        
R8                 20        P6                 Gi0/0/0/5       *PtoP*        
R8                 20        P5                 Gi0/0/0/4       *PtoP*        
R8                 20        P4                 Gi0/0/0/3       *PtoP*        
R8                 20        P3                 Gi0/0/0/2       *PtoP*        
R8                 20        P2                 Gi0/0/0/1       *PtoP*        
R8                 20        P1                 Gi0/0/0/0       *PtoP*        

The path taken changes with the destination

Which of the six paths is used is decided per destination. Given a source and a destination, show cef exact-route returns the single exit selected for that pair.

STEP 0: show cef exact-route 1.1.1.1 192.168.8.1 on R1
RP/0/RP0/CPU0:R1#show cef exact-route 1.1.1.1 192.168.8.1

Sun Sep 27 13:17:33.565 UTC
192.168.8.1/32, version 136, internal 0x1000001 0x10 (ptr 0x88519330) [1], 0x400 (0x89740418), 0x0 (0x0)
 Updated Sep 27 13:07:17.114 
 local adjacency to GigabitEthernet0/0/0/1

 Prefix Len 32, traffic index 0, precedence n/a, priority 1
   via GigabitEthernet0/0/0/1
   via 10.0.12.3/32, GigabitEthernet0/0/0/1, 7 dependencies, weight 0, class 0 [flags 0x0]
    path-idx 1 NHID 0x2 [0x8a8405a0 0x0]
    next hop 10.0.12.3/32
    local adjacency
STEP 0: show cef exact-route 1.1.1.1 192.168.8.4 on R1
RP/0/RP0/CPU0:R1#show cef exact-route 1.1.1.1 192.168.8.4

Sun Sep 27 13:17:34.260 UTC
192.168.8.4/32, version 115, internal 0x1000001 0x10 (ptr 0x885195d0) [1], 0x400 (0x89740358), 0x0 (0x0)
 Updated Sep 27 13:07:17.114 
 local adjacency to GigabitEthernet0/0/0/0

 Prefix Len 32, traffic index 0, precedence n/a, priority 1
   via GigabitEthernet0/0/0/0
   via 10.0.11.2/32, GigabitEthernet0/0/0/0, 7 dependencies, weight 0, class 0 [flags 0x0]
    path-idx 0 NHID 0x7 [0x8a840c80 0x0]
    next hop 10.0.11.2/32
    local adjacency

Across the eight destinations, five of the six paths were used. Equal cost does not mean an even share: the computed value decides, and it can be uneven.

DestinationExitRouter traversed
192.168.8.1 / .2Gi0/0/0/1P2
192.168.8.3Gi0/0/0/3P4
192.168.8.4 / .5Gi0/0/0/0P1
192.168.8.6Gi0/0/0/2P3
192.168.8.7 / .8Gi0/0/0/4P5

The middle hop in traceroute changes with the destination as well.

STEP 0: traceroute from R1 to 192.168.8.1
RP/0/RP0/CPU0:R1#traceroute 192.168.8.1 source 1.1.1.1
Sun Sep 27 13:14:04.621 UTC

Type escape sequence to abort.
Tracing the route to 192.168.8.1

 1  10.0.12.3 10 msec  6 msec  5 msec 
 2  10.0.82.8 22 msec  *  10 msec 
STEP 0: traceroute from R1 to 192.168.8.4
RP/0/RP0/CPU0:R1#traceroute 192.168.8.4 source 1.1.1.1
Sun Sep 27 13:14:19.814 UTC

Type escape sequence to abort.
Tracing the route to 192.168.8.4

 1  10.0.11.2 7 msec  4 msec  5 msec 
 2  10.0.81.8 9 msec  *  22 msec 

The input packet counts on the transit routers P1-P6 show the same unevenness (IIHs included; the counters are cleared at the start of each STEP).

STEPP1P2P3P4P5P6
0 (default)626441437020
1 (4 paths)1227325265356
2 (2 paths)641568704547
3 (1 path)1166161232177
4 (back to default)656844467323

With maximum-paths, a different combination survives per prefix (IS-IS)

Lowering maximum-paths from 4 to 2 to 1 reduces the number of lines per prefix to that value. The surviving combination of exits differs between prefixes.

STEP 1: show route isis on R1 (destinations in 192.168.8.0/24)
i L2 192.168.8.1/32 [115/20] via 10.0.11.2, 00:02:10, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:10, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:02:10, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:10, GigabitEthernet0/0/0/3
i L2 192.168.8.2/32 [115/20] via 10.0.11.2, 00:02:10, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:10, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:02:10, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:10, GigabitEthernet0/0/0/3
i L2 192.168.8.3/32 [115/20] via 10.0.13.4, 00:02:10, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:10, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:02:10, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:02:10, GigabitEthernet0/0/0/5
i L2 192.168.8.4/32 [115/20] via 10.0.11.2, 00:02:10, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:10, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.15.6, 00:02:10, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:02:10, GigabitEthernet0/0/0/5
i L2 192.168.8.5/32 [115/20] via 10.0.11.2, 00:02:10, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:10, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.15.6, 00:02:10, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:02:10, GigabitEthernet0/0/0/5
i L2 192.168.8.6/32 [115/20] via 10.0.13.4, 00:02:10, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:10, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:02:10, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:02:10, GigabitEthernet0/0/0/5
i L2 192.168.8.7/32 [115/20] via 10.0.11.2, 00:02:10, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:10, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:02:10, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:10, GigabitEthernet0/0/0/3
i L2 192.168.8.8/32 [115/20] via 10.0.11.2, 00:02:10, GigabitEthernet0/0/0/0
STEP 2: show route isis on R1 (destinations in 192.168.8.0/24)
i L2 192.168.8.1/32 [115/20] via 10.0.13.4, 00:02:20, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:20, GigabitEthernet0/0/0/3
i L2 192.168.8.2/32 [115/20] via 10.0.13.4, 00:02:20, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:20, GigabitEthernet0/0/0/3
i L2 192.168.8.3/32 [115/20] via 10.0.15.6, 00:02:20, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:02:20, GigabitEthernet0/0/0/5
i L2 192.168.8.4/32 [115/20] via 10.0.11.2, 00:02:20, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:20, GigabitEthernet0/0/0/1
i L2 192.168.8.5/32 [115/20] via 10.0.11.2, 00:02:20, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:20, GigabitEthernet0/0/0/1
i L2 192.168.8.6/32 [115/20] via 10.0.15.6, 00:02:20, GigabitEthernet0/0/0/4
                    [115/20] via 10.0.16.7, 00:02:20, GigabitEthernet0/0/0/5
i L2 192.168.8.7/32 [115/20] via 10.0.13.4, 00:02:20, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:20, GigabitEthernet0/0/0/3
i L2 192.168.8.8/32 [115/20] via 10.0.13.4, 00:02:20, GigabitEthernet0/0/0/2
STEP 3: show route isis on R1 (destinations in 192.168.8.0/24)
i L2 192.168.8.1/32 [115/20] via 10.0.14.5, 00:02:09, GigabitEthernet0/0/0/3
i L2 192.168.8.2/32 [115/20] via 10.0.14.5, 00:02:09, GigabitEthernet0/0/0/3
i L2 192.168.8.3/32 [115/20] via 10.0.16.7, 00:02:09, GigabitEthernet0/0/0/5
i L2 192.168.8.4/32 [115/20] via 10.0.12.3, 00:02:09, GigabitEthernet0/0/0/1
i L2 192.168.8.5/32 [115/20] via 10.0.12.3, 00:02:09, GigabitEthernet0/0/0/1
i L2 192.168.8.6/32 [115/20] via 10.0.16.7, 00:02:09, GigabitEthernet0/0/0/5
i L2 192.168.8.7/32 [115/20] via 10.0.14.5, 00:02:09, GigabitEthernet0/0/0/3
i L2 192.168.8.8/32 [115/20] via 10.0.14.5, 00:02:09, GigabitEthernet0/0/0/3

The eight destinations fall into three groups, each keeping a different combination. Even with maximum-paths 1, traffic leaving the router is split across Gi0/0/0/1, Gi0/0/0/3 and Gi0/0/0/5.

DestinationWith 4 pathsWith 2 pathsWith 1 path
192.168.8.1 / .2 / .7 / .8Gi0/0/0/0-3Gi0/0/0/2, Gi0/0/0/3Gi0/0/0/3
192.168.8.3 / .6Gi0/0/0/2-5Gi0/0/0/4, Gi0/0/0/5Gi0/0/0/5
192.168.8.4 / .5Gi0/0/0/0, Gi0/0/0/1, Gi0/0/0/4, Gi0/0/0/5Gi0/0/0/0, Gi0/0/0/1Gi0/0/0/1

Even with maximum-paths 1, show isis topology still lists six adjacencies towards R8. The limit therefore takes effect when routes are installed, not in the SPF result.

The transit counters confirm it. Below are P4, which carried traffic in STEP 3, and P1, which saw only IIHs.

STEP 3: show interface GigabitEthernet0/0/0/0 on P4
GigabitEthernet0/0/0/0 is up, line protocol is up 
  Interface state transitions: 1
  Hardware is GigabitEthernet, address is 5254.00c5.360d (bia 5254.00c5.360d)
  Description: to R1 (10.0.14.0/24 p2p)
  Internet address is 10.0.14.5/24
  MTU 1514 bytes, BW 1000000 Kbit (Max: 1000000 Kbit)
     reliability 255/255, txload 0/255, rxload 0/255
  Encapsulation ARPA,
  Full-duplex, 1000Mb/s, unknown, link type is force-up
  output flow control is off, input flow control is off
  Carrier delay (up) is 10 msec
  loopback not set,
  Last link flapped 00:24:56
  ARP type ARPA, ARP timeout 04:00:00
  Last input 00:00:00, output 00:00:00
  Last clearing of "show interface" counters 00:02:27
  5 minute input rate 1000 bits/sec, 0 packets/sec
  5 minute output rate 1000 bits/sec, 0 packets/sec
     123 packets input, 36218 bytes, 0 total input drops
     0 drops for unrecognized upper-level protocol
     Received 0 broadcast packets, 19 multicast packets
              0 runts, 0 giants, 0 throttles, 0 parity
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     51 packets output, 29442 bytes, 0 total output drops
     Output 0 broadcast packets, 19 multicast packets
     0 output errors, 0 underruns, 0 applique, 0 resets
     0 output buffer failures, 0 output buffers swapped out
     0 carrier transitions
STEP 3: show interface GigabitEthernet0/0/0/0 on P1
GigabitEthernet0/0/0/0 is up, line protocol is up 
  Interface state transitions: 1
  Hardware is GigabitEthernet, address is 5254.000b.ab4d (bia 5254.000b.ab4d)
  Description: to R1 (10.0.11.0/24 p2p)
  Internet address is 10.0.11.2/24
  MTU 1514 bytes, BW 1000000 Kbit (Max: 1000000 Kbit)
     reliability 255/255, txload 0/255, rxload 0/255
  Encapsulation ARPA,
  Full-duplex, 1000Mb/s, unknown, link type is force-up
  output flow control is off, input flow control is off
  Carrier delay (up) is 10 msec
  loopback not set,
  Last link flapped 00:23:10
  ARP type ARPA, ARP timeout 04:00:00
  Last input 00:00:00, output 00:00:05
  Last clearing of "show interface" counters 00:01:37
  5 minute input rate 1000 bits/sec, 0 packets/sec
  5 minute output rate 1000 bits/sec, 0 packets/sec
     11 packets input, 16654 bytes, 0 total input drops
     0 drops for unrecognized upper-level protocol
     Received 0 broadcast packets, 11 multicast packets
              0 runts, 0 giants, 0 throttles, 0 parity
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     34 packets output, 17860 bytes, 0 total output drops
     Output 0 broadcast packets, 10 multicast packets
     0 output errors, 0 underruns, 0 applique, 0 resets
     0 output buffer failures, 0 output buffers swapped out
     0 carrier transitions

A path that is not equal cost is not installed

ECMP is about costs being equal, so a single differing metric keeps that path out of the routing table. Setting metric 20 on both ends of R1 - P6 makes that path cost 30.

STEP 5: configuration committed on P6
RP/0/RP0/CPU0:P6#show configuration commit changes last 1
Sun Sep 27 13:37:58.675 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
router isis 1
 interface GigabitEthernet0/0/0/0
  address-family ipv4 unicast
   metric 20
  !
 !
!
end

R1’s routing table drops from six paths to five.

STEP 5: show route isis on R1 (destinations in 192.168.8.0/24)
i L2 192.168.8.1/32 [115/20] via 10.0.11.2, 00:02:14, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:14, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:02:14, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:14, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:02:14, GigabitEthernet0/0/0/4
i L2 192.168.8.2/32 [115/20] via 10.0.11.2, 00:02:14, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:14, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:02:14, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:14, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:02:14, GigabitEthernet0/0/0/4
i L2 192.168.8.3/32 [115/20] via 10.0.11.2, 00:02:14, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:14, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:02:14, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:14, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:02:14, GigabitEthernet0/0/0/4
i L2 192.168.8.4/32 [115/20] via 10.0.11.2, 00:02:14, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:14, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:02:14, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:14, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:02:14, GigabitEthernet0/0/0/4
i L2 192.168.8.5/32 [115/20] via 10.0.11.2, 00:02:14, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:14, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:02:14, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:14, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:02:14, GigabitEthernet0/0/0/4
i L2 192.168.8.6/32 [115/20] via 10.0.11.2, 00:02:14, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:14, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:02:14, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:14, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:02:14, GigabitEthernet0/0/0/4
i L2 192.168.8.7/32 [115/20] via 10.0.11.2, 00:02:14, GigabitEthernet0/0/0/0
                    [115/20] via 10.0.12.3, 00:02:14, GigabitEthernet0/0/0/1
                    [115/20] via 10.0.13.4, 00:02:14, GigabitEthernet0/0/0/2
                    [115/20] via 10.0.14.5, 00:02:14, GigabitEthernet0/0/0/3
                    [115/20] via 10.0.15.6, 00:02:14, GigabitEthernet0/0/0/4
i L2 192.168.8.8/32 [115/20] via 10.0.11.2, 00:02:14, GigabitEthernet0/0/0/0

show isis topology shows the metric to P6 changed to 20, leaving five adjacencies towards R8, from P5 down to P1.

STEP 5: show isis topology on R1
RP/0/RP0/CPU0:R1#show isis topology
Sun Sep 27 13:40:06.187 UTC

IS-IS 1 paths to IPv4 Unicast (Level-2) routers
System Id          Metric    Next-Hop           Interface       SNPA          
R1                 --      
P1                 10        P1                 Gi0/0/0/0       *PtoP*        
P2                 10        P2                 Gi0/0/0/1       *PtoP*        
P3                 10        P3                 Gi0/0/0/2       *PtoP*        
P4                 10        P4                 Gi0/0/0/3       *PtoP*        
P5                 10        P5                 Gi0/0/0/4       *PtoP*        
P6                 20        P6                 Gi0/0/0/5       *PtoP*        
R8                 20        P5                 Gi0/0/0/4       *PtoP*        
R8                 20        P4                 Gi0/0/0/3       *PtoP*        
R8                 20        P3                 Gi0/0/0/2       *PtoP*        
R8                 20        P2                 Gi0/0/0/1       *PtoP*        
R8                 20        P1                 Gi0/0/0/0       *PtoP*        

Design notes

  • When lowering the limit, look at how each prefix is skewed. Several links stay in use device-wide, so maximum-paths 1 does not necessarily concentrate traffic on one link
  • To keep a specific path out of ECMP, use the metric rather than the limit. The limit cannot say which paths survive
  • show cef exact-route tells you the exit in advance, with no traffic needed

Verification configs and show output

Collected from all eight routers in every STEP. The verification config is the ..._run.txt file (the final state is the one from the last STEP).

FileContents
..._show.txtshow version / show route isis / show isis interface / show isis neighbors / show isis topology / show isis database detail / show isis spf-log / show interface and more
..._ping.txtping (20 packets each) and traceroute from R1 to the eight destinations
..._cef.txtshow cef 192.168.8.1/32 / 192.168.8.8/32 on R1 plus show cef exact-route for the eight destinations
..._clear.txtRecord of the interface counters cleared in that STEP
..._commit.cfgOnly the configuration committed in that STEP (absent for STEP 0, which changes nothing)
..._log.txtshow logging limited to the range of that STEP
..._run.txtshow running-config at that STEP (the verification config for the STEP)
..._trace.txtshow isis trace all | include SPF (the SPF computations in that STEP)

STEP 0: Initial state (defaults)

Routershowping / traceroutecefclearConfig committedsyslogrunning-configtrace
R1showpingcefclear—logruntrace
P1show——clear—logruntrace
P2show——clear—logruntrace
P3show——clear—logruntrace
P4show——clear—logruntrace
P5show——clear—logruntrace
P6show——clear—logruntrace
R8show——clear—logruntrace

STEP 1: maximum-paths 4 on R1

Routershowping / traceroutecefclearConfig committedsyslogrunning-configtrace
R1showpingcefclearcommitlogruntrace
P1show——clear—logruntrace
P2show——clear—logruntrace
P3show——clear—logruntrace
P4show——clear—logruntrace
P5show——clear—logruntrace
P6show——clear—logruntrace
R8show——clear—logruntrace

STEP 2: maximum-paths 2 on R1

Routershowping / traceroutecefclearConfig committedsyslogrunning-configtrace
R1showpingcefclearcommitlogruntrace
P1show——clear—logruntrace
P2show——clear—logruntrace
P3show——clear—logruntrace
P4show——clear—logruntrace
P5show——clear—logruntrace
P6show——clear—logruntrace
R8show——clear—logruntrace

STEP 3: maximum-paths 1 on R1

Routershowping / traceroutecefclearConfig committedsyslogrunning-configtrace
R1showpingcefclearcommitlogruntrace
P1show——clear—logruntrace
P2show——clear—logruntrace
P3show——clear—logruntrace
P4show——clear—logruntrace
P5show——clear—logruntrace
P6show——clear—logruntrace
R8show——clear—logruntrace

STEP 4: maximum-paths removed (back to the default)

Routershowping / traceroutecefclearConfig committedsyslogrunning-configtrace
R1showpingcefclearcommitlogruntrace
P1show——clear—logruntrace
P2show——clear—logruntrace
P3show——clear—logruntrace
P4show——clear—logruntrace
P5show——clear—logruntrace
P6show——clear—logruntrace
R8show——clear—logruntrace

STEP 5: metric 20 on both ends of R1-P6

Routershowping / traceroutecefclearConfig committedsyslogrunning-configtrace
R1showpingcefclearcommitlogruntrace
P1show——clear—logruntrace
P2show——clear—logruntrace
P3show——clear—logruntrace
P4show——clear—logruntrace
P5show——clear—logruntrace
P6show——clearcommitlogruntrace
R8show——clear—logruntrace

STEP 6: metric back to 10 (final state)

Routershowping / traceroutecefclearConfig committedsyslogrunning-configtrace
R1showpingcefclearcommitlogruntrace
P1show——clear—logruntrace
P2show——clear—logruntrace
P3show——clear—logruntrace
P4show——clear—logruntrace
P5show——clear—logruntrace
P6show——clearcommitlogruntrace
R8show——clear—logruntrace

No packet capture was taken. What this article verifies is the result of the route calculation and how forwarding is spread, and the show output is the direct evidence for both.

References

StandardTitleSummary
ISO/IEC 10589:2002 (second edition)Intermediate System to Intermediate System intra-domain routeing information exchange protocolThe Decision Process that builds the set of equal-cost paths (7.2.6, Annex C.2 and C.2.1), removal of excess paths (7.2.7), the management parameter maximumPathSplits (default 2, range 1-32), and equal-cost path computation being optional (conformance table A.5.4).
IS-IS Commands (Cisco IOS XR)maximum-paths (IS-IS)That the default for maximum-paths is 8 and the range is 1 to 64 (the page also notes ECMP being extended from 32 to 64 in IOS XR 5.3.0).

Related articles