<?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 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 RFC4377 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4377.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 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-jags-mpls-ps-mna-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-jags-mpls-ps-mna-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="2023"/>
    <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 In-Stack MNA solution
	defined in draft-ietf-mpls-mna-hdr. MPLS Network Actions can be used to
	influence packet forwarding decisions, carry additional OAM
	information in the MPLS packet or perform user-defined
	operations. This document addresses the MNA requirements
	specified in draft-ietf-mpls-mna-requirements. This document
	follows the MNA framework specified in
	draft-ietf-mpls-mna-fwk.
      </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 OAM logging, for
	  example.  Ancillary Data can be used to carry additional
	  information, such as a IOAM, Path tracing etc.
	    Several MNA applications
	  are described in <xref target="I-D.ietf-mpls-mna-usecases"
	  format="default"/>. User-defined network actions allow new,
	  local actions to be defined. In some cases, more Ancillary 
          Data may required to be carried in the MPLS header, so 
          these kind of Network Actions and its Ancillary data are 
          encoded after the MPLS Stack. These are called as Post-Stack Data. 
	</t>
	<t>
	This document defines the syntax and semantics of Post-Stack
	Network Actions and their corresponding Ancillary Data based on the 
	In-Stack MNA solution defined in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>.
		
        This document addresses the requirements
	specified in <xref target="I-D.ietf-mpls-mna-requirements"
	format="default"/>.  This document follows the framework
	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 And Management</td>
	    <td><xref target="RFC4377"/></td>
	  </tr>

	  <tr>
	    <td>P</td>
	    <td>Post-Stack Network Action Indicator 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>PSMNA</td>
	    <td>Post-Stack MPLS Network Action </td>
	    <td>This document</td>
	  </tr>
	  <tr>
	    <td>PS-MNA-OP</td>
	    <td>Post-Stack MPLS Network Action Opcode</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>
      A Flag in the In-Stack NAS 
      header <xref target="I-D.ietf-mpls-mna-hdr" format="default"/> 
      indicates the presence of the Post-Stack MNA. The Post-Stack 
      MNA's are encoded after the MPLS Label Stack (BoS).

    </t>



    <t>
      The Post-Stack MNA encoding contains two main parts:
    </t>
    <ul>
       <li>
          Post-Stack Network Action Indicator
       </li>
       <li>
          Post-Stack Network Action Encoding 
       </li>
    </ul>
    
</section>

    <section>
      <name>Post-Stack Network Action Indicator </name>
  
      <t>
	A reserved bit (21st bit from left in LSE Format B) in the In-Stack MNA header described 
        in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/> 
        is used to indicate the presence of the Post-Stack Network Action.
       
      </t>
      
      <figure>
	<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| Res |U|  NASL |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>

      <t>
      The below are the flags applicable to Post-Stack MNA encoding purposes defined in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>.
      </t>

      <ul>
          <li> 
            P (1 Bit) : Indicates the presence of the Post-Stack MNA 
          </li>
          <li> 
            IHS (2 Bit) : Indicates the combined scope of the In-Stack and the Post-Stack Network Actions. Each scope with P bit set will have its corresponding Post-Stack MNA sub-stack.
          </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 Network Action Encoding</name>
      
      <t>
	The Post-Stack Network Action and its Ancillary Data are encoded after
        the MPLS Label Stack (BoS). The Post-Stack Network Action may carry multiple Post-Stack 
        Network Actions and its corresponding Ancillary Data.
      </t>
      <t>
        This consist of two main parts:
      </t>
      <ul>
          <li>
             Post-Stack Network Action Top Header
          </li>
          <li>
             Post-Stack Network Action Header
          </li>
      </ul>

      <section>
          <name>Post-Stack Network Action Top Header</name>

       <t> This header is overall for all the Post-Stack Network 
           Actions that are encoded.
       </t>
      <figure>
	<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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|N N N N|Version|   PS-MNA-LEN  |    TYPE = POST-STACK-MNA      | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 

]]></artwork>
      </figure>

      <ul>
        <li> NNNN (4 bits): This first nibble identifies the start of the 
             Post-Stack Network Actions. A new value can be assigned 
             by IANA (value TBA1). Generic Associated Channel (0001b) can be used instead.
        </li>
        <li> Version (4 bits): This is Post-Stack MNA version. The initial version will be 0.
        </li>
        <li> PS-MNA-LEN (8 bits): Post-Stack MNA Total Length in words. This excludes the Post-Stack Top header.
        </li>
        <li> TYPE (16 bits): Type is set to POST-STACK-MNA. The type value is an IANA allocated value.
        </li>
      </ul>

       </section>

      <section>
          <name>Post-Stack Network Action Header</name>
      <t> This header encodes a single Post-Stack Network Action. 
          Using this scheme, multiple Post-Stack Network Action and 
          its corresponding Ancillary data can be encoded.
      </t>
      <figure>
	<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 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
|  PS-MNA-OP  |R|R|  PS-NAL     |       PS ANCILLARY DATA       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
      </figure>
      <ul>
         <li> PS-MNA-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 for the respective Network Action. This value is in the order of words excluding current word.
         </li>
         <li> PS ANCILLARY DATA (16 bits): Post-Stack Ancillary Data associated with the Network Action
         </li>

      </ul>

      </section>

    </section>

    <section anchor="SPL-OPCODES">
       <name>In-Stack Special Opcode Allocation </name>
      <t>
        Some of the In-Stack MNA Opcodes are allocated to support Post-Stack
        Network Action. They are as follows.
      </t>

      <section anchor="SPL-OPCODES-PSD-OFFSET">
        <name>Post-Stack Network Action Offset</name>
      
        <t>
	  Opcode: TBA2
        </t>
        <t>
	  Purpose: This opcode carries the start offset of the
	  Post-Stack Network Action Top Header.
        </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.  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
	  Post-Stack Network Action is encoded immediately after the MPLS BOS.  A data value
	  of 1 indicates that the PAH starts 4 octets after the BOS.
        </t>
        <t>
	  Scope: This opcode can be used with any scope.
        </t>
        </section>

      <section anchor="PS-IS-NA-ORD">
        <name>PS-IS-NA Ordering</name>
        <t>
	  Opcode: TBA3
        </t>
        <t>
	  Purpose: In cases where the ordering of network action is
	  significant and where some of the network actions reside in
	  Post-Stack Network Action, this opcode can be used to insert Post-Stack network actions
	  into the order of execution. The 'P' bit and 'O' bit MUST be
	  set in the NAS's Format B LSE if this opcode is used.
        </t>
        <t>
	  LSE Format: B, C, D (defined in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>)
        </t>
        <t>
	  Data: The data field contains one or more 7-bit Post-Stack MNA
	  Opcode. When used with LSE Format B, only one PS MNA Opcode
	  is carried.  Two PS MNA opcodes can be carried in a
	  Format C LSE, and if Format D LSEs are used, each may carry up
	  to three PS MNA opcodes.  The PS MNA opcodes are the stored
	  concatenated in the most significant bits of the data
	  field. If multiple indicators are carried, the most
	  significant PS MNA opcode is evaluated to the least
	  significant. PS MNA opcodes do not span LSEs. If some PS MNA
	  opcode positions are not to be used, then the opcode should be set
	  to value 0.
        </t>
        <t>
	  Scope: This opcode can be used with any scope.
        </t>
        </section>

    </section>


  <section anchor="Signaling" numbered="true" toc="default">
    <name>Node Capability Signaling</name>
    <t>
      The ingress node which is adding a Post-Stack MNA MUST make sure that the
      egress node is capable of MNA and removes the Post-Stack MNA.     </t>

    <ul>
      <li>
	Each participating node MUST signal the network actions that
	it supports.
      </li> 
      <li>
	Each participating node MUST signal its Maximum Post-Stack MNA Length
	that could 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 anchor="sect-J12.1a" numbered="true" toc="default">
    <name>Processing the Network Action Sub-Stack</name>

    <t>
      This section defines the specific responsibilities for nodes
      along a MPLS path.
    </t>

    <section>
      <name> Encapsulating Node Responsibilities </name>

      <t>
	The encapsulating node MAY add Post-Stack MNA 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 MNA to the packet
	if the decapsulation node does not support Post-Stack MNA.
      </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 change the Ancillary Data in the Post-Stack MNA.
      </t>

      <t>
	A transit node MUST respect the Unknown Action Handling value
	encoded in the NAS.
      </t>
      <t>
	A node that removes the last copy of a NAS that has the P bit set MUST remove
	all Post-Stack Network Actions.
      </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 a HBH or I2E
	NAS when it is exposed after removing the forwarding
	(transport) label. This allows the egress node to process the
	NAS.
      </t>
    </section>

    <section>
      <name> Decapsulating Node Responsibilities </name>
      <t>
	The decapsulating node MUST remove any Post-Stack MNA 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"/> also apply to this document.
    </t>
    <t> 
      In addition, MNA creates a new dimension in security
      concerns:
    </t>
      <ul>
	<li>
	  The actions of an encapsulating node can affect any or all
	  of the nodes along the path. In the most common and benign
	  situations, such as a syntactically incorrect packet, this
	  could result in packet loss or corruption.
	</li>
	<li>
	  The semantics of a network action are unbounded and may be
	  insecure. A network action could be defined that made
	  arbitrary changes to the memory of the forwarding router,
	  which could then be used by the encapsulating node to
	  compromise every MNA capable router in the network. The IETF
	  needs to ensure that only secure network actions are
	  defined.
	</li>
	<li>
	  The MNA architecture supports locally defined network
	  actions. For such actions, there will be limited oversight
	  to ensure that the semantics do not create security
	  issues. Implementors and network operators will need to
	  ensure that locally defined network actions do not
	  compromise the security of the network.
	</li>
      </ul>
  </section>

  <section anchor="sect-J13" numbered="true" toc="default">
    <name>IANA Considerations</name>

    <section anchor="sect-J13.6" numbered="true" toc="default">
      <name>Post-Stack MNA Nibble </name>
      <t>
	This document requests that IANA allocate a value (TBA1) for
	the Post-Stack MNA Nibble (NNNN) to indicate the start of the 
        Post-Stack Network Actions. The reference should be this document.
      </t> 
    </section>

    
    <section anchor="IANAFlags" numbered="true" toc="default">
      <name>In-Stack Network Action Opcodes </name>
      <t>
	The In-Stack Network Action Opcodes for In-Stack Network Action Opcode 
        registry (to be created by in
        [<xref target="I-D.ietf-mpls-mna-hdr" format="default"/>])are defined 
        in the document as follows
      </t>

      <table anchor="iana-nafif-tbl-2" align="center">
        <name>In-Stack Network Action Flags With Ancillary Data Registry</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 of start of Post-Stack Network Action Header</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left"> TBA3</td>
            <td align="left">PS-IS-NA Ordering</td>
            <td align="left">This document</td>
          </tr>
        </tbody>
      </table>

    </section>

    <section anchor="IANATopHdrType" numbered="true" toc="default">
      <name>Top Header Types Registry</name>

      <t>
	This document requests that IANA create a new registry with
	the name "Top Header Types". The
	registration procedure for this registry is "IETF Review". The
	fields are "Type" (integer), "Description" (string), and
	"Reference" (string). Type is an integer 0-65535.
      </t>
      <t>
	The initial assignments for this registry are:
      </t>
      <table anchor="iana-top-hdr-type-tbl" align="center">
        <name> Top 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</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">1</td>
            <td align="left">POST-STACK-MNA-TYPE</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">2-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>
    </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". The
	fields are "Opcode" (integer), "Description" (string), and
	"Reference" (string). Opcode is an integer 0-127.
      </t>
      <t>
	The initial 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</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>
        </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>Post-Stack Network Action Encoding </name>

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

      <figure anchor="MNA-Carrying-only-PSD">
        <name>NAS encoding only 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Label=MNA bSPL              | TC  |S|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Opcode=TBA2|            0            |1|IHS|S| Res |U| NASL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                             |1|               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|N N N N|Version|   PS-MNA-LEN  |    TYPE = POST-STACK-MNA      | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|  PS-MNA-OP  |R|R|  PS-NAL     |       PS ANCILLARY DATA       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                                       
~                                                               ~
~                           Payload                             ~
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

        ]]></artwork>  
      </figure>

      <t>
	In some cases, the NAS may encode only the presence of
	Post-Stack NAs. In this case, the P-Bit is set. The IHS field
	indicates the scope of the Post-Stack NAs (I2E, HBH, Select).
      </t>

    </section>

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

      <figure anchor="MNA-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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Label=MNA bSPL               | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |            0            |1|IHS|0| Res |U| NASL=1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=1    |        Flag-Based NAIs        |S| NAIs  | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                             |1|               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|N N N N|Version|   PS-MNA-LEN  |    TYPE = POST-STACK-MNA      | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|  PS-MNA-OP  |R|R|  PS-NAL     |       PS ANCILLARY DATA       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
~                                                               ~
~                           Payload                             ~
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

        ]]></artwork>  
      </figure>

      <t>
	In some cases, the NAS may encode In-Stack NAs and indicate the
	presence of Post-Stack NAs. In this case, P-Bit is set.  The
	NASL is set to "1", indicating the presence of one additional
	LSE.  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 Multiple Scopes </name>

      <figure anchor="MNA-Carrying-ISD-PSD-Diff-Scope">
        <name>NASes with multiple 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Label=MNA bSPL               | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |            0            |0| 1 |0| Res |U| NASL=1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
| Opcode=1    |        Flag-Based NAIs        |0| NAIs  | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Label=MNA bSPL               | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |            0            |1| 0 |1| Res |U| NASL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|N N N N|Version|   PS-MNA-LEN  |    TYPE = POST-STACK-MNA      | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|  PS-MNA-OP  |R|R|  PS-NAL     |       PS ANCILLARY 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 anchor="sect-J7.1" numbered="true" toc="default">
        <name>Post-Stack Network Action with two Opcodes </name>

        <figure anchor="In-Stack-Ext-Hdr-1-a">
          <name>Post-Stack NA Example</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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Label=MNA bSPL               | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |          0              |1|IHS|1| Res |U| NASL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|N N N N|Version|PS-MNA-LEN = 3 |    TYPE = POST-STACK-MNA      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|  PS-MNA-OP=2|R|R|  PS-NAL=0   |       PS ANCILLARY DATA       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
|  PS-MNA-OP=3|R|R|  PS-NAL=1   |       PS ANCILLARY DATA       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
|                       PS ANCILLARY DATA                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                     Optional Payload + Padding                |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


          ]]></artwork>
        </figure>
 
        <t>
	  This is an example of Post-Stack MNA encoding, that encode two different Post-Stack Network Actions.
	</t>
      
        <t>
	  Details:
	</t>
        <ul empty="true" spacing="normal">
          <li> PS-MNA-LEN=3: This is the Total Length of Post-Stack MNAs. </li>
          <li> PS-MNA-OP=2: Post-Stack MNA Opcode "2". </li>
          <li> PS-NAL=0: Post-Stack Network Action does not contain any additional data. </li>
          <li> PS-MNA-OP=3: Post-Stack MNA Opcode "3". </li>
          <li> PS-NAL=1: Post-Stack Network Action contains 1 additional word to carry its 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 Example</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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Label=MNA bSPL               | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |         0               |1| H |0| Res |U| NASL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|          Label=MNA bSPL               | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |         2               |1| I |1| Res |U| NASL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|N N N N|Version|PS-MNA-LEN = 1 |    TYPE = POST-STACK-MNA      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
|  PS-MNA-OP=2|R|R|  PS-NAL=0   |       PS ANCILLARY DATA       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|N N N N|Version|PS-MNA-LEN = 2 |    TYPE = POST-STACK-MNA      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|  PS-MNA-OP=3|R|R|  PS-NAL=1   |       PS ANCILLARY DATA       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       PS ANCILLARY DATA                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                     Optional Payload + Padding                |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


          ]]></artwork>
        </figure>
 
        <t>
	  This is an example of Post-Stack MNA 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 PSD data.
	</t>
      
        <t>
	  Details:
	</t>
        <ul empty="true" spacing="normal">
      
          <li> Opcode:TBA2: This the offset of the Hop-By-Hop scoped PSD data. This value of this opcode is "0"</li>
          <li> Opcode:TBA2: This the offset of the Ingress-To-Egress scoped PSD data. This value of this opcode is "2" (i.e) the PSD stack starts from second word after the MPLS Bottom Of Stack</li>
      </ul>
  
  </section>


 
  <section anchor="sect-J6.a" numbered="true" toc="default">
    <name>Network Action Processing Order</name>
    <t>
      The semantics of a network action can vary widely and the
      results of processing one network action may affect the
      processing of a subsequent network action. 
    </t>
      

    <section anchor="sect-J6.a2" numbered="true" toc="default">
      <name>Post-Stack NA Processing Order</name>
      <t>
	By default, Post-Stack NAs follow the ordering of the encoding. 
	However, the PS-IS-NA ordering opcode can
	be used to override the default ordering and interleave Post-Stack 
	network actions with In-Stack network actions.
      </t> 
      <t>
	In some cases, Post-Stack NAs needs to be processed before
	In-Stack NAs. This section shows how to prioritize the
	Post-Stack NAs over In-Stack NAs.
      </t>
      <figure anchor="In-Stack-NA-Ordering-3">
        <name>Post-Stack and In-Stack NA processing order</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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Label=MNA bSPL               | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=8    |      Ancillary Data     |1|IHS|0| Res |U| NASL=3|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=1    |      Flag-Based NAIs          |0| NAIs  | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA3 |      Post-Stack NA=6          |0|PS-NAI | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=7    |      Ancillary Data           |1|  AD   | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|N N N N|Version|PS-MNA-LEN = 1 |    TYPE = POST-STACK-MNA      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
|  PS-MNA-OP=6|R|R|  PS-NAL=0   |       PS ANCILLARY DATA       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

        ]]></artwork>
      </figure>

      <t>
	In the above example, opcode 8 is processed first, then the
	Flag-Based NAIs, followed by Post-Stack NA Opcode 6, and finally
	opcode 7.
      </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;
	&RFC2119;
	&RFC3032;
	&RFC4377;
	&RFC4385;
	&RFC5462;
	&RFC5586;
	&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.
       </t>
    </section>


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

          <figure anchor="contrib">
     <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>
      </figure>

    </section>



  </back>
</rfc>
