<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8174 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8279 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8279.xml">
<!ENTITY RFC8296 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8296.xml">
<!ENTITY RFC7432 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7432.xml">
<!ENTITY RFC7024 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7024.xml">
<!ENTITY RFC6513 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6513.xml">
<!ENTITY RFC6514 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6514.xml">
<!ENTITY RFC8401 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8401.xml">
<!ENTITY RFC8444 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8444.xml">
<!ENTITY RFC3032 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3032.xml">
<!ENTITY RFC8556 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8556.xml">
<!ENTITY RFC9573 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9573.xml">
<!ENTITY RFC9574 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9574.xml">
<!ENTITY RFC9624 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9624.xml">
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc strict="no"?>
<?rfc rfcedstyle="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-bier-php-12" ipr="trust200902">
  <front>
    <title abbrev="bier-php">BIER Penultimate Hop Popping</title>

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

    <workgroup>BIER</workgroup>

    <abstract>
      <t>This document specifies a mechanism for Penultimate Hop Popping (PHP) in the Bit Index Explicit Replication (BIER) architecture. PHP enables the removal of the BIER header by the penultimate router, thereby reducing the processing burden on the final router in the delivery path. This extension to BIER enhances operational efficiency by optimizing packet forwarding in scenarios where the final hop's capabilities or requirements necessitate such handling. The document details the necessary extensions to the BIER encapsulation and forwarding processes to support PHP, providing guidance for implementation and deployment within BIER-enabled networks.
      </t>
    </abstract>

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

  <middle>
    <!--section title="Terminologies">
    <t>Familiarity with BIER/MVPN/EVPN protocols and procedures is assumed.
       Some terminologies are listed below for convenience.
    </t>
    <t>[To be added].
    </t>
    </section-->
    <section title="Introduction">
    <t>
The Bit Index Explicit Replication (BIER) architecture <xref target="RFC8279"/>  consists of three layers: the "routing underlay", the "BIER layer", and the "multicast flow overlay". The multicast flow overlay is responsible for allowing BIER Forwarding Egress Routers (BFERs) to signal to BIER Forwarding Ingress Routers (BFIRs) their interest in receiving specific multicast flows, enabling BFIRs to encode the appropriate bitstring for forwarding by the BIER layer.
    </t>
    <t>

Multicast Virtual Private Network (MVPN) <xref target="RFC6513"/> <xref target="RFC6514"/>  and Ethernet VPN (EVPN) <xref target="RFC7432"/>  are two analogous overlays in which BGP Auto-Discovery routes for MVPN/EVPN are exchanged among all Provider Edge (PE) routers to signal which PEs should receive multicast traffic for all or certain flows. Typically, a consistent provider tunnel type is used for traffic delivery to all receiving PEs.
    </t>
    <t>

In a deployment scenario where MVPN/EVPN is in use and a sufficient number of provider routers support BIER, BIER can become the preferred provider tunnel type <xref target="RFC8556"/> <xref target="RFC9624"/> . However, some PEs may lack the capability to support BIER forwarding. While it is possible for an ingress PE to send traffic to some PEs using one type of tunnel and to others using a different type, such a procedure can be complex and may result in suboptimal forwarding.
    </t>
    <t>

A potential solution to this issue is the use of Penultimate Hop Popping (PHP), whereby the upstream BFR pops the BIER header <xref target="RFC8296"/>  and transmits the payload "natively." This transmission can occur either directly or indirectly through any type of tunnel to the PE. This mechanism is analogous to Multi-Protocol Label Switching (MPLS) PHP, except that the BIER header is removed.
    </t>
    <t>

The transition from an existing MVPN/EVPN deployment with traditional provider tunnels to a BIER-based solution, where some PEs are not BIER-capable, can be incremental. Initially, all PEs are upgraded to support BIER in the control plane, with those unable to perform BIER forwarding requesting PHP. Subsequently, BIER-capable ingress PEs can independently and incrementally switch to BIER transport.
    </t>
    <t>

While MVPN/EVPN is used as an example in the above discussion, BIER PHP is applicable to any scenario where the multicast flow overlay edge router does not support BIER, provided that the edge router does not need to identify the transmitting BFIR or participate in BIER Operations, Administration, and Maintenance (OAM) procedures.
    </t>
    <t>
This approach is effective when a BIER-incapable PE only needs to receive multicast traffic. However, if the PE also needs to send multicast traffic, it must perform Ingress Replication to a BIER-capable helper PE, which will then relay the packet to other PEs. The helper PE may be a Virtual Hub as defined in <xref target="RFC7024"/>  for MVPN and <xref target="I-D.ietf-bess-evpn-virtual-hub"/>  for EVPN, or an AR-Replicator as defined in <xref target="RFC9574"/>  for EVPN.
    </t>
    </section>
    <section title = "Specifications" anchor="spec">
    <t>
The BIER Penultimate Hop Popping (PHP) mechanism is designed specifically for scenarios where a multicast flow overlay router within a BIER domain does not support BIER forwarding, either completely or for specific BitStringLengths (BSL). In the latter case, PHP applies only to BIER packets with those particular BSLs. If the flow overlay router were capable of BIER forwarding, it would function as a BFER, and PHP would not be performed by the penultimate hop.

    </t>
    <t>

The procedures outlined in this section are applicable only if, through means outside the scope of this document, it is established that all potential penultimate hop BFRs are capable of supporting PHP (i.e., able to remove the BIER header when forwarding to a requesting flow overlay router) and that the payload following the BIER header is one of the following:
    <list style="symbols">
    <t>
MPLS packets with a downstream-assigned label at the top of the stack (i.e., the Proto field in the BIER header is set to 1). For instance, a label from a Domain-wide Common Block (DCB) as specified in <xref target="RFC9573"/>.
    </t>
    <t>
IPv4/IPv6 multicast packets for which the Reverse Path Forwarding (RPF) check is disabled.
    </t>
    </list>
    </t>
	<section title="Signaling">
	<t>In IS-IS signaling, a sub-TLV nested within another sub-TLV is referred to as a sub-sub-TLV (and further levels are possible, such as sub-sub-sub-TLV). In other signaling protocols, a sub-TLV nested within another sub-TLV is still referred to as a sub-TLV. For convenience, this document uses the term "sub-TLV" even when referring to a sub-sub-TLV in IS-IS, as there is no ambiguity in the terminology (e.g., MPLS Encapsulation).
	</t>
    <t>A BIER-incapable router, when functioning as a multicast flow overlay router for BIER, MUST signal its BIER information as specified in <xref target="RFC8401"/>, <xref target="RFC8444"/>, <xref target="I-D.ietf-bier-ospfv3-extensions"/>, or <xref target="I-D.ietf-bier-idr-extensions"/>, including a PHP sub-TLV within the BIER sub-TLV (or TLV in the case of BGP) attached to the BIER-incapable router's BFR-prefix to request BIER PHP from other BFRs. The type of the sub-TLV or sub-sub-TLV is TBD, and the length is 0.
    </t>
    <t>For MPLS encapsulation, the BIER-incapable multicast flow overlay router MAY omit the BIER MPLS Encapsulation sub-TLV, or it MUST set the Label field in the BIER MPLS Encapsulation sub-TLV to the Implicit Null Label <xref target="RFC3032"/>.
    </t>
    <t>
In the case of MPLS encapsulation, if a BFER (which supports BIER but not a specific BSL) does not support a particular BSL, it MAY advertise a corresponding BIER MPLS Encapsulation sub-TLV with the Label field set to the Implicit Null Label to request PHP for that BSL. In this scenario, the PHP sub-TLV MUST NOT be included.
    </t>
    <t>

For non-MPLS encapsulation [I-D.ietf-bier-lsr-non-mpls-extensions], the BIER-incapable multicast flow overlay router MAY omit the BIER non-MPLS Encapsulation sub-TLV, or it MUST set the BIFT-id field in the BIER non-MPLS Encapsulation sub-TLV to 0.
    </t>
    <t>

Similarly, for non-MPLS encapsulation, if a BFER (which supports BIER but not a specific BSL) does not support a particular BSL, it MAY advertise a corresponding BIER non-MPLS Encapsulation sub-TLV but set the BIFT-id field to 0 to request PHP for that BSL. In this scenario, the PHP sub-TLV MUST NOT be included.
    </t>
	</section>
	<section title="BIRT/BIFT Calculation">
    <t>
If a BFR adheres to Section 6.9 of [RFC8279] for handling BIER-incapable routers, it MUST treat a router as BIER-incapable for a specific BSL if the label in the corresponding MPLS Encapsulation sub-TLV advertised by the router is Implicit Null, or if the BIFT-id in the corresponding non-MPLS Encapsulation sub-TLV is 0. Additionally, the router MUST be treated as BIER-incapable for all BSLs if it advertises a PHP sub-TLV. Consequently, the router will not be utilized as a transit BFR for certain or all BSLs.
    </t>
    <t>
When the downstream neighbor (whether determined through IGP calculation or indicated in the BIER Nexthop sub-TLV in the case of BGP) for a BFR-prefix is the router that advertises the prefix with a PHP sub-TLV, an Implicit Null Label in its BIER MPLS Encapsulation sub-TLV, or a BIFT-id of 0 in its BIER non-MPLS Encapsulation sub-TLV, then, upon the creation or update of the corresponding BIRT or BIFT entry, the forwarding behavior MUST be that the BIER header is removed and the payload is forwarded to the downstream router without the BIER header, either directly or over any type of tunnel.
    </t>
	</section>
	</section>

    <section title="Security Considerations">
    <t>This specification does not introduce additional security concerns
       beyond those already discussed in BIER architecture and OSPF/IS-IS/BGP
       extensions for BIER signaling.
    </t>
    </section>

    <section title="Operational Considerations">
    <t>
BIER PHP can only be used when the conditions specified in <xref target="spec"/> are met.
The BIER OAM functionality is not available on the BIER-incapable flow overlay routers,
but using PHP when the conditions are met is simpler than the alternative of using BIER
to send to some whereas using non-BIER tunnels to send to other flow overlay routers.
    </t>
    </section>
	
    <section title="IANA Considerations">
    <t>This document requests a new sub-sub-TLV type value from the
       "Sub-sub-TLVs for BIER Info Sub-TLV" registry within
       the "IS-IS TLV Codepoints" registry:
      <figure>
        <artwork>
     Type    Name
     ----    ----
     TBD     BIER PHP Request
        </artwork>
    </figure>
    </t>
    <t>This document requests a new sub-TLV type value from the
       OSPFv2 Extended Prefix TLV Sub-TLV registry:
      <figure>
        <artwork>
     Type    Name
     ----    ----
     TBD     BIER PHP Request
        </artwork>
    </figure>
    </t>
    <t>This document requests a new sub-TLV type value from the
       OSPFv3 Extended LSA Sub-TLVs registry:
      <figure>
        <artwork>
     Type    Name
     ----    ----
     TBD     BIER PHP Request
        </artwork>
    </figure>
    </t>
    <t>This document requests a new sub-TLV type value from the
       BGP BIER TLV sub-TLV Types registry requested in
       <xref target="I-D.ietf-bier-idr-extensions"/>:
      <figure>
        <artwork>
     Type    Name
     ----    ----
     TBD     BIER PHP Request
        </artwork>
    </figure>
    </t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
    <t>The author wants to thank Eric Rosen and Antonie Przygienda for
       their review, comments and suggestions. The author also wants to thank
       Senthil Dhanaraj for his suggestion of requesting PHP if a BFER
       does not support certain BSL.
    </t>
    </section>
   </middle>

  <back>
    <references title="Normative References">
	  &RFC2119;
	  &RFC8174;
	  &RFC8279;
	  &RFC8296;
	  &RFC8401;
	  &RFC8444;
	  &RFC3032;
	  &RFC8556;
	  &RFC9573;
	  &RFC9624;
      <?rfc include='reference.I-D.ietf-bier-idr-extensions'?>
      <?rfc include='reference.I-D.ietf-bier-lsr-non-mpls-extensions'?>
      <?rfc include='reference.I-D.ietf-bier-ospfv3-extensions'?>
    </references>
    <references title="Informative References">
      &RFC7432;
      &RFC7024;
      &RFC6513;
      &RFC6514;
	  &RFC9574;
      <?rfc include='reference.I-D.ietf-bess-evpn-virtual-hub'?>
    </references>

  </back>
</rfc>

