<?xml version="1.0" encoding="utf-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.17 (Ruby 3.1.2) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

<!ENTITY RFC8279 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8279.xml">
<!ENTITY RFC2119 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8174 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY I-D.cheng-rtgwg-adaptive-routing-framework SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.cheng-rtgwg-adaptive-routing-framework.xml">
<!ENTITY I-D.ietf-idr-fare SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-fare.xml">
]>

<?rfc toc, sortrefs, symrefs, comments="yes"?>

<rfc ipr="trust200902" docName="draft-zzhang-bier-adaptive-routing-00" category="info">
  <front>
    <title>Adaptive Routing with BIER</title>

    <author initials="Z." surname="Zhang" fullname="Zhaohui Zhang">
      <organization>HPE</organization>
      <address>
        <email>zhaohui.zhang@hpe.com</email>
      </address>
    </author>
    <author initials="T." surname="Przygienda" fullname="Tony Przygienda">
      <organization>HPE</organization>
      <address>
        <email>antoni.przygienda@hpe.com</email>
      </address>
    </author>
    <author initials="Z." surname="Zhang" fullname="Zheng Zhang">
      <organization>ZTE</organization>
      <address>
        <email>zhang.zheng@zte.com.cn</email>
      </address>
    </author>
    <author initials="X." surname="Xu" fullname="Xiaohu Xu">
      <organization>China Mobile</organization>
      <address>
        <email>xuxiaohu_ietf@hotmail.com</email>
      </address>
    </author>

    <date year="2026" month="November" day="02"/>

    <area>Routing</area>
    <workgroup>bier</workgroup>
    <keyword>bier, adaptive routing, congestion</keyword>

    <abstract>


<t>ECMP is extensively used in AI DC networking, often with
so called adaptive routing mechansim, with which the load/congestion/capacity
information for the nexthop, next nexthop, or even the entire path
is considered to dynamically adjusts routing paths based on changes 
in global network conditions, thereby optimizing network performance and 
resource utilization. This document describe how BIER can work with
adaptive routing.</t>



    </abstract>



  </front>

  <middle>


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

<t>ECMP is extensively used in modern AI DC networking, often with
so called Adaptive Routing mechansim, with which the load/congestion/capacity
information for the nexthop, next nexthop, or even the entire path
is considered to dynamically adjusts routing paths based on changes 
in global network conditions, thereby optimizing network performance and 
resource utilization <xref target="I-D.cheng-rtgwg-adaptive-routing-framework"/>.</t>

<t>Consider the following spine and leaf network (due the limitation of
ASCII art,
some S-L links are not drawn, but every spine is connected to every leaf):</t>

<figure><artwork><![CDATA[
  S1    S2    S3    S4
  |\   /|\   /|\   /|
  | \ / | \ / | \ / |
  |  X  |  X  |  X  |
  | / \ | / \ | / \ |
  |/   \|/   \|/   \|      
  L1    L2    L3    L4
]]></artwork></figure>

<t>If L1 detects that S1-L2 link is congested but L1-S2 and S2-L2 are not,
it can avoid S1 and choose S2 for the L1-L2 traffic. That's the concept
of adaptive routing in a nut shell.</t>

<t>Now consider multicast using BIER <xref target="RFC8279"/>. Suppose the source is attached to L1,
and the receivers are attached to L2 and L3. Without adaptive
routing, L1 can send the BIER packet to any of the spine switches, say S1.
S1 would replicate it to L2 and L3, but since the S1-L2 link is congested,
L2 will experience packet losses.</t>

<t>With adaptive routing for BIER, L1 can avoid S1 but send the copy to S2,
who then replicate to L2 and L3. If none of the spines has uncongested paths
to both L2 and L3, then L1 can replicate to two spines, who then forward
to L2 or L3 separately.</t>

<t>This can be achieved without changing the BIER forwarding algorithm.
Oly the calculation of F-BM and some BIFT entries need to be changed,
as described below.</t>

<t>Note that, while the example and the text below uses congestion as the
criterion, other criteria can be used for adaptive routing as well
<xref target="I-D.ietf-idr-fare"/>, and the scheme in this document also works with
that - how a BFR neighbor is determined usable or not for a BFER from
adaptive routing aspect is orthogonal.</t>

<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 anchor="mode-of-operation"><name>Mode of Operation</name>

<t>This is an information document for local behaviors,
and there is no nomaltive specification.
This secion describe how the adaptive routing is done with BIER.</t>

<t>BIER forwarding is based on the F-BM associated with a BFR neighbor,
representing all the BFERs reachable via that neighbor.
The index of the lowest bit that is set in the incoming bitstring
is used to look up a BIFT entry, resulting in a set of BFR neighbors
that can be used to reach the BFER represented by that bit.
One of the neighbors is chosen, and its F-BM is used to determine
the outgoing bitstring for the copy replicated to it. The
F-BM is also used to mask bits off the incoming bitstring, and
the forwarding iterates for the remaining set bits.</t>

<t>The F-BM includes all the bits for BFERs reachable via that
neighbor, as described in <xref target="RFC8279"/>. Using the extremely simple example
of 4-bit bitstring (for only 4 BFERs in the example), L1's BIFT
includes four entries:</t>

<t>Key      Neighbor
   1 (L1)   self (pop)<br />
   2 (l2)   S1,S2,S3,S4
   3 (l3)   S1,S2,S3,S4
   4 (L4)   S1,S2,S3,S4</t>

<t>The F-BM is 1111 for all S1~S4 when all the links are up and
adaptive routing is not used (i.e., congestion is ignored).</t>

<t>Now let's say S1-L2 is congested and all other links are fine.
With adaptive routing, the second entry then becomes:</t>

<t>2 (l2)      S2,S3,S4</t>

<t>S1's F-BM also becomes 1101, because it no longer has an
uncongested path to L2. Other entries and F-BMs do not change.</t>

<t>When L1 forwards the 0110 packet (for L2 and L3), the 2nd
entry is first looked up beause the index of the lowest set
bit is 2. S1 is not in the entry and one of (S2, S3,S4) is chosen.</t>

<t>Now consider that S2-L3 is also congested. The BIFT becomes:</t>

<t>Key      Neighbor
   1 (L1)   self (pop)<br />
   2 (L2)      S2,S3,S4
   3 (L3)   S1,   S3,S4
   4 (L4)   S1,S2,S3,S4</t>

<t>S1 F-BM: 1101
   S2 F-BM: 1011</t>

<t>For the same packet, in the first lookup, if S2 is chosen out
of (S2, S3, S4) in the 2nd entry, the outgoing bitstring
becomes 0010 (0110 \&amp; 1011), and another lookup is done
for the remaining bits 0100,
leading to the 3rd entry. This time a copy is sent to one
of (S1, S3, S4) who all have an uncongested path to L3.</t>

<t>Now consider that all the Sx-L3 links are congested - there
is just no congested path to L3. Now the 3rd entry goes back to
the following, and all the F-BMs have L3's bit added back:</t>

<t>3 (L3)   S1,S2,S3,S4</t>

<t>Now we can give the formular for the calculation of the F-BM
for a neighbor when adaptive routing is used:</t>

<t><list style="numbers">
  <t>Let F-BM0 represent all BFERs reachable via the neighbor
(the vanilla F-BM in <xref target="RFC8279"/>).</t>
  <t>Let F-BM1 represent all BFERs reachaable via the neighbor
without congestion, based on unicast adaptive routing.</t>
  <t>Let F-BM2 represent all BFERs that can be reached via all
the neighbors without congestoin. ~F-BM2 then represents
all BFERs that can't be reached without congestion in any way.  <vspace blankLines='1'/>
F-BM2 = Logical OR of F-BM1 of all neighbors</t>
  <t>F-BM = F-BM1 | F-BM0 &amp; ~F-MB2</t>
</list></t>

<t>The change to BIFT entries:</t>

<t><list style="numbers">
  <t>If a BFER can be reached via some neighbors without congestion,
only those neighbors are included in the BIFT entry.
When a lookup hits the entry, one of those neighbors will be used.</t>
  <t>If a BFER can not be reached via any neighbor without congestion,
all the neighbors via which the BFER can be reached
w/o considering congestion are included in the entry.</t>
</list></t>

<t>This means that if there is no uncongested path to a BFER,
we'll take chance to foward traffic towards it after all,
even though this may sustain or further contribute to the
congestion. If it is desired to drop the packet for the BFER,
then F-BM1 in step 2 instead of F-BM in step 4 can be used,
and the BFER's entry in the BIFT becomes a discard one.</t>

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

<t>To be added.</t>

</section>
<section anchor="iana-considerations"><name>IANA Considerations</name>

<t>No IANA consideration is needed</t>

</section>
<section anchor="acknowledgments"><name>Acknowledgments</name>

<t>The authors want to thank Duncan Roweth for his collaboration on this adaptive
routing scheme for BIER.</t>

</section>


  </middle>

  <back>


    <references title='Normative References'>

&RFC8279;
&RFC2119;
&RFC8174;


    </references>

    <references title='Informative References'>

&I-D.cheng-rtgwg-adaptive-routing-framework;
&I-D.ietf-idr-fare;


    </references>



  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA+1Z624bNxb+z6fgZoHWBiTZkg20NVBsHSdBjcp21nKw2SLA
gprhSFyPhoMhx4qcps+yz7JPtt855Fx0cbH7f4N2MuKQ536+cw4zHA5FYlNT
LC5k7bPh90J443N9IS9TVXrzpOW9rT2+y7XxS/n6+u29UPN5pZ8upEhtUqgV
NqeVyvzw+XmpisVwbnQ1VPH4sArHh6enIlFeL2y1uZCmyKwQzqsiVbktQGGj
nSjNhfQ2GUhnK1/pzOFtswoviV2tdOGdEKassK2qnZ+cnv5wOhGq0uqiEVOs
oQlJIB7X4WUgG1lklIWoFQvtvLGFEKr2SwuSQsoh/pcQzl3IX0fyV9KGV4KS
+G2Xtemt2wrMfn7/ln/olTL5hXwOu0Zsi5+WpR5BdLFN/GEk31fPm4XR0L/H
4cEWm90vh3iowtvCjMp25wt8Diqh4csdFX592FWhWEAB7Pzp2TPhUVLs0P44
kh/rHuGPhvRu1pjs1dIUSt7Yucl1n/7n+jNv/ofRPvtpaT0tB/GHw6FUc+cr
lXgh3l7dvJfGSf3Z68LBg/lG1k6nkEBeXss3V7LQfm2rR3aqzbCLw1Q4KxOV
59i563u50gnUc2Y1CBG9XppkKf1Sy9yq9KSLjJNElSoxfiMoWquVokWJN95c
QKalLQf80v3CV/0EKWgLwtVUWpYKAkEJUHYm1RWE8lamG5jNkJAbyPhPRLNr
RaQTTs4VaQqWJC9kkpBDLnI7V3mjNtFMDcmFDAHLSs830kLflXkmQs22Ules
QZFoxE4qRaWdrSv8AsPcPLNqI/mwhJjI6ZoyTabaJZWZa7m0a857mBTmJXps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