<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
  <!ENTITY I-D.ietf-mpls-mna-fwk SYSTEM
    "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-mna-fwk.xml">
  <!ENTITY I-D.ietf-mpls-mna-requirements SYSTEM 
    "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-mna-requirements.xml">
  <!ENTITY I-D.ietf-mpls-mna-usecases SYSTEM 
    "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-mna-usecases.xml">
  <!ENTITY I-D.ietf-mpls-mna-hdr SYSTEM 
    "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-mna-hdr.xml">
  <!ENTITY I-D.ietf-mpls-1stnibble SYSTEM 
    "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-1stnibble.xml">
  <!ENTITY RFC2119 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
  <!ENTITY RFC3032 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3032.xml">
  <!ENTITY RFC4385 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4385.xml">
  <!ENTITY RFC5462 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5462.xml">
  <!ENTITY RFC5586 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5586.xml">
  <!ENTITY RFC6291 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6291.xml">
  <!ENTITY RFC8174 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
  <!ENTITY RFC9017 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9017.xml">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" docName="draft-ietf-mpls-mna-ps-hdr-01" 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="Post-Stack MNA Solution">Post-Stack MPLS Network Action (MNA) Solution
    </title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-mpls-mna-ps-hdr-01"/>
    <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="Royi Zigler" initials="R." surname="Zigler">
      <organization>Broadcom</organization>
      <address>
        <email>royi.zigler@broadcom.com</email>
      </address>
    </author>

    <author initials="T." surname="Li" fullname="Tony Li">
      <organization>Juniper Networks</organization>
      <address>
        <email>tony.li@tony.li</email>
      </address>
    </author>

    <author fullname="Jie Dong" initials="J." surname="Dong">
      <organization>Huawei Technologies</organization>
      <address>
        <postal>
          <street/>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>jie.dong@huawei.com</email>
      </address>
    </author>


   
    <date year="2025"/>
    <workgroup>MPLS Working Group</workgroup>
    <abstract>
      <t>
This document defines the Post-Stack MPLS Network Action (MNA) solution for carrying Network Actions and Ancillary Data after the MPLS label stack, based on the In-Stack MNA solution defined in "MPLS Network Action (MNA) Sub-Stack Solution." MPLS Network Actions can be used to influence packet forwarding decisions, carry additional Operations, Administration, and Maintenance (OAM) information in the MPLS packet, or perform user-defined operations. This solution document addresses the Post-Stack network action and Post-Stack data specific requirements found in "Requirements for MPLS Network Actions." This document follows the architectural framework for the MPLS Network Actions (MNA) technologies specified in "MPLS Network Actions (MNA) Framework."
      </t>

    </abstract>
    </front>
    <middle>
      <section anchor="sect-1" numbered="true" toc="default">
    <name>Introduction</name>

<t>
<xref target="RFC3032" format="default"/> defines the encoding of the MPLS label stack, the basic structure used to define a forwarding path. 
Forthcoming applications require MPLS packets to perform special network actions and carry optional Ancillary Data (AD) that can affect the packet forwarding decision or trigger Operations, Administration, and Maintenance (OAM) logging, for example. 
AD can be used to carry additional information, such as for In Situ OAM (IOAM) as described in <xref target="I-D.ietf-mpls-mna-usecases" format="default"/>. 
User-defined network actions allow local actions to be defined. 
In some cases, more AD may be required to be carried in the MPLS header, so these kinds of network actions and their AD are encoded after the Bottom of Stack (BOS). This network action with AD is called Post-Stack Data.
</t>

<t>
This document defines the Post-Stack MPLS Network Action (MNA) solution for carrying Network Actions and Ancillary Data after the MPLS label stack.
It is based on the In-Stack MNA solution defined in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>. 
This solution document addresses the Post-Stack network action and Post-Stack data specific requirements found in <xref target="I-D.ietf-mpls-mna-requirements"/>.
This document follows the architectural framework for the MPLS Network Actions (MNA) technologies specified in <xref target="I-D.ietf-mpls-mna-fwk" format="default"/>.
</t>

    </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>Abbreviations</name>

      <t>
    The terminology defined in <xref
    target="I-D.ietf-mpls-mna-fwk" format="default"/> and <xref
    target="I-D.ietf-mpls-mna-requirements" format="default"/> are
    used in this document.
      </t> 

      <table anchor="abbreviations">
    <name>Abbreviations</name>
    <thead>
      <tr>
        <th align='left'>Abbreviation</th>
        <th align='left'>Meaning</th>
        <th align='left'>Reference</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>AD</td>
        <td>Ancillary Data</td>
        <td><xref target="I-D.ietf-mpls-mna-requirements"/></td>
      </tr>
      <tr>
        <td>bSPL</td>
        <td>Base Special Purpose Label</td>
        <td><xref target="RFC9017"/></td>
      </tr>
      <tr>
        <td>BOS</td>
        <td>Bottom Of Stack</td>
        <td><xref target="RFC3032"/></td>
      </tr>
      <tr>
        <td>HBH</td>
        <td>Hop-By-Hop Scope</td>
        <td><xref target="I-D.ietf-mpls-mna-fwk"/></td>
      </tr>
      <tr>
        <td>I2E</td>
        <td>Ingress-To-Egress Scope</td>
        <td><xref target="I-D.ietf-mpls-mna-fwk"/></td>
      </tr>
      <tr>
        <td>IHS</td>
        <td>I2E, HBH, or Select Scope</td>
        <td><xref target="I-D.ietf-mpls-mna-hdr"/></td>
      </tr>
      <tr>
        <td>ISD</td>
        <td>In-Stack Data</td>
        <td><xref target="I-D.ietf-mpls-mna-requirements"/></td>
      </tr>
      <tr>
        <td>LSE</td>
        <td>Label Stack Entry</td>
        <td><xref target="RFC3032"/></td>
      </tr>
      <tr>
        <td>MNA</td>
        <td>MPLS Network Actions</td>
        <td><xref target="I-D.ietf-mpls-mna-fwk"/></td>
      </tr>
      <tr>
        <td>NAI</td>
        <td>Network Action Indicator</td>
        <td><xref target="I-D.ietf-mpls-mna-requirements"/></td>
      </tr>
      <tr>
        <td>NAL</td>
        <td>Network Action Length</td>
        <td><xref target="I-D.ietf-mpls-mna-hdr"/></td>
      </tr>
      <tr>
        <td>NAS</td>
        <td>Network Action Sub-Stack</td>
        <td><xref target="I-D.ietf-mpls-mna-fwk"/></td>
      </tr>
      <tr>
        <td>NASL</td>
        <td>Network Action Sub-Stack Length</td>
        <td><xref target="I-D.ietf-mpls-mna-hdr"/></td>
      </tr>
      <tr>
        <td>OAM</td>
        <td>Operations, Administration, and Maintenance </td>
        <td><xref target="RFC6291"/></td>
      </tr>

      <tr>
        <td>P</td>
        <td>Post-Stack Header Presence Bit</td>
        <td>This document</td>
      </tr>

      <tr>
        <td>PSD</td>
        <td>Post-Stack Data </td>
        <td>
          <xref target="I-D.ietf-mpls-mna-requirements"/> and
          <xref target="I-D.ietf-mpls-mna-fwk"/>
        </td>
      </tr>

       <tr>
        <td>PSH</td>
        <td>Post-Stack Header</td>
        <td>This document</td>
      </tr>

      <tr>
        <td>TC</td>
        <td>Traffic Class</td>
        <td><xref target="RFC5462"/></td>
      </tr>
      <tr>
        <td>TTL</td>
        <td>Time To Live</td>
        <td><xref target="RFC3032"/></td>
      </tr>
    </tbody>
      </table>
    </section>
  </section>

  <section anchor="sect-3" numbered="true" toc="default">
    <name>Overview</name>

    <t>
      The Post-Stack MNA solution contains two main parts:
    </t>
    <ul>
       <li>
          Post-Stack Header Presence in In-Stack MNA Sub-Stack
       </li>
       <li>
          Post-Stack Header Encoding that includes Post-Stack Header Type and Post-Stack Network Actions
       </li>
    </ul>
    
    <section>
      <name>Post-Stack Header Presence in In-Stack MNA Sub-Stack</name>
  
      <t>
      A reserved bit (21st bit from the left in LSE Format B <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>) in the In-Stack Network Action Sub-Stack (NASS) described in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/> is defined as P bit in this document to indicate the presence of the Post-Stack Header in the packet after the BOS.
      </t>
      <t>
      The Post-Stack Header is encoded after the MPLS Label Stack (BOS), either immediately after the BOS (i.e., start offset of 0) or after any other Post-Stack headers that follow the BOS (i.e., start offset of non-zero).
      </t>
      
      <figure anchor="MNA-PSH-Presence">
        <name>Post-Stack Header Presence in In-Stack MNA Sub-Stack</name>
    <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Opcode    |        Data             |P|IHS|S|U|  NASL | NAL |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>

     <t>
     The following flags as defined in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/> are also applicable to Post-Stack Header:
     </t>

      <ul>
          <li> 
          IHS (2 Bit): Indicates the combined scope of the In-Stack and the Post-Stack Network Actions. NASS for each scope with P bit set will have its corresponding Post-Stack Header.
          </li>
          <li> 
          U (1 Bit): Indicates the combined Unknown Action Handling of the In-Stack and the Post-Stack Network Actions.
          </li>
      </ul>

    </section>

    <section>
      <name>Post-Stack Header Encoding</name>
      
      <t>
      The Post-Stack Header is encoded after the Bottom of the MPLS Label Stack (BOS). 
      The Post-Stack Header carry one ore more Post-Stack Network Actions and their Ancillary Data.
      </t>
      <t>
        The PSH consist of two main parts:
      </t>
      <ul>
          <li>
             Post-Stack Header (PSH) Type 
          </li>
          <li>
             Post-Stack Network Action Encoding
          </li>
      </ul>

      <section>
          <name>Post-Stack Header Type</name>

       <t> The Post-Stack Header type is the top-header for all the Post-Stack Network Actions that are encoded in the PSH for each scope.
       </t>

      <figure anchor="Post-Stack-Header">
        <name>Post-Stack Header Type</name>
    <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
| TBA1  |Version| PS-HDR-LEN    | TYPE = MNA-POST-STACK-HDR = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
]]></artwork>
      </figure>

      <ul>
      <li> TBA1 (4 bits): This first nibble <xref target="I-D.ietf-mpls-1stnibble" format="default"/> identifies the start of the PSH.
       A new value (value TBA1) is to be assigned by IANA for PSH. 
       Editor's note: Generic Associated Channel (0001b) or CW (0000b) can be used.
        </li>
        <li> Version (4 bits): This is PSH version. The initial version is set to 0.
        </li>
        <li> PS-HDR-LEN (8 bits): PSH Total Length in 4-octet units that includes Post-Stack Network Actions. This excludes the PSH type header.
        </li>
        <li> TYPE (16 bits): Type is set to MNA-POST-STACK-HDR as value 1 for MNA, to be allocated by IANA.
        </li>
      </ul>

       </section>

      <section>
          <name>Post-Stack Network Action Encoding</name>

      <t>The format shown in Figure 3, encodes a single Post-Stack Network Action. 
      By repeating this format, multiple Post-Stack Network Action and 
      its corresponding Ancillary data can be encoded.
      </t>

      <figure anchor="Post-Stack-Network-Action-Encoding">
        <name>Post-Stack Network Action Encoding</name>
    <artwork name="" type="" align="left" alt=""><![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 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
|  MNA-PS-OP  |R|R|  PS-NAL     |       POST-STACK DATA         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <ul>
         <li> MNA-PS-OP (7 bits): Post-Stack Network Action Opcode. 
              Opcode "0" is reserved and other opcodes will be assigned 
              by IANA accordingly.
         </li>
         <li> R (2 bits): Reserved bits.
         </li>
     <li> PS-NAL (7 bits): Post-Stack Network Action Length in 4-octet units. This excludes the first 4-octets starting MNA-PS-OP.
         </li>
         <li> POST-STACK DATA (16 bits): Post-Stack Data associated with the Post-Stack Network Action.
         </li>
      </ul>
  
      </section>
      </section>

    </section>

    <section anchor="SPL-OPCODES">
       <name>In-Stack Network Action Special Opcodes </name>

      <section anchor="SPL-OPCODES-PSD-OFFSET">
        <name>In-Stack Network Action Opcode for PSH Start Offset</name>
      
        <t>
      Opcode: TBA2
        </t>
        <t>
      Purpose: This opcode carries the start offset of the PSH from BOS.
        </t>
        <t>
      LSE Format: B (defined in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>)
        </t>
        <t>
      Data: The data value of the LSE contains the offset from the
      MPLS BOS in units of 4 octets.  This allows the Generic
      Control Word (0000b) <xref target="RFC4385" format="default"/>
      and G-ACh (0001b) <xref target="RFC5586"/> fields to be placed
      immediately after the BOS. In the absence of this opcode, the
      PSH is encoded immediately after the MPLS BOS. A data value
      of 1 indicates that the PSH starts 4 octets after the BOS.
        </t>
        <t>
      Scope: This opcode can be used with any scope.
        </t>

        </section>

      <section anchor="SPL-OPCODES-PSD-OFFSET-DEPTH">
        <name>In-Stack Network Action Opcode for PSH Depth Offset</name>
      
        <t>
      Opcode: TBA3
        </t>
        <t>
      Purpose: This opcode carries the depth of the Post-Stack Header offset from BOS.
        </t>
        <t>
      LSE Format: B or C (defined in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>)
        </t>
        <t>
      Data: The data value of the LSE contains the offset from the
      MPLS BOS in units of 4 octets. A data value
      of 5 indicates that the Post-Stack Header ends 20 octets after the BOS.
        </t>
        <t>
      Scope: This opcode can be used with any scope.
        </t>

        </section>

    </section>

  <section anchor="sect-J12.12a" numbered="true" toc="default">
    <name>Procedure</name>

      <section anchor="Processing-P">
       <name>Processing Rules for P Bit </name>

<t>
The P bit MUST be set to 1 in In-Stack Network Action Sub-Stack when corresponding Post-Stack Header is added in the packet.
</t>

<t>
By default, the PSH starts immediately after the BOS.
The offset for the PSH that does not start immediately after the BOS is indicated using the PSH Start Offset Opcode TBA2.
</t>

<t>
The P bit MUST be set to 1 when the network action with opcode TBA2 is added to the In-Stack Network Action Sub-Stack. The node that recognizes the network action with Opcode TBA2 MUST process the packet according to the U flag if the P bit is not set.
</t>

<t>
The P bit MUST be set to 1 when the network action with opcode TBA3 is added to the In-Stack Network Action Sub-Stack. The node that recognizes the network action with Opcode TBA3 MUST process the packet according to the U flag if the P bit is not set.
</t>

<t>
The node that supports the P bit, processes the Post-Stack Network Actions in the Post-Stack Header as defined in this document. Conversely, the node that does not support the P bit, will skip processing the Post-Stack Header altogether.
</t>
      </section>

      <section anchor="Processing-Order">
       <name>Network Action Processing Order </name>

<t>
    The Post-Stack Network Actions are processed in the same order they are encoded after the BOS. 
    By default, they are processed after the In-Stack Network Actions in the Network Action Sub-Stack. 
    However, Post-Stack Network Action Opcodes for applications (such as IOAM as described in <xref target="I-D.ietf-mpls-mna-usecases" format="default"/>) 
    can be added in the In-Stack Network Action Sub-Stack to process Post-Stack Network Actions in a certain order with respect to the Opcodes in the In-Stack Network Action Sub-Stack.
</t>

     </section>

  <section anchor="Signaling" numbered="true" toc="default">
    <name>Node Capability Signaling</name>
    <t>
The ingress node that is adding a Post-Stack Header MUST ensure that the egress node is capable of Post-Stack MNA and can remove the PSH from the packet.
    </t>

    <ul>
    <li>
        Each participating node MUST signal the network actions that it supports.
    </li>
    <li>
        Each participating node MUST signal its "Readable Label Depth including Post-Stack Header" that can be encoded.
    </li>
    </ul>

    <t>
The above capability signaling will be added in appropriate protocols. Signaling details are outside the scope of this document.
    </t>

  </section>
  </section>

  <section anchor="sect-J12.1a" numbered="true" toc="default">
    <name>Node Responsibilities </name>

    <t>
      This section defines the specific responsibilities for nodes along an MPLS path for processing a Post-Stack Header.
    </t>

    <section>
      <name> Encapsulating Node Responsibilities </name>

      <t>
    The encapsulating node MAY add Post-Stack Header to the packet in accordance with its policies, the placement restrictions, and the limitations. 
      </t>
      <t>
    The encapsulating node MUST NOT add a Post-Stack Header to the packet if the decapsulation node does not support Post-Stack Header.
      </t>

      <t>
    If the encapsulating node is also a transit node, then it MUST also respect transit node responsibilities.
      </t>
    </section>

    <section>
      <name> Transit Node Responsibilities </name>

      <t>
    A transit node MAY modify the Ancillary Data in the Post-Stack Header.
      </t>

      <t>
    A transit node MUST respect the Unknown Action Handling flag encoded in the corresponding NAS when processing the PSH.
      </t>
      <t>
    A node that removes the last copy of a NAS that has the P bit set MUST remove all Post-Stack Headers.
      </t>
    </section>

    <section>
      <name> Penultimate Node Responsibilities </name>
      <t>
     In addition to the transit node responsibilities above, the penultimate node MUST NOT remove the last copy of an HBH or I2E NAS and associated
     PSH when it is exposed after removing the forwarding (transport) label. This allows the egress node to process the NAS and associated PSH.
      </t>
    </section>

    <section>
      <name> Decapsulating Node Responsibilities </name>
      <t>
    The decapsulating node MUST remove any Post-Stack Header it receives.
      </t>
    </section>
  </section>

  <section anchor="sect-J11" numbered="true" toc="default">
    <name>Security Considerations</name>

    <t>
The security considerations in <xref target="RFC3032" format="default"/>, <xref target="I-D.ietf-mpls-mna-fwk" format="default"/>, 
and <xref target="I-D.ietf-mpls-mna-hdr" format="default"/> also apply to this document.
    </t>

  </section>

  <section anchor="sect-J13" numbered="true" toc="default">
    <name>IANA Considerations</name>

    <section anchor="sect-J13.6" numbered="true" toc="default">
      <name>First Nibble for Post-Stack Header </name>
      <t>
    This document requests that IANA allocate a value (TBA1) for
    the First Nibble (value TBA1) for Post-Stack Header from the registry "Post-Stack First Nibble" created
    by <xref target="I-D.ietf-mpls-1stnibble" format="default"/> to indicate the start of the PSH after BOS.
      </t> 

      <table anchor="iana-nafif-tbl-5" align="center">
        <name>First Nibble for Post-Stack Header</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"> TBA1 </td>
            <td align="left"> First Nibble for Post-Stack Header</td>
            <td align="left"> This document</td>
          </tr>
        </tbody>
      </table>

    </section>

    <section anchor="IANATopHdrType" numbered="true" toc="default">
      <name>Post-Stack Header Types Registry</name>

      <t>
    This document requests that IANA create a new registry with
    the name "Post-Stack Header Types" as follows. 
    The registration procedure for this registry is "IETF Review", "Experimental Use" and "Private Use". 
    The fields are "Type" (integer), "Description" (string), and "Reference" (string).  
     </t>

      <t>
    The assignments for this registry are:
      </t>
      <table anchor="iana-top-hdr-type-tbl" align="center">
        <name> Post-Stack Header Types Registry </name>
        <thead>
          <tr>
            <th align="left">Type</th>
            <th align="center">Description</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">0</td>
            <td align="left">Reserved, not to be assigned</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">1-65520</td>
            <td align="left">IETF Review</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">65521-65524</td>
            <td align="left">Experimental Use</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">65525-65535</td>
            <td align="left">Private Use</td>
            <td align="left">This document</td>
          </tr>
        </tbody>
      </table>


      <t>
    The initial assignment for this registry is:
      </t>
      <table anchor="iana-top-hdr-type-tbl-assign" align="center">
        <name>Post-Stack Header Type For MNA</name>
        <thead>
          <tr>
            <th align="left">Type</th>
            <th align="center">Description</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>

          <tr>
            <td align="left">1</td>
            <td align="left">Post-Stack Header Type For MNA</td>
            <td align="left">This document</td>
          </tr>

        </tbody>
      </table>

    </section>
        <section anchor="IANAFlags" numbered="true" toc="default">
      <name>In-Stack Network Action Opcodes </name>
      <t>
    The opcodes for In-Stack Network Action to be allocated by IANA from the "In-Stack Network Action Opcode 
    registry" to be created by in
    [<xref target="I-D.ietf-mpls-mna-hdr" format="default"/>] as defined 
    in this document as follows.
      </t>

      <table anchor="iana-nafif-tbl-2" align="center">
        <name>In-Stack Network Action Opcodes</name>
        <thead>
          <tr>
            <th align="left"> Opcode</th>
            <th align="left"> Description</th>
            <th align="left"> Reference</th>
          </tr>
        </thead>

        <tbody>
          <tr>
            <td align="left"> TBA2 </td>
            <td align="left">Offset for Start of Post-Stack Header</td>
            <td align="left">This document</td>
          </tr>
        </tbody>

        <tbody>
          <tr>
            <td align="left"> TBA3 </td>
            <td align="left">Offset for Depth of Post-Stack Header</td>
            <td align="left">This document</td>
          </tr>
        </tbody>

      </table>

    </section>


    <section anchor="IANAOpcodes" numbered="true" toc="default">
      <name>Post-Stack Network Action Opcodes</name>

      <t>
    This document requests that IANA create a new registry with
    the name "Post-Stack Network Action Opcodes". 
    The registration procedure for this registry is "IETF Review", "Experimental Use" and "Private Use". 
    The fields are "Opcode" (integer), "Description" (string), and
    "Reference" (string). Opcode is an integer 0-127.
      </t>
      <t>
    The assignments for this registry are:
      </t>
      <table anchor="iana-is-fioc-reg-tbl" align="center">
        <name> Post-Stack Network Action Opcodes Registry</name>
        <thead>
          <tr>
            <th align="left">Opcode</th>
            <th align="center">Description</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">0</td>
            <td align="left">Reserved, not to be assigned</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">1-110</td>
            <td align="left">IETF Review</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">111-114</td>
            <td align="left">Experimental Use</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">115-126</td>
            <td align="left">Private Use</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">127</td>
            <td align="left">Reserved, not to be assigned</td>
            <td align="left">This document</td>
          </tr>
        </tbody>
      </table>
    </section>

  </section>

  <section anchor="sect-J14" numbered="true" toc="default">
    <name>Appendix A: Examples</name>

    <section anchor="sect-J6" numbered="true" toc="default">
      <name>Examples of Post-Stack Header Encoding</name>

    <section anchor="sect-J6.1a" numbered="true" toc="default">
      <name> NAS that only Indicates Post-Stack Header </name>

      <figure anchor="Header-Carrying-only-PSD">
        <name>NAS that only indicates Post-Stack Header </name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           MNA Label                   | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Opcode=2=NOOP|    0                    |1|IHS|0|U| NASL=0|NAL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                                             [0|               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                             |1|               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TBA1  |Version| PS-HDR-LEN=1  | TYPE = MNA-POST-STACK-HDR = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  MNA-PS-OP  |R|R|  PS-NAL=0   |       POST-STACK DATA         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                                                               ~
~                           Payload                             ~
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>  
      </figure>

      <t>
In some cases, the NAS may encode only the presence of Post-Stack Header. The Post-Stack Header starts immediately after the BOS.
      </t>

    </section>

   <section anchor="sect-J6.1aa" numbered="true" toc="default">
      <name> NAS that Indicates Post-Stack Header Start Offset</name>

      <figure anchor="Header-Carrying-only-PSD-Offset">
        <name>NAS Indicates Post-Stack Header Start Offset </name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           MNA Label                   | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |  Post-Stack Offset = 2  |1|IHS|0|U| NASL=0|NAL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                                             [0|               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                             |1|               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
| TBA1  |Version| PS-HDR-LEN=1  | TYPE = MNA-POST-STACK-HDR = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|  MNA-PS-OP  |R|R|  PS-NAL=0   |       POST-STACK DATA         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                                       
~                                                               ~
~                           Payload                             ~
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>  
      </figure>

    <t>
     The NAS may encode the start offset for the Post-Stack Header with a non-zero value, for example, when it is after other header such as GACH or CW header. 
     In this example, the PSH starts at offset of 8 bytes after the BoS.
    </t>

    </section>


        <section anchor="sect-J7.1" numbered="true" toc="default">
        <name>Post-Stack Network Actions with Two Opcodes </name>

        <figure anchor="In-Stack-Ext-Hdr-1-a">
          <name>Post-Stack NA with Two Opcodes</name>
          <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          MNA Label                    | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Opcode=2=NOOP|    0                    |1|IHS|1|U| NASL=0|NAL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
| TBA1  |Version| PS-HDR-LEN=3  | TYPE = MNA-POST-STACK-HDR = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|  MNA-PS-OP=2|R|R|  PS-NAL=0   |       POST-STACK DATA         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
|  MNA-PS-OP=3|R|R|  PS-NAL=1   |       POST-STACK DATA         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
|                       POST-STACK DATA                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                     Optional Payload + Padding                |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          ]]></artwork>
        </figure>
 
        <t>
      This is an example, Post-Stack Header encodes two different Post-Stack Network Actions.
    </t>
      
        <t>
      Details:
    </t>
        <ul empty="true" spacing="normal">
          <li> PS-HDR-LEN=3: This is the Total Length of Post-Stack Header. </li>
          <li> MNA-PS-OP=2: Post-Stack NA Opcode 2. </li>
          <li> PS-NAL=0: Post-Stack Network Action does not contain any additional data. </li>
          <li> MNA-PS-OP=3: Post-Stack NA Opcode 3. </li>
          <li> PS-NAL=1: Post-Stack Network Action contains 1 additional 4-octet Ancillary data. </li>
      </ul>
  
  </section>

       <section anchor="sect-J7.2" numbered="true" toc="default">
        <name>Post-Stack Network Action with two Different Scopes </name>

        <figure anchor="In-Stack-Ext-Hdr-1-b">
          <name>Post-Stack NA with two Different Scopes</name>
          <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          MNA Label                    | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Opcode=2=NOOP|    0                    |1|HBH|0|U| NASL=0|NAL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|          MNA Label                    | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |  Post-Stack Offset = 2  |1|I2E|1|U| NASL=0|NAL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
| TBA1  |Version| PS-HDR-LEN=1  | TYPE = MNA-POST-STACK-HDR = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
|  MNA-PS-OP=2|R|R|  PS-NAL=0   |       POST-STACK DATA         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TBA1  |Version| PS-HDR-LEN=2  | TYPE = MNA-POST-STACK-HDR = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|  MNA-PS-OP=3|R|R|  PS-NAL=1   |       POST-STACK DATA         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      POST-STACK DATA                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                     Optional Payload + Padding                |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          ]]></artwork>
        </figure>
 
        <t>
This is an example of Post-Stack Header encoding, that encode two different different scoped Post-Stack Network Actions. The first scope is Hop-By-Hop and the second scope is Ingress-To-Egress scoped Post-Stack Network Action.
    </t>
      
        <t>
      Details:
    </t>
        <ul empty="true" spacing="normal">
          <li> The offset of the Hop-By-Hop scoped Post-Stack Network Action 0.</li>
      <li> Opcode TBA2 carries the offset of the Ingress-To-Egress scoped Post-Stack Network Action. The data is 2, i.e., the Post-Stack Header starts 8 bytes after the MPLS Bottom of Stack.</li>
      </ul>
  
  </section>
  </section>

     <section anchor="sect-J6.1bb" numbered="true" toc="default">
      <name> In-Stack and Post-Stack Network Actions </name>

     <section anchor="sect-J6.1b" numbered="true" toc="default">
      <name> NAS with In-Stack and Post-Stack NAs </name>

      <figure anchor="Header-Carrying-ISD-PSD">
        <name>NAS with In-Stack and Post-Stack NAs</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          MNA Label                    | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=1    |   Flag-Based NAIs       |1|IHS|0|U| NASL=0|NAL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                                             [0|               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                             |1|               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TBA1  |Version| PS-HDR-LEN=1  | TYPE = MNA-POST-STACK-HDR = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|  MNA-PS-OP  |R|R|  PS-NAL=0   |       POST-STACK DATA         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
~                                                               ~
~                           Payload                             ~
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>  
      </figure>

      <t>
In some cases, the NAS may encode In-Stack NAs and indicate the presence of Post-Stack Header. 
The IHS field indicates the scope of both the In-Stack and Post-Stack NAs.
      </t>

    </section>

    <section anchor="sect-J6.1c" numbered="true" toc="default">
      <name> NASes with Different In-Stack and Post-Stack Scopes</name>

      <figure anchor="Header-Carrying-ISD-PSD-Diff-Scope">
        <name>NASes with Different In-Stack and Post-Stack Scopes</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          MNA Label                    | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=1    |   Flag-Based NAIs       |0|HBH|0|U| NASL=0|NAL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|          MNA Label                    | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Opcode=2=NOOP|    0                    |1|I2E|1|U| NASL=0|NAL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TBA1  |Version| PS-HDR-LEN=1  | TYPE = MNA-POST-STACK-HDR = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|  MNA-PS-OP  |R|R|  PS-NAL=0   |       POST-STACK DATA         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
~                                                               ~
~                           Payload                             ~
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>  
      </figure>

      <t>
    In some cases the label stack may need to carry In-Stack NAs
    with Hop-By-Hop scope and Post-Stack NAs with I2E scope. In
    this case, there will be two NASes in the label stack. In this
    case, the first NAS will encode the In-Stack NA with the
    Hop-By-Hop scope and the second NAS will encode the presence
    of I2E scoped Post-Stack NAs.
      </t>

    </section>

  </section>
 </section>

 </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
    &I-D.ietf-mpls-mna-fwk;
    &I-D.ietf-mpls-mna-requirements;
    &I-D.ietf-mpls-mna-hdr;
    &I-D.ietf-mpls-1stnibble;
    &RFC2119;
    &RFC3032;
    &RFC4385;
    &RFC5462;
    &RFC5586;
    &RFC6291;
    &RFC8174;
    &RFC9017;
      </references>
      <references>
        <name>Informative References</name>
        &I-D.ietf-mpls-mna-usecases; 
      </references>
    </references>

    <section numbered="false" anchor="acknowledgments" toc="default">
      <name>Acknowledgments</name>
      <t>
      The authors would like to thank the authors and contributors of the draft-ietf-mpls-mna-hdr as this document borrows some text from the earlier version of that document.
      The authors would like to thank Greg Mirsky, Loa Andersson, Haoyu Song, and Joel Halpern for reviewing this document and providing many useful comments.
       </t>
    </section>

    <section numbered="false" anchor="contributors" toc="default">
      <name>Contributors</name>
      <t>The following people have substantially contributed to this document:</t>

     <artwork name="" type="" align="left" alt=""><![CDATA[
Jisu Bhattacharya
Cisco Systems, Inc.
Email: jisu@cisco.com


John Drake 
Juniper Networks 
United States 
Email: jdrake@juniper.net 
    ]]></artwork>

    </section>


  </back>
</rfc>
