Routing Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Routing Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Configure IS-IS with metric

Want to summarize with AI?

Log in

Teaches you how to configure IS-IS metrics for UCMP and verify resulting path weights and normalized bucket distribution.


Assign different interface metrics to configure IS-IS unequal-cost multipath (UCMP). This configuration distributes traffic across multiple paths with weighted preference instead of an even split.

Procedure

  1. Enable IS-IS and configure IPv4 interface metric for UCMP.

    Example:

    Router# configure
    Router(config)# router isis 1
    Router(config-isis)# interface HundredGigE0/3/0/8
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# metric 1
    Router(config-isis-if-af)# exit
    Router(config-isis)# interface HundredGigE0/3/0/9
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# metric 100
  2. Run show cef command to verify CEF path weights and normalized bucket distribution.

    1. Validate expected weight calculation from the output.

      Example:

      Best path metric: 21 = (configured 1 + IS-IS added 20)
      UCMP path metric: 120 = (configured 100 + IS-IS added 20)
      
      Best path weight: 0xFFFFFFFF = 4294967295
      UCMP path weight: (21/120) * 4294967295 = 751619276
      
      Normalized weights (64 buckets):
      (4294967295 * 64) / (4294967295 + 751619276) = 54
      (751619276 * 64) / (4294967295 + 751619276) = 9
    2. Confirm the values in the CEF output.

      Example:

      Router# show cef ipv4 198.51.100.0 detail
      198.51.100.0/24, version 773, internal 0x1000001 0x0 (ptr 0x71bcaee0) [1], 0x0 (0x71b98870), 0x0 (0x0)
       Updated Oct 16 06:36:08.632 
       remote adjacency to HundredGigE0/3/0/8
       Prefix Len 24, traffic index 0, precedence n/a, priority 2
        gateway array (0x71a6d9d0) reference count 2, flags 0x0, source rib (7), 0 backups
                      [3 type 3 flags 0x8401 (0x71b02b90) ext 0x0 (0x0)]
        LW-LDI [type=3, refc=1, ptr=0x71b98870, sh-ldi=0x71b02b90]
        gateway array update type-time 1 Oct 16 06:36:08.632
       LDI Update time Oct 16 06:36:08.632
       LW-LDI-TS Oct 16 06:36:08.632
         via 198.51.100.2/32, HundredGigE0/3/0/8, 14 dependencies, weight 4294967295, class 0 [flags 0x0]
          path-idx 0 NHID 0x0 [0x7244d2a4 0x0]
          next hop 198.51.100.2/32
          remote adjacency
         via 198.51.100.3/32, HundredGigE0/3/0/9, 14 dependencies, weight 751619276, class 0 [flags 0x0]
          path-idx 1 NHID 0x0 [0x7244d2f8 0x0]
          next hop 198.51.100.3/32
          remote adjacency
      
      
          Weight distribution:
          slot 0, weight 4294967295, normalized_weight 54, class 0
          slot 1, weight 751619276, normalized_weight 9, class 0
      

CEF installs both next hops and applies weighted load balancing based on computed path weights (higher share on lower-metric path). In this example (IPv4), the normalized distribution is 54:9. The same behavior and outcome apply to IPv6 with equivalent IS-IS metric configuration.