IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

PDF

IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

Hash rotation for individual NPUs

Want to summarize with AI?

Log in

Explains how per-NPU hash rotation varies path-selection inputs to reduce traffic polarization. Covers the forwarding process, deployment restriction, configuration priorities, and hardware verification.


Per-network-processing-unit (NPU) hash rotation is a Silicon One load-balancing technique that

  • changes the hashing function by applying a rotation value

  • allows a different value for each NPU, and

  • reduces repeated selection of the same path in highly symmetric networks.

You can configure a global hash rotation value, configure a value for an individual NPU, or let the router calculate values automatically.

Table 1. Feature History Table

Feature Name

Release Information

Feature Description

Per-NPU hash rotation

Release 25.1.1

Introduced in this release on: Fixed Systems (8700 [ASIC: K100]) (select variants only*)

This feature is supported on Cisco 8712-MOD-M routers.

Per-NPU hash rotation

Release 24.4.1

Introduced in this release on: Fixed Systems (8200 [ASIC: Q200, P100], 8700 [ASIC: P100, K100]); Centralized Systems (8600 [ASIC:Q200]); Modular Systems (8800 [LC ASIC: Q100, Q200, P100])

You can now configure the hash rotation value for each Network Processing Unit (NPU) to improve traffic load balancing and minimize traffic polarization. Alternatively, the value can be automatically calculated, eliminating the need for manual configuration.


How hash rotation reduces traffic polarization

A hash function maps packet-header information to an available path. Reusing the same function and inputs across symmetric devices can repeatedly select one path and leave other paths underused.

Summary

The process uses these elements:

  • Hash function: Produces the value that selects a path or interface.

  • Traffic polarization: Concentrates similar traffic on the same path.

  • Hash rotation: Changes the hash parameters that influence path selection.

Workflow

Figure 1. Network topology for optimized hash rotation and load balancing
Network topology for optimized hash rotation and load balancing

Routers R1, R2, and R3 forward traffic from hosts H1 and H2 toward host H3 through multiple paths. Identical hashing can leave the R2-to-R5 and R3-to-R4 links unused.

These stages describe load balancing with hash rotation:

  1. An ingress router hashes packet-header fields and distributes packets across available paths.

  2. Downstream routers that reuse the same hash inputs can map each flow to the same outgoing path.

  3. Different rotation values at the router or NPU level alter the hash results and distribute traffic across more paths.

Result

The network uses links more evenly, which reduces traffic polarization and congestion.


Restriction for per-NPU hash rotation

Use hash rotation only when the network shows traffic polarization and underused bandwidth.


Configure per-NPU hash rotation

Adjust the hashing function to improve path distribution across NPUs.

Before you begin

Enable the hw-module profile pbr vrf-redirect profile and reload the router.

Procedure

Select one hash-rotation configuration method.
  • Configure an NPU-specific value from 1 to 35. This value has the highest priority.
    Router# configure
    Router(config)# cef load-balancing algorithm adjust 7 instance 0 location 0/0/CPU0
    Router(config)# end
  • Configure a global value for all NPUs.
    Router# configure
    Router(config)# cef load-balancing algorithm adjust 2
    Router(config)# end
  • Use automatic calculation by leaving the global and NPU-specific values unconfigured. The router derives values from the router ID, line-card ID, and NPU ID.

The default value is 1 when the required policy-based routing profile is enabled.

The hardware uses the highest-priority configured method to determine the hash-rotation value.


Verify programmed hash-rotation values

Confirm the hash-rotation values that the router programmed in hardware.

Procedure

Select the required verification scope.
  • Display values for all NPUs on a line card.
    Router# show controllers npu debugshell <npu-id> 'script device_hash_rotate_info get_val_all_npu' location <line-card-node>
  • Display the value for one NPU on a line card.
    Router# show controllers npu debugshell <npu-id> 'script device_hash_rotate_info get_val' location <line-card-node>

The command output reports the hash-rotation value programmed for the selected hardware scope.