<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std"
     docName="draft-chen-bier-te-frr-03"
     ipr="trust200902">
  <front>
    <title abbrev="BIER-TE FRR">BIER-TE Fast ReRoute</title>

     <author initials="H" surname="Chen" fullname="Huaimo Chen">
      <organization>Futurewei</organization>
      <address>
        <postal>
          <street></street>
          <city>Boston, MA</city>
          <region></region>
          <code></code>
          <country>USA</country>
        </postal>
        <email>Huaimo.chen@futurewei.com</email>
      </address>
    </author>

    <author fullname="Mike McBride" initials="M" surname="McBride">
      <organization>Futurewei</organization>
      <address>
        <email>michael.mcbride@futurewei.com</email>
      </address>
    </author>

     <author initials="Y" fullname="Yisong Liu" 
            surname="Liu">
      <organization>China Mobile</organization>
      <address>
        <email>liuyisong@chinamobile.com</email>
      </address>
    </author>

     <author initials="A" fullname="Aijun Wang" 
            surname="Wang">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <street>Beiqijia Town, Changping District</street>
          <city>Beijing</city>
          <region> </region>
          <code>102209</code>
          <country>China</country>
        </postal>
        <email>wangaj3@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Gyan S. Mishra" initials="G" surname="Mishra">
      <organization>Verizon Inc.</organization>
      <address>
        <postal>
          <street>13101 Columbia Pike</street>
          <city>Silver Spring</city>
          <code>MD 20904</code>
          <country>USA</country>
        </postal>
        <phone> 301 502-1347</phone>
        <email>gyan.s.mishra@verizon.com</email>
      </address>
    </author>

   <author initials="Y" fullname="Yanhe Fan" 
            surname="Fan">
      <organization>Casa Systems</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <code></code>
          <country>USA</country>
        </postal>
        <email>yfan@casa-systems.com</email>
      </address>
    </author>

   <author initials="L" fullname="Lei Liu" 
            surname="Liu">
      <organization>Fujitsu</organization>
      <address>
        <postal>
          <street> </street>
          <city> </city>
          <region></region>
          <code></code>
          <country>USA</country>
        </postal>
        <email>liulei.kddi@gmail.com</email>
      </address>
    </author>

  <author initials="X" fullname="Xufeng Liu" 
            surname="Liu">
      <organization>IBM Corporation</organization>
      <address>
        <postal>
          <street> </street>
          <city> </city>
          <region> </region>
          <code></code>
          <country>USA</country>
        </postal>
        <email>xufeng.liu.ietf@gmail.com</email>
      </address>
    </author>

    <date year="2022"/>

    <abstract>
      <t>This document describes a mechanism for fast re-route (FRR) 
         protection against the failure of a transit node or link 
         on an explicit point to multipoint (P2MP) multicast path/tree in 
         a "Bit Index Explicit Replication" (BIER) Traffic Engineering (TE) 
         domain.
         It does not have any per-path state in the core.
         For a multicast packet to traverse a transit node 
         along an explicit P2MP path, when the node fails, its upstream 
         hop node as a PLR reroutes the packet around the failed node
         along the P2MP path once it detects the failure.</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in 
      <xref target="RFC2119"/> <xref target="RFC8174"/> 
      when, and only when, they appear in all capitals, as shown here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
     <t><xref target="I-D.ietf-bier-te-arch"/> introduces Bit Index 
        Explicit Replication (BIER) Traffic/Tree Engineering (BIER-TE).
        It is an architecture for per-packet stateless explicit  
        point to multipoint (P2MP) multicast path/tree and based on
        Bit Index Explicit Replication (BIER)
        architecture defined in <xref target="RFC8279"/>.
        It does not require intermediate nodes to maintain any 
        per-path/tree state.</t>

      <t><xref target="I-D.eckert-bier-te-frr"/> describes three 
         BIER-TE FRR methods for providing fast protections against
         the failure of an intermediate node or link on an explicit 
         P2MP BIET-TE path. 
         The first method is Point-to-Point Tunneling (PPT), 
         where a BIER-TE packet is rerouted by the PLR around the   
         failure to its NHs and NNHs through unicast tunnels.
         This method depends on the tunnels, whose configurations
         may increase the Opex. 

         The second is BIER-in-BIER Encapsulation (BBE),  
         where a BIER-TE packet is rerouted by the PLR to its  
         NHs and NNHs through encapsulating the packet in another
         BIER-TE header. This additional header reroutes the packet
         around the failure towards its NHs and NNHs and may increase
         the overhead.

         The third is Header Modification (HM), where 
         the backup path is added into the existing BIER-TE header
         through using an AddBitmask and a ResetBitmask. 
         The issue of this method is that it may cause duplicated 
         packets for some destinations.</t>

      <t>This document describes a BIER-TE FRR mechanism without the above 
         issues. For a multicast packet with a BIER-TE header to traverse
         a transit node along an explicit P2MP path, when the node fails, 
         its upstream hop node as a point of local repair (PLR) reroutes
         the packet around the failed node to the next hop nodes of 
         the failed node on the P2MP path once it detects the failure.</t>

      <t>This BIER-TE FRR does not require intermediate nodes to maintain
         any per-path state for FRR protection against the failure of 
         a transit node or link on any explicit P2MP multicast path.</t>


    <section title="Terminology">
      <t>
      <list style="hanging" hangIndent="6">
       <t hangText="BIER:">Bit Index Explicit Replication.</t>
       <t hangText="BIER-TE:">BIER Traffic/Tree Engineering.</t>
       <t hangText="BFR:">Bit-Forwarding Router.</t>
       <t hangText="BFIR:">Bit-Forwarding Ingress Router.</t>
       <t hangText="BFER:">Bit-Forwarding Egress Router.</t>
       <t hangText="BFR-id:">BFR Identifier. 
          It is a number in the range [1,65535].</t>
       <t hangText="BFR-NBR:">BFR Neighbor.</t>
       <t hangText="F-BM:">Forwarding Bit Mask.</t>
       <t hangText="BFR-prefix:">An IP address (either IPv4 or IPv6) of a BFR.</t>
       <t hangText="BIRT:">Bit Index Routing Table. 
          It is a table that maps from the BFR-id (in a particular sub-domain)
          of a BFER to the BFR-prefix of that BFER, and to the BFR-NBR 
          on the path to that BFER.</t>
       <t hangText="BIFT:">Bit Index Forwarding Table.</t>

       <t hangText="FRR:">Fast Re-Route.</t>
       <t hangText="PLR:">Point of Local Repair.</t>

       <t hangText="IGP:">Interior Gateway Protocol.</t>
       <t hangText="LSDB:">Link State DataBase.</t>
       <t hangText="SPF:">Shortest Path First.</t>
       <t hangText="SPT:">Shortest Path Tree.</t>

      </list></t>
    </section> <!-- Terminology -->

    </section> <!-- Introduction -->



    <section title="Overview of BIER-TE FRR"> 
       <t>A Bit-Forwarding Router (BFR) in a BIER-TE domain has 
         a BIER-TE Bit Index Forwarding Tables (BIFT)
         <xref target="I-D.ietf-bier-te-arch"/>.
         A BIER-TE BIFT on a BFR comprises a forwarding entry for 
         a BitPosition (BP) assigned to each of the adjacencies of the BFR. 
         If the BP represents a forward connected adjacency, 
         the forwarding entry for the BP forwards the multicast packet 
         with the BP to the directly connected BFR neighbor of the adjacency.
         If the BP represents a BFER (i.e., egress node) 
         or say a local decap adjacency,
         the forwarding entry for the BP decapsulates the multicast packet
         with the BP and passes a copy of the payload of the packet
         to the packet's NextProto within the BFR. </t>
    
       <t>To support BIER-TE FRR (i.e., fast re-route (FRR) 
         protection against the failure of a transit node or link on an
         explicit P2MP multicast path in a BIER-TE domain), 
         the BIER-TE BIFT on a BFR is extended.
 
         For each forwarding entry of the BIER-TE BIFT on the BFR, 
         if it is for the BP representing a forward connected adjacency,
         the forwarding entry is extended to include a new 
         forwarding entry, which is called FRR forwarding entry or
         FRR entry for short.</t>

      <t>Suppose that the BFR-NBR in the forwarding entry for the BP is N.
         The FRR entry forwards the multicast packet with the BP
         to the N's next hops that are on the P2MP path encoded in 
         the multicast packet.</t>

       <t>Once the BFR as a PLR detects the failure of its BFR-NBR N
          that is a transit node,
          for a multicast packet with the BP attached to N, 
          the PLR uses the FRR forwarding entry in 
          the extended BIER-TE BIFT to send the packet to 
          the N's next hop nodes that are on the P2MP path encoded in 
          the multicast packet. 
          These next hop nodes forward the packet along the 
          P2MP path towards the egress nodes of the path.</t> 

       <t>Before sending the packet to the N's next hops, 
          for any local decap BP for a destination/BFER in the header, 
          the PLR removes/clears it
          if it is on the backup path and 
          it is not reachable through the forward connected adjacency BPs 
          in the header (i.e., it is not on any branch from the PLR).</t>
    </section> <!-- Overview of BIER-TE FRR -->


   <section title="BIER-TE Extensions for BIER-TE FRR"> 
     <t>This section describes extensions to a BIER-TE BIFT of a BFR
        for supporting BIER-TE FRR and 
        enhancements on a forwarding procedure to use
        the extended BIER-TE BIFT for BIER-TE FRR.</t>

      <section title="Extensions to BIER-TE BIFT"> 
      <t>Every BFR has an extended BIER-TE BIFT to support
         BIER-TE FRR protection against the failure of its neighbor 
         transit node.

         The forwarding entry with transit node (say N) as its BFR-NBR 
         in the BIFT comprises a FRR forwarding entry 
         (or FRR entry for short).
         The FRR entry contains a flag FPA
         (which is short for FRR Protection is Active) and 
         a backup path from the BFR to each of N's next hop nodes.</t>

      <t>In normal operations, the flag FPA in the FRR entry 
         for neighbor transit node N is set to 0 (zero).
         The flag FPA is set to 1 (one) when transit node N fails. 
         FPA == 1 means that the FRR protection for transit 
         node N is active and the FRR entry will be used
         to forward the packet with the BP for the adjacency from 
         the BFR to node N towards N's next hop nodes on the 
         P2MP path encoded in the packet's BitString 
         along the backup paths.</t> 

      <t>The backup path from the BFR to a N's next hop node X is 
         a path that satisfies a set of constraints and 
         does not traverse transit node N or 
         any link connected to N. 
         In one implementation, the backup path is represented 
         by the BitPositions for the adjacencies along the backup 
         path.</t>

      </section> <!-- Extensions to BIER-TE BIFT for BIER-TE FRR -->


      <section title="Updated Forwarding Procedure">  
       <t>The forwarding procedure defined in 
          <xref target="I-D.ietf-bier-te-arch"/>
          is updated/enhanced for using an extended BIER-TE BIFT 
          to support BIER-TE FRR.</t>

       <t>For a multicast packet with the BP in the BitString 
          indicating a BFR-NBR as a transit node of the P2MP path
          encoded in the packet, 
          the updated forwarding procedure on a BFR
          sends the packet towards the transit node's next hop nodes
          on the P2MP path if the transit node fails. </t>

       <t>It checks whether FPA equals to 1 (one) 
          in the forwarding entry with the BFR-NBR that is a transit
          node of the P2MP path. 
          
          If FPA is 1 (i.e., the transit node fails and 
          the FRR protection for the transit node is active), 
          the procedure clears the BP for the adjacency to 
          the transit node in the packet's BitString first. 

          Secondly, 
          for any local decap BP for a destination/BFER in the BitString,
          it removes/clears the BP if the BP is on the backup path and 
          is not reachable by the forward connected adjacency BPs in the 
          BitString (i.e., is not on any branch from the BFR as PLR). 

          And then,
          for each next hop node of the failed transit node 
          that is on the P2MP path encoded
          in the packet's BitString, it copies and sends the packet 
          to the next hop node along the backup path from the BFR
          to the next hop node.</t>

       <t>For each next hop node of transit node BFR-NBR 
         (which is named as N for simplicity), when N's next hop node
         is on the P2MP path, the forwarding procedure 
         clears the BP for the adjacency from N to the N's next hop node 
         in the packet's BitString and adds the BPs for the backup path
         from the BFR to the N's next hop node.
         This lets the packet be copied and sent to the N's next hop nodes 
         along the backup paths when transit node N fails and then towards 
         the destinations along the P2MP path. </t>

       <t>The updated procedure is described in 
          <xref target="proc4-frr-bift"/>.
          It can also be used by the BFR
          to forward multicast packets in normal operations.
 
<figure anchor="proc4-frr-bift" 
        title="Updated Forwarding Procedure">
  <artwork> <![CDATA[
  Packet = the packet received by BFR;
  FOR each BP k (from the rightmost in Packet's BitString) {
     IF (BP k is local decap adjacency) {
        copies Packet, sends the copy to the multicast 
        flow overlay and clears bit k in Packet's BitString
     } ELSE IF (BP k is forward connect adjacency of the BFR) {
        finds the forwarding entry in the BIER-TE BIFT for the domain 
        using BP k;
        Clears BP k in Packet's BitString;
        IF (FPA == 1) {//FRR for BFR-NBR/transit N is Active
           FOR each BP j for a BFER in Packet's BitString {
              IF (BP j is on a backup path and
                       is not reachable by BPs in BitString) {
                 Clears BP j in Packet's BitString
              }  
           }
           FOR each N's next hop on P2MP path in Packet's BitString {
              Clears the BP for the adjacency from N to the next hop;
              Adds the BPs for the backup path to N's next hop 
              into Packet's BitString 
           }
        } //Adjacency to N removed, backup path to N's next hop added
        ELSE {
           Copies Packet, updates the copy's BitString by 
           clearing all the BPs for the adjacencies of the BFR, 
           and sends the updated copy to BFR-NBR
        }
     }
  }]]></artwork>
</figure> </t>
      </section> <!-- Updated Forwarding Procedure -->
    </section> <!-- BIER-TE Extensions -->


    <section title="Example Application of BIER-TE FRR">
      <t>This section illustrates an example application of 
         BIER-TE FRR on a BFR in a BIER-TE topology 
         in <xref target="bier-top-1"/>.</t>

      <section title="Example BIER-TE Topology">
        <t>An example BIER-TE topology for a BIER-TE domain is shown
           in <xref target="bier-top-1"/>.

           It has 9 nodes/BFRs A, B, C, D, E, F, G, H and I.
           Nodes/BFRs D, F, E, H and A are BFERs and have 
           local decap adjacency BitPositions 1, 2, 3, 4, and 5 respectively.
           For simplicity, these BPs are represented by (SI:BitString),
           where SI = 0 and BitString is of 8 bits. 
           BPs 1, 2, 3, 4, and 5 are represented by
           1 (0:00000001), 2 (0:00000010), 3 (0:00000100), 4 (0:00001000) 
           and 5 (0:00010000) respectively.

           <figure anchor="bier-top-1" 
           title="Example BIER-TE Topology">
  <artwork align="center"> <![CDATA[
                           26'       19'       20'    4 
        /--------------------(  G  )---------------(  H  )
       /                    /  18'\               16'/|28'
      /                  6'/       \17'             / |
     /            ________/       ( I )____________/  | 
 25'/            /             14'/      15'          |
   /          5'/                /                    |
  /   8'   7'  /    3'     4'   /13'           12'    |27'
( A )--------( B )------------( C )-----------------( D ) 1
  5            \1'              \9'   11'            /24'
                \                \                  /
                 \2'   21'   22'  \10'             /
                ( E )------------( F )____________/
                  3                2   23'          ]]></artwork>
</figure>

            The BitPositions for the forward connected adjacencies 
            are represented by i', where i is from 1 to 28. 
            In one option, they are encoded as (n+i), 
            where n is a power of 2 such as 32768.
            For simplicity, these BitPositions are represented 
            by (SI:BitString),
            where SI = (6 + (i-1)/8) and BitString is of 8 bits. 
            BitPositions i' (i from 1 to 28) are represented by
            1'(6:00000001), 2'(6:00000010), 3'(6:00000100), 4'(6:00001000), 
            5'(6:00010000), 6'(6:00100000), 7'(6:01000000), 8'(6:10000000),
            9'(7:00000001), 10'(7:00000010), . . . , 24'(8:10000000)
            25'(9:00000001), 26'(9:00000010), ..., 28'(9:00001000).</t>

        <t>For a link between two nodes X and Y, 
           there are two BitPositions for two forward connected adjacencies.
           These two forward connected adjacency BitPositions are assigned 
           on nodes X and Y respectively. 
           The BitPosition assigned on X is the forward connected 
           adjacency of Y.
           The BitPosition assigned on Y is the forward connected 
           adjacency of X.</t>

        <t>For example, for the link between nodes B and C in the figure,
           two forward connected adjacency BitPositions 3' and 4' are assigned
           to two ends of the link.
           BitPosition 3' is assigned on node B to B's end of the link. 
           It is the forward connected adjacency of node C.
           BitPosition 4' is assigned on node C to C's end of the link. 
           It is the forward connected adjacency of node B.</t>

      </section> <!-- Example BIER-TE Topology -->


      <section title="BIER-TE BIFT on a BFR">
        <t>Every BFR in a BIER-TE domain/topology has 
           a BIER-TE BIFT. 
           For the BIER-TE topology in <xref target="bier-top-1"/>,
           each of 9 nodes/BFRs A, B, C, D, E, F, G, H and I 
           has its BIER-TE BIFT for the topology.</t>

        <t>The BIER-TE BIFT on BFR B (i.e. node B) is shown in
           <xref target="bift-bfr-b"/>. </t>

         <t>The 1st forwarding entry in the BIFT is for BitPosition 2', 
            which is the forward connected adjacency from B to E. 
            For a multicast packet with BitPosition 2', which indicates
            that the P2MP path in the packet traverses the adjacency from B to E,   
            the forwarding entry forwards the packet to E along 
            the link from B to E.</t>
         <t>The 2nd forwarding entry in the BIFT is for BitPosition 4', 
            which is the forward connected adjacency from B to C. 
            For a multicast packet with BitPosition 4', which indicates
            that the P2MP path in the packet traverses the adjacency from B to C,   
            the forwarding entry forwards the packet to C along 
            the link from B to C.</t>
         <t>The 3rd forwarding entry in the BIFT is for BitPosition 6', 
            which is the forward connected adjacency from B to G. 
            For a multicast packet with BitPosition 6', which indicates
            that the P2MP path in the packet traverses the adjacency from B to G,   
            the forwarding entry forwards the packet to G along 
            the link from B to G.</t>
         <t>The 4-th forwarding entry in the BIFT is for BitPosition 8', 
            which is the forward connected adjacency from B to A. 
            For a multicast packet with BitPosition 8', which indicates
            that the P2MP path in the packet traverses the adjacency from B to A,   
            the forwarding entry forwards the packet to A along 
            the link from B to A.

<figure anchor="bift-bfr-b" 
        title="BIER-TE BIFT on BFR B">
  <artwork align="center"> <![CDATA[
 +----------------+--------------+------------+
 |  Adjacency BP  |    Action    |  BFR-NBR   |
 | (SI:BitString) |              | (Next Hop) |
 +================+==============+============+
 | 2'(6:00000010) | fw-connected |     E      |
 +----------------+--------------+------------+
 | 4'(6:00001000) | fw-connected |     C      |
 +----------------+--------------+------------+
 | 6'(6:00100000) | fw-connected |     G      |
 +----------------+--------------+------------+
 | 8'(6:10000000) | fw-connected |     A      |
 +----------------+--------------+------------+ ]]></artwork>
</figure> 
       </t>

       <t>The BIER-TE BIFT on BFR E (i.e. node E) is shown in
           <xref target="bift-bfr-e"/>. </t>

       <t>The 1st forwarding entry in the BIFT forwards a multicast  
          packet with BitPosition 1' to B.
          It is for BitPosition 1', 
            which is the forward connected adjacency from E to B. 
            For a multicast packet with BitPosition 1', which indicates
            that the P2MP path in the packet traverses the adjacency from E to B,   
            the forwarding entry forwards the packet to B along 
            the link from E to B.</t>

       <t>The 2nd forwarding entry in the BIFT forwards a multicast  
          packet with BitPosition 22' to F.
          It is for BitPosition 22', 
            which is the forward connected adjacency from E to F. 
            For a multicast packet with BitPosition 22', which indicates
            that the P2MP path in the packet traverses the adjacency from E to F,   
            the forwarding entry forwards the packet to F along 
            the link from E to F.</t>

       <t>The 3rd forwarding entry in the BIFT locally decapsulates  
          a multicast packet with BitPosition 3 and passes a copy of the  
          payload of the packet to the packet's NextProto.
          It is for BitPosition 3, 
            which is the local decap adjacency for BFER (i.e., egress) E. 
            For a multicast packet with BitPosition 3, which indicates
            that the P2MP path in the packet has node E as one of its 
            destinations (i.e., egress nodes),   
            the forwarding entry decapsulates the packet and passes
            a copy of the payload of the packet to the packet's NextProto 
            within node E.


<figure anchor="bift-bfr-e" 
        title="BIER-TE BIFT on BFR D">
  <artwork align="center"> <![CDATA[
 +----------------+--------------+------------+
 |  Adjacency BP  |    Action    |  BFR-NBR   |
 | (SI:BitString) |              | (Next Hop) |
 +================+==============+============+
 |  1'(6:00000001)| fw-connected |     B      |
 +----------------+--------------+------------+
 | 22'(8:00001000)| fw-connected |     F      |
 +----------------+--------------+------------+
 |  3 (0:00000100)| local-decap  |            |
 +----------------+--------------+------------+]]></artwork>
</figure>
         </t>

      </section> <!-- BIER-TE BIFT on a BFR -->

     <section title="Extended BIER-TE BIFT on a BFR">
        <t>Every BFR has an extended BIER-TE BIFT to support BIER-TE FRR
           protection against the failure of its neighbor transit node. </t>

         <t>For example, the extended BIER-TE BIFT on BFR B is 
            illustrated in <xref target="frr-bift-bfr-b"/>.
            Each forwarding entry with transit node (such as E, C and G) 
            as its BFR-NBR in the BIFT comprises a FRR entry.

            Each of these FRR entries contains
            a flag FPA and a number of backup paths. 
            For a forwarding entry with transit node X, 
            its FRR entry has a backup path to each of node X's next hop 
            nodes except for BFR B itself.
            FPA is set to zero in normal operations.
            FPA in the FRR entry for neighbor transit node X 
            is set to one when node X fails.</t>

         <t>On BFR B, the 1st forwarding entry in the BIFT has BFR-NBR E 
            as transit node. 
            Nodes F and B are the next hop nodes of node E in 
            <xref target="bier-top-1"/>.
            The backup path from B to F without E or links attached to E goes 
            through the link from B to C and then the link from C to F.
            This backup path from B to F is represented by B--&gt;F: {4', 10'} 
            in the FRR entry of the forwarding entry.</t>

         <t>FPA in the FRR entry is set to 0 (zero) in normal operations. 
            When transit node E fails, the FPA is set to 1 (one) and 
            the FRR entry is used to
            forward a multicast packet with BitPosition 2' for adjacency  
            from B to E towards E's next hop node F  
            along the backup path from B to F if  the P2MP path in the packet
            traverses node F.</t>

         <t>
<figure anchor="frr-bift-bfr-b" 
        title="Extended BIER-TE BIFT on BFR B">
  <artwork align="center"> <![CDATA[ 
+--------------+------------+----------+------------------------+
| Adjacency BP |   Action   | BFR-NBR  |     FRR Entry          |
|(SI:BitString)|            |(Next Hop)|---+--------------------+
|              |            |          |FPA|  Backup Paths      |
+==============+============+==========+===+====================+
|2'(6:00000010)|fw-connected|    E     | 0 |B-->F: {4',10'}     |
+--------------+------------+----------+---+--------------------+
|4'(6:00000010)|fw-connected|    C     | 0 |B-->F: {2',22'}     |
|              |            |          |   |B-->D: {6',20',27'} |
|              |            |          |   |B-->I: {6',17'}     |
+--------------+------------+----------+---+--------------------+
|6'(6:00100000)|fw-connected|    G     | 0 |B-->I: {4',14'}     |
|              |            |          |   |B-->H: {4',14',16'} |
|              |            |          |   |B-->A: {8'}         |
+--------------+------------+----------+---+--------------------+
|8'(6:10000000)|fw-connected|    A     | 0 |B-->G: {6'}         |
+--------------+------------+----------+---+--------------------+]]></artwork>
</figure>
        </t>

         <t>On BFR B, the 2nd forwarding entry in the BIFT has BFR-NBR C 
            as transit node. 
            Nodes F, D, I and B are the next hop nodes of node C in 
            <xref target="bier-top-1"/>.
            The backup path from B to F without C or links attached to C goes 
            through the link from B to E and then the link from E to F.
            This backup path from B to F is represented by B--&gt;F: {2', 22'} 
            in the FRR entry of the forwarding entry.</t>
         <t>The backup path from B to D without C or links attached to C goes 
<!--
            through the link from B to E, the link from E to F and 
            then the link from F to D.
            This backup path from B to D is represented by B-&gt;D: 
            {2', 22', 24'} 
            in the FRR entry of the forwarding entry.</t>
-->
            through the link from B to G, the link from G to H and 
            then the link from H to D.
            This backup path from B to D is represented by B--&gt;D: 
            {6', 20', 27'} 
            in the FRR entry of the forwarding entry.</t>
         <t>The backup path from B to I without C or links attached to C goes 
            through the link from B to G and then the link from G to I.
            This backup path from B to I is represented by B--&gt;I: {6', 17'} 
            in the FRR entry of the forwarding entry.</t>

         <t>FPA in the FRR entry is set to 0 (zero) in normal operations. 
            When transit node C fails, the FPA is set to 1 (one) and 
            the FRR entry is used to
            forward a multicast packet with BitPosition 4' for adjacency  
            from B to C towards C's next hop nodes F, D or I  
            along the backup paths from B to F, D or I respectively
            if the P2MP path in the packet traverses nodes F, D or I.</t>

         <t>On BFR B, the 3rd forwarding entry in the BIFT has BFR-NBR G 
            as transit node. 
            Nodes I, H, A and B are the next hop nodes of node G in 
            <xref target="bier-top-1"/>.
            The backup path from B to I without G or links attached to G goes 
            through the link from B to C and then the link from C to I.
            This backup path from B to I is represented by B--&gt;I: {4', 14'} 
            in the FRR entry of the forwarding entry.</t>

         <t>The backup path from B to H without G or links attached to G goes 
            through the link from B to C, the link from C to I and 
            then the link from I to H.
            This backup path from B to H is represented by B--&gt;H: 
            {4', 14', 16'} 
            in the FRR entry of the forwarding entry.</t>

         <t>The backup path from B to A without G or links attached to G goes 
            through the link from B to A.
            This backup path from B to A is represented by B--&gt;A: 
            {8'} 
            in the FRR entry of the forwarding entry.</t>

         <t>FPA in the FRR entry is set to 0 (zero) in normal operations. 
            When transit node G fails, the FPA is set to 1 (one) and 
            the FRR entry is used to
            forward a multicast packet with BitPosition 6' for adjacency  
            from B to G towards G's next hop nodes I, H or A 
            along the backup paths from B to I, H or A respectively
            if the P2MP path in the packet traverses nodes I, H or A.</t>

         <t>On BFR B, the 4-th forwarding entry in the BIFT has BFR-NBR A 
            as transit node. Nodes G and B are the next hop nodes of node A.
            The backup path from B to G without A or links attached to A goes 
            through the link from B to G.
            This backup path from B to G is represented by B--&gt;G: {6'} 
            in the FRR entry of the forwarding entry.</t>

         <t>FPA in the FRR entry is set to 0 (zero) in normal operations. 
            When node A fails, the FPA is set to 1 (one) and 
            the FRR entry is used to
            forward a multicast packet with BitPosition 8' for adjacency  
            from B to A towards A's next hop node G 
            along the backup path from B to G 
            if the P2MP path in the packet traverses node A 
            as a transit node.</t>

      </section> <!-- Extended BIER-TE BIFT on a BFR -->

      <section title="Forwarding using Extended BIER-TE BIFT">

        <t>Suppose that there is an explicit multicast P2MP path from 
           ingress A to egresses H and D, traversing from A to G to H and 
           from A to B to C to D.
           This path is represented by BPs as {26', 20', 7', 4', 12', 4, 1}.
           The forwarding behaviors in normal operations and 
           in case of BFR C failure are described below.
        </t>

      <section title="Forwarding in Normal Operations">

        <t>For a multicast packet with the path on BFR A,
           A sends the packet to G and B according to 
           the forwarding entries for 26' and 7' in A's extended BIER-TE BIFT
           respectively. 
           The packet received by G and B contains path {20', 4', 12', 4, 1}.
        </t>

        <t>After receving the packet from A, G forwards the packet to H
           according to forwarding entry for 20' in its extended BIER-TE BIFT.
           The packet received by H contains path {4', 12', 4, 1}.

           After receving the packet from A, B forwards the packet to C
           according to forwarding entry for 4' in its extended BIER-TE BIFT.
           The packet received by C contains path {20', 12', 4, 1}.
        </t>

        <t>After receving the packet from G, H decapsulates the packet
           and passes a copy of the payload 
           of the packet to the packet's NextProto
           according to forwarding entry for 4 in its extended BIER-TE BIFT.

           After receving the packet from B, C forwards the packet to D 
           according to forwarding entry for 12' in its extended BIER-TE BIFT.
           The packet received by D contains path {20', 4, 1}.
        </t>

        <t>After receving the packet from C, D decapsulates the packet
           and passes a copy of the payload 
           of the packet to the packet's NextProto
           according to forwarding entry for 1 in its extended BIER-TE BIFT.
        </t>
      </section> <!-- Forwarding in Noraml Operations -->

      <section title="Forwarding in Failure">
        <t>Once BFR B detects the failure of node C,
           it sets FPA of the FRR entry in the 2nd forwarding entry with 
           BFR-NBR C to one.
           After receiving the packet from BFR A, which contains path 
           {20', 4', 12', 4, 1},
           BFR B clears BP 4';
           BFR B clears the BP 4 for BFER H since H is on the backup path
           from B to G to H to D, but not on any branch of the path from B.
        </t>

      
        <t>For C's next hop node D on the P2MP path, 
           BFR B clears adjacency BP 12' from C to D and 
           adds the BPs for backup path {6', 20', 27'} from B to G to H to D.

           The packet has path {6', 20', 27', 1}.

           BFR B sends the packet to G
           according to forwarding entry for 6' in its extended BIER-TE BIFT.
           The packet received by G contains path {20', 27', 1}.
        </t>

        <t>After receving the packet from B, G forwards the packet to H 
           according to forwarding entry for 20' in its extended BIER-TE BIFT.
           The packet received by H contains path {27', 1}.</t>

        <t>After receving the packet from G, H forwards the packet to D 
           according to forwarding entry for 27' in its extended BIER-TE BIFT.
           The packet received by D contains path {1}.</t>

        <t>After receving the packet from H, D decapsulates the packet
           and passes a copy of the payload 
           of the packet to the packet's NextProto
           according to forwarding entry for 1 in its extended BIER-TE BIFT.
        </t>
      </section> <!-- Forwarding in Failure -->
<!--
        <t>Suppose that there is a multicast packet 
           with explicit path {7', 4', 10', 14', 16', 24', 4, 1} on BFR A.
           The path traverses the link from A to B, the link from B to C,
           the link from C to F and the link from C to I, 
           the link from I to H, and the link from F to D.
           This path is encoded in the BitPositions of the packet.
           BFR A forwards the packet to BFR B according to 
           the forwarding entry for 7' in its extended BIER-TE BIFT.
           BFR B forwards the packet to BFR C according to 
           the forwarding entry for 4' in B's extended BIER-TE BIFT
           in normal operations.</t>

        <t>After receiving the packet from BFR B,
           BFR C copies and sends the packet to
           BFR F and BFR I using the forwarding entries for 10' and 14' 
           in the extended BIER-TE BIFT on BFR C respectively.
           After receiving the packet from BFR C, 
           BFR F sends the packet to BFR D according to 
           the forwarding entry for 24' in F's extended BIER-TE BIFT;
           BFR I sends the packet to BFR H according to 
           the forwarding entry for 16' in I's extended BIER-TE BIFT.</t>

        <t>Once BFR B detects the failure of transit node C,
           it sets FPA of the FRR entry in the 2nd forwarding entry with 
           BFR-NBR C to one.
           After receiving the packet from BFR A,
           BFR B copies and sends the packet to C's next hop nodes F and I
           using the FRR entry in the forwarding entry and the P2MP path
           encoded in the packet.</t>
        <t>The failed node C has three next hop nodes F, D and I except for B.
           Since the P2MP path encoded in the packet traverses nodes F and I, 
           BFR B sends the packet to nodes F and I
           using the backup path from B to F and the backup path from B to I 
           in the FRR entry respectively.</t>

        <t>The packet received by BFR B from BFR A contains 
           {4', 10', 14', 16', 24', 4, 1}.
           Since FPA in the FRR entry in the forwarding entry for 4' with 
           BFR-NBR C is 1,
           BFR B copies and sends the packet to C's next hop nodes F and I
           in the following steps. </t>

        <t>At first, it obtains the FRR entry from the forwarding 
           entry for 4' with BFR-NBR C. 
           FPA == 1 in the FRR entry indicates that FRR protection 
           for transit node C is active.
           BFR B clears BitPosition 4' for the adjacency from B to C 
           in Packet's BitString.</t>

        <t>Since the P2MP path goes through C's next hops F and I 
           via BitPositions 10' and 14' respectively, where
           BitPosition 10' is for the adjacency from C to F and 
           14' is for the adjacency from C to I.

           BFR B clears BitPosition 10' and adds the backup path 
           from B to F {2', 22'} into Packet's BitString. 
           BFR B clears BitPosition 14' and adds the backup path 
           from B to I {6', 17'} into Packet's BitString. </t>
 
        <t>The updated BitString in Packet contains the BitPositions
           representing {2', 22', 6', 17', 16', 24' 4, 1}.
           This lets BFR B copy and send Packet to E and G using the 
           forwarding entries for 2' and 6' in B's extended BIER-TE 
           BIFT respectively.</t>

        <t>BFR B copies and sends the packet to E using the 
           forwarding entries for 2'. It clears BitPositions 2' and 6'
           before sending the packet.
           It copies and sends the packet to G using the 
           forwarding entries for 6'. It clears BitPositions 2' and 6'
           before sending the packet.</t>

        <t>When node E receives from node B the packet with Bitpositions 
           representing {22', 17', 16', 24', 4, 1}, 
           it copies and sends the packet to F using the 
           forwarding entries for 22' in its extended BIER-TE BIFT.</t>

        <t>The packet received by node F from node E has Bitpositions 
           representing {17', 16', 24', 4, 1}. 
           Node F copies and sends the packet to D using the 
           forwarding entries for 24' in its extended BIER-TE BIFT.</t>

        <t>The packet received by node D from node E has Bitpositions 
           representing {17', 16', 4, 1}. 
           Node D decapsulates the packet and passes a copy of the payload 
           of the packet to the packet's NextProto using the 
           forwarding entries for 1 in its extended BIER-TE BIFT,
           which sends the payload to a CE receiver 
           (not shown in the figure).</t>

        <t>When node G receives from node B the packet with Bitpositions 
           representing {22', 17', 16', 24', 4, 1}, 
           it copies and sends the packet to I using the 
           forwarding entries for 17' in its extended BIER-TE BIFT.</t>

        <t>The packet received by node I from node G has Bitpositions 
           representing {22', 16', 24', 4, 1}. 
           Node I copies and sends the packet to H using the 
           forwarding entries for 16' in its extended BIER-TE BIFT.</t>

        <t>The packet received by node H from node I has Bitpositions 
           representing {22', 24', 4, 1}. 
           Node H decapsulates the packet and passes a copy of the payload 
           of the packet to the packet's NextProto using the 
           forwarding entries for 4 in its extended BIER-TE BIFT,
           which sends the payload to a CE receiver 
           (not shown in the figure).</t>
-->


      </section> <!-- Forwarding using Extended BIER-TE BIFT -->

    </section> <!-- Example Application of BIER-TE FRR -->


    <section anchor="Security" title="Security Considerations">
      <t>TBD.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>No requirements for IANA.</t>
    </section>


    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to thank Daniel Merling
      for his comments to this work.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.5286"?>
      <?rfc include="reference.RFC.5714"?>
      <?rfc include="reference.RFC.5880"?>
      <?rfc include="reference.RFC.8174"?>
      <?rfc include="reference.RFC.8279"?>
      <?rfc include="reference.RFC.8556"?>
      <?rfc include="reference.RFC.7490"?>

      <?rfc include="reference.RFC.5250"?>
      <?rfc include="reference.RFC.5226"?>
      <?rfc include="reference.RFC.7356"?>
      <?rfc include="reference.RFC.7684"?>
      <?rfc include="reference.RFC.7770"?>
      <?rfc include="reference.I-D.ietf-bier-te-arch"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.8296"?>
      <?rfc include="reference.RFC.8401"?>
      <?rfc include="reference.RFC.8444"?>
      <?rfc include="reference.I-D.ietf-rtgwg-segment-routing-ti-lfa"?>
      <?rfc include="reference.I-D.ietf-spring-segment-protection-sr-te-paths"?>
      <?rfc include="reference.I-D.eckert-bier-te-frr"?>
    </references>

  </back>

</rfc>
