<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     category="std"
     docName="draft-li-rtgwg-hash-polarization-mitigation-00"
     ipr="trust200902"
     obsoletes=""
     updates=""
     submissionType="IETF"
     xml:lang="en"
     version="3">

  <front>
    <title abbrev="Hash Polarization Mitigation">
      Load Balancing Hash Polarization Mitigation Extension
    </title>

    <seriesInfo name="Internet-Draft" value="draft-li-rtgwg-hash-polarization-mitigation-00"/>

    <author fullname="Zhiqiang Li" initials="Z." surname="Li">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <street>32 Xuanwumen West Street</street>
          <city>Beijing</city>
          <code>100053</code>
          <country>China</country>
        </postal>
        <email>lizhiqiangyjy@chinamobile.com</email>
      </address>
    </author>
    <author fullname="Zongpeng Du" initials="Z." surname="Du">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <street>32 Xuanwumen West Street</street>
          <city>Beijing</city>
          <code>100053</code>
          <country>China</country>
        </postal>
        <email>duzongpeng@chinamobile.com</email>
      </address>
    </author>
    <author fullname="Wei Cheng" initials="W." surname="Cheng">
      <organization>Centec Networks</organization>
      <address>
        <postal>
          <city>Suzhou</city>
          <code>215000</code>
          <country>China</country>
        </postal>
        <email>chengw@centec.com</email>
      </address>
    </author>
    <author fullname="Junjie Wang" initials="J." surname="Wang">
      <organization>Centec Networks</organization>
      <address>
        <postal>
          <city>Suzhou</city>
          <code>215000</code>
          <country>China</country>
        </postal>
        <email>wangjj@centec.com</email>
      </address>
    </author>
    <author fullname="Guoying Zhang" initials="G." surname="Zhang">
      <organization>Centec Networks</organization>
      <address>
        <postal>
          <city>Suzhou</city>
          <code>215000</code>
          <country>China</country>
        </postal>
        <email>zhanggy@centec.com</email>
      </address>
    </author>

<date year="2026" month="February" day="28"/>

    <area>Routing</area>
    <workgroup>RTGWG</workgroup>

    <keyword>load balancing</keyword>
    <keyword>hash polarization</keyword>
    <keyword>ECMP</keyword>
    <keyword>LAG</keyword>
    <keyword>shift factor</keyword>

    <abstract>
      <t>
        This document defines a hash polarization mitigation extension
        for Link Aggregation (LAG) and Equal-Cost Multi-Path (ECMP)
        routing. This document specifies hash input field selection
        rules, Shift Factor definition and generation methods, hash
        value adjustment algorithms, and normative requirements for
        device processing procedures.
      </t>
    </abstract>

  </front>

  <middle>

    <section anchor="introduction">
      <name>Introduction</name>

      <section anchor="background">
        <name>Background</name>
        <t>
          Link Aggregation (LAG), defined in IEEE 802.1AX
          <xref target="IEEE802.1AX"/>, and Equal-Cost Multi-Path
          (ECMP) routing, described in <xref target="RFC2991"/> and
          <xref target="RFC2992"/>, are fundamental mechanisms for
          network load balancing. These mechanisms compute hash values
          from packet fields and map the hash values to one path within
          the set of available paths.
        </t>
        <t>
          In multi-tier network topologies, when devices at each tier
          employ identical hash algorithms and identical input field
          configurations, packets with identical hash inputs produce
          identical hash values at each tier and are consequently
          mapped to the same relative path positions. This behavior
          causes traffic to persistently aggregate on specific physical
          paths, a phenomenon termed hash polarization.
        </t>
      </section>

      <section anchor="document-scope">
        <name>Document Scope</name>
        <t>
          This document defines the following:
        </t>
        <ul>
          <li>Hash input field selection and configuration rules</li>
          <li>Shift Factor definition, value range, and generation methods</li>
          <li>Shift Factor-based hash value adjustment algorithm</li>
          <li>Normative device packet processing procedures</li>
          <li>Error handling requirements</li>
          <li>Manageability requirements</li>
        </ul>
        <t>
          This document does not define the following:
        </t>
        <ul>
          <li>Specific LAG or ECMP protocol specifications</li>
          <li>Data plane encapsulation formats</li>
          <li>Specific hash algorithm implementations</li>
          <li>Control plane protocols</li>
        </ul>
      </section>

      <section anchor="requirements-language">
        <name>Requirements Language</name>
        <t>
          The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
          "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",
          "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document
          are to be interpreted as described in BCP 14
          <xref target="RFC2119"/> <xref target="RFC8174"/> when, and
          only when, they appear in all capitals, as shown here.
        </t>
      </section>
    </section>

    <section anchor="terminology">
      <name>Terminology and Definitions</name>

      <section anchor="abbreviations">
        <name>Abbreviations</name>
        <dl>
          <dt>ECMP:</dt>
          <dd>Equal-Cost Multi-Path routing.</dd>
          <dt>HRNG:</dt>
          <dd>Hardware Random Number Generator.</dd>
          <dt>LAG:</dt>
          <dd>Link Aggregation.</dd>
        </dl>
      </section>

      <section anchor="term-definitions">
        <name>Term Definitions</name>
        <dl>
          <dt>Hash Input Data:</dt>
          <dd>
            The sequence of field values extracted from a packet and
            used for hash computation.
          </dd>
          <dt>Initial Hash Value:</dt>
          <dd>
            The output value produced by the hash function operating
            on Hash Input Data.
          </dd>
          <dt>Adjusted Hash Value:</dt>
          <dd>
            The value resulting from processing the Initial Hash Value
            with the Shift Factor, used for final path selection.
          </dd>
          <dt>Shift Factor:</dt>
          <dd>
            An unsigned integer parameter used for circular bit
            rotation of the Initial Hash Value.
          </dd>
          <dt>Hash Polarization:</dt>
          <dd>
            A phenomenon where traffic persistently aggregates on
            specific paths due to identical hash configurations across
            multi-tier load balancing devices.
          </dd>
          <dt>Path Index:</dt>
          <dd>
            A non-negative integer identifying a specific path within
            the set of available paths, numbered starting from zero.
          </dd>
        </dl>
      </section>
    </section>

    <section anchor="hash-input-field-selection">
      <name>Hash Input Field Selection</name>

      <section anchor="field-types">
        <name>Field Types</name>

        <section anchor="mandatory-fields">
          <name>Mandatory Fields</name>
          <t>
            Devices conforming to this specification MUST support the
            following hash input fields:
          </t>
          <t>
            Layer 2 fields: Source MAC Address (48 bits), Destination
            MAC Address (48 bits), EtherType (16 bits), VLAN ID
            (12 bits).
          </t>
          <t>
            Layer 3 fields: Source IP Address (32 bits for IPv4,
            128 bits for IPv6), Destination IP Address (32 bits for
            IPv4, 128 bits for IPv6), Protocol or Next Header (8 bits),
            Flow Label (IPv6 only, 20 bits).
          </t>
          <t>
            Layer 4 fields: Source Port (16 bits), Destination Port
            (16 bits).
          </t>
        </section>

        <section anchor="optional-fields">
          <name>Optional Fields</name>
          <t>
            Devices conforming to this specification SHOULD support the
            following optional fields:
          </t>
          <t>
            Inner tunnel fields: For packets with tunnel encapsulation
            such as VXLAN <xref target="RFC7348"/>, GRE, or MPLS,
            support for extracting Layer 2, Layer 3, and Layer 4 fields
            from inner packets.
          </t>
          <t>
            Devices conforming to this specification MAY support the
            following extended fields:
          </t>
          <t>
            Custom offset fields: Byte sequences of specified length
            extracted from specified byte offset positions within
            packets.
          </t>
        </section>
      </section>

      <section anchor="field-selection-configuration">
        <name>Field Selection Configuration</name>
        <t>
          Devices MUST provide a configuration mechanism allowing
          independent enabling or disabling of each field defined in
          <xref target="field-types"/> for hash computation
          participation.
        </t>
        <t>
          For devices supporting inner tunnel fields, the configuration
          mechanism MUST allow specification of one of the following
          options: use outer fields only; use inner fields only; use a
          combination of both outer and inner fields.
        </t>
        <t>
          Devices SHOULD support bitmask configuration, allowing
          specification of a mask value for each field. When a mask is
          configured, only bit positions corresponding to mask bits set
          to 1 participate in hash computation.
        </t>
      </section>

      <section anchor="hash-input-data-assembly">
        <name>Hash Input Data Assembly</name>
        <t>
          Devices MUST assemble Hash Input Data according to the
          following rules:
        </t>
        <ul>
          <li>
            Extract field values sequentially in the order specified by
            configuration. If field order is not configured, devices
            MUST use an implementation-defined deterministic order and
            MUST document this order.
          </li>
          <li>
            Field values are represented in network byte order
            (big-endian).
          </li>
          <li>
            Concatenate field values sequentially into a contiguous
            byte sequence, forming the Hash Input Data.
          </li>
          <li>
            If a field does not exist in the packet (e.g., IP address
            fields for non-IP packets, or port fields for non-TCP/UDP
            packets), that field position MUST be filled with all-zero
            values.
          </li>
          <li>
            If a field mask is configured, devices MUST perform a
            bitwise AND operation between the field value and the mask,
            then include the result in the Hash Input Data.
          </li>
        </ul>
      </section>

      <section anchor="default-configuration">
        <name>Default Configuration</name>
        <t>
          When no explicit configuration is present, devices MUST use
          the following default field set: Source IP Address,
          Destination IP Address, Protocol, Source Port, Destination
          Port. This field set is commonly referred to as the
          five-tuple.
        </t>
      </section>
    </section>

    <section anchor="shift-factor">
      <name>Shift Factor</name>

      <section anchor="definition-and-value-range">
        <name>Definition and Value Range</name>
        <t>
          The Shift Factor is an unsigned integer used for circular bit
          rotation of the Initial Hash Value.
        </t>
        <t>
          Let W denote the bit width of hash values. The valid value
          range for the Shift Factor is the closed interval [0, W-1].
        </t>
        <t>
          Devices MUST support a hash value width of at least 16 bits.
          Devices SHOULD support a hash value width of 32 bits. Devices
          MAY support other hash value widths.
        </t>
      </section>

      <section anchor="generation-methods">
        <name>Generation Methods</name>
        <t>
          Devices MUST support at least one of the following Shift
          Factor generation methods:
        </t>
        <t>
          Static Configuration: Explicit specification of the Shift
          Factor value through the management interface. When static
          configuration is used, the configured value MUST be within
          the valid value range.
        </t>
        <t>
          Random Generation: Automatic generation of a random value as
          the Shift Factor during device initialization. When random
          generation is used, devices SHOULD use a Hardware Random
          Number Generator (HRNG) or cryptographically secure
          pseudo-random number generator. Devices MUST NOT use
          predictable pseudo-random number generators such as Linear
          Congruential Generators.
        </t>
        <t>
          Devices MAY support regeneration of the Shift Factor during
          runtime.
        </t>
      </section>

      <section anchor="persistence">
        <name>Persistence</name>
        <t>
          After device restart, the Shift Factor behavior depends on
          the generation method:
        </t>
        <t>
          If static configuration is used, devices MUST restore the
          configured Shift Factor value after restart.
        </t>
        <t>
          If random generation is used, devices MAY generate a new
          random value after restart, or MAY persistently store and
          restore the previous value. Devices SHOULD document their
          behavior.
        </t>
      </section>
    </section>

    <section anchor="hash-value-computation">
      <name>Hash Value Computation and Path Selection</name>

      <section anchor="initial-hash-value-computation">
        <name>Initial Hash Value Computation</name>
        <t>
          Devices MUST input the Hash Input Data to a hash function and
          compute the Initial Hash Value.
        </t>
        <t>
          Hash function selection is outside the scope of this
          document. Common choices include CRC polynomial families and
          XOR-based folding algorithms.
        </t>
        <t>
          The hash function output bit width MUST equal the hash value
          width W defined in <xref target="definition-and-value-range"/>.
        </t>
        <t>
          Hash functions SHOULD have good distribution uniformity,
          meaning that for randomly distributed inputs, output values
          are approximately uniformly distributed within the range
          [0, 2^W - 1].
        </t>
      </section>

      <section anchor="hash-value-adjustment-algorithm">
        <name>Hash Value Adjustment Algorithm</name>
        <t>
          Let H denote the Initial Hash Value, W denote the bit width,
          and S denote the Shift Factor. The Adjusted Hash Value H'
          MUST be computed according to the following algorithm:
        </t>
        <artwork><![CDATA[
H' = ROR(H, S, W)
        ]]></artwork>
        <t>
          Where ROR is the circular right rotation function, defined as:
        </t>
        <artwork><![CDATA[
ROR(H, S, W) = (H >> S) OR (H << (W - S))
        ]]></artwork>
        <t>
          Operators are defined as follows: ">>" is logical right shift
          with zero-fill of high-order bits; "&lt;&lt;" is logical left
          shift with zero-fill of low-order bits; "OR" is bitwise OR
          operation.
        </t>
        <t>
          When S equals 0, H' equals H. Implementations MUST correctly
          handle this boundary condition.
        </t>
        <t>
          When S equals W, this case should not occur per the value
          range constraint. If S is greater than or equal to W due to
          configuration error, devices MUST treat S as 0 and SHOULD log
          an error.
        </t>
      </section>

      <section anchor="path-selection">
        <name>Path Selection</name>
        <t>
          Let N denote the number of available paths (N &gt; 0). Devices
          MUST compute the Path Index P according to the following
          formula:
        </t>
        <artwork><![CDATA[
P = H' mod N
        ]]></artwork>
        <t>
          Where "mod" is the modulo operation, with a non-negative
          integer result.
        </t>
        <t>
          Path indices are numbered starting from 0, with valid range
          [0, N-1].
        </t>
        <t>
          Devices MUST forward packets to the path corresponding to
          Path Index P.
        </t>
        <t>
          When the path set changes (e.g., member port failure or
          recovery), the N value changes accordingly. Devices MUST use
          the updated N value to compute Path Index for subsequent
          packets.
        </t>
      </section>
    </section>

    <section anchor="device-processing-procedures">
      <name>Device Processing Procedures</name>

      <section anchor="receive-processing">
        <name>Receive Processing</name>
        <t>
          When a device receives a packet requiring LAG or ECMP load
          balanced forwarding, the device MUST execute processing in
          the following order:
        </t>
        <t>
          First, parse packet headers. For tunnel-encapsulated packets,
          if configuration requires use of inner fields, devices MUST
          complete inner header parsing.
        </t>
        <t>
          Second, extract hash input fields from the packet according
          to current configuration.
        </t>
        <t>
          Third, assemble Hash Input Data according to the rules in
          <xref target="hash-input-data-assembly"/>.
        </t>
        <t>
          Fourth, compute the Initial Hash Value H.
        </t>
        <t>
          Fifth, compute the Adjusted Hash Value H' using the current
          Shift Factor according to the algorithm in
          <xref target="hash-value-adjustment-algorithm"/>.
        </t>
        <t>
          Sixth, compute the Path Index P according to the formula in
          <xref target="path-selection"/> using the current number of
          available paths N.
        </t>
        <t>
          Seventh, forward the packet to path P.
        </t>
      </section>

      <section anchor="error-handling">
        <name>Error Handling</name>

        <section anchor="parsing-failures">
          <name>Parsing Failures</name>
          <t>
            If packet header parsing fails (e.g., truncated headers,
            checksum errors, non-conformant format), devices SHOULD
            handle the situation as follows:
          </t>
          <ul>
            <li>
              If some fields have been successfully extracted, devices
              MAY continue computation using extracted fields, with
              non-extracted fields filled with all-zero values.
            </li>
            <li>
              If no configured fields can be extracted, devices SHOULD
              forward the packet to the default path (Path Index 0).
            </li>
            <li>
              Devices SHOULD maintain a parsing failure counter.
            </li>
          </ul>
        </section>

        <section anchor="configuration-errors">
          <name>Configuration Errors</name>
          <t>
            If the Shift Factor configuration value exceeds the valid
            range, devices MUST treat the Shift Factor as 0, SHOULD log
            a configuration error, and SHOULD notify the administrator
            through an alerting mechanism.
          </t>
          <t>
            If the hash input field configuration is empty (no fields
            enabled), devices SHOULD use the default configuration
            defined in <xref target="default-configuration"/> and SHOULD
            log a configuration warning.
          </t>
        </section>
      </section>
    </section>

    <section anchor="manageability-considerations">
      <name>Manageability Considerations</name>

      <section anchor="configuration-parameters">
        <name>Configuration Parameters</name>
        <t>
          Devices conforming to this specification SHOULD provide the
          following configuration parameters through management
          interfaces:
        </t>
        <ul>
          <li>
            Hash input field enable state, allowing independent
            configuration for each field.
          </li>
          <li>
            Field bitmask values, if mask functionality is supported.
          </li>
          <li>
            Shift Factor generation method selection.
          </li>
          <li>
            Static Shift Factor configuration value, when static
            configuration is used.
          </li>
        </ul>
      </section>

      <section anchor="operational-state">
        <name>Operational State</name>
        <t>
          Devices conforming to this specification SHOULD provide the
          following operational state queries through management
          interfaces:
        </t>
        <ul>
          <li>Currently effective Shift Factor value.</li>
          <li>Currently effective hash input field configuration.</li>
          <li>
            Per-path traffic statistics, including packet counts and
            byte counts.
          </li>
          <li>Parsing error counts.</li>
          <li>Configuration error counts.</li>
        </ul>
      </section>

      <section anchor="logging-and-notifications">
        <name>Logging and Notifications</name>
        <t>
          Devices SHOULD log events when the following occur:
        </t>
        <ul>
          <li>
            Shift Factor value changes, including initial generation,
            static configuration changes, and runtime regeneration.
          </li>
          <li>Hash input field configuration changes.</li>
          <li>Configuration error detection.</li>
          <li>
            Parsing error rate exceeds an implementation-defined
            threshold.
          </li>
        </ul>
      </section>
    </section>

    <section anchor="security-considerations">
      <name>Security Considerations</name>

      <section anchor="configuration-access-control">
        <name>Configuration Access Control</name>
        <t>
          Shift Factor and hash input field configuration affects
          traffic distribution. Unauthorized configuration modification
          may cause abnormal traffic aggregation, resulting in
          congestion or service degradation.
        </t>
        <t>
          Implementations MUST enforce authentication for configuration
          operations. Implementations MUST enforce authorization control
          for configuration operations, allowing only administrators
          with appropriate privileges to modify configuration.
          Implementations SHOULD maintain configuration change audit
          logs, including operation time, operator identity, and change
          content.
        </t>
      </section>

      <section anchor="randomness-quality">
        <name>Randomness Quality</name>
        <t>
          When using random generation to produce the Shift Factor,
          weak randomness may make the Shift Factor predictable,
          allowing attackers to infer traffic distribution patterns.
        </t>
        <t>
          Implementations SHOULD use a Hardware Random Number Generator
          (HRNG). If software random number generators are used,
          implementations MUST use cryptographically secure
          pseudo-random number generators (CSPRNG), such as those based
          on AES-CTR or ChaCha20. Implementations MUST NOT use Linear
          Congruential Generators, Mersenne Twister (non-cryptographic
          variants), or other predictable generators.
        </t>
      </section>

      <section anchor="traffic-analysis-attacks">
        <name>Traffic Analysis Attacks</name>
        <t>
          Attackers may infer load balancing configuration by observing
          network traffic patterns.
        </t>
        <t>
          In deployments with high security requirements, operators MAY
          consider periodic Shift Factor configuration updates.
        </t>
      </section>

      <section anchor="hash-collision-attacks">
        <name>Hash Collision Attacks</name>
        <t>
          Attackers may construct packet sets with identical hash
          values, causing traffic to concentrate on specific paths and
          resulting in path congestion.
        </t>
        <t>
          Implementations SHOULD select hash functions with good
          collision resistance. Operators SHOULD deploy traffic
          monitoring mechanisms to detect abnormal traffic patterns.
          Operators MAY deploy rate limiting mechanisms as a mitigation
          measure.
        </t>
      </section>

      <section anchor="multi-tenancy-isolation">
        <name>Multi-Tenancy Isolation</name>
        <t>
          In multi-tenant environments, configuration for different
          tenants MUST be mutually isolated. Tenants MUST NOT be able
          to view or modify Shift Factor or hash input field
          configuration of other tenants.
        </t>
      </section>
    </section>

    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>
        This document has no IANA actions.
      </t>
      <t>
        The mechanism defined in this document is local device behavior
        and does not involve protocol field allocation, port number
        registration, or parameter encoding registration.
      </t>
    </section>

  </middle>

  <back>
    <references>
      <name>References</name>

      <references>
        <name>Normative References</name>

        <reference anchor="RFC2119"
                   target="https://www.rfc-editor.org/info/rfc2119">
          <front>
            <title>
              Key words for use in RFCs to Indicate Requirement Levels
            </title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>

        <reference anchor="RFC8174"
                   target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>
              Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words
            </title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>

      </references>

      <references>
        <name>Informative References</name>

        <reference anchor="IEEE802.1AX">
          <front>
            <title>
              IEEE Standard for Local and Metropolitan Area Networks--
              Link Aggregation
            </title>
            <author>
              <organization>IEEE</organization>
            </author>
            <date/>
          </front>
          <seriesInfo name="IEEE Std" value="802.1AX"/>
        </reference>

        <reference anchor="RFC2991"
                   target="https://www.rfc-editor.org/info/rfc2991">
          <front>
            <title>
              Multipath Issues in Unicast and Multicast Next-Hop
              Selection
            </title>
            <author fullname="D. Thaler" initials="D." surname="Thaler"/>
            <author fullname="C. Hopps" initials="C." surname="Hopps"/>
            <date month="November" year="2000"/>
          </front>
          <seriesInfo name="RFC" value="2991"/>
          <seriesInfo name="DOI" value="10.17487/RFC2991"/>
        </reference>

        <reference anchor="RFC2992"
                   target="https://www.rfc-editor.org/info/rfc2992">
          <front>
            <title>Analysis of an Equal-Cost Multi-Path Algorithm</title>
            <author fullname="C. Hopps" initials="C." surname="Hopps"/>
            <date month="November" year="2000"/>
          </front>
          <seriesInfo name="RFC" value="2992"/>
          <seriesInfo name="DOI" value="10.17487/RFC2992"/>
        </reference>

        <reference anchor="RFC7348"
                   target="https://www.rfc-editor.org/info/rfc7348">
          <front>
            <title>
              Virtual eXtensible Local Area Network (VXLAN): A Framework
              for Overlaying Virtualized Layer 2 Networks over Layer 3
              Networks
            </title>
            <author fullname="M. Mahalingam" initials="M."
                    surname="Mahalingam"/>
            <author fullname="D. Dutt" initials="D." surname="Dutt"/>
            <author fullname="K. Duda" initials="K." surname="Duda"/>
            <author fullname="P. Agarwal" initials="P." surname="Agarwal"/>
            <author fullname="L. Kreeger" initials="L." surname="Kreeger"/>
            <author fullname="T. Sridhar" initials="T." surname="Sridhar"/>
            <author fullname="M. Bursell" initials="M." surname="Bursell"/>
            <author fullname="C. Wright" initials="C." surname="Wright"/>
            <date month="August" year="2014"/>
          </front>
          <seriesInfo name="RFC" value="7348"/>
          <seriesInfo name="DOI" value="10.17487/RFC7348"/>
        </reference>

      </references>
    </references>

    <section anchor="algorithm-examples">
      <name>Algorithm Examples (Informative)</name>
      <t>
        This appendix provides computation examples of the hash value
        adjustment algorithm for reference purposes.
      </t>

      <section anchor="computation-examples">
        <name>Computation Examples</name>
        <t>
          Given conditions: Initial Hash Value H = 0x12345678; Hash
          value width W = 32 bits; ECMP group member count N = 4.
        </t>
        <t>
          Example computations are shown in the following table:
        </t>
        <table anchor="tab-computation-examples">
          <name>Computation Examples</name>
          <thead>
            <tr>
              <th>S</th>
              <th>Circular Right Rotation</th>
              <th>H'</th>
              <th>Path Index</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>0</td>
              <td>ROR(0x12345678, 0, 32)</td>
              <td>0x12345678</td>
              <td>0</td>
            </tr>
            <tr>
              <td>4</td>
              <td>ROR(0x12345678, 4, 32)</td>
              <td>0x81234567</td>
              <td>3</td>
            </tr>
            <tr>
              <td>8</td>
              <td>ROR(0x12345678, 8, 32)</td>
              <td>0x78123456</td>
              <td>2</td>
            </tr>
            <tr>
              <td>16</td>
              <td>ROR(0x12345678, 16, 32)</td>
              <td>0x56781234</td>
              <td>0</td>
            </tr>
          </tbody>
        </table>
      </section>

      <section anchor="multi-device-scenario">
        <name>Multi-Device Scenario</name>
        <t>
          Consider three devices deployed in series, each configured
          with a different Shift Factor:
        </t>
        <t>
          Device A is configured with Shift Factor 0. Device B is
          configured with Shift Factor 4. Device C is configured with
          Shift Factor 8.
        </t>
        <t>
          When traffic flows with identical five-tuples traverse these
          three devices sequentially, the path selection results at
          each device are as shown in
          <xref target="tab-computation-examples"/>. Because each
          device has a different Adjusted Hash Value, path selection
          results exhibit differentiated distribution.
        </t>
      </section>
    </section>

  </back>
</rfc>