<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8174 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8279 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8279.xml">
<!ENTITY RFC8401 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8401.xml">
<!ENTITY RFC8444 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8444.xml">
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc strict="no"?>
<?rfc rfcedstyle="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-bier-tether-04" ipr="trust200902">
  <front>
    <title abbrev="bier-tether">Tethering A BIER Router To A BIER incapable Router</title>

    <author fullname="Zhaohui Zhang" initials="Z." surname="Zhang">
      <organization>Juniper Networks</organization>
      <address>
        <email>zzhang@juniper.net</email>
      </address>
    </author>

    <author fullname="Nils Warnke" initials="N." surname="Warnke">
      <organization>Deutsche Telekom</organization>
      <address>
        <email>Nils.Warnke@telekom.de</email>
      </address>
    </author>

    <author fullname="IJsbrand Wijnands" initials="I." surname="Wijnands">
      <organization>Arrcus</organization>
      <address>
        <email>ice@braindump.be</email>
      </address>
    </author>

    <author fullname="Daniel Awduche" initials="D." surname="Awduche">
      <organization>Verizon</organization>
      <address>
        <email>daniel.awduche@verizon.com</email>
      </address>
    </author>

    <date year="2023"/>

    <workgroup>BIER</workgroup>

    <abstract>
      <t>This document specifies optional procedures to optimize the handling
         of Bit Index Explicit Replication (BIER) incapable routers,
         by attaching (tethering) a BIER router to a BIER incapable router.
      </t>
    </abstract>

    <note title="Requirements Language">
      <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>
    </note>
  </front>

  <middle>
    <!--section title="Terminologies">
    <t>Familiarity with BIER architecture, protocols and procedures is assumed.
       Some terminologies are listed below for convenience.
    </t>
    <t>[To be added].
    </t>
    </section-->
    <section title="Introduction">
    <t>
Consider the scenario in <xref target="Xincapable"/> where router X does not support BIER. 


      <figure align="center" anchor="Xincapable" title="Deployment with BIER incapable routers">
        <artwork>
                           ------ BFR2 ------- BFER2
                          /
   BFER1 ---  BFR1 ---- X ------- BFR3 ------- BFER3
                          .........
                          \
                           ------ BFRn ------- BFERn

        </artwork>
    </figure>
    </t>
    <t>For BFR1 to forward BIER traffic towards BFR2...BFRn, it needs to
       tunnel individual copies through X. This degrades to "ingress"
       replication to those BFRs.
If X's connections to BFRs are long distance or bandwidth limited, and n is
large, it becomes very inefficient.
    </t>
    <t>
A solution to the inefficient tunneling from BFRs is to attach (tether) a BFRx to X as depicted in <xref target="tethered"/>:
      <figure align="center" anchor="tethered" title="Tethered BFRx">
        <artwork>

                           ------ BFR2 ------- BFER2
                          /
   BFER1 ---  BFR1 ---- X ------- BFR3 ------- BFER3
                       / \  .........
                      /   \
                   BFRx    ------ BFRn ------- BFERn

        </artwork>
    </figure>
    </t>
    <t>
Instead of BFR1 tunneling to BFR2, ..., BFRn directly, BFR1 will
get BIER packets to BFRx, who will then tunnel to BFR2, ..., BFRn. There could
be fat and local pipes between the tethered BFRx and X, so ingress replication
from BFRx is acceptable.
    </t>
    <t>
For BFR1 to tunnel BIER packets to BFRx, the BFR1-BFRx tunnel need to be
announced in Interior Gateway Protocol (IGP) as a forwarding adjacency
so that BFRx will appear on the Shortest Path First (SPF)
tree. This needs to happen in a BIER specific topology so that unicast traffic
would not be tunneled to BFRx. Obviously this is operationally cumbersome.
    </t>
    <t>Section 6.9 of BIER architecture specification [RFC8279] describes a method
       that tunnels BIER packets through incapable routers without the need
       to announce tunnels. However that does not work here, because BFRx
       will not appear on the SPF tree of BFR1.
    </t>
    <t>There is a simple solution to the problem though. BFRx could advertise that it is X's helper
and other BFRs will use BFRx (instead of X's children on the SPF tree)
to replace X during its post-SPF processing as described in section 6.9 of
BIER architecture specification [RFC8279].
<!--That way, X does not need any special knowledge, provisioning or procedure.
    </t>
    <t>
BFRx could also be connected to other routers in the network so that
it could send BIER packets through other routers as well, not necessarily
tunneling through X. To prevent routing loops, smallest metric, which is 1,
must be announced for links between X and BFRx in both directions.-->
    </t>
    </section>
    <section title="Additional Considerations">
    <t>While the example shows a local connection between BFRx and X,
       it does not have to be like that. As long as packets can arrive at
       BFRx without requiring X to do BIER forwarding, it should work.
       <!--For example, X could label switch incoming BIER packets through a
       multi-hop tunnel to BFRx, or other BFRs could tunnel BIER packets to BFRx
       based on X's advertisement that BFRx is its helper. However, BFRx
       must make sure that if X appears in its SPF paths to some BFERs,
       then it must tunnel BIER packets for those BFERs directly to X's
       BFR children on BFRx's SPF tree.-->
    </t>
    <t>Additionally, the helper BRFx can be a transit helper, i.e., it has
       other connections (instead of being a stub helper that is only
       connected to X), as long as BFRx won't
       send BIER packets tunneled to it back towards the tunnel ingress.
       <xref target="safehelper"/> below is a simple case:
    <figure align="center" anchor="safehelper" title="A Safe Transit Helper">
    <artwork>
                              ------ BFR2 ------- BFER2
                             /
      BFER1 ---  BFR1 ---- X ------- BFR3 ------- BFER3
                           | 
                           |  
                         BFRx ------ BFR4 ------- BFER4
                             \
                              ------ BFR5 ------- BFER5
    </artwork>
    </figure>
    </t>
    <t>In the example of <xref target="unsafehelper"/>, there is a connection between BFR1 and BFRx.
       If the link metrics are all 1 on the three sides of BFR1-X-BFRx triangle,
       loop won't happen but if the BFRx-X metric is 3 while other two sides
       of the triangle has metric 1 then BFRx will send BIER packets tunneled
       to it from BFR1 back to BFR1, causing a loop.
      <figure align="center" anchor="unsafehelper" title="Potential looping situation">
        <artwork>

                           ------ BFR2 ------- BFER2
                          /
   BFER1 ---  BFR1 ---- X ------- BFR3 ------- BFER3
                \      / \  .........
                 \    /   \
                   BFRx    ------ BFRn ------- BFERn

        </artwork>
    </figure>
    </t>
    <t>This can easily be prevented if BFR1 does an SPF calculation with the
       helper BFRx as the root. For any BFERn reached via X from BFR1, if BFRx's
       SPF path to BFERn includes BFR1 then BFR1 must not use the helper.
       Instead, BFR1 must directly tunnel packets for BFERn to X's BFR
       (grand-)child on BFR1's SPF path to BFERn, per section 6.9 of [RFC8279].
    </t>
    <t>Notice that this SPF calculation on BFR1 with BFRx as the root is not
       different from the SPF done for a neighbor as part of Loop-Free Alternate (LFA) calculation.
       In fact, BFR1 tunneling packets to X's helper is not different from
       sending packets to a LFA backup.
    </t>
    <t>Also notice that, instead of a dedicated helper BFRx, any one or
       multiple ones of BFR2..N can also be the helper (as long as the
       connection between that BFR and X has enough bandwidth for replication
       to multiple helpers through X).
       To allow multiple helpers to help the same non-BFR, the
       "I am X's helper" advertisement carries a priority. BFR1 will choose
       the helper advertising the highest priority among those satisfying
       the loop-free
       condition described above. When there are multiple helpers advertising
       the same priority and satisfying the loop-free condition, any one or
       multiple ones could be used solely at the discretion of BFR1.
       However, if multiple ones are used, it means that multiple copies may 
       be tunneled through X.
    </t>
    <t>The situation in <xref target="multiplehelped"/> where a helper BFRxy helps two different
       non-BFRs X and Y also works. It's just a special situation of a transit
       helper.
      <figure align="center" anchor="multiplehelped" title="One Helper for multiple helped">
        <artwork>

                           ----- BFR2 ------- BFER2
                         /
                       X ------- BFR3 ------- BFER3
                     / | \
                   /    \  ----- BFR4 ------- BFER4
                 /       \
       BFER1 -- BFR1      BFRxy ------------- BFERxy
                 \       /
                   \    /  ----- BFR5 ------- BFER5
                     \ | /
                       Y ------- BFR6 ------- BFER6
                         \
                           ----- BFRn ------- BFERn

        </artwork>
    </figure>
    </t>
    </section>
    <!--section title="Egress Protection">
    <t>The same principal can be used for egress protection.
	  Consider the following:
      <figure align="center" anchor="egress" title="Egress Protection">
        <artwork>
                           .............BFER1 .... ce1
                          /                   ____ /
                 ... BFR1 ..............BFER2 ____
                                                   \
                                                     ce2
        </artwork>
    </figure>
    </t>
    <t> ce1 is multi-homed to BFER1 and BFER2. Suppose both ce1 and ce2 need
	to receive certain multicast traffic and the copy for ce1 in normal situation
	follows the BFR1-BFER1-ce1 path while the copy for for ce2 follows the
	BFR1-BFER2-ce2 path (i.e. the packet that BFR1 receives has two bits
	set for BFER1 and BFER2 respectively). If BFR1 detects the node failure
	of BFER1, in-flight traffic with BFER1 bit set is redirected to BFER2,
	who will then deliver to ce1 only. Note that for the same multicast payload,
	BFER2 would receive two copies (before the BFIR converges), one with
	the BFER1 bit set and one with the BFER2 bit set. BFER2 will deliver the
	copy with the BFER1 bit to ce1 upon detection of node failure of BFER1,
	but will not deliver the same to ce2.
    </t>
    <t>If ce2 is also multi-homed to BFER1 and BFER2, then BFER1 and BFER2
	could egress-pretect each other. Each announces that it is the helper
	node of the other, and the fact that each is capable of BIER indicates
	that it is for egress protection only.
    </t>
    </section-->
    <section title="Specification">
    <t>The procedures in this document apply when a BFRx is tethered to a BIER
       incapable router X as X's helper for BIER forwarding.
    </t>
    <section title="IGP Signaling">
    <t>Suppose that the BIER domain uses BIER signaling extensions to
       ISIS [RFC8401] or OSPF [RFC8444]. The helper node (BFRx) MUST advertise
       one or more BIER Helped Node sub-sub-TLVs (one for each helped node).
       The value is BIER prefix of the helped
       node (X) followed by a one-octet priority field, and one-octet reserved
       field. The length is 6 for IPv4 and 18 for IPv6 respectively.
    </t>
    <t>The post-SPF processing procedures in Section 6.9 of the BIER
       architecture specification [RFC8279] are modified as following
       for BIER tethering purpose.
    </t>
    <t>At step 2, the removed node is added to an ordered list maintained
       with each child that replaces the node. If the removed node already has a
       non-empty list maintained with itself, add the removed node to the tail
       of the list and copy the list to each child.
    </t>
    <t>At the end, the calculating
       node BFR-B would use a unicast tunnel to reach next hop BFRs for
       some BFERs. The next hop BFR has an ordered
       list created at step 2 above, recording each BIER incapable node
       replaced by their children along the way. For a particular BFER
       to be reached via a tunnel to the next hop BFR, additional procedures
       are performed as following.
    <list style="symbols">
    <t>Starting with the first node in the ordered list of incapable nodes,
       say N1, check if there is one or more helper nodes for N1. If not,
       go the next node in the list.
    </t>
    <t>Order all the helper nodes of N1 based descending (priority,
       BIER prefix). Starting with the first one, say H1, check if BFR-B
       could use H1 as LFA next hop to reach the BFER. If yes,
       H1 is used as the next hop BFR for the BFER
       and the procedure stops. If not, go to the next helper in order.
    </t>
    <t>If none of the helper nodes of N1 can be used, go to the next node
       in the list of incapable nodes.
    </t>
    </list>
    </t>
    <t>If the above procedure finishes without finding any helper,
       then the original BFR next hop via a tunnel is used to reach the BFER.
    </t>
    </section>
    <section title="BGP Signaling" anchor="bgp">
    <t>Suppose that the BIER domain uses BGP signaling
       <xref target="I-D.ietf-bier-idr-extensions"/> instead of IGP.
       BFR1..N advertises BIER prefixes that are reachable through them,
       with BIER Path Attributes (BPA) attached. There are three situations
       regarding X's involvement:
       <list style="format (%d)">
          <t>X does not participate in BGP peering at all
          </t>
          <t>X re-advertises the BIER prefixes but it does not update
		  the BPA, as specified in <xref target="I-D.ietf-bier-idr-extensions"/>.
          </t>
       </list>
    </t>
    <t>In either case, the BFR1..N will tunnel BIER packets directly to
       each other. It works but not efficiently as explained earlier.
    </t>
    <t>To make tethering work well with BGP signaling, the following can be
       done:
       <list style="symbols">
         <t>Configure BGP sessions between X and BFR1..N and BFRx.
		 </t>
		 <t>
          When X re-advertises BIER prefixes to BFRx, it does not
		  change BIER Nexthop <xref target="I-D.ietf-bier-idr-extensions"/>
		  in the BPA. When X re-advertises BIER prefixes to
		  BFR1..N, it does change the BIER Nexthop to BFRx.
          </t>
          <t>BFRx advertises its own BIER prefix with BPA to X, and sets the
          BIER Nexthop to itself. X then re-advertises BFRx's BIER prefix to
		  BFR1..N.
          </t>
       </list>
    </t>
    <t>With the above, BFR1..N will tunnel BIER packets to BFRx (following the
       BIER Nexthop), who will then tunnel packets to
       other BFRs (again following the BIER Nexthop).
    </t>
    </section>
    </section>
    <section title="Security Considerations">
    <t>This specification does not introduce additional security concerns
       beyond those already discussed in BIER architecture and OSPF/ISIS/BGP
       extensions for BIER signaling.
    </t>
    </section>

    <section title="IANA Considerations">
    <t>This document requests a new sub-sub-TLV type value from the
       "Sub-sub-TLVs for BIER Info Sub-TLV" registry in
       the "IS-IS TLV Codepoints" registry:
      <figure>
        <artwork>
     Type    Name
     ----    ----
     TBD1    BIER Helped Node
        </artwork>
    </figure>
    </t>
    <t>This document also requests a new sub-TLV type value from the
       OSPFv2 Extended Prefix TLV Sub-TLV registry:
      <figure>
        <artwork>
     Type    Name
     ----    ----
     TBD2    BIER Helped Node
        </artwork>
    </figure>
    </t>
    </section>

    <section title="Contributors">
    <t>The following also contributed to this document.
    <figure>
	<artwork>
   Zheng(Sandy) Zhang
   ZTE Corporation

   EMail: zzhang_ietf@hotmail.com

   Hooman Bidgoli
   Nokia
   EMail: hooman.bidgoli@nokia.com
	</artwork>
    </figure>
    </t>
    </section>
    <section anchor="Acknowledgements" title="Acknowledgements">
    <t>The author wants to thank Eric Rosen and Antonie Przygienda for
       their review, comments and suggestions.
    </t>
    </section>
   </middle>

  <back>
    <references title="Normative References">
	  &RFC2119;
	  &RFC8174;
	  &RFC8279;
	  &RFC8401;
	  &RFC8444;
      <?rfc include='reference.I-D.ietf-bier-idr-extensions'?>
    </references>
  </back>
</rfc>

