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


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

<!ENTITY RFC8296 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8296.xml">
<!ENTITY I-D.xzlnp-bier-ioam SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.xzlnp-bier-ioam.xml">
<!ENTITY I-D.zzhang-intarea-generic-delivery-functions SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.zzhang-intarea-generic-delivery-functions.xml">
<!ENTITY I-D.song-mpls-extension-header SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.song-mpls-extension-header.xml">
<!ENTITY I-D.jags-mpls-ps-mna-hdr SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.jags-mpls-ps-mna-hdr.xml">
]>

<?rfc comments="yes"?>

<rfc ipr="trust200902" docName="draft-zzhang-bier-extension-headers-01" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title abbrev="BIER Extension Headers">BIER Extension Headers</title>

    <author initials="Z." surname="Zhang" fullname="Zhaohui Zhang">
      <organization>Juniper Networks</organization>
      <address>
        <email>zzhang@juniper.net</email>
      </address>
    </author>
    <author initials="X." surname="Min" fullname="Xiao Min">
      <organization>ZTE</organization>
      <address>
        <email>xiao.min2@zte.com.cn</email>
      </address>
    </author>
    <author initials="Y." surname="Liu" fullname="Yisong Liu">
      <organization>China Mobile</organization>
      <address>
        <email>liuyisong@chinamobile.com</email>
      </address>
    </author>
    <author initials="H." surname="Bidgoli" fullname="Hooman Bidgoli">
      <organization>Nokia</organization>
      <address>
        <email>hooman.bidgoli@nokia.com</email>
      </address>
    </author>

    <date year="2023" month="July" day="07"/>

    <area>Routing</area>
    <workgroup>bier</workgroup>
    <keyword>extension header</keyword>

    <abstract>


<t>Bit Index Explicit Replication (BIER) is a multicast technology with
a new encapsulation and forwarding paradigm. BIER encapsulation is
specified in RFC8296, and this document specifies extension headers
used with BIER encapsulation header.</t>



    </abstract>



  </front>

  <middle>


<section anchor="background"><name>Background</name>

<t><xref target="RFC8296"/> specifies BIER encapsulation header as following:</t>

<figure><artwork><![CDATA[
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |              BIFT-id                  | TC  |S|     TTL       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |Nibble |  Ver  |  BSL  |              Entropy                  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |OAM|Rsv|    DSCP   |   Proto   |            BFIR-id            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                BitString  (first 32 bits)                     ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                                                               ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                BitString  (last 32 bits)                      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>

<t>The header is fixed format, making it difficult to extend for additional
functionalities.</t>

<t><xref target="I-D.xzlnp-bier-ioam"/> describes In-situ Operations, Administration,
and Maintenance (IOAM) functionality for BIER, and proposes a way
to extend the BIER header to encode IOAM data as well as other
potential extension headers.</t>

<t><xref target="I-D.zzhang-intarea-generic-delivery-functions"/> considers Generic
Delivery Functions (GDFs, e.g., fragmentation, security, IOAM)
that can be applied to various layers (e.g., MPLS, IPv6, BIER)
and proposes a slightly different extension header mechanism that
is aligned with <xref target="I-D.song-mpls-extension-header"/> and
work for both MPLS, BIER, and potentially other layers.</t>

<t><xref target="I-D.song-mpls-extension-header"/> is not adopted in the MPLS WG.
<xref target="I-D.jags-mpls-ps-mna-hdr"/> is the candidate solution,
and the main difference is that the "next header" concept is no longer
used, which means that IPv6 extension headers for GDFs can not be used
as is. However, other than that it takes a different way to get to the
ancillary data used for the functions, the data itself and the handling can
still be generic.</t>

<t>To align BIER and MPLS for a generic solution, this document now
takes the approach in <xref target="I-D.jags-mpls-ps-mna-hdr"/>
for discussions and progressing in the BIER WG.</t>

</section>
<section anchor="specifications"><name>Specifications</name>

<section anchor="bier-encapsulation-with-extension-headers"><name>BIER Encapsulation with Extension Headers</name>

<t>The following figure illustrates a BIER header with extension
headers.</t>

<t>A TBD value for the "proto" field in the BIER
header indicates that some BIER Extension Headers follow the BIER
header and precede the BIER payload. An extension header could be
an IPv6 one for a GDF like IOAM, even though this is not an IPv6
protocol layer.</t>

<figure><artwork><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              BIFT-id                  | TC  |S|     TTL       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Nibble |  Ver  |  BSL  |              Entropy                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|OAM|R|H|    DSCP   | Proto=TBD |            BFIR-id            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                BitString  (first 32 bits)                     ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                BitString  (last 32 bits)                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   
|     Extension Top Header                                      |
+---------------------------------------------------------------+
~     Extension Header (EH) 1                                   ~
+---------------------------------------------------------------+
~     ...                                                       ~
+---------------------------------------------------------------+
~     Extension Header (EH) N                                   ~
+---------------------------------------------------------------+
~     Upper Layer Headers/Payload                               ~
+---------------------------------------------------------------+
]]></artwork></figure>

<t>R: The "R" flag bit is reserved.  It MUST be set to 0 on transmission and
      ignored on reception.</t>

<t>H: If the "H" flag bit is set, it indicates the presence of at least one
      extension header that needs to be processed hop by hop even before
      a BFER is reached.</t>

</section>
<section anchor="extension-top-header"><name>Extension Top Header</name>

<t>The Extension Top Header (ETH) encoding is as following:</t>

<figure><artwork><![CDATA[
   0           1         2          3
   0123456789012345 67890123 45678901
  +--------------+-+--------+--------+
  |   Reserved   |P|  EHTL  |  NH    |
  +--------------+-+--------+--------+


 Reserved: Reserved field.
  
 P:    1-bit flag indicating the type of the NH field.
 
 EHTL:  8-bit unsigned integer for the Extension Header Total Length
    in 4-octet units.  This field keeps the total length of the
    extension headers in this packet, not including the ETH itself.
  
 NH:  8-bit selector for the Next Header. This field identifies the
    type of the header following the final extension header.
    If the P-flag is set, the value is from the Internet Protocol
    Numbers registry. If the P-flag is not set, the value is from
    BIER's own protocol registry number registry, which is now
    extended from the original 6-bit to 8-bit. Note that only
    the first 64 values from the original registry can be used
    in the Proto field in the base BIER header. If a larger value
    is needed, the ETH MUST be used (with or without some Extension
    Headers).
]]></artwork></figure>

<t>A BIER capable router is smart enough to interpret the data afer the base
BIER header only according to the Proto field, so there is no need to
reserve a nibble at the begining of ETH to distinguish from an IP header.</t>

</section>
<section anchor="extension-header-format"><name>Extension Header Format</name>

<t>The format of a BIER Extension Header (EH) mimics the MPLS Post-Stack Network
Action Header <xref target="I-D.jags-mpls-ps-mna-hdr"/> (assuming the MPLS format
will be updated to put its equivalent of EH-DATA at the end of the first
word):</t>

<figure><artwork><![CDATA[
 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      EH-OP  |R|R|   EH-Len    |          EH-DATA              ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>

<t>EH-OP:  7-bit OP Code for the extension.
   RR:     2-bit reserved field.</t>

<t>EH-LEN: 7-bit unsigned integer for the Extension Header Length in
      4-octet units, not including the first four octets.</t>

<t>EH-Data:Data for the extension header. The first two octets are
      not counted in the EH-Len.</t>

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

<t>To be provided.</t>

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

<t>The following IANA actions are requested.</t>

<t><list style="symbols">
  <t>Assign a "BIER Extension Header" value from the "BIER Next Protocol Identifiers" registry for the "proto" field in a BIER header.</t>
  <t>Create a "BIER Extension Header OP Codes" registry for the "EH-OP" field in a BIER specific extension header.</t>
</list></t>


</section>


  </middle>

  <back>


    <references title='Normative References'>

&RFC8296;


    </references>

    <references title='Informative References'>

&I-D.xzlnp-bier-ioam;
&I-D.zzhang-intarea-generic-delivery-functions;
&I-D.song-mpls-extension-header;
&I-D.jags-mpls-ps-mna-hdr;


    </references>



  </back>

<!-- ##markdown-source:
H4s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