﻿<?xml version="1.0" encoding="UTF-8"?>
<!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="info" docName="draft-ietf-bier-frr-04" ipr="trust200902">
 <front>
  <title abbrev="BIER FRR">BIER Fast ReRoute</title>
  <author initials="H" role="editor" surname="Chen" fullname="Huaimo Chen">
   <organization>Futurewei</organization>
   <address>
    <postal>
     <street />
     <city>Boston, MA</city>
     <region />
     <code />
     <country>USA</country>
    </postal>
    <email>hchen.ietf@gmail.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 fullname="Steffen Lindner" initials="S" surname="Lindner">
   <organization>University of Tuebingen</organization>
   <address>
    <email>steffen.lindner@uni-tuebingen.de</email>
   </address>
  </author>
  <author fullname="Michael Menth" initials="M" surname="Menth">
   <organization>University of Tuebingen</organization>
   <address>
    <email>menth@uni-tuebingen.de</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 />
     <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="Yisong Liu" surname="Liu">
   <organization>China Mobile</organization>
   <address>
    <email>liuyisong@chinamobile.com</email>
   </address>
  </author>

  <author initials="Y" fullname="Yanhe Fan" surname="Fan">
   <organization>Casa Systems</organization>
   <address>
    <postal>
     <street />
     <city />
     <region />
     <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 />
     <city />
     <region />
     <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="2024" />


  <abstract>
<!-- 
***  The focus points in abstract are 
       1) BIER-FRR for fast protecting transit node or link
       2) BIER-FRR has no per-flow state in network core
       3) Three backup strategies
    The other details are in the body of the document.
    Note: there is no fast failure detection method that can detect
          a link failure which is not node failure. In general,
          when a PLR detects a failure of a link L to a BFR-NBR N,
          it reroutes the traffic around L and N since it cannot
          determine whether L or N fails.
*** 
--> 
  <t>
    BIER is a scalable multicast overlay 
    that utilizes a routing underlay, e.g., IP, to build up its 
    Bit Index Forwarding Tables (BIFTs).
    This document proposes Fast Reroute for BIER (BIER-FRR).
    It protects BIER traffic after detecting the failure of a link 
    or node in the core of a BIER domain 
    until affected BIFT entries are recomputed after 
    reconvergence of the routing underlay.

    BIER-FRR is applied locally at the point of
    local repair (PLR) and does not introduce any per-flow state.

    The document specifies nomenclature 
    for BIER-FRR and gives examples for its integration in
    BIER forwarding.  
    Furthermore, it presents operation modes for BIER-FRR.  
 
    Link and node protection may be chosen as protection level.

    Moreover, the backup strategies tunnel-based BIER-FRR and 
    LFA-based BIER-FRR are defined and compared.
<!-- Restored
    When a multicast packet is sent to a node in the domain
    and the node fails, its upstream hop, acting as a Point of 
    Local Repair (PLR), reroutes the packet
    around the failed node once it detects the failure.
  
    The three backup strategies defined in this document, 
    to provide failure 
    protection in a BIER domain, 
    are tunnel-based BIER-FRR, LFA-based BIER-FRR, and mixed BIER-FRR.
    
    Each strategy can provide two protection levels 
    link protection and node protection.
--> 
   </t>
  </abstract>

  <note title="Requirements Language">
   <t>
    The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, 
&quot;SHALL&quot;, &quot;SHALL NOT&quot;,
      &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, 
&quot;MAY&quot;, and &quot;OPTIONAL&quot; 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>

  <!-- Introduction -->
  <section title="Introduction">

   <t>With BIER <xref target="RFC8279"/>, 
   a Bit-Forwarding Router (BFR) forwards BIER
   packets based on a bitstring in the BIER header using the information
   in the Bit Index Forwarding Table (BIFT).  Its entries are locally
   derived from a routing underlay or set by a controller. In case of a
   persistent link or node failure, BIER traffic may not be delivered
   until the BIFT has been updated based on the reconverged routing
   underlay or by the controller.</t>

<!-- Restored
   <t><xref target="RFC8279"/> specifies 
      "Bit Index Explicit Replication" (BIER).
    A Bit-Forwarding Router (BFR) forwards a BIER packet based on 
    a bitstring in the BIER header of the packet using the information 
    in the Bit Index Forwarding Table (BIFT).
    Its entries are locally derived from a routing underlay or 
    set by a controller.

    When a link or node failure occurs, the BIER packets, to be sent
    to the failed link or node, may not be delivered until the BIFT has 
    been updated based on the reconverged BIER topology.
   </t>
-->


   <t>BIER packets are usually forwarded without an outer IP header. 
If a link or node fails, the
corresponding BFR neighbor (BFR-NBR) is no longer reachable. Fast reroute (FRR)
mechanisms in the routing underlay, e.g., IP-FRR, apply only to IP
packets so that BIER traffic would be dropped. BIER traffic can be
delivered again only after reconvergence of the routing underlay
and recalculation of the BIFT. Thus, tunneling BIER packets can
help to reach the BFR-NBR in case of a link failure by leveraging
FRR capabilities of the routing underlay if such mechanisms are
available. However, this does not help in case of a node failure.
Then, all destinations having the failed node as BFR-NBR cannot be
reached anymore. As BIER carries multicast traffic which has often
realtime requirements, there is a particular need to protect BIER
traffic against too long outages after failures.</t>

<!-- Restored above, then used the merge -->

<!--
   <t>All BIER packets are forwarded using the 
      BIFTs and the forwarding procedure specific for BIER.
      This is separate from forwarding IP packets.
      All IP packets are forwarded using the normal  
      FIBs and the forwarding procedure specific 
      for IP.

      IP FRR is for protecting IP packets by enhancing normal 
      FIBs and IP forwarding procedure.
      It will not protect BIER packets.

      When there is a failure, IP packets are protected by IP FRR 
      through the FIBs with LFAs and the forwarding procedure for IP.

      BIER packets are still forwarded using the BIFTs, 
      which do not have backup next hops.
      They are not protected since they are not forwarded using the FIBs 
      with LFAs.</t>
-->
<!-- to address comments from mailing list -->

     <t> 
   In this document we propose nomenclature for Fast Reroute 
   in BIER (BIER-FRR).  As soon as a BFR detects a 
   BFR-NBR is unreachable, BIER-FRR enables a BFR to quickly
   reroute affected BIER packets with the help of backup forwarding
   entries.  To avoid redundant packets, backup forwarding entries
   should be processed prior to normal forwarding entries.  To achieve
   that goal, two possible representations for backup forwarding entries
   are proposed.
     </t>

     <t>
   The protection level can be either link protection or node
   protection. Link protection protects only the failure of a link. It
   is simple but may not work if a BFR fails. Node protection is more
   complex but also protects against the failure of BFRs. The backup
   strategy determines the selection of the backup forwarding entries.
     </t>

<!-- Restored above para. but 
     the para about not need to be standardized 

   <t>This document proposes Fast Reroute mechanisms for BIER (BIER-FRR)
      to protect against the failure of a node or link in the core of
      a BIER domain. 
      When a BFR, as a PLR, detects the failure of its BFR-NBR N, using
      a failure detection mechanism such as BFD,
      it fast reroutes the BIER packets to be sent to BFR-NBR N 
      around the failed BFR-NBR N.</t>
-->

     <t>
   Examples for backup strategies are tunnel-based BIER-FRR and LFA-based
   BIER-FRR
     <list style="symbols">
      <t>
      Tunnel-based BIER-FRR leverages mechanisms of the routing underlay
      for FRR purposes.  The routing underlay restores connectivity
      faster than BIER as a reconverged routing underlay is prerequisite
      for recalculation of the BIFT.  If the routing underlay leverages
      FRR mechanisms, its forwarding ability is restored long before
      reconvergence is completed.  To leverage fast restoration of the
      routing underlay, BIER traffic affected by a failure is tunneled
      over the routing underlay.
       </t>

     <t>
LFA-based BIER-FRR reroutes BIER traffic to alternative neighbors in
case of a failure. It utilizes the principles of IP-FRR but requires that
LFAs are BFRs. Normal BIER-LFAs can be reached without tunneling, remote
BIER-LFAs utilize a tunnel, and topology-independent BIER-LFAs leverage
explicit paths to reach the backup BFR-NBR. In contrast to tunnel-based
FRR, LFA-based BIER-FRR does not require fast reroute mechanisms in
the routing underlay.</t>


     </list>
     </t>

   <t>
   BIER-FRR as presented in this document follows a primary/backup path
   principle, also known as 1:1 protection.  It is opposite to 1+1
   protection which denotes a live-live protection principle. This has
   been considered for BIER in <xref target="BrAl17"/>.
   </t>

<!--
    <section title="Terminology">
      <t>
      <list style="hanging" hangIndent="6">
       <t hangText="BIER:">Bit Index Explicit Replication  
                    defined in <xref target="RFC8279"/>.</t>
       <t hangText="FRR:">Fast Re-Route.</t>
       <t hangText="BIER-FRR:">BIER Fast Re-Route.</t>
       <t hangText="LFA:">Loop-Free Alternate.</t>
       <t hangText="basic/normal LFA:">Basic or normal LFA is a LFA
                   defined in <xref target="RFC5286"/>.</t>
       <t hangText="R-LFA:">R-LFA (short for Remote LFA) is a LFA
                   defined in <xref target="RFC7490"/>.</t>
       <t hangText="TI-LFA:">TI-LFA (short for Topology Independent LFA)
                   is a LFA defined in 
                   <xref target="I-D.ietf-rtgwg-segment-routing-ti-lfa"/>.</t>

       <t hangText="BIER-LFA:">BIER-LFA is a x-LFA computed 
                   using a BIER network domain topology, 
                   where x-LFA is a basic/normal LFA, R-LFA or TI-LFA.</t>

       <t hangText="PLR:">Point of Local Repair.</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="BFR-prefix:">An IP address (either IPv4 or IPv6) of a BFR.</t>
       <t hangText="BIRT:">Bit Index Routing Table  
                    defined in <xref target="RFC8279"/>.</t>
       <t hangText="BIFT:">Bit Index Forwarding Table  
                    defined in <xref target="RFC8279"/>.</t>
       <t hangText="F-BM:">Forwarding Bit Mask 
                    defined in <xref target="RFC8279"/>.</t>
       <t hangText="IS-IS:">Intermediate System to Intermediate System.</t>
       <t hangText="OSPF:">Open Shortest Path First.</t>
       <t hangText="IGP:">Interior Gateway Protocol.</t>
       <t hangText="LSDB:">Link State Database.</t>
      </list></t>
    </section> --> <!-- Terminology -->
  </section> <!-- Introduction -->





  <!-- mechanisms for BIER-FRR -->
  <section title="Definition of BIER-FRR"
           anchor="ex4_bier_frr">
    <t>In this section, forwarding actions and backup forwarding entries 
       are defined. Then,  
       the BIER forwarding process with BIER-FRR and 
       the computation of the backup F-BM are explained.
    </t>

    <section title="Definition of Forwarding Actions" 
             anchor="trigger_for_frr">
      <t>
   A BFR-NBR is directly connected if it is a next hop on the network 
   layer, i.e., if it can be reached via the link layer technology. 
   Otherwise, the BFR-NBR is indirectly connected.
      </t>

      <t>We define the following forwarding actions.
        <list style="symbols">
          <t>Plain: Sends the mere BIER packet to a BFR-NBR 
                    via a direct link and without a tunnel header. 
                    That means, the packet is not sent 
                    over the routing underlay.</t>
          <t>Tunnel: Encapsulates the BIER packet with a tunnel header 
                     towards a BFR-NBR and sends it 
                     over the routing underlay.</t>
          <t>Explicit: Forwards the packet over an explicit path to a 
                     BFR-NBR.
             The path information must be given.
             If segment routing is used for this purpose, the segment 
             IDs (SIDs) must be given. 
      Two
      forwarding actions of type Explicit are equal only if they 
      share the same explicit path.
           </t>
        </list>
      </t>

      <t>The forwarding actions in the BIFT as proposed in 
         <xref target="RFC8279"/> are given implicitly as they are 
         derived from the connectedness of the BFR-NBR.
         If the BFR-NBR is directly connected, the forwarding action is Plain.
         If the BFR-NBR is not directly connected, the forwarding action 
         is Tunnel.
      </t>

<!--
      <t>Action Plain, Tunnel and Explicit are associated with
         basic LFA in <xref target="RFC5286"/>,  
         remote LFA in <xref target="RFC7490"/> and TI-LFA
         in <xref target="I-D.ietf-rtgwg-segment-routing-ti-lfa"/> 
         respectively. 

         These actions are represented as follows for clear explanation 
         in a BIFT for LFA-based BIER-FRR: 
          <list style="symbols">
            <t>LFA/Plain (or LFA) for basic LFA with Plain,</t>
            <t>R-LFA/Encap for remote LFA with Tunnel/Encapsulation, and</t>
            <t>TI-LFA/Exp for TI-LFA with Explicit.</t>
          </list>
      </t>
-->
     </section>

     <section title="Definition of Backup Forwarding Entries" 
              anchor="backup_forwarding_entries">
       <t> 
   The BIFT as proposed in <xref target="RFC8279"/> contains a F-BM and 
   a BFR-NBR for a specific BFER. 
   They constitute a primary forwarding entry. BIER-FRR 
   extends this regular BIFT by additional columns containing backup 
   forwarding entries.  A backup forwarding entry contains
 
         <list style="symbols">
           <t>a backup F-BM (BF-BM), </t>
           <t>a backup BFR-NBR (BBFR-NBR),</t>
           <t>a backup forwarding action (BFA), and </t>
           <t>a backup entry active (BEA) flag.</t>
         </list>
      </t>

      <t>Backup F-BM and backup BFR-NBR have the same structure 
         as their primary counterparts.
         The backup forwarding action is a forwarding action as defined 
         in <xref target="trigger_for_frr" />.
   The BEA flag indicates whether the backup 
   forwarding entry is active. When it is active, the backup F-BM, backup 
   BFR-NBR, and the backup forwarding action are used for the forwarding 
   of BIER packets instead of the primary forwarding entry.
         The structure of the extended BIFT is given 
         in <xref target="bift" />.
      </t>
      <figure anchor="bift" 
       title="Structure of an extended BIFT with backup forwarding entries.">
          <artwork align="center"><![CDATA[
+--------+------+---------+--------+----------+--------+----+
| BFR-id | F-BM | BFR-NBR | BF-BM  | BBFR-NBR |  BFA   | BEA|
+========+======+=========+========+==========+========+====+
|  ...   |  ... |   ...   |   ...  |   ...    |  ...   |    |
+--------+------+---------+--------+----------+--------+----+]]>
          </artwork>
      </figure>

<!--
*** The backup action can also be derived from the BFR-NBR
      in the same way as the primary action.
-->
      <t>The primary action is not given in the BIFT as it is derived 
         from the BFR-NBR.  In contrast, the backup forwarding action 
         is given in the extended BIFT.
   Moreover, an explicit path must be indicated in case of forwarding 
   action Explicit. However, explicit paths are implementation-specific 
   and, therefore, this information is not indicated in the table. The
   values for the backup BFR-NBR and the backup action depend on the 
   desired protection level and the backup strategy. 
   Examples for them are described 
   in <xref target="Tunnel_Based"/>  and <xref target="LFA_Based"/>. 
 
   The backup F-BM depends on the backup BFR-NBR.  Its computation
   is explained in <xref target="f_bm_computation"/>. 
      </t>

    </section>

    <section title="Activating and Deactivating Backup Forwarding Entries" 
             anchor="a_backup_entry">
      <t>  
   When a primary BFR-NBR is not reachable 
   over the implicit primary action, a failure is observed. Then, 
   the BEA flag of the corresponding backup forwarding entry is set.</t>

     <t>
   If the primary BFR-NBR is directly connected, the information about the
   failed interface is sufficient to detect its unreachability.

   If the primary BFR-NBR is indirectly connected, a BFD session between 
   the BFR as PLR and the BFR-NBR may be used to monitor its reachability.
     </t>

     <t>
   If the primary BFR-NBR is reachable again, the BEA flag is deactivated. 
This may be caused by the disappearance of the failure or by a change of
the primary BFR-NBR due to a reconfiguration of the BIFT.
     </t>

    </section>



    <section title="Computation of the Backup F-BM" 
             anchor="f_bm_computation">

      <t>The primary F-BM of a specific BFER indicates all BFERs 
         that share the same primary BFR-NBR. 
         The backup F-BM of a specific BFER indicates
         <list style="symbols">
           <t>all BFERs that share the primary and backup BFR-NBR 
              of the specific BFER and</t>
           <t>all BFERs that have the backup BFR-NBR of the specific 
              BFER as primary BFR-NBR.</t>
         </list>
       </t>

<!--
       <t>In one implementation, 
          the backup F-BM of a specific BFER B can be computed 
          as follows. Assume that the primary BFR-NBR of B is P.
         <list style="symbols">
            <t>For each BFER with primary BFR-NBR P,  
               change P to a backup BFR-NBR in a BIRT 
               copied from a regular BIRT, and</t>

            <t>the backup F-BM of B indicates
               all BFERs in the BIRT that have the same BFR-NBR 
               as the backup BFR-NBR for B.</t>
         </list>
       </t>
-->
<!--
       <t>The backup F-BM (BF-BM) in a backup forwarding sub-entry is 
          computed in two steps.
          In the first step, the BFR builds a temporary BIRT (T-BIRT) 
          through copying its regular BIRT to the T-BIRT 
          and then changing the next hop BFR-NBR (NH) in each of the entries 
          with a same next hop BFR-NBR (e.g., B6) in the T-BIRT
          to a backup next hop (BNH). This protects against the
          failure of the next hop (e.g., B6) and the link to the next hop
          for node protection 
          or the link to the next hop for link protection.</t>

       <t>In the second step, the BFR gets the BF-BM through ORing
          the Bit for each of the BFERs with the same backup next hop (BNH)
          and next hop BFR-NBR (NH) in the T-BIRT.</t>

       <t>In <xref target="lfa-1bift-link-protect"/>,
          the procedures for building the enhanced BIFT for BIER-FRR 
          link protection  
          illustrate these two steps in details.
          In <xref target="lfa-1bift-node-protect"/>,
          the procedures for building the enhanced BIFT for BIER-FRR 
          node protection 
          show these two steps in details.
           </t>
-->
    </section>
    </section> <!-- mechanisms for BIER FRR  -->

  <!-- Representations for BIER-FRR Forwarding Data -->
  <section anchor="Representation" 
           title="Representations for BIER-FRR Forwarding Data">
    <t>We show that backup entries need to be used first to 
       reduce the number of redundant packets in the single extended BIFT 
       (presented in <xref target="backup_forwarding_entries"/>).
       This may be hard or cannot be achieved 
       on some hardware platforms.
       Therefore, two alternate representations of forwarding 
       entries are proposed. The first is a primary BIFT and single 
       backup BIFT (SBB). 
       The second is a primary BIFT  
       and multiple failure-specific backup BIFTs (FBB).
<!--
       In the first representation, when a failure happens, 
       the corresponding entries in the backup BIFT
       are used first and then the entries in the primary BIFT 
       to reduce redundant packets.
       In the second representation, when a failure happens,
       the FRR-BIFT for the failure is used. The redundant packets
       are reduced. 
-->
    </t>

    <section title="Potential Emergence of Redundant Packets" 
             anchor="redundant_packets">

      <t>
<!--
         For a BIER packet, 
         when a BFR forwards extra unnecessary copies of the packet 
         to its BFR-NBRs, these extra unnecessary copies are called
         redundant packets.
-->
         The BIER forwarding procedure in failure-free scenarios
         avoids redundant packets, i.e., 
         it ensures that at most a single copy is sent per link for 
         every BIER packet.  However, this property might be violated
         when BIER-FRR as presented in <xref target="ex4_bier_frr"/>
         is applied to protect against a failure.</t>

      <t><xref target="networking_scenario" /> shows 
         an example of a BIER network.
         <!--The arrows in the figure denote the primary multicast 
             forwarding tree routed in PLR.
             The lines without arrows signify additional links that may 
             be utilized for rerouting. -->
         BFRs have the prefix "B" and are numbered by their BFR-ids.
         To simplify the example, every BFR is a BFER and its bit 
         position in the bitstring equals its BFR-id.

         The number on a link is its cost 
         which is used by the routing underlay for computing 
         the shortest paths.

       <figure anchor="networking_scenario" 
               title="BIER network example.">
        <artwork align="center"><![CDATA[
        1              1
  B1 --------- B6 ------------ B5       BFR Bi is BFER
  |            |               |       (i = 1,2,3,4,5,6,7;
  |            |               |        i is BFR-id of Bi)
2 |            | 1             |
  |      1     |               | 1     cost of link B1-B2 is 2
  B2 --------- B7              |       cost of link B3-B4 is 4
  |                            |       cost of other links is 1
1 |                            |
  |                  4         |
 B3 ------------------------- B4]]>
        </artwork>
      </figure>
</t>
      <!-- Attention: We cite networking example. Can't use xref 
           in title though ... -->

    <t>The extended BIFT with backup forwarding entries for 
       LFA-based BIER-FRR with link protection built by BFR B1 
       is illustrated 
       in <xref target="extended_bift_plr_redeundant"/>.

      <figure anchor="extended_bift_plr_redeundant" 
       title="B1's extended BIFT for LFA-based FRR with link protection.">
          <artwork align="center"><![CDATA[
+------+----------+-------+----------+--------+----------+---+
|BFR-id|   F-BM   |BFR-NBR|  BF-BM   |BBFR-NBR|   BFA    |BEA|
+======+==========+=======+==========+========+==========+===+
|   2  | 0000110  |  B2   | 1111110  |   B6   |  Plain   |   |
+------+----------+-------+----------+--------+----------+---+
|   3  | 0000110  |  B2   | 1111110  |   B6   |  Plain   |   |
+------+----------+-------+----------+--------+----------+---+
|   4  | 1111000  |  B6   | 1111110  |   B2   |  Plain   |   |
+------+----------+-------+----------+--------+----------+---+
|   5  | 1111000  |  B6   | 1111110  |   B2   |  Plain   |   |
+------+----------+-------+----------+--------+----------+---+
|   6  | 1111000  |  B6   | 1111110  |   B2   |  Plain   |   |
+------+----------+-------+----------+--------+----------+---+
|   7  | 1111000  |  B6   | 1111110  |   B2   |  Plain   |   |
+------+----------+-------+----------+--------+----------+---+]]>
          </artwork>
      </figure>
</t>

      <t>We show how redundant packets can occur in case of a failure. 
   To that end, we consider the extended BIFT for BFR 1 in 
   <xref target="extended_bift_plr_redeundant"/>. 
   It has backup forwarding entries for LFA-based FRR and link
   protection. 

         For a BIER packet with destinations B2 and B6 (i.e., 
         bitstring 0100010), BFR B1 sends 
         a single packet copy on link B1-B2 and on link B1-B6
         in the absence of a failure.</t>

      <t>When the link B1-B6 fails, B1 as a PLR detects the failure.
Therefore, B1 sets the BEA flag for all destinations that have B6 as BFR-NBR. 
We consider again that B1 sends a BIER packet to B2 and B6. 

         At first, it sends a copy with bitstring 0000010  
         to B2 using the corresponding primary forwarding entry
         in the extended BIFT in 
         <xref target="extended_bift_plr_redeundant" />. </t>

      <t>Then, B1 sends another copy of the packet with bitstring 
         0100000 for B6 to B2 using the backup forwarding entry
         since the BEA flag is activated. </t>
         
      <t>This is a second (redundant) copy over the same link B1-B2.
         It can be prevented if the backup forwarding entry is 
         used first.
         When using the backup forwarding entry, B1 sends only 
         a single copy of the packet with bitstring 0100010 to B2.
         It will not send any copy of the packet to B2 again since
         the bitstring in the packet will be all cleaned by the 
         BF-BM 1111110.

         Thus, prioritized processing of BFERs with unreachable BFR-NBRs 
         helps to reduce redundant packet copies.
       </t>
    </section>

    <section anchor="primary_bift_single_backup_bift" 
             title="Primary BIFT and Single Backup BIFT">
      <t>The extended BIFT may be separated into two BIFTs. 
         One is a primary BIFT and the other is
         a single backup BIFT.
         The primary BIFT is the same as the regular BIFT.
         The backup BIFT contains the backup forwarding entries,
         including BF-BM, BBFR-NBR, BFA 
         and BEA in the extended BIFT.

         When a BFR as a PLR detects that BFR-NBR N is unreachable,
it activates the BEA flag for all BFERs in the backup BIFT 
that have BFR-NBR as primary BFR-NBR. When a BFR forwards a BIER packet, 
it processes the packet first using the backup BIFT and 
then using the primary BIFT.  With
this prioritization, the number of redundant packet copies can be reduced.
       </t>

       <t>B1's extended BIFT 
in <xref target="extended_bift_plr_redeundant"/>
is separated into the primary BIFT in 
<xref target="primary_bift_failure_free"/>
and the single backup BIFT in 
<xref target="backup_bift_failure_specific"/>.

       <figure anchor="primary_bift_failure_free" 
               title="B1's primary BIFT for the BIER network example.">
           <artwork align="center"><![CDATA[
 +--------+---------+---------+
 | BFR-id |   F-BM  | BFR-NBR |
 +========+=========+=========+
 |   2    | 0000110 |    B2   |
 +--------+---------+---------+
 |   3    | 0000110 |    B2   |
 +--------+---------+---------+
 |   4    | 1111000 |    B6   |
 +--------+---------+---------+
 |   5    | 1111000 |    B6   |
 +--------+---------+---------+
 |   6    | 1111000 |    B6   |
 +--------+---------+---------+
 |   7    | 1111000 |    B6   |
 +--------+---------+---------+]]>
           </artwork>
       </figure>

</t>

<t>  
       <figure anchor="backup_bift_failure_specific" 
               title="B1's backup BIFT for the BIER network example.">
           <artwork align="center"><![CDATA[
  +------+----------+--------+-----------+---+-----------------+
  |BFR-id|  BF-BM   |BBFR-NBR|   BFA     |BEA|Comment: protects|
  |      |          |        |           |   |  failure of     |
  +======+==========+========+===========+===+=================+
  |   2  | 1111110  |   B6   |  Plain    |   |  Link B1->B2    |
  +------+----------+--------+-----------+---+-----------------+
  |   3  | 1111110  |   B6   |  Plain    |   |  Link B1->B2    |
  +------+----------+--------+-----------+---+-----------------+
  |   4  | 1111110  |   B2   |  Plain    |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   5  | 1111110  |   B2   |  Plain    |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   6  | 1111110  |   B2   |  Plain    |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   7  | 1111110  |   B2   |  Plain    |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+]]>
           </artwork>
       </figure>

Each forwarding entry in the backup BIFT contains
BF-BM, BBFR-NBR, BFA and BEA.
When a BFR-NBR fails,  
the BEA flag is activated for all BFERs in the backup
BIFT that have BFR-NBR as primary BFR-NBR.
For example,  
BFERs B4, B5, B6 and B7 have BFR-NBR B6 as their primary BFR-NBR.
When BFR-NBR B6 fails, the BEA flag for BFERs B4, B5, B6 and B7 
is activated, i.e., the BEA in the last four entries in the backup 
BIFT is set to one.
<!-- 
The entries are the same as
for LFA-based BIER-FRR with link protection (see Section 5.2.5).
-->
</t>
    </section>

    <section anchor="primary_bift_failure_backup_bift" 
             title="Primary BIFT and Failure-Specific Backup BIFTs">
     <t>As an alternative, the information in the extended BIFT may be
   represented in a primary BIFT and several, failure-specific backup
   BIFTs.
<!--
        A failure-specific backup BIFT is a backup BIFT for X's 
        failure, where X is a link or BFR-NBR.

        A backup BIFT for X's failure is simply called a FRR-BIFT for X.
        It has the same structure as the regular BIFT except for 
        forwarding action.
        Each of its forwarding entries contains F-BM and BFR-NBR.
        In addition to a primary BIFT, 
        which is the same as the regular BIFT,
        a BFR has a FRR-BIFT for each of its 
        links or BFR-NBRs.
-->
   A failure-specific backup BIFT is a backup BIFT for the
   unreachability of BFR-NBR N.  A backup BIFT for the failure of N is
   simply called a backup BIFT for N.  It has the same structure as the
   regular BIFT but has an entry for a backup forwarding action.  Thus, 
   a BFR has a primary
   BIFT, which is the same as the regular BIFT, and a backup BIFT for
   each of its BFR-NBRs.
<!--
 with link protection and node
   protection. The backup BIFT for N with link protection assumes that
   the link to N failed (i.e., N is unreachable through the link). The
   backup BIFT for N with node protection assumes that node N failed.  

Given a BIER network, the BFR computes the 
   backup BIFT for N under the assumption that N is not present in the 
   network topology.
-->

</t>

     <t>The BFR uses the primary BIFT to forward BIER 
        packets under failure-free conditions.
        When the BFR as a PLR detects that 
        BFR-NBR N is unreachable, 
        it uses the backup BIFT for N to forward all BIER packets.

        After the routing underlay has re-converged 
        on the new network topology, 
        the primary BIFT is re-computed.

        Once the re-computed primary BIFT is installed, it is used to 
        forward all BIER packets. 
<!--
        From the new topology, the BFR re-computes 
        its FRR-BIFTs.
-->
        </t>
<!--
     <t>
        Given a BIER network, the BFR builds the FRR-BIFT for X 
        in the same way as it builds a regular BIFT on the network
        without X (i.e., assuming X failed) except for 
        using the backup BFR-NBR of a BFER without X as a (primary) BFR-NBR
        and having forwarding actions for backup BFR-NBRs.
        It builds a BIRT containing the entries for all BFERs 
        (except for the BFR itself as BFER) in the network. 
        Each entry includes a BFER and the BFR-NBR of the BFER.
        If its neighbor N on the shortest path to a BFER does 
        not go through X, then N is the BFR-NBR of the BFER; 
        otherwise (i.e., the path to the BFER goes through X), 
        a backup BFR-NBR of the BFER without X is computed and
        used as the BFR-NBR of the BFER.
        The FRR-BIFT for X is derived from the BIRT in the way
        defined in <xref target="RFC8279"/>.</t>
-->
     <t>We illustrate the concept using the example from extended BIFT in 
        <xref target="extended_bift_plr_redeundant"/>.
        <xref target="primary_bift_failure_free"/> 
        shows the primary BIFT of B1 in this context.
        BFR B1 
        in <xref target="networking_scenario"/> has two neighbors: 
        B6 and B2.  
        B1 has two backup BIFTs with link protection: one for B6 and 
        another for B2.
        B1 has also two backup BIFTs with node protection.
        <xref target="b1s-frr-bift4-link2-b6"/> is 
        B1's backup BIFT for B6  
to react to the unreachability of B1 in a similar way as with 
the extended BIFT in
<xref target="extended_bift_plr_redeundant"/>.  

<!--
        It is derived from the BIRT 
        in <xref target="b1s-frr-birt4-link2-b6"/> built by B1.

      <figure anchor="b1s-frr-birt4-link2-b6" 
       title="B1's BIRT for deriving FRR-BIFT for link B1-B6.">
          <artwork align="center"><![CDATA[
+===========+===============+============+
|  BFR-id   | BFER's Prefix |  BFR-NBR   |
+===========+===============+============+
|    2      |      B2       |     B2     |
+===========+===============+============+
|    3      |      B3       |     B2     |
+===========+===============+============+
|    4      |      B4       |    B2      |
+===========+===============+============+
|    5      |      B5       |    B2      |
+===========+===============+============+
|    6      |      B6       |    B2      |
+===========+===============+============+
|    7      |      B7       |    B2      |
+===========+===============+============+]]>
          </artwork>
      </figure>

        B1 builds the BIRT containing 6 entries for BFERs 
        B2 to B7. 
        Since B1's neighbor B2 on the shortest path to each of 
        BFERs B2 and B3 does not go through link B1-B6, 
        B2 is the BFR-NBR of BFERs B2 and B3.
        B1's path to each of BFERs B4 to B7 goes through link B1-B6,
        so, a LFA as a backup BFR-NBR to each of BFERs B4 to B7 
        without link B1-B6
        is computed, which is B2.
        B2 is used as the BFR-NBR of BFERs B4 to B7.
-->

      <figure anchor="b1s-frr-bift4-link2-b6" 
 title="B1's backup BIFT for B6 for LFA-based BIER FRR with link protection.">
          <artwork align="center"><![CDATA[
+--------+---------+---------+-----------------+-----------------+
| BFR-id |  F-BM   | BFR-NBR |Forwarding Action|Comment: protects|
|        |         |         |                 |  failure of     |
+========+=========+=========+=================+=================+
|    2   | 1111110 |    B2   |   Plain         |                 |
+--------+---------+---------+-----------------+-----------------+
|    3   | 1111110 |    B2   |   Plain         |                 |
+--------+---------+---------+-----------------+-----------------+
|    4   | 1111110 |    B2   |   Plain         |  Link B1->B6    |
+--------+---------+---------+-----------------+-----------------+
|    5   | 1111110 |    B2   |   Plain         |  Link B1->B6    |
+--------+---------+---------+-----------------+-----------------+
|    6   | 1111110 |    B2   |   Plain         |  Link B1->B6    |
+--------+---------+---------+-----------------+-----------------+
|    7   | 1111110 |    B2   |   Plain         |  Link B1->B6    |
+--------+---------+---------+-----------------+-----------------+]]>
          </artwork>
      </figure>

        Once B1 as a PLR detects that B6 is unreachable through the link to
        B6, it uses the backup BIFT for B6 to forward all BIER packets.

As this representation is equivalent to the concept of single primary 
and single backup BIFT,
<!-- 
(or the regular BIFT without the link to B6), 
-->
redundant packets for the same forwarding action are avoided.

<!--
As the backup BIFT for B6 with link protection is equivalent to the regular 
BIFT without the link to B6, 
there is no redundant packet when it is used
to forward all BIER packets. 

        For example, for a BIER packet with destinations B2 and B6 (i.e., bitstring
        0100010), BFR B1 sends a single packet copy on link B1-B2 using
        the backup BIFT for link B1-B6 after detecting link B1-B6's failure. 
        It will not send any copy of the
        packet to B2 again since the bitstring in the packet will be all
        cleaned by the F-BM 1111110 after sending the packet to B2 via 
        link B1-B2. 

        Similarly, 
        for a BIER packet with destinations B2, B5 and B7 (i.e., bitstring
        1010010), BFR B1 sends a single packet copy on link B1-B2 using
        the backup BIFT for link B1-B6 after detecting link B1-B6's failure. 
-->
     </t>

<!--
      <t>The BFR builds the FRR-BIFT for its BFR-NBR N from its normal BIRT 
         with consideration of N failure. It changes the next hop 
         with value BFR-NBR N to a backup next hop (BNH) to protect 
         against the failure, and then derives the 
         FRR-BIFT for N from the BIRT.
         The BNH is a x-LFA (or a tunnel to N's next hop). 
         The x-LFA can be the Loop-Free 
         Alternate (LFA) defined in <xref target="RFC5286"/>,  
         Remote LFA defined in <xref target="RFC7490"/> or TI-LFA
         in <xref target="I-D.ietf-rtgwg-segment-routing-ti-lfa"/>.</t>

      <t>If the IGP topology is the same as the BIER network 
         domain topology, the x-LFA in the IP routing information base
         (RIB) computed for IP FRR is re-used as a BNH 
         in the FRR-BIRT; 
         otherwise (i.e., the IGP topology is different from 
         the BIER domain topology), the BFR computes
         a x-LFA as a BNH.</t>

      <t>To protect a transit node failure, BFR B1
         in <xref target="networking_scenario"/> has two FRR-BIFTs. 
         One is for its BFR-NBR B2, and the other is for B6.
         The FRR-BIFT for B2 is illustrated in
         <xref target="backup_bift_failure_specific_B2"/>.

       <figure anchor="backup_bift_failure_specific_B2" 
               title="B1's FRR-BIFT for B2">
           <artwork align="center"><![CDATA[
+===========+==========+============+==============+
|  BFR-id   |   F-BM   |  BFR-NBR   |   Action     |
|           |  /BF-BM  |  (NH/BNH)  |   (Notes)    |
+===========+==========+============+==============+
|    2      |  0000010 |     NULL   |              |
+===========+==========+============+==============+
|    3      |  0000100 |     B4     | TI-LFA/Exp   |
+===========+==========+============+==============+
|    4      |  1111000 |     B6     |              |
+===========+==========+============+==============+
|    5      |  1111000 |     B6     |              |
+===========+==========+============+==============+
|    6      |  1111000 |     B6     |              |
+===========+==========+============+==============+
|    7      |  1111000 |     B6     |              |
+===========+==========+============+==============+]]>
           </artwork>
       </figure>

   The 1st forwarding entry in the FRR-BIFT indicates that 
   there is no BFR-NBR (NH/BNH) or
   path to BFER B2 with BFR-id 2 when BFR B2 fails. 
</t>

<t>The 2nd forwarding entry in the FRR-BIFT indicates that 
   the BFR-NBR (BNH) on
   the path to BFER B3 with BFR-id 3 is BFR B4. 
   B4 is the TI-LFA  
   to protect against the failure of B2 and link from B1 to B2.</t>

<t>The 3rd forwarding entry in the FRR-BIFT indicates that 
   the BFR-NBR (NH) on
   the path to BFER B4 with BFR-id 4 is BFR B6.</t>

<t>The i-th (i = 4, 5, 6) forwarding entry in the FRR-BIFT indicates that 
   the BFR-NBR (NH) on
   the path to BFER Bj (j = i+1) with BFR-id j is BFR B6.</t>
-->
<!--
B1 copies its BIRT to the FRR-BIRT for B2.
+===========+==========+============+==============+
|  BFR-id   |   F-BM   |  BFR-NBR   |   Action     |
|           |  /BF-BM  |  (NH/BNH)  |   (Notes)    |
+===========+==========+============+==============+
|    2      |          |     B2     |              |
+===========+==========+============+==============+
|    3      |          |     B2     |              |
+===========+==========+============+==============+
|    4      |          |     B6     |              |
+===========+==========+============+==============+
|    5      |          |     B6     |              |
+===========+==========+============+==============+
|    6      |          |     B6     |              |
+===========+==========+============+==============+
|    7      |          |     B6     |              |
+===========+==========+============+==============+
B1 computes or gets x-LFA for BNH of BFR-NBR B2.
For BFR-id 2, x-LFA is NULL since B2 fails, no way to B2.
For BFR-id 3, x-LFA is TI-LFA B4.
B1 changes BFR-NBR B2 for BFR-id 2 and 3 to NULL and TI-LFA B4
respectively.
+===========+==========+============+==============+
|  BFR-id   |   F-BM   |  BFR-NBR   |   Action     |
|           |  /BF-BM  |  (NH/BNH)  |   (Notes)    |
+===========+==========+============+==============+
|    2      |          |     NULL   |              |
+===========+==========+============+==============+
|    3      |          |     B4     | TI-LFA/Exp   |
+===========+==========+============+==============+
|    4      |          |     B6     |              |
+===========+==========+============+==============+
|    5      |          |     B6     |              |
+===========+==========+============+==============+
|    6      |          |     B6     |              |
+===========+==========+============+==============+
|    7      |          |     B6     |              |
+===========+==========+============+==============+

B1 derives the FRR-BIFT for B2 from the FRR-BIRT.
-->

  </section> <!-- Primary and Failure-Specific Backup BIFTs -->
  </section> <!-- Representation of fw data -->



  <!-- Protection Levels -->
  <section anchor="Protection_Levels" 
           title="Protection Levels">
    <t>
   Link and node protection may be supported.  

   Link protection protects against the failure of an adjacent link 
   while node protection protects against the failure of a neighboring 
   node and the path towards that node.

   Depending on the supported service, link
   protection or node protection may be relevant.  Both protection
   levels can be combined with any backup strategy 
   in <xref target="Strategies"/>.
    </t>

    <section anchor="link_protection" 
             title="Link Protection">
      <t>
   With link protection the backup path avoids the failed link 
   (i.e., the failed primary path
   from the PLR to the primary BFR-NBR, excluding the primary BFR-NBR), 
   but the backup path may include
   the primary BFR-NBR.  Therefore, the backup path 
   is still operational
   if the primary path fails.  The disadvantage of link protection is
   that it fails if the primary BFR-NBR itself is not operational.
   However, link protection has also advantages.  It often leads to
   shorter backup paths than node protection.  In case of tunnel-based
   BIER-FRR, link protection causes at most one redundant packet
   while node protection can cause more redundant packets.  In case of
   LFA-based BIER-FRR, link protection can protect more BFERs with
   normal BIER-LFAs than node protection.
      </t>
    </section>

    <section anchor="node_protection" 
             title="Node Protection">

      <t> 
   With node protection, the backup path avoids the failed node and 
   the link to the node (i.e., the failed primary path
   from the PLR to the primary BFR-NBR, including the primary BFR-NBR).
   Therefore, the backup path 

   must not include the primary path or the primary
   BFR-NBR so that the backup path 

   is still operational if these
   elements fail.  If a BFER and its primary
   BFR-NBR are the same, only link protection is possible for that BFER.
   An advantage of node protection is the improved protection quality
   compared to link protection.  However, node protection has also
   disadvantages.  It often leads to longer backup paths than link
   protection.  For tunnel-based BIER-FRR, possibly more redundant
   packets are transmitted over a link than with link protection. 

   For LFA-based BIER-FRR, possibly fewer BFERs can be protected with 
   normal BIER-LFAs so that more remote BIER-LFAs or topology-independent 
   BIER-LFAs are needed which are more complex.
 
      </t>
    </section>

    <section anchor="protection_example" title="Example">
      <t>In <xref target="networking_scenario" />, B1's primary path 
         towards BFER B5 is B1-B6-B5.
         Node protection for BFER B5 can be achieved only via the backup 
         path B1-B2-B3-B4-B5.
         Link protection for BFER 5 is achieved via the backup path 
         B1-B2-B7-B6 and in addition via the backup path
         B1-B2-B3-B4-B5-B6.
         The backup entries depend on the protection level and 
         on the backup strategy.
         Example BIFTs for link and node protection are given in 
         <xref target="Strategies"/>. 

      </t>
    </section>
  </section>

  <!-- Strategies -->
  <section anchor="Strategies" 
           title="Backup Strategies">
    <t>The backup strategies determine the selection of the backup
   forwarding entries.  They have an impact on the backup BFR-NBR and on
   the backup action, and thereby on the backup path.
   In the following,
   tunnel-based BIER-FRR and LFA-based BIER-FRR are
   presented.
<!--  
       This section specifies three backup strategies: 
       tunnel-based BIER-FRR, LFA-based BIER-FRR and hybrid BIER-FRR.
       The LFA-based BIER-FRR has two modes: 
       LFA-based BIER-FRR using multiple BIFTs and 
       LFA-based BIER-FRR using single BIFT.
-->
    </t>

    <section anchor="Tunnel_Based" title="Tunnel-Based BIER-FRR">
      <t>The routing underlay may be able to forward packets towards 
         their destinations despite an existing failure.
         This may be achieved, e.g., due to FRR mechanisms  
         in the routing underlay.
         In that case, 
         the primary BFR-NBR is not reachable via the primary action
         (Plain), but it may be reachable via a backup action (Tunnel).
<!--
         In that case, when packets cannot be forwarded through 
         the primary BFR-NBR via the primary action (Plain)
         because the primary BFR-NBR fails, they may be forwarded
         via a backup action (Tunnel).
--> 
          </t>

      <t>Tunnel-based BIER-FRR encapsulates BIER packets affected by 
         a failure in the routing underlay to leverage its fast 
         restoration capability.
         The affected BIER packets can be delivered towards their 
         destinations as soon as the connectivity in the 
         routing underlay is restored.
         The appropriate backup forwarding entries in a BIFT for 
         BIER-FRR depend on the desired protection level.
      </t>

      <section title="Tunnel-Based BIER-FRR with Link Protection">
        <t>With link protection, the backup BFR-NBRs equal the primary 
           BFR-NBRs. If a primary BFR-NBR is directly connected to the BFR
           as a PLR, the corresponding backup forwarding action is Tunnel.
           As a result, the BIER packets affected by a failure are 
           tunneled over the routing underlay to their BFR-NBR 
           instead of being sent directly as plain BIER packets  
           to the BFR-NBR.

           If a primary BFR-NBR is not directly connected to the BFR as a
           PLR (i.e., the implicit, primary action is Tunnel), 
           the corresponding backup action is also Tunnel.

           The backup F-BMs are the same as the primary F-BMs,
           which is in line with the computation of the backup F-BMs 
           in <xref target="f_bm_computation"/>.         

         <figure anchor="backup_bift_tunnel_based_link_protection" 
          title="B1's backup BIFT for tunnel-based BIER-FRR with link protection.">
             <artwork align="center"><![CDATA[
  +------+----------+--------+-----------+---+-----------------+
  |BFR-id|  BF-BM   |BBFR-NBR|   BFA     |BEA|Comment: protects|
  |      |          |        |           |   |  failure of     |
  +======+==========+========+===========+===+=================+
  |   2  | 0000110  |  B2    |  Tunnel   |   |  Link B1->B2    |
  +------+----------+--------+-----------+---+-----------------+
  |   3  | 0000110  |  B2    |  Tunnel   |   |  Link B1->B2    |
  +------+----------+--------+-----------+---+-----------------+
  |   4  | 1111000  |  B6    |  Tunnel   |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   5  | 1111000  |  B6    |  Tunnel   |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   6  | 1111000  |  B6    |  Tunnel   |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   7  | 1111000  |  B6    |  Tunnel   |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+]]>
             </artwork>
         </figure>
</t>

    <t><xref target="backup_bift_tunnel_based_link_protection"/> shows
       B1's backup BIFT for tunnel-based BIER-FRR 
       with link protection for the BIER network example of 
       <xref target="networking_scenario"/>.

       The backup BFR-NBRs and backup F-BMs 
       in this backup BIFT are 
       the same as the primary 
       BFR-NBRs and primary F-BMs in the primary BIFT in 
       <xref target="primary_bift_failure_free"/>,
but the backup actions in this backup BIFT are Tunnel 
       while the primary actions in the primary BIFT are Plain
       (which are not shown, but implied).</t>

        <t>
           When B1 as a PLR detects failure of its link to B6,
           a BIER packet with bitstring 0100000 for B6 
           is tunneled by B1 towards B6 via the routing underlay.
           The exact path of the backup tunnel depends on the routing 
           underlay.
           It may be B1-B2-B7-B6 or B1-B2-B3-B4-B5-B6.
        </t>

        <t>If a BIER packet is destined to {B2, B5, B7}, first
   an encapsulated packet copy is 
   forwarded via link B1-B2 to backup BFR-NBR B6 with backup action
   Tunnel to deliver packet copies to BFER B5 and B7.  Then, a
   non-encapsulated
   packet copy is forwarded via link B1-B2 to BFR-NBR B2 with primary
   action Plain to deliver a packet copy to BFER B2.  Thus, with 
   tunnel-based BIER-FRR, a single redundant packet copy can occur
   in case of a failure because an encapsulated packet copy and 
   a non-encapsulated packet copy are forwarded over the same link. 
   This happens although BIER packets affected by failures are forwarded
   before BIER packets not affected by failures.
        </t>

        <t>A BIER packet with bitstring 1000000 for B7 is forwarded 
           on the backup 
           path B1-B2-B7-B6-B7 as it is first delivered to the backup 
           BFR-NBR B6.
           Thus, the backup path can be unnecessarily long.
           This phenomenon is known from facility backup method in 
           <xref target="RFC4090" /> which takes similar paths as 
           tunnel-based BIER-FRR.
        </t>
      </section>

      <section title="Tunnel-Based BIER-FRR with Node Protection">

        <t>
   To determine the backup forwarding entries with node protection, a
   case analysis for the BFER to protect is needed.  If the BFER is the
   same as its primary BFR-NBR, node protection is not possible for that
   BFER.  Therefore, link protection is applied,
   i.e., the backup
   BFR-NBR is set to the primary BFR-NBR. 
If that level of protection is not sufficient, 
egress protection in <xref target="I-D.chen-bier-egress-protect"/> 
may be applied.

   Otherwise (i.e., the BFER is
   different from its primary BFR-NBR), the backup BFR-NBR is set to the
   primary BFR-NBR's primary BFR-NBR for that BFER, i.e., the backup
   BFR-NBR is a next next hop BFR.  In all cases, the backup action is
   Tunnel.  In the first case, the backup F-BM is set to all zeroes plus
   the bit enabled for the BFER to protect. In the second case, the 
   backup F-BM is computed in the way 
           described in <xref target="f_bm_computation"/>.       

        <figure anchor="backup_bift_tunnel_based_node_protection" 
         title=
    "B1's backup BIFT for tunnel-based BIER-FRR with node protection.">
            <artwork align="center"><![CDATA[
  +------+----------+--------+----------+---+-----------------+
  |BFR-id|  BF-BM   |BBFR-NBR|   BFA    |BEA|Comment: protects|
  |      |          |        |          |   |  failure of     |
  +======+==========+========+==========+===+=================+
  |   2  | 0000010  |   B2   |  Tunnel  |   |  Link B1->B2    |
  +------+----------+--------+----------+---+-----------------+
  |   3  | 0000100  |   B3   |  Tunnel  |   |  BFR-NBR B2     |
  +------+----------+--------+----------+---+-----------------+
  |   4  | 0011000  |   B5   |  Tunnel  |   |  BFR-NBR B6     |
  +------+----------+--------+----------+---+-----------------+
  |   5  | 0011000  |   B5   |  Tunnel  |   |  BFR-NBR B6     |
  +------+----------+--------+----------+---+-----------------+
  |   6  | 0100000  |   B6   |  Tunnel  |   |  Link B1->B6    |
  +------+----------+--------+----------+---+-----------------+
  |   7  | 1000000  |   B7   |  Tunnel  |   |  BFR-NBR B6     |
  +------+----------+--------+----------+---+-----------------+]]>
            </artwork>
        </figure>
</t>

     <t><xref target="backup_bift_tunnel_based_node_protection"/> shows 
        B1's backup BIFT for tunnel-based BIER-FRR 
        with node protection for the BIER network example in 
        <xref target="networking_scenario"/>.

BFERs B2 and B6 are direct neighbors of B1. To protect them, only
link protection is applied as B1's primary BFR-NBR for them are 
those nodes themselves. According to the description above,
only the bit for B2 is set in the
   backup F-BM of B2. The same holds for B6.  

   For BFER B5, the backup BFR-NBR is B5 as it is B1's
   next next hop BFR towards B5.
   Similarly, for BFER B7, the backup BFR-NBR is B7.

        When B1 as a PLR detects the failure of its BFR-NBR B6,  
a BIER packet with bitstring 1010010 for {B2, B5, B7} 
is processed as follows. 

   An encapsulated copy of the packet is sent via tunnel
   B1-B2-B3-B4-B5, another encapsulated copy is sent via tunnel B1-B2-B7,
   and a non-encapsulated copy is sent via link B1-B2.  
In this example,
   two redundant packets are sent on link B1-B2.  Thus,
   with node protection, more redundant packets copies may be sent than
   with link protection.</t>

     <t>Caveat: If the routing underlay does not provide node protection, 
   tunnel-based BIER-FRR cannot provide node protection, either.  
   This is shown 
   by the following example.  The underlay in the networking example of
   <xref target="networking_scenario"/> offers only link protection.
   B6 fails and B1 must forward a
   packet to B5.  According to the backup BIFT in 
   <xref target="backup_bift_tunnel_based_node_protection"/> the packet
   is tunneled towards B5 and the tunnel path B1-B2-B7-B6-B5 may be taken
   for
   this purpose by the underlay due to FRR with link protection.
   However, B6 is also unreachable at B7 so that the packet is returned
   to B2 and the packet loops between B2 and B7.
        </t>
      </section>

      <section title="Implementation Experience">
        <t>Tunnel-based BIER-FRR has been implemented in P4 for the 
           software-switch bmv2 <xref target="MeLi20b"/> and the 
           hardware switching ASIC Tofino <xref target="MeLi21"/>.
           Performance results have been provided.
        </t>
      </section>
    </section>







    <section anchor="LFA_Based" title="LFA-based BIER-FRR">
      <t>LFA-based BIER-FRR leverages alternate BFRs   
         to deliver BIER packets to BFERs for which the primary  
         BFR-NBR is unreachable. 
         It does not rely on any fast restoration/protection 
         mechanisms in the underlay. 

       First, some
   prerequisites for LFA-based BIER-FRR are clarified, BIER-LFAs are
   defined, and then link and node protection for 
   LFA-based BIER-FRR are discussed using a single backup BIFT.

<!--
   One option uses multiple backup BIFTs, and
   the other uses a single backup BIFT.

   which are a primary BIFT of a BFR and 
   backup BIFTs for specific failures of the BFR's links and neighbors; 
-->
<!--
   and the third uses a single BIFT.
-->
</t>

      <section title="Relation of BIER-LFAs to IP-LFAs and Prerequisites">
        <t>A loop-free alternate (LFA) for a specific destination is an 
           alternate node to which a packet is sent if the primary next hop 
           for this destination is not reachable.
           This alternate node should be able to forward the packet 
           without creating a forwarding loop.
           LFAs have been defined for IP networks in <xref target="RFC5286"/>,
           <xref target="RFC7490"/> and 
           <xref target="I-D.ietf-rtgwg-segment-routing-ti-lfa"/>.
           We denote such LFAs as IP-LFAs.
           BIER-LFAs are very similar to IP-LFAs, but a BIER-LFA node must 
           be a BFR.
           If only a subset of the nodes in the routing underlay are BFRs, 
           some IP-LFAs in the routing underlay may not be usable as BIER-LFAs.
           To compute BIER-LFAs, network topology and link cost information 
           from the routing 
           underlay are needed.
           This is a difference to tunnel-based BIER-FRR where knowledge 
           about the primary BIFTs of a PLR and its BFR-NBRs is sufficient.
        </t>

        <t>LFA-based BIER-FRR may reuse IP-LFAs in the following sense as 
           BIER-LFAs.
           If an IP-LFA node for the destination of a specific BFER is a 
           BFR, it may be reused as backup BFR-NBR for that BFER together with the 
           backup action that is applied for that IP-LFA on the IP layer.
           A normal IP-LFA corresponds to backup action plain, 
           a remote IP-LFA to Tunnel, and a TI-IP-LFA to Explicit.
        </t>
<!--
       <t>If the IP-LFA for a BFER in the RIB of a BFR has the same type as 
          expected for the LFA-based BIER-FRR and 
             it is computed using the IGP topology 
             that is the same as the BIER network domain topology, 
          then it is used as the backup BFR-NBR for the BFER in 
          the LFA-based BIER-FRR;
          otherwise,  
          the BFR computes a x-LFA as a backup BFR-NBR 
          using the BIER network 
          domain topology.

          In other words, the BFR computes the x-LFA for the BFER 
          in any of the following cases:
          <list style="symbols">
            <t>the IGP topology for computing IP-LFAs is different from
               the BIER domain topology,</t>
            <t>no IP-LFA exists in its RIB, or</t>
            <t>the IP-LFA in its RIB is not the type of LFA as expected 
              (e.g., the IP-LFA in the RIB is a remote LFA,  
               but a TI-LFA is expected).</t> 
           </list>
         </t>
-->
      </section> <!-- Relation of BIER-LFAs to IP-LFAs and Prerequisites -->


      <section title="Definition of BIER-LFAs">

        <t>As for IP-LFAs, there are several, different types of BIER-LFAs:
          <list style="symbols">
            <t>A BFR is a normal BIER-LFA for a specific BFER if it is 
               directly connected to the PLR and 
              <list style="numbers">
                <t>the BFER can be reached from it through the BIER domain
<!--
                   and it meets Loop-Free Criterion in 
                   <xref target="RFC5286"/>
-->
                </t>

                <t>both the path from the PLR to it and the path from it 
                   to the BFER are disjoint with the primary path from the 
                   PLR to the primary BFR-NBR. These paths
                  <list style="symbols">
                    <t>may contain the primary BFR-NBR for link protection, and</t>
                    <t>must not contain the primary BFR-NBR for node protection.</t>
                  </list>
                </t>
              </list>
            </t>
            <t>A BFR is a remote BIER-LFA for a specific BFER if it is not 
               directly connected to the PLR, 
               if it can be reached via a tunnel from the PLR, and if it 
               also satisfies the aforementioned conditions 1 and 2.
            </t>
            <t>A BFR is a TI-BIER-LFA for a specific BFER if it is not 
               directly connected to the PLR, 
               if it cannot be reached via a tunnel from the PLR, 
               if it is reachable 
               from the PLR via an explicit path (i.e., with the help of 
               a SR header), and if it also satisfies the aforementioned 
               conditions 1 and 2.</t>

          </list>
        </t>

        <t> For some BFERs, one or more normal BIER-LFAs are available at a specific PLR.
            For other BFERs, only remote and TI-LFAs are available.
            And there may be some BFERs, for which only TI-LFAs are available.
        </t>

        <t>The backup actions to reroute BIER packets depending 
           on the BIER-LFA types are:

          <list style="symbols">
            <t>For normal BIER-LFA: Plain</t>
            <t>For remote BIER-LFA: Tunnel</t>
            <t>For TI-BIER-LFA: Explicit</t>
          </list>
        </t>

<!--
        <t>Based on the backup BFR-NBRs, the backup F-BMs 
           are derived according to <xref target="f_bm_computation" />. </t>
-->
      </section>

      <section title="Protection Coverage of BIER-LFA Types" 
               anchor="bier_lfa_protection_coverage">

        <t>The protection coverage is the set of BFERs that can be protected with 
           a desired protection level by a certain BIER-LFA type.
           The BIER-LFA types have the following properties:
          <list style="symbols">
            <t>Normal BIER-LFAs
              <list style="symbols">
                <t>The protection coverage is the least because some or many BFERs 
                   cannot be protected with the desired protection level or even 
                   not at all.</t>
                <t>Redundant packet copies are avoided.</t>
                <t>No encapsulation overhead.</t>
              </list>
            </t>
            <t>Remote BIER-LFAs
              <list style="symbols">
                <t>They increase the protection coverage of normal BIER-LFAs.</t>
                <t>Redundant packet copies may occur on a link 
                   similar to tunnel-based BIER-FRR.</t>
<!--
                <t>The LFA-based BIER-FRR using multiple backup BIFTs may have
                    no or fewer redundant packet copies without 
                    any prioritization of backup
                    forwarding entries.</t>
-->
                <t>Same encapsulation overhead as with tunnel-based BIER-FRR.</t>
              </list>
            </t>
            <t>TI-BIER-LFAs
              <list style="symbols">
                <t>They complement the protection coverage of normal and remote 
                   BIER-LFAs to 100%.</t>
                <t>Redundant packets may occur on a link 
                   similar to tunnel-based BIER-FRR.</t>
<!--
                <t>The LFA-based BIER-FRR using multiple backup BIFTs may have
                   no or fewer redundant packet copies without 
                   any prioritization of backup
                   forwarding entries.</t>
-->
                <t>Same or similar encapsulation overhead as with
                   tunnel-based BIER-FRR depending on the FRR 
                   mechanism in the routing underlay.</t>
              </list>
            </t>
          </list>
        </t>
      </section>

      <section title="Sets of Supported BIER-LFAs">
        <t>Normal BIER-LFAs are simplest, as they require neither tunneling 
           nor explicit paths.
           Remote BIER-LFAs are more powerful, but entail more header overhead 
           and require more functionality from the PLR.
           TI-BIER-LFAs are most complex as they require the use of explicit paths.
           When LFA-based BIER-FRR is utilized, the set of supported BIER-LFAs 
           must be indicated.
           The following options are available:

           <list style="symbols">
             <t>Option 1: only normal BIER-LFAs are supported</t>
             <t>Option 2: normal and remote BIER-LFAs are supported</t>
             <t>Option 3: all BIER-LFA types are supported</t>
           </list>
         </t>
      </section> <!-- Sets of Supported BIER-LFAs -->


  
<!--
    <section title="LFA-based BIER-FRR using Single Backup BIFT"> 
      <t>The LFA-based BIER-FRR using single backup BIFT 
         has a single backup BIFT and primary BIFT in every BFR. 
         The primary BIFT is a regular BIFT. 
         The backup BIFT contains a backup forwarding entry for each BFER, 
         including BF-BM, BBFR-NBR, BFA and BEA. </t>
-->
      <section  anchor="lfa-based-1backup-bift-link-protect" 
                title="Link Protection">
       <t>
   With link protection, normal BIER-LFAs are preferred over remote LFAs
   and remote BIER-LFAs are preferred over TI-BIER-LFAs.  Depending on
   the set of supported BIER-LFAs, a BFER may not be protectable.
       </t>

       <t><xref target="backup_bift_failure_specific"/>
   illustrates B1's backup BIFT for LFA-based 
   BIER-FRR with link protection in the networking example of
   <xref target="networking_scenario"/>.
       </t>

       <t>
   If the link B1-B6 fails, B1 cannot reach the BFERs B4, B5, B6, and B7
   over their primary BFR-NBR.  Therefore, B1 sends their traffic via
   the backup BFR-NBR B2 together with the traffic for B2 and B3 as B2
   is their primary BFR-NBR.  As a consequence, the backup F-BM is
   1111110 in that case.  Likewise, if the link B1-B2 fails, B1 sends
   all traffic to B6, and the backup F-BM is 1111110 also in that case.
       </t>

       <t>
   B1 requires only normal BIER-LFAs to protect all BFERs.  This can be
   substantially different for other BFRs.   
   <xref target="b7-backup_bift_lfa-based-link-protect"/> and 
   <xref target="b5-backup_bift_link-protect"/> show
   the backup BIFTs for B7 and B5 respectively.  
   BFR B7 requires one normal BIER-LFA,
   three remote BIER-LFAs, and two TI-BIER-LFAs to protect all BFERs.
   And BFR B5 requires even one normal BIER-LFA, one remote BIER-LFA,
   and four TI-BIER-LFAs as backup BFR-NBRs.  Thus, depending on the set
   of supported BIER-LFAs, a BFER cannot be protected by BIER-FRR.
       </t>

       <t>
   We now assume B7 has a BIER packet with destinations {B1, B4, B5,
   B6}.  When link B7-B6 fails, 
   the packet copy for B1 is sent to B2 using forwarding action Plain,
   the packet copy to B4 is tunneled via B2 to B3, 
   and the packet copies towards
   B5 and B6 are sent via explicit paths towards B4 and B1 respectively. 
   As these
   packet copies have different headers, they all need to be sent.
   Hence, we observe three redundant copies.

       <figure anchor="b7-backup_bift_lfa-based-link-protect" 
               title="B7's backup BIFT with link protection.">
           <artwork align="center"><![CDATA[
  +------+----------+--------+-----------+---+-----------------+
  |BFR-id|  BF-BM   |BBFR-NBR|   BFA     |BEA|Comment: protects|
  |      |          |        |           |   |  failure of     |
  +======+==========+========+===========+===+=================+
  |   1  | 0000111  |   B2   |  Plain    |   |  Link B7->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   2  | 0000110  |   B1   |  Tunnel   |   |  Link B1->B2    |
  +------+----------+--------+-----------+---+-----------------+
  |   3  | 0000110  |   B1   |  Tunnel   |   |  Link B1->B2    |
  +------+----------+--------+-----------+---+-----------------+
  |   4  | 0001000  |   B3   |  Tunnel   |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   5  | 0010000  |   B4   |  Explicit |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   6  | 0100000  |   B1   |  Explicit |   |  Link B1->B6    |
  +------+----------+--------+-----------+---+-----------------+]]>
           </artwork>
       </figure>
       </t>

       <t>

       <figure anchor="b5-backup_bift_link-protect" 
               title="B5's backup BIFT with link protection.">
           <artwork align="center"><![CDATA[
  +------+----------+--------+-----------+---+-----------------+
  |BFR-id|  BF-BM   |BBFR-NBR|   BFA     |BEA|Comment: protects|
  |      |          |        |           |   |  failure of     |
  +======+==========+========+===========+===+=================+
  |   1  | 1100011  |   B3   |  Explicit |   |  Link B5->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   2  | 1100011  |   B3   |  Explicit |   |  Link B5->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   3  | 0000100  |   B4   |  Plain    |   |  Link B5->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   4  | 0001000  |   B3   |  Tunnel   |   |  Link B5->B4    |
  +------+----------+--------+-----------+---+-----------------+
  |   6  | 1100011  |   B3   |  Explicit |   |  Link B5->B6    |
  +------+----------+--------+-----------+---+-----------------+
  |   7  | 1100011  |   B3   |  Explicit |   |  Link B5->B6    |
  +------+----------+--------+-----------+---+-----------------+]]>
           </artwork>
       </figure>
       </t>
      </section> <!-- Link Protection -->

      <section title="Node Protection">
       <t>
   To determine the backup forwarding entries with node protection, a
   case analysis for the BFER to protect is needed again.  If the BFER
   is the same as its primary BFR-NBR, node protection is not possible
   for that BFER.  In this case, link protection is applied. 
   Otherwise,
   the BFER must be protected by a node-protecting BIER-LFA.  Thereby,
   normal BIER-LFAs are preferred over remote BIER-LFAs and remote BIER-
   LFAs are preferred over TI-BIER-LFAs.  Depending on the set of
   allowed BIER-LFAs, a BFER may not be protectable.
       </t>

       <t>
   <xref target="b1-backup_bift_node-protect"/>
   illustrates B1's backup BIFT for the LFA-based BIER-FRR 
   with node protection in the networking example of 
   <xref target="networking_scenario"/>.

       <figure anchor="b1-backup_bift_node-protect" 
               title="B1's backup BIFT with node protection.">
           <artwork align="center"><![CDATA[
  +------+----------+--------+-----------+---+-----------------+
  |BFR-id|  BF-BM   |BBFR-NBR|   BFA     |BEA|Comment: protects|
  |      |          |        |           |   |  failure of     |
  +======+==========+========+===========+===+=================+
  |   2  | 1111010  |   B6   |  Plain    |   |  BFR-NBR B2     |
  +------+----------+--------+-----------+---+-----------------+
  |   3  | 0000100  |   B4   |  Tunnel   |   |  BFR-NBR B2     |
  +------+----------+--------+-----------+---+-----------------+
  |   4  | 0001000  |   B3   |  Tunnel   |   |  BFR-NBR B6     |
  +------+----------+--------+-----------+---+-----------------+
  |   5  | 0010000  |   B4   |  Explicit |   |  BFR-NBR B6     |
  +------+----------+--------+-----------+---+-----------------+
  |   6  | 1100100  |   B2   |  Plain    |   |  BFR-NBR B6     |
  +------+----------+--------+-----------+---+-----------------+
  |   7  | 1100100  |   B2   |  Plain    |   |  BFR-NBR B6     |
  +------+----------+--------+-----------+---+-----------------+]]>
           </artwork>
       </figure>

   As the primary BFR-NBR of B1 for BFER B6 is B6 itself, only link
   protection can be applied.  Therefore, B2 is used as normal, link-
   protection BIER-LFA to protect B6.  Likewise, the primary BFR-NBR of
   B1 for BFER B2 is B2, and therefore, B2 is protected with B6 as
   normal, link-protecting BIER-LFA.  BFER B7 is protected against the
   failure of node B6 with B2 as normal, node-protecting BIER-LFA as B2
   has a shortest path towards B7 that does not traverse B6.  The backup
   F-BMs for BFER 6 and BFER 7 are {B2, B6, B7} because if B6 is
   unreachable, the traffic for these BFERs is sent via link B1-B2 with
   forwarding action Plain.
       </t>

       <t>
   BFER B4 is not reachable through a normal LFA when BFR B6 fails.
   However, B3 is a remote, node-protecting BIER-LFA for BFER B4 because
   B3 has a shortest path towards B4, and B3 is reachable through a
   shortest path from B1, and the resulting backup path from B1 to B4
   does not traverse B6.  Likewise, B4 is a remote LFA for BFER B3 if
   BFR B2 fails.
       </t>

       <t>
   BFER B5 is neither reachable through a normal BIER-LFA nor through a
   remote BIER-LFA when BFR B6 fails.  However, B4 is a node-protecting
   TI-LFA for BFER B5 because B4 has a shortest path towards B5 that
   does not traverse B6.  Moreover, B4 is reachable through the explicit
   path B1-B2-B3-B4.
       </t>
      </section> <!-- Node Protection -->

      <section title="Optimization Potential to Reduce Redundant BIER Packets in Failure Cases"> 
        <t>Redundant packets occur with LFA-based BIER-FRR 
           if BIER packets are sent over a specific link in different forms.
           These forms are

           <list style="symbols">
             <t>plain BIER packets (plain primary transmission or 
                reroute to normal BIER-LFA)</t>
             <t>BIER packets encapsulated to a specific BFR-NBR 
               (tunneled primary transmission or reroute to remote BIER-LFA)</t>
             <t>BIER packets with an encoded explicit path (reroute to TI-LFA)</t>
           </list>

           When different remote LFAs are addressed, even multiple
           redundant packets can be caused through remote LFAs.
           The same can happen with TI-LFAs.
           Some redundant packets can be avoided if remote LFAs 
           or TI-LFAs are chosen such that they can protect several
           BFERs and thereby avoid the need for another remote LFA or TI-LFA.
           However, this may lead to longer backup paths.
           This is a new, potential optimization objective for 
           the choice of remote or TI-BIER-LFAs which does not exist for IP-FRR.
           Its relevance may depend on the use case.
        </t>

        <t>We illustrate this optimization potential.
           We consider LFA-based BIER-FRR with link protection for B7.
           Its backup BIFT is given in 
           <xref target="b7-backup_bift_lfa-based-link-protect"/>.
           As observed in <xref target="lfa-based-1backup-bift-link-protect"/>, 
           B7 needs to send four copies to forward a packet to {B1, B4, B5, B6}.
           If we choose the more complex TI-BIER-LFA B4 to protect 
           BFER B4 instead of the remote BIER-LFA B3, then only two 
           redundant copies need to be sent.
        </t>
      </section> <!-- Optimization Potential to Reduce Redundant Packets -->

    <!-- </section> --> <!-- LFA-based BIER-FRR using Single Backup BIFT -->

<!--
    <section title="LFA-based BIER-FRR using Single BIFT"> 
      <t>In the LFA-based BIER-FRR using single BIFT,
         every BFR has a single BIFT for a level of protection.
         Its structure is the same as the one in 
         <xref target="bift"/>.

         For each BFER in the BIFT, the backup entry for it
         contains a BF-BM, BBFR-NBR, BFA and BEA. 
         The BBFR-NBR for the BFER is a BIER-LFA for the BFER
         to provide the level of protection. 
      </t>
-->

<!--
      <t>This section specifies mechanisms to the normal BIFT and 
         forwarding procedure for providing fast protection 
         for BIER packets against a transit node or link failure.
         After the extensions, 
         examples for node protection and link protection are given.</t>

      <section title="Extensions to BIFT and Forwarding Procedure"> 

      <t>The normal single BIFT is extended  
         based on LFA to provide fast protection against a transit node
         or link failure. 
         The BIER forwarding procedure defined in <xref target="RFC8279"/>
         needs to be enhanced accordingly.</t>

      <t>Every BFR has an extended BIFT. 
         The forwarding entry with transit node (say N) as its BFR-NBR 
         in the BIFT comprises a primary forwarding entry (or say sub-entry) 
         and a backup forwarding entry (or say sub-entry,
         or backup entry for short) and a flag BEA.
         The backup entry contains a BF-BM,
         BBFR-NBR, 
         BFA and BEA. 
         The BBFR-NBR is a BIER-LFA.        
       </t>

       <t>The backup F-BM (BF-BM) in a backup forwarding sub-entry is 
          computed in two steps as described in 
          <xref target="f_bm_computation"/>.</t>

       <t>In normal operations, all the BIER packets are forwarded 
          using the primary forwarding entries.
          When a BFR as a PLR detects the failure of its BFR-NBR N 
          or its link to the BFR-NBR N using 
          a failure detection mechanism such as BFD, it sets the flag
          in the forwarding entry with BFR-NBR N to 1.
          The BIER packets to be sent via N are forwarded using
          the backup forwarding entry for N.
          The BIER packets to be sent via the other BFR neighbors
          are forwarded using the primary forwarding entries for the
          neighbors.</t>

       <t>In a BFR, the BIER forwarding procedure is enhanced to check whether 
          the flag BEA in an entry of its BIFT is set to 1
          and forward a BIER packet using the primary or backup 
          forwarding sub-entry accordingly. 
-->
<!--
          When the BFR as a PLR sets the flag BA
          in the forwarding entry with BFR-NBR N to 1, the following 
          loop should be executed to avoid some redundant packets.
<figure>
  <artwork> <![CDATA[
    For each primary forwarding entry with BFR-NBR X in BIFT
        IF X == N {F-BM for X = BF-BM for N}.
]]></artwork>
</figure>
-->


<!--
       <t>The updated procedure is described in 
<xref target="proc4-updated-bift"/>. 
For simplicity, using the SI, sub-domain, and
BitStringLength in packets, as the "index" into the BIFT is 
not included in the procedure.

<figure anchor="proc4-updated-bift" 
        title="Updated Forwarding Procedure using Single BIFT">
  <artwork> <![CDATA[
  Packet = the packet received by BFR;
  FOR each BFER k (from the rightmost in Packet's BitString) {
      IF BFER k is the BFR itself {
          copies Packet, sends the copy to the multicast 
          flow overlay and clears bit k in Packet's BitString
      } else {
          finds the forwarding entry using BFER k
          IF (FPA == 1) { //FRR for BFR-NBR/transit N is Active
              Copies Packet, updates the copy's BitString by ANDing
              it with BF-BM, sends updated copy to BNH
              Update Packet's BitString by ANDing it with ~BF-BM
          } ELSE {
              Copies Packet, updates the copy's BitString by ANDing
              it with F-BM, sends updated copy to N
              Update Packet's BitString by ANDing it with ~F-BM
          }
      }
  }]]></artwork>
</figure>
          </t>
-->

      <!-- Extensions to BIFT and Forwarding Procedure --> 

<!--
      <section title="Link Protection"
               anchor="lfa-1bift-link-protect"> 
       <t>A BFR has a single BIFT for link protection.
          The BBFR-NBR for each BFER in the BIFT
          is a BIER-LFA for the BFER for link protection. 
          After having the BIER-LFA as BBFR-NBR for each BFER,
          the BF-BM for each BFER can be computed in the way
          described in <xref target="f_bm_computation"/>.
       </t>

       <t>The following presents the details in BFR B1 in 
          <xref target="networking_scenario"/>
          for building the BIFT for BIER-FRR link protection.</t>

       <t>At first, BFR B1 obtains 
          a BIER-LFA as BBFR-NBR for each BFER.
          B6 is normal BIER-LFA as BBFR-NBR for BFER B2 and B3.
          B2 is normal BIER-LFA as BBFR-NBR for BFER B4, B5, B6 and B7.
          
          <xref target="frr-bift0-b1-link"/> illustrates B1's  
          intermediate BIFT for link protection filled with 
          values for BBFR-NBRs and BFAs.

<figure anchor="frr-bift0-b1-link" 
        title="B1's intermediate BIFT for link protection.">
  <artwork align="center"> <![CDATA[
+======+=========+=======+==========+========+==========+===+
|BFR-id|   F-BM  |BFR-NBR|  BF-BM   |BBFR-NBR|   BFA    |BEA|
+======+=========+=======+==========+========+==========+===+
|   2  | 0000110 |  B2   |          |   B6   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
|   3  | 0000110 |  B2   |          |   B6   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
|   4  | 1111000 |  B6   |          |   B2   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
|   5  | 1111000 |  B6   |          |   B2   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
|   6  | 1111000 |  B6   |          |   B2   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
|   7  | 1111000 |  B6   |          |   B2   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
]]></artwork>
</figure>
       </t>

       <t>From the intermediate BIFT, 
          BFERs B2 and B3 have the same BFR-NBR B2 and BBFR-NBR B6,
          BFERs B4 to B7 have the same BFR-NBR B6 as the BBFR-NBR B6 
          for BFER B2. 

          According to <xref target="f_bm_computation"/>,
          the BF-BM for BFER B2 has the bits for B2 and B3 as well as
          the bits for B4 to B7, which is 1111110.

          Similarly, the BF-BM for each of BFERs B3 to B7 is computed,
          which is 1111110.
       </t>

       <t>With the BF-BMs, BFR B1 has the BIFT for link protection,
          which is illustrated in
          <xref target="frr-bift1-b1-link"/>.

<figure anchor="frr-bift1-b1-link" 
        title="B1's BIFT for BIER-FRR link protection.">
  <artwork align="center"> <![CDATA[
+======+=========+=======+==========+========+==========+===+
|BFR-id|   F-BM  |BFR-NBR|  BF-BM   |BBFR-NBR|   BFA    |BEA|
+======+=========+=======+==========+========+==========+===+
|   2  | 0000110 |  B2   | 1111110  |   B6   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
|   3  | 0000110 |  B2   | 1111110  |   B6   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
|   4  | 1111000 |  B6   | 1111110  |   B2   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
|   5  | 1111000 |  B6   | 1111110  |   B2   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
|   6  | 1111000 |  B6   | 1111110  |   B2   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
|   7  | 1111000 |  B6   | 1111110  |   B2   | Plain/LFA|   |
+======+=========+=======+==========+========+==========+===+
]]></artwork>
</figure>

   The 1st forwarding entry in the BIFT indicates that 
   the BF-BM is 1111110 and the BBFR-NBR on
   the path to BFER B2 with BFR-id 2 is BFR B6. 
   B6 is the normal BIER-LFA to protect against the
   failure of the link to B2.
</t>

<t>The 2nd forwarding entry in the BIFT indicates that 
   the BF-BM is 1111110 and the BBFR-NBR on
   the path to BFER B3 with BFR-id 3 is BFR B6. 
   B6 is the normal BIER-LFA to protect against the
   failure of the link to B2.
   </t>

<t>The 3rd forwarding entry in the BIFT indicates that 
   the BF-BM is 1111110 and the BBFR-NBR on 
   the path to BFER B4 with BFR-id 4 is BFR B2. 
   B2 is the normal BIER-LFA to protect against the
   failure of the link to B6.</t>

<t>The i-th (i = 4, 5, 6) forwarding entry in the BIFT indicates that 
   the BF-BM is 1111110 and the BBFR-NBR on 
   the path to BFER Bj (j = i+1) with BFR-id j is BFR B2. 
   B2 is the normal BIER-LFA to protect against the
   failure of the link to B6.</t>
-->

<!--
<t>The 6-th forwarding entry in the BIFT contains 
   the backup forwarding sub-entry, indicating that 
   the backup F-BM (BF-BM) is 1111110 and the BFR-NBR (BNH) on 
   the path to BFER B7 with BFR-id 7 is BFR B2. 
   B2 is the LFA to protect against the
   failure of the link to B6.</t>
-->
<!--
<t>When BFR B1 as a PLR detects the failure of its link to B2, 
   it sets the flag BEA in each of the forwarding entries with BFR-NBR 
   (NH) B2 to 1. The flag BEA in each of the first two forwarding entries 
   is set to 1. 
   BFR B1 forwards the BIER packets with BitString for BFERs 2 or 3 
   using the backup forwarding sub-entry in the forwarding entry
   for BFER 2 or 3.
   For the BIER packets with BitString for BFERs 4, 5, 6, or 7,
   B1 forwards them using the primary forwarding sub-entry 
   in the forwarding entry for BFER 4, 5, 6, or 7.</t>

<t>When BFR B1 as a PLR detects the failure of its link to B6, 
   it sets the flag BA in each of the forwarding entries with BFR-NBR 
   (NH) B6 to 1. The flag BA in each of the last four forwarding entries 
   is set to 1. 
   BFR B1 forwards the BIER packets with BitString for BFERs 4, 5, 6, or 7 
   using the backup forwarding sub-entry in the forwarding entry
   for BFER 4, 5, 6, or 7.
   For the BIER packets with BitString for BFERs 2 or 3,
   B1 forwards them using the primary forwarding sub-entry 
   in the forwarding entry for BFER 2 or 3.</t>
-->
      <!--  </section> --> <!-- Link Protection -->

 <!-- 
      <section title="Node Protection" 
               anchor="lfa-1bift-node-protect"> 
       <t>A BFR has a single BIFT for node protection.
          The BBFR-NBR for each BFER in the BIFT
          is a BIER-LFA for the BFER for node protection. 
          After having the BIER-LFA as BBFR-NBR for each BFER,
          the BF-BM for each BFER can be computed in the way
          described in <xref target="f_bm_computation"/>.
       </t>

       <t>The following presents the details in BFR B1 in 
          <xref target="networking_scenario"/>
          for building the BIFT for BIER-FRR node protection.</t>

       <t>At first, BFR B1 obtains 
          a BIER-LFA as BBFR-NBR for each BFER.
          B6 is normal BIER-LFA as BBFR-NBR for BFER B2 
          (note: link protection is used for B2).
          B4 is TI-BIER-LFA as BBFR-NBR for BFER B3.
          B3 is remote BIER-LFA as BBFR-NBR for BFER B4.
          B4 is TI-BIER-LFA as BBFR-NBR for BFER B5.
          B2 is normal BIER-LFA as BBFR-NBR for BFERs B6 and B7.
         
          <xref target="frr-bift0"/> illustrates B1's  
          intermediate BIFT for node protection filled with 
          values for BBFR-NBRs and BFAs.
<figure anchor="frr-bift0" 
        title="B1's intermediate BIFT for node protection">
  <artwork align="center"> <![CDATA[
+======+=========+=======+=========+========+================+===+
|BFR-id|  F-BM   |BFR-NBR|  BF-BM  |BBFR-NBR|      BFA       |BEA|
+======+=========+=======+=========+========+================+===+
|   2  | 0000110 |  B2   |         |   B6   | Plain/LFA      |   |
+======+=========+=======+=========+========+================+===+
|   3  | 0000110 |  B2   |         |   B4   | Explicit/TI-LFA|   |
+======+=========+=======+=========+========+================+===+
|   4  | 1111000 |  B6   |         |   B3   | Tunnel/R-LFA   |   |
+======+=========+=======+=========+========+================+===+
|   5  | 1111000 |  B6   |         |   B4   | Explicit/TI-LFA|   |
+======+=========+=======+=========+========+================+===+
|   6  | 1111000 |  B6   |         |   B2   | Plain/LFA      |   |
+======+=========+=======+=========+========+================+===+
|   7  | 1111000 |  B6   |         |   B2   | Plain/LFA      |   |
+======+=========+=======+=========+========+================+===+
]]></artwork>
</figure>
      </t>

       <t>From the intermediate BIFT, 
          BFER B2 shares its BBFR-NBR B6 with BFR-NBR B6 for BFERs B4 to B7. 

          According to <xref target="f_bm_computation"/>,
          the BF-BM for BFER B2 has the bit for B2 as well as
          the bits for B4 to B7, which is 1111010.

          BFER B3 does not share its BBFR-NBR B4 with any BFR-NBR.
          the BF-BM for BFER B3 is the bit for B3 itself, which is 
          0000100.
          Similarly, the BF-BM for BFER B4 is 0001000;
          the BF-BM for BFER B5 is 0010000.

          BFER B6 shares its BBFR-NBR B2 with BFR-NBR B2 for BFERs B2 and B3.
          It also shares both its BFR-NBR B6 and BBFR-NBR B2 with those of BFER B7.
          The BF-BM for BFER B6 has the bits for B2 and B3 as well as
          the bits for B6 and B7, which is 1100110.
          Similarly, the BF-BM for BFER B7 is 1100110.

       </t>


       <t>With the BF-BMs, BFR B1 has the BIFT for node protection,
          which is illustrated in
          <xref target="frr-bift1-b1"/>.

<figure anchor="frr-bift1-b1" 
        title="B1's BIFT for BIER-FRR Node Protection">
  <artwork align="center"> <![CDATA[
+======+=========+=======+=========+========+================+===+
|BFR-id|  F-BM   |BFR-NBR|  BF-BM  |BBFR-NBR|      BFA       |BEA|
+======+=========+=======+=========+========+================+===+
|   2  | 0000110 |  B2   | 1111010 |   B6   | Plain/LFA      |   |
+======+=========+=======+=========+========+================+===+
|   3  | 0000110 |  B2   | 0000100 |   B4   | Explicit/TI-LFA|   |
+======+=========+=======+=========+========+================+===+
|   4  | 1111000 |  B6   | 0001000 |   B3   | Tunnel/R-LFA   |   |
+======+=========+=======+=========+========+================+===+
|   5  | 1111000 |  B6   | 0010000 |   B4   | Explicit/TI-LFA|   |
+======+=========+=======+=========+========+================+===+
|   6  | 1111000 |  B6   | 1100110 |   B2   | Plain/LFA      |   |
+======+=========+=======+=========+========+================+===+
|   7  | 1111000 |  B6   | 1100110 |   B2   | Plain/LFA      |   |
+======+=========+=======+=========+========+================+===+
]]></artwork>
</figure>
</t>
-->

<!--
<t>
   The 1st forwarding entry in the BIFT indicates that 
   the BF-BM is 1111010 and the BBFR-NBR is BFR B6.
   B6 is a normal BIER-LFA to protect against the failure of link to B2.
   (note: link protection is used for BFER B2). 
</t>

<t>The 2nd forwarding entry in the BIFT indicates that 
   the BF-BM is 0000100 and 
   the BBFR-NBR on
   the path to BFER B3 with BFR-id 3 is BFR B4. 
   B4 is a TI-BIER-LFA  
   to protect against the failure of B2.</t>

<t>The 3rd forwarding entry in the BIFT indicates that 
   the  BF-BM is 0001000 and  
   the BBFR-NBR on
   the path to BFER B4 with BFR-id 4 is BFR B3. 
   B3 is a remote BIER-LFA  
   to protect against the failure of B6.</t>

<t>The 4-th forwarding entry in the BIFT indicates that 
   the BF-BM is 0010000 and  
   the BBFR-NBR on
   the path to BFER B5 with BFR-id 5 is BFR B4. 
   B4 is a TI-BIER-LFA to protect against the
   failure of B6.</t>

<t>The 5-th forwarding entry in the BIFT indicates that 
   the BF-BM is 1100110 and the BBFR-NBR 
   B6 is a normal BIER-LFA to protect against the failure of link to B6.
   (note: link protection is used for BFER B6). 
</t>

<t>The 6-th forwarding entry in the BIFT indicates that 
   the BF-BM is 1100110 and 
   the BBFR-NBR on
   the path to BFER B7 with BFR-id 7 is BFR B2. 
   B2 is the normal BIER-LFA to protect against the
   failure of B6.
</t>
-->
<!--
<t>When BFR B1 as a PLR detects the failure of BFR B2, 
   it sets the flag BA in each of the forwarding entries with BFR-NBR 
   (NH) B2 to 1. The flag BA in each of the first two forwarding entries 
   is set to 1. 
   BFR B1 forwards the BIER packets with BitString for BFERs 2 or 3 
   using the backup forwarding sub-entry in the forwarding entry
   for BFER 2 or 3.
   For the BIER packets with BitString for BFERs 4, 5, 6, or 7,
   B1 forwards them using the primary forwarding sub-entry 
   in the forwarding entry for BFER 4, 5, 6, or 7.</t>

<t>When BFR B1 as a PLR detects the failure of BFR B6, 
   it sets the flag BA in each of the forwarding entries with BFR-NBR 
   (NH) B6 to 1. The flag BA in each of the last four forwarding entries 
   is set to 1. 
   BFR B1 forwards the BIER packets with BitString for BFERs 4, 5, 6, or 7 
   using the backup forwarding sub-entry in the forwarding entry
   for BFER 4, 5, 6, or 7.
   For the BIER packets with BitString for BFERs 2 or 3,
   B1 forwards them using the primary forwarding sub-entry 
   in the forwarding entry for BFER 2 or 3.</t>
-->
     <!-- </section> --> <!-- Node Protection -->

    <!-- </section> --> <!-- LFA-based BIER-FRR using Single BIFT -->

    </section>

  </section>

<!-- Comparison -->
  <section anchor="Comparison" title="Comparison">
    <t>This section first discusses the difference of IP-LFAs 
       for IP-FRR and BIER-LFAs for BIER-FRR.  
       Then it discusses advantages and disadvantages of tunnel-based
       and LFA-based BIER-FRR.  
    </t>

    <section title="Comparison of LFA-Based Protection for IP-FRR and BIER-FRR">
      <t>LFAs have been first proposed for IP networks. They are 
simple in the sense that they do not require any tunneling overhead. 
However, some destinations cannot be protected against some link 
failures and even more destinations cannot be protected against some 
node failures. Therefore, remote LFAs (R-LFAs) have been defined 
to improve that coverage by tunneling the affected traffic to another 
node from where the traffic can reach the destination via normal 
forwarding. Nevertheless, there may be still some destinations that 
cannot be protected against link or node failures. Therefore, 
topology-independent LFAs (TI-LFAs) have been defined where affected 
traffic is tunneled via an explicit path (preferably using segment 
routing headers) to another node from where the traffic can reach its 
destination via normal IP forwarding. With TI-LFAs, all destinations 
can be protected against any failures as long as connectivity exists. 
      </t>

      <t>LFA-based BIER-FRR adopts the idea of LFAs. It differs from 
IP-FRR as the LFA target node, i.e., the node to which the traffic 
is deviated, must be a BFR. If an IP-LFA target is a BFR, it can be 
utilized as a BIER-LFA; otherwise it cannot serve as BIER-LFA. Thus, 
if only some nodes of the underlay are BFRs, the BIER-LFAs will be 
substantially different from IP-LFAs. Moreover, this makes it more 
difficult to find normal LFAs for which tunneling is not needed. 
That means, LFA-based BIER-FRR is likely to require more remote LFAs 
and TI-LFAs than IP-FRR under such conditions.
      </t>
    </section>

    <section title="Advantages and Disadvantages of Tunnel-Based BIER-FRR">
      <section title="Advantages">
        <t>
          <list style="symbols">
            <t>Computation of backup forwarding entries is very simple.
               Only primary BIFTs of a PLR and its BFR-NBRs are needed 
               to compute the backup forwarding entries.
               Routing information from the routing underlay is not needed.
            </t>
            <t>The forwarding action Explicit is not needed. However, 
               depending on the underlay, explicit forwarding may be used 
               to achieve FRR in the underlay.</t>

          </list>
        </t>
      </section>

      <section title="Disadvantages">
        <t>
          <list style="symbols">
            <t>It requires a FRR mechanism on the underlay.</t>
            <t>It is limited to the protection level of the underlay.
  E.g., if the underlay supports only link protection, tunnel-based 
BIER-FRR cannot provide node protection.</t>
            <t>Redundant packet copies may occur in
               tunnel-based BIER-FRR.
            </t>
            <t>In case of node protection, backup paths may be extended
more than needed.</t>
            <t>Requires a tunneling header for any rerouting, which creates 
               header overhead.</t>
          </list>
        </t>
      </section>
    </section>

    <section title="Advantages and Disadvantages of LFA-Based BIER-FRR">
      <section title="Advantages">
        <t>
          <list style="symbols">
            <t>Does not rely on any fast protection of the underlay.</t>

            <t>Can provide better protection on the BIER layer than on 
the IP layer; this is possible if LFA-based BIER-FRR utilizes BIER-LFAs 
with better protection level than LFA-based IP-FRR. E.g., the underlay 
may provide only FRR with link protection while BIER-FRR may provide 
node protection for BIER traffic.
               </t>
            <t>Avoids header overhead for normal BIER-LFAs.</t>
<!--
            <t>LFA-based BIER-FRR may have  
               less redundant packet copies without 
               any prioritization of backup forwarding entries than 
               tunnel-based BIER-FRR.</t>
-->
          </list>
        </t>
      </section>

      <section title="Disadvantages">
        <t>
          <list style="symbols">
            <t>Computation of backup forwarding entries requires routing
      information from the underlay.</t>

            <t>Computation of backup forwarding entries more complex
if some nodes of the underlay are not BFRs.</t>

            <t>Need for forwarding action Tunnel to protect some BFERs, 
               which adds header overhead. </t>

            <t>Need for forwarding action Explicit to achieve full protection
      coverage for some topologies; otherwise only partial protection
      coverage. This requires support for explicit paths, e.g., segment routing.</t>

            <t>More remote and TI-LFAs needed than for IP-FRR if some nodes 
in the routing underlay are not BFRs. </t>
            <t>Redundant packet copies may occur in LFA-based BIER-FRR
(but it's less than with tunnel-based BIER-FRR). </t>
          </list>
        </t>
      </section>
    </section>
  </section>

  <section anchor="Security" title="Security Considerations">
     <t>
         This document does not introduce any new security 
         issues beyond those discussed in BIER architecture
         <xref target="RFC8279"/>.</t>
  </section>
  <section anchor="IANA" title="IANA Considerations">
   <t>No requirements for IANA.</t>
  </section>




 </middle>
 <back>
  <references title="Normative References">
   <?rfc include="reference.RFC.2119"?>
   <?rfc include="reference.RFC.5286"?>

   <?rfc include="reference.RFC.8174"?>
   <?rfc include="reference.RFC.8279"?>
   <?rfc include="reference.RFC.7490"?>

  </references>
  <references title="Informative References">
   <?rfc include="reference.RFC.4090"?>
   <?rfc include="reference.I-D.chen-bier-egress-protect"?>

   <?rfc include="reference.I-D.ietf-rtgwg-segment-routing-ti-lfa"?>
   <reference anchor="BrAl17">
      <front>
      <title>Performance Comparison of Resilience Mechanisms for Stateless Multicast Using BIER</title>
      <author initials="W." surname="Braun" fullname="W. Braun"></author>
      <author initials="M." surname="Albert" fullname="M. Albert"></author>
      <author initials="T." surname="Eckert" fullname="T. Eckert"></author>
      <author initials="M." surname="Menth" fullname="M. Menth"></author>
      <date year="2017" month="May"/>
      </front>
    </reference>
<!--
    <reference anchor="MeLi20a">
       <front>
       <title>Comparison of Fast-Reroute Mechanisms for BIER-Based IP Multicast</title>
       <author initials="D." surname="Merling" fullname="D. Merling"></author>
       <author initials="S." surname="Lindner" fullname="S. Lindner"></author>
       <author initials="M." surname="Menth" fullname="M. Menth"></author>
       <date year="2020" month="June"/>
       </front>
     </reference>
-->
     <reference anchor="MeLi20b">
        <front>
        <title>P4-Based Implementation of BIER and BIER-FRR for Scalable and Resilient Multicast</title>
        <author initials="D." surname="Merling" fullname="D. Merling"></author>
        <author initials="S." surname="Lindner" fullname="S. Lindner"></author>
        <author initials="M." surname="Menth" fullname="M. Menth"></author>
        <date year="2020" month="November"/>
        </front>
      </reference>
      <reference anchor="MeLi21">
         <front>
         <title>Hardware-based Evaluation of Scalable and Resilient Multicast with BIER in P4</title>
         <author initials="D." surname="Merling" fullname="D. Merling"></author>
         <author initials="S." surname="Lindner" fullname="S. Lindner"></author>
         <author initials="M." surname="Menth" fullname="M. Menth"></author>
         <date year="2020" month="March"/>
         </front>
       </reference>
  </references>

<!-- Appendix -->
    <section title="Specific Backup Strategy Examples">
      <t>This appendix demonstrates the computations of some 
         specific backup strategy options in details.</t>

    <section title="LFA-based BIER-FRR using Single BIFT"> 
      <t>In the LFA-based BIER-FRR using single BIFT,
         every BFR has a single BIFT for a level of protection.
         Its structure is the same as the one in 
         <xref target="bift"/>.
      </t>

       <t>The following presents the details in BFR B1 in 
          <xref target="networking_scenario"/>
          for building the BIFT for BIER-FRR link protection.</t>

       <t>At first, BFR B1 obtains 
          a BIER-LFA as BBFR-NBR for each BFER.
          B6 is normal BIER-LFA as BBFR-NBR for BFER B2 and B3.
          B2 is normal BIER-LFA as BBFR-NBR for BFER B4, B5, B6 and B7.
          
          <xref target="frr-bift0-b1-link"/> illustrates B1's  
          intermediate BIFT for link protection filled with 
          values for BBFR-NBRs and BFAs.

<figure anchor="frr-bift0-b1-link" 
        title="B1's intermediate BIFT for link protection.">
  <artwork align="center"> <![CDATA[
+------+---------+-------+----------+--------+----------+---+
|BFR-id|   F-BM  |BFR-NBR|  BF-BM   |BBFR-NBR|   BFA    |BEA|
+======+=========+=======+==========+========+==========+===+
|   2  | 0000110 |  B2   |          |   B6   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+
|   3  | 0000110 |  B2   |          |   B6   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+
|   4  | 1111000 |  B6   |          |   B2   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+
|   5  | 1111000 |  B6   |          |   B2   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+
|   6  | 1111000 |  B6   |          |   B2   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+
|   7  | 1111000 |  B6   |          |   B2   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+]]></artwork>
</figure>
       </t>

       <t>From the intermediate BIFT, 
          BFERs B2 and B3 have the same BFR-NBR B2 and BBFR-NBR B6,
          BFERs B4 to B7 have the same BFR-NBR B6 as the BBFR-NBR B6 
          for BFER B2. 

          According to <xref target="f_bm_computation"/>,
          the BF-BM for BFER B2 has the bits for B2 and B3 as well as
          the bits for B4 to B7, which is 1111110. 
          The BF-BM for BFER B3 is also 1111110.

          Similarly, the BF-BM for each of BFERs B3 to B7 is computed,
          which is 1111110.
       </t>

       <t>With the BF-BMs, BFR B1 has the BIFT for link protection,
          which is illustrated in
          <xref target="frr-bift1-b1-link"/>.

<figure anchor="frr-bift1-b1-link" 
        title="B1's BIFT for BIER-FRR link protection.">
  <artwork align="center"> <![CDATA[
+------+---------+-------+----------+--------+----------+---+
|BFR-id|   F-BM  |BFR-NBR|  BF-BM   |BBFR-NBR|   BFA    |BEA|
+======+=========+=======+==========+========+==========+===+
|   2  | 0000110 |  B2   | 1111110  |   B6   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+
|   3  | 0000110 |  B2   | 1111110  |   B6   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+
|   4  | 1111000 |  B6   | 1111110  |   B2   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+
|   5  | 1111000 |  B6   | 1111110  |   B2   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+
|   6  | 1111000 |  B6   | 1111110  |   B2   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+
|   7  | 1111000 |  B6   | 1111110  |   B2   | Plain    |   |
+------+---------+-------+----------+--------+----------+---+]]></artwork>
</figure>
</t>

   </section>  <!-- LFA-based BIER-FRR using Single BIFT --> 


    <section title="LFA-based BIER-FRR using Multiple Backup BIFTs"> 

      <t>For the LFA-based BIER-FRR using multiple backup BIFTs,
         in addition to a primary BIFT, a BFR has a backup BIFT 
         for each of its BFR-NBRs with a level of protection.

         The backup BIFT for BFR-NBR N with link protection 
         (or simply called the backup BIFT for link to N)
         assumes that the link to N failed. 
         The BFR uses it to protect against the failure of its link to N.
         The backup BIFT for N with node protection 
         (or simply called the backup BIFT for N)
         assumes that node N failed. 
         The BFR uses it to protect against the failure of N.

         Once the BFR as a PLR detects the failure of its link to N, 
         it uses the backup BIFT for link to N to forward 
         all BIER packets.

         When the BFR as a PLR detects the failure of its BFR-NBR N,
         it uses the backup BIFT for N to forward 
         all BIER packets.
      </t>

      <t>Even though a BFR has multiple backup BIFTs, 
         the LFA-based BIER-FRR using multiple backup BIFTs is scalable. 
         Both the size of a backup BIFT and 
         the number of backup BIFTs on the BFR are small. 
         Assume a BIER network has 1000 BFRs and 100 BFERs, and
         each BFR has 10 BFR-NBRs on average. 
         The size of a backup BIFT is 100 forwarding entries.
         The number of backup BIFTs on the BFR is 20 on average.
         The total size of all backup BIFTs is 100*20 = 2000 
         forwarding entries.</t>
<!--
      <t>For each BFR-NBR N of a BFR, 
         the BFR has a FRR-BIFT for link to N.
         
         The BFR builds the FRR-BIFT for link to N from its normal BIRT 
         with consideration of the failure of the link. 
         It changes the BFR-NBR N for a BFER in the BIRT 
         to a backup BFR-NBR for the BFER to protect 
         against the failure of the link to N, 
         where the backup BFR-NBR for the BFER is a BIER-LFA for the BFER.
         And then it derives the 
         FRR-BIFT for link to N from the BIRT in the same way as
         it derives its regular BIFT from 
         its BIRT defined in <xref target="RFC8279"/>.
         </t>
-->
        <t>The following presents the details in BFR B1 
           in <xref target="networking_scenario"/> for
           building the backup BIFT for link to B2 to support 
           BIER-FRR link protection.</t>

      <t>To support link protection, 
         BFR B1 in <xref target="networking_scenario"/>
         has two backup BIFTs: 
         one for link to B2 and 
         the other for link to B6.
         The backup BIFT for link to B2 is illustrated in
         <xref target="frr-bift4-link2b2"/>.

<figure anchor="frr-bift4-link2b2" 
        title="B1's backup BIFT for link to B2.">
  <artwork align="center"> <![CDATA[
+--------+---------+---------+-----------------+-----------------+
| BFR-id |   F-BM  | BFR-NBR |Forwarding Action|Comment: protects|
|        |         |         |                 |  failure of     |
+========+=========+=========+=================+=================+
|   2    | 1111110 |    B6   |   Plain         |  Link B1->B2    |
+--------+---------+---------+-----------------+-----------------+
|   3    | 1111110 |    B6   |   Plain         |  Link B1->B2    |
+--------+---------+---------+-----------------+-----------------+
|   4    | 1111110 |    B6   |   Plain         |                 |
+--------+---------+---------+-----------------+-----------------+
|   5    | 1111110 |    B6   |   Plain         |                 |
+--------+---------+---------+-----------------+-----------------+
|   6    | 1111110 |    B6   |   Plain         |                 |
+--------+---------+---------+-----------------+-----------------+
|   7    | 1111110 |    B6   |   Plain         |                 |
+--------+---------+---------+-----------------+-----------------+
]]></artwork>
</figure>
</t>
<!--
<t>
   The 1st forwarding entry in the FRR-BIFT indicates that 
   the BFR-NBR on
   the path to BFER B2 with BFR-id 2 is BFR B6. 
   B6 is the BIER-LFA for BFER B2 

   to protect against the failure of the link to B2.
</t>

<t>The 2nd forwarding entry in the FRR-BIFT indicates that 
   the BFR-NBR on
   the path to BFER B3 with BFR-id 3 is BFR B6.
   B6 is the BIER-LFA for BFER B3
   to protect against the failure of the link to B2.
</t>

<t>The 3rd forwarding entry in the FRR-BIFT indicates that 
   the BFR-NBR on
   the path to BFER B4 with BFR-id 4 is BFR B6. 
</t>

<t>The i-th (i = 4, 5, 6) forwarding entry in the FRR-BIFT indicates that 
   the BFR-NBR on
   the path to BFER Bj (j = i+1) with BFR-id j is BFR B6. 
</t>
-->

<t>BFR B1 builds the backup BIFT for link to B2 in two steps. 
   In the first step, it builds the backup BIRT for link to B2 
   through copying its regular BIRT
   to the backup BIRT and then changing   
   BFR-NBR B2
   in the backup BIRT to a backup BFR-NBR to protect against the
   failure of the link to B2.
   The backup BIRT for link to B2 built by B1 is illustrated in 
         <xref target="frr-birt4-link2-b2"/>.

<figure anchor="frr-birt4-link2-b2" 
        title="B1's backup BIRT for link to B2.">
  <artwork align="center"> <![CDATA[
+------+-------------+---------+-----------------+-----------------+
|BFR-id|BFER's Prefix| BFR-NBR |Forwarding Action|Comment: protects|
|      |             |         |                 |  failure of     |
+======+=============+=========+=================+=================+
|  2   |     B2      |    B6   |   Plain         |  Link B1->B2    |
+------+-------------+---------+-----------------+-----------------+
|  3   |     B3      |    B6   |   Plain         |  Link B1->B2    |
+------+-------------+---------+-----------------+-----------------+
|  4   |     B4      |    B6   |   Plain         |                 |
+------+-------------+---------+-----------------+-----------------+
|  5   |     B5      |    B6   |   Plain         |                 |
+------+-------------+---------+-----------------+-----------------+
|  6   |     B6      |    B6   |   Plain         |                 |
+------+-------------+---------+-----------------+-----------------+
|  7   |     B7      |    B6   |   Plain         |                 |
+------+-------------+---------+-----------------+-----------------+]]></artwork>
</figure>

    The BFR-NBR in each of the first two routing entries 
    with BFR-NBR B2 originally from the BIRT is changed to 
    its corresponding backup BFR-NBR.
    The BFR-NBR B2 in the first entry is changed
    to backup BFR-NBR BIER-LFA B6.

    The BFR-NBR B2 in the second entry is changed
    to backup BFR-NBR BIER-LFA B6.</t>

<t>In the second step, BFR B1 derives the backup BIFT for link to B2 from 
   the backup BIRT for link to B2 in the same way 
   as it derives its regular BIFT from 
   its BIRT defined in <xref target="RFC8279"/>.
   The result of the backup BIFT for link to B2 is the one 
   shown in <xref target="frr-bift4-link2b2"/>.</t>

<t>When BFR B1 as a PLR detects the failure of its link to B2, 
   it forwards all the BIER packets using the FRR-BIFT for link to B2.
   There is no redundant packet.

   For example, for a BIER packet with destinations B2 and B6 
   (i.e., bitstring 0100010), BFR B1 sends a single packet copy 
   on the link to B6 using the backup BIFT for link to B2 after 
   detecting the failure of its link to B2. 
   It will not send any copy of the
   packet to B6 again since the bitstring in the packet will be all
   cleaned by the F-BM 1111110 after sending the packet to B6 via 
   its link to B6. 

   Similarly, 
   for a BIER packet with destinations B2, B5 and B7 (i.e., bitstring
   1010010), BFR B1 sends a single packet copy on its link to B6 using
   the backup BIFT for link to B2 after detecting the failure of its link
   to B2. 
</t>
    </section> <!-- LFA-based BIER-FRR using Multiple Backup BIFTs -->

    </section>

    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
       <t>The authors would like to thank Daniel Merling, Jeffrey Zhang,
          Tony Przygienda and Shaofu Peng
          for their comments to this work.</t>
    </section>

    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-contributors">Contributors</name>

      <t><figure align="left">
          <artwork><![CDATA[Yisong Liu
China Mobile
Email: liuyisong@chinamobile.com

Yanhe Fan
Casa Systems
United States of America
Email: yfan@casa-systems.com

Lei Liu
Fujitsu
United States of America
Email: liulei.kddi@gmail.com

Xufeng Liu
Alef Edge
United States of America
Email: xufeng.liu.ietf@gmail.com
     
Xuesong Geng  
China
Email: gengxuesong@huawei.com]]>
</artwork> 
</figure>
</t>
    </section>


 </back>
</rfc>
