<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" docName="draft-jags-mpls-ext-hdr-00" category="std" ipr="trust200902" obsoletes="" updates="" xml:lang="en" sortRefs="false" symRefs="true" tocInclude="true" version="3" consensus="true">
  <!-- xml2rfc v2v3 conversion 3.12.0 -->
  <!-- Generated by id2xml 1.5.0 on 2020-03-06T17:47:05Z -->
    <front>
    <title abbrev="MPLS Header Extensions">MPLS Extension Header Encodings </title>
    <seriesInfo name="Internet-Draft" value="draft-jags-mpls-ext-hdr-00"/>
    <author fullname="Jaganbabu Rajamanickam" initials="J." role="editor" surname="Rajamanickam">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Canada</street>
        </postal>
        <email>jrajaman@cisco.com</email>
      </address>
    </author>
    <author fullname="Rakesh Gandhi" initials="R." role="editor" surname="Gandhi">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Canada</street>
        </postal>
        <email>rgandhi@cisco.com</email>
      </address>
    </author>
    <author fullname="Jisu Bhattacharya" initials="J." surname="Bhattacharya">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <email>jisu@cisco.com</email>
      </address>
    </author>
    <author fullname="Bruno Decraene" initials="B." surname="Decraene">
      <organization>Orange</organization>
      <address>
        <email>bruno.decraene@orange.com</email>
      </address>
    </author>
    <author fullname="Royi Zigler" initials="R." surname="Zigler">
      <organization>Broadcom</organization>
      <address>
        <email>royi.zigler@broadcom.com</email>
      </address>
    </author>

    <author fullname="Weiqiang Cheng" initials="W." surname="Cheng">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>chengweiqiang@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Luay Jalil" initials="L." surname="Jalil">
      <organization>Verizon</organization>
      <address>
        <email>luay.jalil@verizon.com</email>
      </address>
    </author>
    <date day="02" month="March" year="2022"/>
    <workgroup>MPLS Working Group</workgroup>
    <abstract>
      <t>
      This document uses the Multiprotocol Label Switching (MPLS) Entropy Label (EL) extensions defined in draft-decraene-mpls-slid-encoded-entropy-label-id or a new Special Purpose Label to indicate the presence of MPLS Extension Header (MEH) in an MPLS label stack. It defines different MPLS Extension Header encoding formats to carry additional data in the MPLS label stack that can influence forwarding decision and to carry additional data after the Bottom of the MPLS label stack.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
    <xref target="RFC3032" format="default"/> defines MPLS Header for carrying a stack of MPLS labels which are used to forward packets in an MPLS network.
    Today's new applications require the MPLS packets to carry some additional indicators and associated ancillary data that would be used in MPLS packet forwarding decision or for OAM purpose. </t>
      <t>
    Each application requires a separate Extended Special Purpose Label (eSPL) to address its problem that adds 2 extra labels (extension label 15 + eSPL) in the MPLS label stack. 
    This approach does not scale, as it increases the label stack depth with multiple eSPLs that need to be imposed by the encapsulation node and scanned by the intermediate nodes. 
    Also, currently there are no solutions defined to add ancillary data in a label stack or add multiple ancillary data after the Bottom Of Stack (BOS) in an MPLS packet. 
    Ancillary data can be used to carry additional information, for example, a network slice identifier, In-Situ OAM (IOAM) data presence indicator, etc. Some of these use-cases are described in <xref target="I-D.saad-mpls-miad-usecases" format="default"/>. </t>
      <t>
    This document defines a new MPLS data plane extension header format to efficiently encode forwarding and OAM instructions those are easy to process in hardware. 
    The instructions are encoded in the form of flags and opcodes and can be carried without associated ancillary data or with short in-stack ancillary data or with one or more ancillary data after the BOS. </t>
      <t>
   MPLS Entropy Label (EL) standard is defined in <xref target="RFC6790" format="default"/>.
   This document uses the Entropy Label extensions defined in <xref target="I-D.decraene-mpls-slid-encoded-entropy-label-id" format="default"/> or a new Special Purpose Label (SPL) to indicate the presence of MPLS Extension Header (MEH) in an MPLS label stack. It defines different MPLS Extension Header encoding formats to carry additional data in the MPLS label stack that can influence forwarding decision and to carry additional data after the Bottom of the MPLS label stack.</t>
      <section anchor="sect-1.1" numbered="true" toc="default">
        <name>Requirements</name>
        <t>
   This document defines different MPLS Extension Header encoding formats to support the following requirements:</t>
        <t> 1. MPLS packet to carry additional data in the MPLS label stack to influence forwarding. This can be of two types:</t>
        <ul empty="true" spacing="normal">
          <li> 1a. Forwarding Instruction Flags (FIF) that does not use additional data. </li>
          <li> 1b. Forwarding Instruction (FI) that needs additional data.</li>
        </ul>
        <t> 2. MPLS packet to carry additional data after the Bottom of the MPLS Label Stack.</t>
        <t> 3. Any combination of (1) and (2) in the same MPLS packet.</t>
        <t>When MPLS Extension Header is added in an MPLS Label stack, the extension header MUST NOT contain the label field that can conflict with any previously allocated 
    reserved label value. <xref target="I-D.bocci-mpls-miad-adi-requirements" format="default"/> describes additional requirements for MPLS Extension Header.</t>
      </section>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>Conventions Used in This Document</name>
      <section anchor="sect-2.1" numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>
   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/>
   when, and only when, they appear in all capitals, as shown here.</t>
      </section>
      <section anchor="sect-2.2" numbered="true" toc="default">
        <name>Terminology</name>
        <t>
   BOS (Bottom Of Stack): Bottom of the MPLS label stack. </t>
        <t>
   BOS-FI (Bottom Of Stack Forwarding Instruction): This is the Forwarding Instruction that is encoded after Bottom of MPLS Stack. </t>
        <t>
   BPI (Bottom of the Stack MPLS Extension Header Presence Indicator): This is the flag to indicate the presence of MPLS Extension Header after the bottom of the MPLS label stack. </t>
        <t>
   E2E (Edge-To-Edge): Edge to Edge. </t>
        <t>
   EL (Entropy Label): Entropy Label defined as per <xref target="RFC6790" format="default"/>. </t>
        <t>
   ELC (Entropy Label Control): EL TTL field re-purposed to carry Entropy Label control bits defined in <xref target="I-D.decraene-mpls-slid-encoded-entropy-label-id" format="default"/>. </t>
        <t>
   FI (Forwarding Instruction): Forwarding Instruction is the instruction that expresses the forwarding behaviour. 
   This can result in changing the forwarding decision or adding some information or important data to the packet. </t>
        <t>
   FIF (Forwarding Instruction Flags): A bitwise flag that influences the forwarding behaviour. This flag does not need any additional data to execute its FI. </t>
        <t>
   FIOC (Forwarding Instruction Opcode): A Opcode value that refers to a specific Forwarding Instruction. </t>
        <t>
   HBI (Hop-By-Hop Bottom of the Stack MPLS Extension Header Presence Indicator): This is the flag to indicate the presence of MPLS Extension Header after the bottom of the MPLS label stack that require Hop-By-Hop processing. </t>
        <t>
   IS-FI (In-Stack Forwarding Instruction): This is the Forwarding Instruction that is encoded in the MPLS label stack. </t>
        <t>
   IPI (In-Stack MPLS Extension Header Presence Indicator): This is the flag to indicate the presence of MPLS Extension Header in the MPLS label stack. </t>
        <t>
   MEI (MPLS Extension Indicator): This is the Indicator MPLS Label which indicates the presence of MPLS Extension Header in the MPLS Label stack. </t>
        <t>
   MEH (MPLS Extension Header): MPLS Extension Header encoding carried in the MPLS Label stack. </t>
        <t>
   MPLS (Multiprotocol Label Switching): Multiprotocol Label Switching. </t>
        <t>
   NPL (Network Programming Label): Network Programming Label provisioned by user. </t>
        <t>
   SPI (Slice ID Presence Indicator): This is the flag to indicate the presence of Slice ID in the Entropy Label field. </t>
        <t>
   SPL (Special Purpose Label): IANA Allocated Special Purpose Label in the range of 0-15. Extended Special Purpose Label (eSPL) uses label value 15. </t>
        <t>
   TC (Traffic Class): Traffic Class. </t>
        <t>
   TTL (Time-To-Live): Time To Live. </t>
      </section>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
	    <name>Overview</name>
	    <t> 
      Extending existing MPLS Header needs two main parts. </t>
      <ul spacing="normal">
      <li>  MPLS Extension Header Indicator (MEI) - This is a way to indicate the presence of MPLS Extension Header in the packet. This could be done using two different methods. Each method has its own advantages and disadvantages. This document describes both options of MEI. The encoding formats defined in this document are compatible with both options of MEI.</li>
      </ul>
      <ul empty="true" spacing="normal">
      <li>  Option 1. MEI by extending ELI/EL </li>
      <li>  Option 2. MEI by using a New Special Purpose Label (SPL) allocated by IANA </li>
      <li>  Option 3. MEI by using New Network Programming Label (NPL) provisioned by user </li>
      </ul>
      <ul spacing="normal">
      <li>  MPLS Extension Header Format - The format in which the MPLS Extension Header could be carried in the MPLS packet. This includes both In-stack Extension Header and BOS Extension Header. </li>
      </ul>


      <figure anchor="mpls-label-format">
        <name>MPLS Label Format</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              Label                    | TC  |S|      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ]]></artwork>
      </figure>
      <t>
    New In-Stack (IS) MPLS Extension Header format is defined in this document to carry the In-stack Forwarding Instruction and corresponding data in the MPLS label stack. </t>
      <ul spacing="normal">
        <li>  It uses MPLS Label field to carry the Forwarding Instruction Opcode. </li>
        <li>  It uses Traffic Class (TC) field to identify the Length of the MPLS In-Stack Extension Header size. </li>
        <li>  It uses MPLS Label and Time-To-Live (TTL) fields to carry the In-Stack data (can be Flags or data). </li>
      </ul>
      <t>
      A new Bottom Of Stack (BOS) MPLS Extension Header format is defined in this document to carry the BOS Forwarding Instruction and corresponding data after the MPLS Label stack. </t>
      <t> 
      The MPLS Extension Header encoding formats defined in this document are flexible and allow to stack multiple In-Stack and BOS MPLS Extension Headers in a desired order in the same MPLS packet. </t>



      <section anchor="sect-J3" numbered="true" toc="default">
        <name>Option 1 - ELC as MPLS Extension Header Indicator</name>
        <t> 
    As described in <xref target="I-D.decraene-mpls-slid-encoded-entropy-label-id" format="default"/>, the EL's 8-bit TTL field is re-purposed as Entropy Label Control (ELC) field. One bit from ELC is requested for the Slice ID Presence Indicator (SPI) and the 7 bits are available for use. From the ELC, 3 bits (for IPI, BPI and HBI) are allocated to indicate the presence of MPLS Extension Header. </t>
        <figure anchor="ELC-Bit-Field-Alloc">
          <name>ELI/EL Packet Format</name>
          <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Entropy Label Indicator (7)       | TC  |S|      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Slice ID     |  Entropy Label        | IL  |S|  ELC (SPI=1)  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
        </figure>
        <t> TTL (in ELC) bit allocations are defined by user as follows: </t>
        <table anchor="ELC-Bit-Field-Tbl" align="center">
          <name>Bit Fields</name>
          <thead>
            <tr>
              <th align="left"> Bit Position</th>
              <th align="left"> Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left"> TBD0 </td>
              <td align="left"> SPI - Slice ID Presence Indicator: Indicate the presence of Slice ID in the Entropy label as defined in <xref target="I-D.decraene-mpls-slid-encoded-entropy-label-id" format="default"/>. </td>
            </tr>
            <tr>
              <td align="left"> TBD1 </td>
              <td align="left"> IPI - In-Stack Extension Header Presence Indicator: Indicate the presence of In-Stack MPLS Extension Header after this label. </td>
            </tr>
            <tr>
              <td align="left"> TBD2 </td>
              <td align="left"> BPI - Bottom Of Stack Extension Header Presence Indicator: Indicates the presence of MPLS Extension Header after the Bottom Of Stack (BOS). </td>
            </tr>
            <tr>
              <td align="left"> TBD3 </td>
              <td align="left"> HBI - Hop-By-Hop Bottom Of Stack Extension Header Indicator: Indicates the MPLS Extension Header after the Bottom Of Stack requires Hop-By-Hop processing. </td>
            </tr>
            <tr>
              <td align="left"> TBD4 - TBD7 </td>
              <td align="left"> Unassigned Bits.</td>
            </tr>
          </tbody>
        </table>
	<t>IL - In-Stack Extension Header Length - The 3-bit TC field in the EL is used to indicate the length of the In-Stack MPLS Extension Header (excluding the ELI and EL labels) in terms of number of 32-bit labels. If more that 7 labels are needed in an MPLS extension header, the node can either use a BOS extension header to carry the data or use an additional In-stack MPLS Extension Header with MEI Label. </t>
	
	<t>For backwards compatibility, an intermediate and decapsulating nodes MUST only read the length from the TC field when the IPI (In-Stack Extension Presence Indicator) is set to "1". </t>

      <section anchor="sect-J3.1" numbered="true" toc="default">
        <name>Advantages with ELC</name>

	<t>Faster deployment in an existing network that has EL already deployed with an incremental benefit (e.g., incremental signaling extension for ELI capability).</t> 

	<t>Single label for Entropy in the MPLS header which helps with keeping label stack size smaller.</t> 

	<t>When EL is already enabled in the network, the proposed scheme does not require hardware to support an additional SPL indicator.</t> 

	<t>Save a new Special Purpose Label and related protocol extensions to signal its capability in LDP, RSVP-TE, BGP, IS-IS, OSPF, BGP-LS, etc.</t> 

        <t>An intermediate node can compute ECMP hash with the EL field and avoid inconsistent load-balancing of traffic flow that can happen when MPLS Extension Header alters the label stack.</t>

	<t>Reduce MPLS Label stack size when EL is enabled for ECMP hashing when MPLS Extension Header is also used. As there is only one field for EL in the MPLS Header, it simplifies the MPLS header processing.</t>

      </section>
      </section>


      <section anchor="sect-J4.2" numbered="true" toc="default">
        <name>Option 2 - New SPL as MPLS Extension Header Indicator</name>
        <t>The MPLS Extension Header encoding formats defined in this document is equally applicable when using a new Special Purpose Label (SPL) (value TBA1) allocated by IANA.
        </t>
        <figure anchor="SPL-Ext-Hdr-Format">
          <name>New SPL as MPLS Extension Header Indicator</name>
          <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     MEI=SPL (TBA1)                    | IL  |S| IPI,BPI,HBI   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
        </figure>
	<t>The TTL field in the SPL (value TBA1) is used to encode FI Flags including IPI, HBI and BPI flags defined in this document. The definition and meaning of these flags and IL field are exactly the same as those in ELC field.</t> 
         </section>


	       <section anchor="sect-J4.3" numbered="true" toc="default">
        <name>Option 3 - NPL as MPLS Extension Header Indicator</name>
        <t>The MPLS Extension Header encoding formats defined in this document is equally applicable when using a Network Programming Label (NPL) configured by an operator.
        </t>
        <figure anchor="NPL-Ext-Hdr-Format">
          <name>NPL as MPLS Extension Header Indicator</name>
          <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     MEI=NPL                           | IL  |S| IPI,BPI,HBI   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
        </figure>
	<t>The TTL field in the NPL is used to encode FI Flags including IPI, HBI and BPI flags defined in this document. The definition and meaning of these flags and IL field are exactly the same as those in ELC field.</t> 
         </section>


    </section>
    <section anchor="sect-J5" numbered="true" toc="default">
      <name>In-Stack MPLS Extension Header Encoding</name>
      <t> This section describes the encoding format of the MPLS Extension Header carried as part of the MPLS label stack. The encoding format defined is flexible (e.g., stackable opcodes in desired order), extensible (by defining new Opcodes) and ASIC friendly (by using Extension Header Length, Opcode+Data in the same field).</t>
      <figure anchor="In-Stack-Ext-Hdr-Format">
        <name>In-Stack Extension Header Format</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Entropy Label or SPL or NPL      | IL=1|S| IPI=1         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  IS-FI Opcode |    In-Stack Data      |R|D|E|S| In-Stack Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
      </figure>
      <t> IPI flag is set to "1" to indicate the presence of In-Stack MPLS Extension Header. </t>
      <t> Since In-Stack MPLS Extension Header is present as part of the MPLS Label stack, the 32-bit MPLS Label is redefined to encode the MPLS Extension Header as follows: </t>
      <t> Label Field: </t>
      <t> The first 8 bits are used to define the In-Stack Forwarding Instruction (IS-FI) Opcode. Next 12 bits in the Label field and the 8 bits from the TTL field are used to carry In-Stack data corresponding to the IS-FI opcode. This opcode ranges from 1 to 255. IS-FI Opcode value of 0 is marked as invalid to avoid the label value aliasing with the reserved SPLs.</t>
      <ul spacing="normal">
        <li> IS-FI Opcode Value:1 - IANA Allocated to carry the Forwarding Instruction Flags (FIF). </li>
        <li> IS-FI Opcode Value:2 - IANA Allocated to indicate the offset in terms of number of bytes for the start of the BOS data after the MPLS Label Bottom of the Stack.
     This can allow to carry Generic Control Word (0000b) [RFC4385] and G-ACh (0001b) [RFC5586] fields immediately after the BOS. Adding of this opcode is
     not required when the BOS data starts immediately after the Bottom of the Label Stack (i.e. when offset is 0).</li>
        <li> IS-FI Opcode Value:3-254 - MUST be assigned by IANA. </li>
        <li> IS-FI Opcode Value:255 - IANA Allocated for IS-FI Opcode range extension. This gives the extensibility for opcode range beyond 255. </li>
      </ul>
      <t> IS-FI Opcode MUST define the following procedure before it can be used: </t>
      <ul empty="true" spacing="normal">
        <li> 1. Define the Data format encoded in the MPLS extension header. </li>
        <li> 2. Define the Hop-By-Hop or Edge-To-Edge (only on the decapsulation node) processing scope. </li>
        <li> 3. The Hop-By-Hop IS-FI opcodes MUST be placed before the Edge-To-Edge IS-FI Opcodes in the MPLS Extension Header of the packet to optimize the Hop-By-Hop processing in hardware. </li>
      </ul>
      <t> TC Field: </t>
      <t> This field is used to indicate the MPLS Extension Header stacking and In-Stack Data stacking. </t>
      <ul empty="true" spacing="normal">
        <li> E (E2E-Bit): MPLS Extension Header In-Stack Data requires E2E processing.  If this is set to "1", then this 4-byte MPLS Extension Header requires Edge-To-Edge processing. If this is set to 0, then this 4-byte MPLS Extension Header requires Hop-By-Hop processing. 
     Note that E2E-Bit is not used with the Entropy Label TC field. </li>
        <li> D (DS-Bit): Data Stacking Bit. This is used to encode more than 20 bits of data for this IS-FI Opcode. If this is set to "1", then this is the end of the data for the IS-FI Opcode. </li>
        <li> R (Reserved Bit): MUST be set to "0" on transmit and ignored on receive. </li>
      </ul>
      <t> TTL Field: </t>
      <t> This 8-bit field is used to carry In-Stack data apart from the 12 bits in the Label field. </t>
      <t> NOTE: </t>
      <ul empty="true" spacing="normal">
        <li> An intermediate node may use the full MPLS label stack for ECMP hash computation hence the In-Stack MPLS extension header MUST NOT change the Label Field part of the IS-FI data within the same traffic flow. But the TTL part of IS-FI data can change for the same traffic flow without affecting the ECMP hash. The In-Stack Extension Header encoding defined above ensures this. </li>
      </ul>
    </section>
    <section anchor="sect-J6" numbered="true" toc="default">
      <name>Bottom Of Stack MPLS Extension Header Encoding</name>
      <t> This section describes the encoding format of the MPLS Extension Header which is present after the bottom of the MPLS label stack. </t>
      <figure anchor="BOS-Ext-Hdr-Format">
        <name>BOS Extension Header Format</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Entropy Label or SPL or NPL      | TC  |1|  BPI=1, HBI   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 1 0|Reserve|  BOS-FI Opcode| Length=1(word)|   BOS-Flags   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        BOS-Data                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Payload                                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
      </figure>
      <t> BPI flag is set to "1" to indicate the presence of MPLS Extension Header after the bottom of MPLS label stack.</t>
      <t> HBI flag is set to "1" to indicate the MPLS Extension Header after the Bottom Of Stack that requires Hop-By-Hop processing.</t>
      <t> A new generic 4-byte header is defined to carry the information about the Forwarding Instruction and its corresponding data that is carried after the bottom of label stack. This generic header is added to each Forwarding Instruction that is encoded after the MPLS bottom of the stack. This generic header gives the flexibility to add multiple Forwarding Instruction after the BOS in any desired order. </t>
      <t> The 4-byte BOS Extension Header is described below: </t>
      <table anchor="BOS-Ext-Hdr-Bit-Field-Tbl" align="center">
        <name>BOS MPLS Extension Header Format</name>
        <thead>
          <tr>
            <th align="left"> Bit Position</th>
            <th align="left"> Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left"> 0 - 3 </td>
            <td align="left">This 4-bit nibble MUST be set to "0010b". This is to avoid aliasing with an IPv4/IPv6 header.</td>
          </tr>
          <tr>
            <td align="left"> 4 - 7 </td>
            <td align="left">This 4-bit nibble defines the version of the generic header format. The current version value is "0". </td>
          </tr>
          <tr>
            <td align="left"> 8 - 15 </td>
            <td align="left">This 8-bit field indicates the BOS FI Opcode value. This opcode values will be allocated by IANA. </td>
          </tr>
          <tr>
            <td align="left"> 16 - 23 </td>
            <td align="left">This 8-bit field indicates the length of the data encoded in units of 4 bytes excluding the current header. </td>
          </tr>
          <tr>
            <td align="left"> 24 - 31 </td>
            <td align="left">
        This 8-bit field carries the BOS-Flags.
        0 - NH bit (Next-Header Presence Bit): Indicates the presence of next BOS extension header.
        1 - H bit (Hop-By-Hop Bit): Hop-By-Hop processing is required for this Bottom Of Stack data.
        7 - 2 bits: Unassigned bits.
    </td>
          </tr>
        </tbody>
      </table>
      <t>
      </t>
      <t> BOS-FI Opcode value of 0 is marked as invalid.</t>
      <t> BOS-FI Opcode Value:1-254 - MUST be assigned by IANA. </t>
      <t> BOS-FI Opcode Value:255 - IANA Allocated for BOS-FI Opcode range extension. This gives the extensibility for opcode range beyond 255. </t>
      <t> If an application requires to add its own data TLV, then the TLV can be added as part of BOS-Data. </t>
      <t> BOS-FI Opcode MUST define the following procedure before it can be used: </t>
      <ul empty="true" spacing="normal">
        <li> 1. Define the Data format encoded in the MPLS extension header. </li>
        <li> 2. Define the Hop-By-Hop or Edge-To-Edge (only on the decapsulation node) processing scope. </li>
        <li> 3. The Hop-By-Hop BOS-FI opcodes MUST be placed before the Edge-To-Edge BOS-FI Opcodes in the MPLS Extension Header of the packet to optimize the Hop-By-Hop processing in hardware. </li>
      </ul>
    </section>
    <section anchor="sect-J7" numbered="true" toc="default">
      <name>MPLS Extension Header Encoding Example Use-case-1.a - Carrying FI without data in the MPLS label stack</name>
      <t>
    The TTL field can support only up to 8-bit flags. This is the use-case to extend the TTL flags and carry additional Forwarding Instruction Flags (FIF) in the MPLS label stack. These forwarding instructions do not require any additional data to be carried with this FI. </t>
      <figure anchor="In-Stack-Ext-Hdr-use-case-1-a">
        <name>Example In-Stack Extension Header Carrying Forwarding Instruction Flags</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Entropy Label or SPL or NPL      | IL=1|0|   IPI=1       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|IS-FI Opcode=1 |  Flags                |R|1|E|1|   Flags       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
      </figure>
      <t> IPI flag is set to "1" to indicate the presence of In-Stack MPLS Extension Header.</t>
      <t> Label Field: </t>
      <ul empty="true" spacing="normal">
        <li> In this case the FI opcode value is set to "1". FI Opcode value "1" is reserved for extending the TTL flags. This indicates the presence of additional flags in the Label field and TTL fields </li>
      </ul>
      <t> TC Field: </t>
      <ul empty="true" spacing="normal">
        <li> DS-Bit - This bit is set to "1" to indicate that the flags are not extended further. </li>
      </ul>
      <t> TTL Field: </t>
      <ul empty="true" spacing="normal">
        <li> 8-bit field is used to encode the Forwarding Instruction Flags apart from 12 bits Label field. </li>
      </ul>
      <t> The FIF bit position and its meaning MUST be defined by IANA. </t>
      <figure anchor="In-Stack-Ext-Hdr-use-case-1-a-ext">
        <name>Example In-Stack Extension Header carrying more than 20 bits FI Flags</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Entropy Label or SPL or NPL      | IL=2|0|   IPI=1       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|IS-FI Opcode=1 |  Flags                |R|1|E|1|   Flags       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|    Flags                            |R|1|E|1|   Flags       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
      </figure>
      <t>More than 20 bits of data can be encoded as part of IS-FI opcode. In this specific case, the FI flags which are more than 20 bits are encoded in next 4 bytes of the MPLS header.</t>
      <t>While encoding the additional data, the Most Significant bit of the Label Field MUST be set to "1" to prevent from aliasing with the reserved SPLs in the case of legacy devices.</t>
    </section>
    <section anchor="sect-J8" numbered="true" toc="default">
      <name>MPLS Extension Header Encoding Example Use-case-1.b - Carrying FI with data in the MPLS label stack</name>
      <t>
    This is the use-case where the MPLS Label stack to carry the Forwarding Instruction with a corresponding data. </t>
      <figure anchor="In-Stack-Ext-Hdr-use-case-1-b">
        <name>Example In-Stack Extension Header Carrying FI with the data</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Entropy Label or SPL or NPL      | IL=1|0|   IPI=1       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IS-FI Opcode  |        Data           |R|1|E|1|   Data        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
      </figure>
      <t> IPI flag is set to "1" to indicate the presence of In-Stack MPLS Extension Header.</t>
      <t> Label Field: </t>
      <ul empty="true" spacing="normal">
        <li> First 8 bits encodes the In-Stack forwarding opcode. In this case the FI opcode value ranges from 1 to 254. This value is assigned by IANA. This opcode value defines data format carried in the Label field and the TTL field.  </li>
      </ul>
      <t> TC Field: </t>
      <ul empty="true" spacing="normal">
        <li> DS-Bit - This bit is set to "1" to indicate that the data is encoded in the 19-bit Label field and does not exceed 19 bits. </li>
        <li> R-Bit  - Reserved bit and MUST be set to "0" on transmit and ignored when received. </li>
      </ul>
      <t> TTL Field: </t>
      <ul empty="true" spacing="normal">
        <li> 8-bit field is used to encode the In-Stack data apart from 12-bit Label field. </li>
      </ul>
      <figure anchor="In-Stack-Ext-Hdr-use-case-1-b-ext">
        <name>Example In-Stack Extension Header Carrying FI with the data more than 20 bits</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Entropy Label or SPL or NPL      | IL=2|0|   IPI=1       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IS-FI Opcode  |        Data           |R|0|E|0|   Data        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|                      Data           |R|1|E|1|   Data        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
      </figure>
      <t>More than 20 bits of data can be encoded as part of IS-FI opcode. In this specific case, the In-Stack data which are more than 20 bits are encoded in next 4 bytes of the MPLS header. </t>
      <t>While encoding the additional data, the Most Significant bit of the Label Field MUST be set to "1" to prevent from aliasing with the reserved SPLs in the case of legacy devices. </t>
    </section>
    <section anchor="sect-J9" numbered="true" toc="default">
      <name>MPLS Extension Header Encoding Example Use-case-2 - Carrying FI with data after the MPLS label stack</name>
      <t>
    This is the use-case where the Forwarding Instruction with a corresponding data is carried after the MPLS bottom of label stack. </t>
      <figure anchor="BOS-Ext-Hdr-use-case-2">
        <name>Example BOS Extension Header Carrying FI with data</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Entropy Label or SPL or NPL      | TC  |1| BPI=1,HBI=1   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 1 0|Reserve|BOS-FI Opcode=1| Length=1(word)|Flags NH=1,H=1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        BOS-Data1                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 1 0|Reserve|BOS-FI Opcode=2| Length=2(word)|Flags NH=0,H=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        BOS-Data2                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        BOS-Data2                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Payload                                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
      </figure>
      <t> BPI flag is set to "1" to indicate the presence of BOS MPLS Extension Header. Also, HBI flag is set to 1 to indicate the presece of BOS MPLS Extension Header that requires Hop-By-Hop processing.</t>
      <t> In this case, the MPLS packet is encoding two different types of BOS FI (Opcode 1 and Opcode 2) after the bottom of MPLS label stack. </t>
      <t> The first BOS MPLS Extension Header has the Length value as "1", this indicates that the data corresponding to this FI opcode "Type1" is 4 bytes following this header. Also the Next-Header (NH) flag in BOS-Flags is set to "0x1", this indicates the presence of next BOS MPLS Extension Header. The H flag is set to "0x1" that indicates the Hop-By-Hop processing is required.</t>
      <t> The second BOS MPLS Extension Header has the Length value as "2", this indicates that the data corresponding to the FI opcode "Type2" is 8 bytes following this header. In this case the Next-Header flag in BOS-Flags is set to "0x0", this indicates that this is the last BOS MPLS Extension Header encoded. The H flag is set to "0x0" that indicates the Hop-By-Hop processing is not required.</t>
    </section>
    <section anchor="sect-J10" numbered="true" toc="default">
      <name>MPLS Extension Header Encoding Example Use-case-3 - Carrying use-case 1.a, 1.b and 2 in MPLS packet</name>
      <t>
    This is the use-case where the same MPLS packet carrie the use-cases "1.a", "1.b" and "2". </t>
      <figure anchor="Combo-Ext-Hdr-use-case-3">
        <name>MPLS Packet Carrying 1.a, 1.b and 2 Use-cases</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Entropy Label or SPL or NPL      | IL=3|0| IPI=BPI=HBI=1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IS-FI Opcode=1|  Flags                |R|0|E|0| Flags         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IS-FI Opcode=2|        0              |R|1|E|0| Offset = 1    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IS-FI Opcode=3|        Data           |R|1|E|1|      Data     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 1 0|Reserve|BOS-FI Opcode=1| Length=1(word)|Flags NH=1,H=1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        BOS-Data1                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 1 0|Reserve|BOS-FI Opcode=2| Length=2(word)|Flags NH=0,H=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        BOS-Data2                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        BOS-Data2                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Payload                                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
      </figure>
      <t> IPI and BPI flags are set to "1" to indicate the presence of both In-Stack and BOS MPLS Extension Header as mentioned in the above use-cases.
    IS-FI Opcode 2 is added to indicate the offset of 1 word after the MPLS header BOS and start of the BOS Extension Header.</t>
    </section>


    <section anchor="sect-J101" numbered="true" toc="default">
      <name>Node Capability Signaling</name>
      <t> The node capability for the MPLS Extension Header must be signaled before the MPLS Encapsulating node can add the necessary MPLS Extension Header in the MPLS label stack.  The capability signaling will be added in LDP, RSVP-TE, BGP, IS-IS, OSPF, BGP-LS, etc. This is outside the scope of this document.
      </t>
    </section>
    <section anchor="sect-J11" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>The security considerations in <xref target="RFC3032" format="default"/> also apply to the extensions defined in this document.
    The MPLS Extension header MUST NOT be exposed to the node which does not support the new MPLS Extension Header. </t>
    </section>

    <section anchor="sect-J12" numbered="true" toc="default">
      <name>Backward Compatibility</name>



    <section anchor="sect-J12-1" numbered="true" toc="default">
      <name>Backward Compatibility With ELC as MEH Indicator</name>
      <t> As specified in <xref target="RFC6790" format="default"/>, the TTL field of the EL MUST be “0”. On the Node which is capable of processing the MPLS Extension Header when it finds that this TTL value is non-zero, then only it will start processing the MPLS Extension header. </t>
      <t> In addition, the TC field will be interpreted as the In-Stack MPLS Header Extension Length only when the TTL field’s IPI Flag is set to "1". </t> 
      <t> For the legacy node that does not advertise the MPLS Extension Header capability, the Encapsulating node MUST make sure that the MPLS Extension header is not at the top of the MPLS label stack to avoid misforwarding the packets by misinterpreting In-Stack Extension Header as a label.</t> 
      <t> The MPLS Extension Header Encoding format is designed to make sure that it does not alias with any reserved SPL. </t> 
      <t> The MPLS extension does not affect the existing GAL / G-ACh <xref target="RFC5586" format="default"/> based encoding of data in the MPLS packet. 
    This MPLS extension can co-exist with the existing GAL / G-ACh based encoding of data. </t>
    </section>

    <section anchor="sect-J12-2" numbered="true" toc="default">
      <name>Backward Compatibility With SPL as MEH Indicator</name>
       <t> For the legacy node that does not advertise the MPLS Extension Header capability, the Encapsulating node MUST make sure that the MPLS Extension header is not at the top of the MPLS label stack to avoid dropping the packets.</t> 
      <t> The MPLS Extension Header Encoding format is designed to make sure that it does not alias with any reserved SPL. </t> 
      <t> The MPLS extension does not affect the existing GAL / G-ACh <xref target="RFC5586" format="default"/> based encoding of data in the MPLS packet. 
    This MPLS extension can co-exist with the existing GAL / G-ACh based encoding of data. </t>
    </section>


    </section>

    <section anchor="sect-J12.1a" numbered="true" toc="default">
      <name>Processing In-Stack MPLS Extension Header</name>
      <t> Encapsulating Node: </t>
      <ul spacing="normal">
        <li> MUST NOT add In-Stack MPLS Extension header if the decapsulation node is not capable of In-Stack MPLS Extension header.</li>
        <li> SHOULD NOT change the IS-FI Opcode and the first 12 bits of the In-Stack Data for the same packet flow avoid ECMP path change. </li>
        <li> MAY change In-Stack data part present only in the TTL field for the same packet flow. </li>
        <li> MUST ensure that the penultimate node does not remove the MPLS extension header.</li>
      </ul>
      <t> Intermediate Node: </t>
      <ul spacing="normal">
        <li> MUST ignore the IS-FI Opcode that are not supported.  </li>
        <li> MUST NOT add In-Stack MPLS Extension header if the decapsulation node is not capable of In-Stack MPLS Extension header.</li>
        <li> SHOULD NOT change the IS-FI Opcode and the first 12 bits of the In-Stack Data for the same packet flow. </li>
        <li> MAY change In-Stack data part present only in the TTL field for the same packet flow. </li>
        <li> MAY remove the IS-FI opcode and its corresponding data for all matching packet flow. </li>
      </ul>
      <t> Decapsulating Node: </t>
      <ul spacing="normal">
        <li> MUST remove the In-Stack MPLS Extension header. </li>
      </ul>
    </section>
    <section anchor="sect-J12.1b" numbered="true" toc="default">
      <name>Processing BOS MPLS Extension Header</name>
      <t> Encapsulating Node: </t>
      <ul spacing="normal">
        <li> MUST NOT add BOS MPLS Extension header if the decapsulation node is not capable of BOS MPLS Extension header.</li>
        <li> MUST ensure that the penultimate node does not remove the MPLS extension header.</li>
      </ul>
      <t> Intermediate Node: </t>
      <ul spacing="normal">
        <li> MAY add additional data to the existing BOS-FI encoded. </li>
        <li> MAY add a new BOS-FI and its corresponding data if the decapsulation node supports BOS MPLS Extension header.</li>
      </ul>
      <t> Decapsulating Node: </t>
      <ul spacing="normal">
        <li> MUST remove the BOS MPLS Extension header. </li>
      </ul>
    </section>
    <section anchor="sect-J13" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t> Below are the IANA actions which this document is requesting. </t>
      <section anchor="sect-J13.1" numbered="true" toc="default">
        <name>IANA Considerations for Forwarding Instruction Flags</name>
        <t>IANA is requested to create a new registry to assign the bit position and the meaning to the Forwarding Instruction Flags based on the user request.</t>
        <table anchor="iana-fif-tbl" align="center">
          <name>Forwarding Instruction Flags Registry</name>
          <thead>
            <tr>
              <th align="left"> Bit Position</th>
              <th align="left"> Description</th>
              <th align="left"> Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">19-0</td>
              <td align="left">Unassigned</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="sect-J13.2" numbered="true" toc="default">
        <name>IANA Considerations for IS-FI Opcode</name>
        <t>IANA is requested to create a new registry to assign IS-FIOC opcode values.
   All code-points in the range 1 through 175 in this registry shall be
   allocated according to the "IETF Review" procedure as specified in
   <xref target="RFC8126" format="default"/>.  Code points in the range 176 through 239 in this
   registry shall be allocated according to the "First Come First
   Served" procedure as specified in <xref target="RFC8126" format="default"/>. 
   Remaining code-points are allocated according to <xref target="iana-is-fioc-reg-tbl" format="default"/>:
        </t>
        <table anchor="iana-is-fioc-reg-tbl" align="center">
          <name>In-Stack Forwarding Instruction Opcode Registry</name>
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="center">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">1 - 175</td>
              <td align="center">IETF Review</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">176 - 239</td>
              <td align="center">First Come First Served</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">240 - 251</td>
              <td align="center">Experimental Use</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">252 - 254</td>
              <td align="center">Private Use</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
        <t>Following IS-FIOC Opcode values are assigned from this registry. </t>
        <table anchor="iana-is-fioc-tbl" align="center">
          <name>In-Stack Forwarding Instruction Opcode Values</name>
          <thead>
            <tr>
              <th align="left"> Value</th>
              <th align="left"> Description</th>
              <th align="left"> Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">0</td>
              <td align="left">Invalid value</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">1</td>
              <td align="left">Forwarding Instruction Flags</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">2</td>
              <td align="left">Offset of start of Bottom Of Stack Data after BOS Label</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">255</td>
              <td align="left">Opcode Range Extension Beyond 255</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="sect-J13.3" numbered="true" toc="default">
        <name>IANA Considerations for BOS-FI Opcode</name>
        <t>IANA is requested to create a new registry to assign BOS-FIOC opcode values.</t>
        <table anchor="iana-bos-fioc-reg-tbl" align="center">
          <name>Bottom-Of-Stack Forwarding Instruction Opcode Registry</name>
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="center">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">1 - 175</td>
              <td align="center">IETF Review</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">176 - 239</td>
              <td align="center">First Come First Served</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">240 - 251</td>
              <td align="center">Experimental Use</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">252 - 254</td>
              <td align="center">Private Use</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
        <t>Following BOS-FIOC Opcode values are assigned from this registry. </t>
        <table anchor="iana-bos-fioc-tbl" align="center">
          <name>Bottom-Of-Stack Forwarding Instruction Opcode Values</name>
          <thead>
            <tr>
              <th align="left"> Value</th>
              <th align="left"> Description</th>
              <th align="left"> Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">0</td>
              <td align="left">Invalid value</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">255</td>
              <td align="left">Opcode Range Extension Beyond 255</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
        <t> </t>
        <t>The application that requires an Opcode for the Forwarding Instruction (IS-FIOC or BOS-FIOC) or a Flag must request the code-point and its meaning from IANA. </t>
      </section>

      <section anchor="sect-J13.6" numbered="true" toc="default">
        <name>IANA Considerations for New Special Purpose Label</name>
        <t>IANA is requested to allocate a value TBA1 for the MEI SPL label from the "Base Special-Purpose MPLS Label Values" registry to indicate the presence of MPLS Header Extension.</t>
      </section>

    </section>
    <section anchor="sect-J14" numbered="true" toc="default">
      <name>Appendix</name>
      <section anchor="sect-J14.1" numbered="true" toc="default">
        <name>Alternate approach for In-Stack Extension Header Encoding</name>
        <t>In the above In-Stack Extension Header Encoding the Label field is used to encode the FI Opcode. So just for completeness, here is the alternate way of In-Stack Extension Header Encoding is provided. </t>
        <figure anchor="Alternate-In-Stack-Ext-Hdr-Format">
          <name>Alternate In-Stack Extension Header Format</name>
          <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Entropy Label or SPL or NPL      | IL=1|S|   IPI=1       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|                      Data           |R|D|E|S|   FI Opcode   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
        </figure>
        <t> IPI flag is set to "1" to indicate the presence of In-Stack MPLS Extension Header. </t>
        <t> Since In-Stack MPLS Extension Header is present as part of the MPLS Header, the MPLS Header is redefined to encode the MPLS Extension Header. </t>
        <t> Label Field: </t>
        <ul empty="true" spacing="normal">
          <li> Most significant bit is always set to "1" to avoid aliasing with the reserved SPLs. </li>
          <li> Rest of the 19 bits and the "R" bit from the TC bit can be used by the application. So total of 20 bits can be used to carry the data corresponding to IS-FI opcode. </li>
        </ul>
        <t> TC Field: </t>
        <t> This carries data stacking bits. They are as follows:</t>
        <ul empty="true" spacing="normal">
          <li> D (DS-Bit): Data Stacking Bit. This is used to encode more than 19 bits of extended data in the MPLS Label stack. If this is set to "1", then this is the end of extended data. </li>
          <li> R (Reserved Bit): This is used to encode the IS-FI data. </li>
        </ul>
        <t> TTL Field: </t>
        <t> This carries In-Stack Forwarding Instruction opcode.</t>
      </section>


      <section anchor="sect-J10.1" numbered="true" toc="default">
        <name>MPLS Extension Header Example for Entropy Label using New SPL</name>
        <t>The MPLS Extension Header encoding formats defined in this document is applicable when using a new Special Purpose Label (SPL) or using a Network Programming Label (NPL) configured by an operator.
        </t>
	 <t>The TTL field in the SPL (value TBA1) is used to encode FI Flags including IPI, HBI and BPI flags defined in this document.</t>
     
        <figure anchor="SPL-In-Stack-Ext-Hdr-Format">
          <name> MPLS Extension Header Encoding Example for Entropy Label using New SPL</name>
          <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     MEI=SPL (value TBA1)              | IL=1|S|   IPI=1       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IS-FI Opcode=3|  Entropy Label        |R|D|E|S|   SLID        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
        </figure>
        <t>The FI Opcode value 3 as an example indicates encoding of Entropy Label and Slice ID as shown in the above Figure.</t>
     
      </section>

      <section anchor="sect-6" numbered="true" toc="default">
        <name>MPLS BOS Extension Header Example with IOAM Data Fields</name>
        <t>The Bottom Of Stack (BOS) Extension Header is used with BOS Opcode for IOAM.</t>

	<t>Bottom Of Stack Presence Indicator (BPI) flag in TTL is set to "1" to indicate the presence of BOS Extension Header.
	HBI flag in TTL is set to "1" to indicate the BOS Extenion Header requires Hop-By-Hop processing.
	</t>
        
        <figure anchor="ure-ioam-encapsulation-in-mpls-header-4">
        <name>Example MPLS Encapsulation for IOAM using BOS Extension Header</name>
        <artwork name="" type="" align="left" alt=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |      Entropy Label or SPL or NPL      |  TC |1| BPI=1, HBI    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |0 0 1 0|Reserve|BOS Opcode=IOAM|Length (words) | Flags (NH, H) |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
 | IOAM-OPT-Type | IOAM HDR Len  | Block Number  | Reserved      |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  I
 |                                                               |  O
 |                                                               |  A
 ~                 IOAM Option and Data Space                    ~  M
 |                                                               |  |
 |                                                               |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |                                                               |
 |                                                               |
 |                 Optional Payload + Padding                    |
 |                                                               |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ]]></artwork>
          </figure>
              
      </section>



    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization/>
            </author>
            <date year="1997" month="March"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC3032" target="https://www.rfc-editor.org/info/rfc3032" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3032.xml">
          <front>
            <title>MPLS Label Stack Encoding</title>
            <author initials="E." surname="Rosen" fullname="E. Rosen">
              <organization/>
            </author>
            <author initials="D." surname="Tappan" fullname="D. Tappan">
              <organization/>
            </author>
            <author initials="G." surname="Fedorkow" fullname="G. Fedorkow">
              <organization/>
            </author>
            <author initials="Y." surname="Rekhter" fullname="Y. Rekhter">
              <organization/>
            </author>
            <author initials="D." surname="Farinacci" fullname="D. Farinacci">
              <organization/>
            </author>
            <author initials="T." surname="Li" fullname="T. Li">
              <organization/>
            </author>
            <author initials="A." surname="Conta" fullname="A. Conta">
              <organization/>
            </author>
            <date year="2001" month="January"/>
          </front>
          <seriesInfo name="RFC" value="3032"/>
          <seriesInfo name="DOI" value="10.17487/RFC3032"/>
        </reference>
        <reference anchor="RFC6790" target="https://www.rfc-editor.org/info/rfc6790" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6790.xml">
          <front>
            <title>The Use of Entropy Labels in MPLS Forwarding</title>
            <author initials="K." surname="Kompella" fullname="K. Kompella">
              <organization/>
            </author>
            <author initials="J." surname="Drake" fullname="J. Drake">
              <organization/>
            </author>
            <author initials="S." surname="Amante" fullname="S. Amante">
              <organization/>
            </author>
            <author initials="W." surname="Henderickx" fullname="W. Henderickx">
              <organization/>
            </author>
            <author initials="L." surname="Yong" fullname="L. Yong">
              <organization/>
            </author>
            <date year="2012" month="November"/>
           </front>
          <seriesInfo name="RFC" value="6790"/>
          <seriesInfo name="DOI" value="10.17487/RFC6790"/>
        </reference>
        <reference anchor="RFC8126" target="https://www.rfc-editor.org/info/rfc8126" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml">
          <front>
            <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
            <author initials="M." surname="Cotton" fullname="M. Cotton">
              <organization/>
            </author>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <author initials="T." surname="Narten" fullname="T. Narten">
              <organization/>
            </author>
            <date year="2017" month="June"/>
          </front>
          <seriesInfo name="BCP" value="26"/>
          <seriesInfo name="RFC" value="8126"/>
          <seriesInfo name="DOI" value="10.17487/RFC8126"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
       </references>
      <references>
        <name>Informative References</name>

	       <reference anchor="I-D.decraene-mpls-slid-encoded-entropy-label-id" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.decraene-mpls-slid-encoded-entropy-label-id.xml" target="https://www.ietf.org/archive/id/draft-decraene-mpls-slid-encoded-entropy-label-id-03.txt">
          <front>
            <title>Using Entropy Label for Network Slice Identification in MPLS networks.</title>
            <author fullname="Bruno Decraene">
              <organization>Orange</organization>
            </author>
            <author fullname="Clarence Filsfils">
              <organization>Cisco Systems, Inc.</organization>
            </author>
            <author fullname="Wim Henderickx">
              <organization>Nokia</organization>
            </author>
            <author fullname="Tarek Saad">
              <organization>Juniper Networks</organization>
            </author>
            <author fullname="Vishnu Pavan Beeram">
              <organization>Juniper Networks</organization>
            </author>
            <author fullname="Luay Jalil">
              <organization>Verizon</organization>
            </author>
            <date month="February" day="11" year="2022"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-decraene-mpls-slid-encoded-entropy-label-id-03"/>
        </reference>

        <reference anchor="I-D.saad-mpls-miad-usecases" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.saad-mpls-miad-usecases.xml" target="https://www.ietf.org/archive/id/draft-saad-mpls-miad-usecases-00.txt">
          <front>
            <title>Usecases for MPLS Indicators and Ancillary Data</title>
            <author fullname="Tarek Saad">
              <organization>Juniper Networks</organization>
            </author>
            <author fullname="Kiran Makhijani">
              <organization>Futurewei Technologies</organization>
            </author>
            <author fullname="Haoyu Song">
              <organization>Futurewei Technologies</organization>
            </author>
            <date month="January" day="7" year="2022"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-saad-mpls-miad-usecases-00"/>
        </reference>


        <reference anchor="I-D.bocci-mpls-miad-adi-requirements" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.bocci-mpls-miad-adi-requirements.xml" target="https://www.ietf.org/archive/id/draft-bocci-mpls-miad-adi-requirements-01.txt">
          <front>
            <title>Requirements for MPLS Label Stack Indicators and Ancillary Data</title>
            <author fullname="Matthew Bocci">
              <organization>Nokia</organization>
            </author>
            <author fullname="Stewart Bryant">
	 </author>
            <date month="January" day="24" year="2022"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-bocci-mpls-miad-adi-requirements-01"/>
        </reference>

        <reference anchor="RFC5586" target="https://www.rfc-editor.org/info/rfc5586" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5586.xml">
          <front>
            <title>MPLS Generic Associated Channel</title>
            <author initials="M." surname="Bocci" fullname="M. Bocci" role="editor">
              <organization/>
            </author>
            <author initials="M." surname="Vigoureux" fullname="M. Vigoureux" role="editor">
              <organization/>
            </author>
            <author initials="S." surname="Bryant" fullname="S. Bryant" role="editor">
              <organization/>
            </author>
            <date year="2009" month="June"/>
          </front>
          <seriesInfo name="RFC" value="5586"/>
          <seriesInfo name="DOI" value="10.17487/RFC5586"/>
        </reference>

        <reference anchor="RFC4385" target="https://www.rfc-editor.org/info/rfc4385" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4385.xml">
          <front>
            <title>Pseudowire Emulation Edge-to-Edge (PWE3) Control Word for Use over an MPLS PSN</title>
            <author initials="S." surname="Bryant" fullname="S. Bryant">
              <organization/>
            </author>
            <author initials="G." surname="Swallow" fullname="G. Swallow">
              <organization/>
            </author>
            <author initials="L." surname="Martini" fullname="L. Martini">
              <organization/>
            </author>
            <author initials="D." surname="McPherson" fullname="D. McPherson">
              <organization/>
            </author>
            <date year="2006" month="February"/>
          </front>
          <seriesInfo name="RFC" value="4385"/>
          <seriesInfo name="DOI" value="10.17487/RFC4385"/>
        </reference>



      </references>
    </references>
    <section numbered="false" anchor="acknowledgments" toc="default">
      <name>Acknowledgments</name>
      <t>
      The auhors of this document would like to thank the MPLS Working Group Design Team for the discussions and comments
      on this document.
      </t>
    </section>
    <section numbered="false" anchor="contributors" toc="default">
      <name>Contributors</name>
      <t>
	      TBD
      </t>
    </section>
  </back>
</rfc>
