<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" ipr="trust200902" docName="draft-ietf-mpls-mna-ioam-11" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3" consensus="true">
  <!-- xml2rfc v2v3 conversion 3.6.0 -->
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<front>
    <title abbrev="IOAM Using MPLS Network Actions">Supporting In Situ Operations, Administration, and Maintenance Using MPLS Network Actions</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-mpls-mna-ioam-11"/>
    
     <author fullname="Rakesh Gandhi" initials="R." surname="Gandhi" role="editor">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <country>Canada</country>
        </postal>
        <email>rgandhi@cisco.com</email>
      </address>
    </author>
  
    <author initials="G." surname="Mirsky" fullname="Greg Mirsky" role="editor">
      <organization>Individual</organization>
      <address>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>

   <author fullname="Haoyu Song" initials="H." surname="Song">
      <organization>Futurewei Technologies</organization>
      <address>
        <postal>
          <country>United States of America</country>
        </postal>
        <email>haoyu.song@futurewei.com</email>
      </address>
    </author>

    <author fullname="Bin Wen" initials="B." surname="Wen">
      <organization>Comcast</organization>
      <address>
        <postal>
          <country>United States of America</country>
        </postal>
        <email>Bin_Wen@cable.comcast.com</email>
      </address>
    </author>

    <author fullname="Voitek Kozak" initials="V." surname="Kozak">
      <organization>Comcast</organization>
      <address>
        <postal>
          <country>United States of America</country>
        </postal>
        <email>Voitek_Kozak@comcast.com</email>
      </address>
    </author>

  
    <date year="2026"/>
    
    <area>Routing</area>
    <workgroup>MPLS Working Group</workgroup>
    <keyword>Internet-Draft</keyword>
    <keyword>IOAM</keyword>
    <keyword>MPLS Network Action</keyword>
    <abstract>
    <t>
    In situ Operations, Administration, and Maintenance (IOAM), defined in RFC 9197,
    collects operational and telemetry information in the packet using IOAM-Data-Fields while the packet
    traverses a path between two points in the network. 
    Several IOAM Option-Types are available, for example, Pre-allocated Trace, Proof of Transit (POT),
    Edge-to-Edge (E2E), and Incremental Trace, that can be used to collect information for calculating
    various performance metrics.
    RFC 9326 defines the IOAM Direct Export (IOAM-DEX) Option-Type,
    which is used as a trigger for IOAM data to be directly exported or locally aggregated
    without being pushed into in-flight data packets.
    </t>

    <t>
    MPLS Network Actions (MNA) techniques indicate actions to be performed on any combination of
    Label Switched Paths, MPLS packets, and the node itself, and to transport data needed for these actions.
    This document employs the MNA mechanisms to collect and transport the operational state and telemetry information
    using IOAM-Data-Fields as well as IOAM-DEX.
    </t>

    </abstract>
  </front>
  <middle>

    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
    In situ Operations, Administration, and Maintenance (IOAM) <xref target="RFC9197"/>
    collects operational and telemetry information in the packet using IOAM-Data-Fields while the packet
    traverses a path between two points in the network. 
    Several IOAM Option-Types are available, for example, Pre-allocated Trace, Proof of Transit (POT),
    Edge-to-Edge (E2E), and Incremental Trace, that can be used to collect information for calculating
    various performance metrics.
    Such mechanisms transport the collected information from an IOAM encapsulating node to an IOAM decapsulating
    node (both typically located at the edge of the IOAM domain within the data path).
    </t>

    <t>
    IOAM Direct Export (IOAM-DEX) <xref target="RFC9326"/> is
    an IOAM Option-Type used as a trigger for IOAM data to be directly exported or locally aggregated
    without being pushed into in-flight data packets.
    The exporting method and format are outside the scope of <xref target="RFC9326"/>.
    </t>

    <t>
    MPLS Network Actions (MNA) techniques <xref target="RFC9789"/>
    indicate actions to be performed on any combination of
    Label Switched Paths, MPLS packets, and the node itself,
    and allow for the transport of data needed for these actions.

     <xref target="RFC9994" format="default"/> defines mechanisms for carrying a Network Action Sub-Stack (NAS)
    as part of the MPLS label stack, i.e., the In-Stack MNA solution.

    <xref target="I-D.ietf-mpls-mna-ps-hdr"/> defines mechanisms for carrying MNA and Ancillary Data (AD) below the MPLS label stack,
    i.e., as the Post-Stack MNA solution. 

    <xref target="RFC9791"/> describes various use cases
    that can be realized using the MNA solution, including the IOAM and IOAM-DEX.
    </t>

    <t>
    This document employs the MNA mechanisms to collect and transport the operational state and telemetry information
    using IOAM Option-Types, including Pre-allocated Trace, POT, and E2E, as well as IOAM-DEX.
    The mechanism for exporting the collected information for the IOAM-DEX Option-Type is outside the scope of this document.
    Also, support for the Incremental Trace IOAM Option-Type is outside the scope of this document.
    </t>

      </section>
      
      <section numbered="true" toc="default">
        <name>Conventions Used in This Document</name>
    
         <section anchor="abbreviations" numbered="true" toc="default">
           <name>Acronyms</name>

           <t>
             The terminology defined in <xref target="RFC9789" format="default"/>,
             <xref target="RFC9994" format="default"/>, and
             <xref target="I-D.ietf-mpls-mna-ps-hdr" format="default"/> is used in this document.
           </t>

           <table anchor="acronyms-table">
             <name>Acronyms</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-ps-hdr"/></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</td>
                 <td><xref target="RFC9789"/></td>
               </tr>
               <tr>
                 <td>I2E</td>
                 <td>Ingress to Egress</td>
                 <td><xref target="RFC9789"/></td>
               </tr>
               <tr>
                 <td>E2E</td>
                 <td>Edge to Edge</td>
                 <td><xref target="RFC9197"/></td>
               </tr>
               <tr>
                 <td>IHS</td>
                  <td>I2E, HbH, or Select</td>
                 <td><xref target="RFC9994"/></td>
               </tr>
               <tr>
                 <td>IOAM</td>
                 <td>In situ Operations, Administration, and Maintenance</td>
                 <td><xref target="RFC9197"/></td>
               </tr>
               <tr>
                 <td>IOAM-DEX</td>
                 <td>IOAM Direct Export</td>
                 <td><xref target="RFC9326"/></td>
               </tr>
               <tr>
                 <td>IOAM-DEX-MNA-ISD</td>
                 <td>IOAM Direct Export as MPLS Network Action ISD</td>
                 <td>This document</td>
               </tr>
               <tr>
                 <td>ISD</td>
                 <td>In-Stack Data</td>
                 <td><xref target="RFC9613"/></td>
               </tr>
               <tr>
                 <td>LSE</td>
                 <td>Label Stack Entry</td>
                  <td><xref target="RFC3032"/></td>
               </tr>
               <tr>
                 <td>MNA</td>
                 <td>MPLS Network Action</td>
                 <td><xref target="RFC9789"/></td>
               </tr>
               <tr>
                 <td>MPLS</td>
                 <td>Multiprotocol Label Switching</td>
                 <td><xref target="RFC3032"/></td>
               </tr>
               <tr>
                 <td>NAI</td>
                 <td>Network Action Indicator</td>
                  <td><xref target="RFC9613"/></td>
               </tr>
               <tr>
                 <td>NAL</td>
                 <td>Network Action Length</td>
                 <td><xref target="RFC9994"/></td>
               </tr>
               <tr>
                 <td>NAS</td>
                 <td>Network Action Sub-Stack</td>
                 <td><xref target="RFC9789"/></td>
               </tr>
               <tr>
                 <td>NASL</td>
                 <td>Network Action Sub-Stack Length</td>
                 <td><xref target="RFC9994"/></td>
               </tr>
               <tr>
                 <td>OAM</td>
                 <td>Operations, Administration, and Maintenance</td>
                  <td><xref target="RFC6291"/></td>
               </tr>
               <tr>
                 <td>P bit</td>
                 <td>Post-Stack Data Presence bit</td>
                 <td><xref target="I-D.ietf-mpls-mna-ps-hdr"/></td>
               </tr>
               <tr>
                 <td>POT</td>
                 <td>Proof of Transit</td>
                 <td><xref target="RFC9197"/></td>
               </tr>
               <tr>
                 <td>RLD</td>
                 <td>Readable Label Depth</td>
                 <td><xref target="RFC9789"/></td>
               </tr>
               <tr>
                 <td>PFN</td>
                 <td>Post-Stack First Nibble</td>
                 <td><xref target="I-D.ietf-mpls-mna-ps-hdr"/></td>
               </tr>
               <tr>
                 <td>PSD</td>
                 <td>Post-Stack Data</td>
                 <td><xref target="I-D.ietf-mpls-mna-ps-hdr"/></td>
               </tr>
               <tr>
                 <td>PSMH</td>
                 <td>Post-Stack MPLS Header</td>
                 <td><xref target="I-D.ietf-mpls-mna-ps-hdr"/></td>
               </tr>
               <tr>
                 <td>S bit</td>
                 <td>Bottom of Stack bit</td>
                 <td><xref target="RFC3032"/></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>
               <tr>
                 <td>U bit</td>
                 <td>Unknown Network Action Handling bit</td>
                 <td><xref target="RFC9994"/></td>
               </tr>
             </tbody>
           </table>
         </section>
         
        <section numbered="true" toc="default">
          <name>Requirements Language</name>
    <t>
 The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
 "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
 described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals, as shown here.
        </t>

      </section>
    </section>
    
    <section anchor="ioam-trace-option-application" numbered="true" toc="default">
      <name>Applicability of IOAM and IOAM-DEX in an MPLS Network</name>

    <t>
    Pre-allocated Trace, POT, and E2E IOAM Option-Types <xref target="RFC9197"/> use user packets to collect and transport
    the operational state and telemetry information. 
    This document defines the Post-Stack MNA <xref target="I-D.ietf-mpls-mna-ps-hdr"/> solution supporting
    Pre-allocated Trace, POT, and E2E IOAM Option-Types (<xref target="ioam-mpls-sec-psd"/>).
    </t>

    <t>
    However, for some use cases, e.g., mobile backhaul, in which network resources are closely controlled,
    collecting and transporting telemetry information within a user packet may increase the
    complexity of network operations.
    In such environments, IOAM nodes can collect and export the operational state and telemetry information using IOAM-DEX as defined in <xref target="RFC9326"/>.

    IOAM-DEX collects the on-path telemetry information defined as IOAM data in <xref target="RFC9197"/>. 

    In this document, IOAM-DEX is realized as In-Stack Data in <xref target="ioam-dex-isd-mna-sec"/>
    and as Post-Stack Data in <xref target="ioam-mpls-sec-psd"/>.
    </t>

    <t>
    The procedure defined in this document for carrying IOAM Option-Types using the MNA solution can be
    applied to user traffic packets and active measurement test packets.
    <xref target="I-D.gandhi-ippm-stamp-mpls-hdr"/> uses the mechanisms defined in this document to transport IOAM Option-Types using the MNA solution,
    with Simple Two-Way Active Measurement Protocol (STAMP) test packets for Hop-by-Hop (HbH) and E2E measurements.
    <xref target="I-D.ietf-ippm-on-path-active-measurements"/> also describes
    active measurement methods where the mechanisms defined in this document
    can carry IOAM Option-Types for on-path telemetry in MPLS networks using MNA.
    </t>

</section>

<section anchor="ioam-mna-nas-sec" numbered="true" toc="default">
<name>Realization of IOAM and IOAM-DEX as MPLS Network Actions</name>

<section anchor="ioam-mpls-sec-psd" numbered="true" toc="default">
<name>Realization of IOAM and IOAM-DEX as Post-Stack MNA</name>
    <t>
  The presence of a corresponding Post-Stack MPLS Header (PSMH) is indicated using the P bit in the NAS as defined in <xref target="I-D.ietf-mpls-mna-ps-hdr"/>.
  An example of a NAS and the corresponding PSMH carrying IOAM and IOAM-DEX Option-Types is shown in <xref target="ure-mna-encapsulation-in-mpls-header-e2e"/>.
    </t>
        <figure anchor="ure-mna-encapsulation-in-mpls-header-e2e">
          <name>An Example of In-Stack Network Action Sub-Stack for Post-Stack MPLS Header Carrying IOAM and IOAM-DEX</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 (value 4)    | TC  |S|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Opcode     |  13-bit Data (Format B) |P|IHS|S|  NASL |U| NAL |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                Label                  | TC  |1|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~ Post-Stack MPLS Header for IOAM and IOAM-DEX per Figure 2     ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                Optional Payload + Padding                     ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>

    <t>
    The MNA Label (value 4) is defined in <xref target="RFC9994" format="default"/>.</t>

    <t>
    S (1-bit): The BoS <xref target="RFC3032" format="default"/>.
    </t>

    <t>
    P (1-bit): The P bit is set as specified in <xref target="I-D.ietf-mpls-mna-ps-hdr"/>.
    </t>

    <t>
    The NAL and NASL fields are set as specified in <xref target="RFC9994" format="default"/>.
    </t>

    <t>
    Opcode (7-bit): The opcode is set as specified in <xref target="RFC9994" format="default"/>.
    </t>

    <t>
    The Data (13-bit, next to the Opcode field): The data is set as specified in <xref target="RFC9994" format="default"/>.
    </t>

    <t>
    The U bit is set as specified in <xref target="RFC9994" format="default"/> for In-Stack Network Actions and updated in <xref target="I-D.ietf-mpls-mna-ps-hdr"/> for Post-Stack Network Actions.
    </t>

    <t>
    The IHS scope field is set as defined in <xref target="RFC9994" format="default"/> and updated in <xref target="I-D.ietf-mpls-mna-ps-hdr"/> to indicate
    the I2E, HbH, or Select processing scope for the Post-Stack Network Action and the associated Post-Stack Data when the P bit is set.
    </t> 

    <t>
    If both edge and intermediate nodes need to process the IOAM Option-Types,
    then the IHS scope MUST be set to "HbH, value 0x1". If only edge nodes need to process
    the IOAM Option-Types, then the IHS scope MUST be set to "I2E, value 0x0".
    The I2E scope allows skipping IOAM processing on the intermediate nodes,
    i.e., it avoids the need to parse all IOAM Option-Types to detect the one that requires HbH processing.
    </t>


  <section anchor="ioam-mpls-sec-psd-2" numbered="true" toc="default">
    <name>MPLS Network Action Post-Stack MPLS Header for IOAM and IOAM-DEX</name>

     <t>An example encoding of PSMH carrying IOAM and IOAM-DEX in Post-Stack Data (PSD) is shown in <xref target="ioam-psd-encaps-fig"/>.
     </t>
   
        <figure anchor="ioam-psd-encaps-fig">
          <name>An Example of Post-Stack MPLS Header Carrying IOAM and IOAM-DEX</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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  PFN  |Reserve|  PSMH-Len     | Type = MNA Post-Stack Header  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  MNA-PS-OP  |R|R|   PS-NAL    | Block-Number  |R|IOAM-Opt-Type|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~       IOAM Option-Type and Data Space [RFC9197] [RFC9326]     ~
 ~       Beginning from Namespace-ID                             ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
  
  <t>The Post-Stack MPLS Base Header is added and contains the following fields 
     as defined in <xref target="I-D.ietf-mpls-mna-ps-hdr" format="default"/>.</t>

    <dl newline="false" spacing="normal" indent="2">
         <dt>PFN (4-bit):</dt>
         <dd>
          The Post-Stack First Nibble (PFN) (value 0x0) as defined in <xref target="I-D.ietf-mpls-mna-ps-hdr" format="default"/>.
         </dd>
         <dt>PSMH-Len (8-bit):</dt>
         <dd>
          The PSMH total length in units of 4 octets as defined in <xref target="I-D.ietf-mpls-mna-ps-hdr" format="default"/>.
          The value excludes the first 4-octet unit for Post-Stack MPLS Base Header.
          When carrying N IOAM and IOAM-DEX network actions, PSMH-Len equals (1 + PS-NAL) * N.
         </dd>
         <dt>Type (16-bit):</dt>
         <dd>
          Type for MNA Post-Stack Header (value 1) as defined in <xref target="I-D.ietf-mpls-mna-ps-hdr" format="default"/>. 
         </dd>
    </dl>

    <t>
    The PSMH is added after the Post-Stack MPLS Base Header and contains the Post-Stack Network Action Opcode for IOAM and IOAM-DEX,
    the length in 4-octet units, and the IOAM Option-Type with
    IOAM-Data-Fields in the Post-Stack ancillary data as shown in <xref target="ioam-psd-encaps-fig"/>.
    The IOAM-Data-Fields MUST follow the definitions corresponding to their
    IOAM Option-Types (e.g., see Section 4 of <xref target="RFC9197" format="default"/>
    and the IOAM-DEX Option-Type in Section 3.2 of <xref target="RFC9326" format="default"/>).
    </t>

    <t>An IOAM Option-Type is added to the PSMH and contains the following fields:</t>
        <dl newline="false" spacing="normal" indent="2">

          <dt>MNA-PS-OP (7-bit):</dt>
          <dd>
       Set to Opcode TBA1 (Network Action Opcode for IOAM and IOAM-DEX in PSD)
       for the IOAM Option-Type defined in <xref target="RFC9197" format="default"/>,
       and the IOAM-DEX Option-Type defined in <xref target="RFC9326" format="default"/>.
       </dd>

          <dt>R (3 x 1-bit):</dt>
          <dd>
       Three reserved bits appear in the PSMH row: two bits following MNA-PS-OP
       and one bit preceding IOAM-Opt-Type. All reserved bits MUST be set to 0 on
       transmission and MUST be ignored on receipt.
          </dd>

          <dt>IOAM-Opt-Type (7-bit):</dt>
          <dd>
       The field to carry the IOAM Option-Type, as defined in
       the "IOAM Option-Type Registry" in <xref target="RFC9197" format="default"/> 
       and <xref target="RFC9326" format="default"/>.
       </dd>

          <dt>PS-NAL (7-bit):</dt>
          <dd>
       Unsigned integer representing the length of the IOAM-Data-Fields in 4-octet units for the MNA-PS-OP. The value excludes the first 4-octet unit.
         </dd>

          <dt>IOAM Option-Type and Data Space:</dt>
          <dd>
       IOAM-Data-Fields as specified by the
       IOAM-Opt-Type field, beginning from the Namespace-ID field. IOAM-Data-Fields are defined according to
       the IOAM Option-Type (e.g., see Section 4 of
       <xref target="RFC9197" format="default"/> and Section 3.2 of <xref target="RFC9326" format="default"/>).
       </dd>

          <dt>Block-Number (8-bit):</dt>
          <dd>
       The Block-Number is used for the alternate marking method <xref target="RFC9341"/> to
       aggregate the IOAM-Data-Fields collected in the data plane and to
       correlate IOAM-Data-Fields exported from different nodes along the packet path,
       e.g., to compute measurement metrics for each block of a data flow.
       When the Flow ID field is present in the IOAM-Data-Fields in the PSMH, 
       the Block-Number is scoped per data flow within the IOAM Namespace identified by the Namespace-ID field.
       When the Flow ID field is absent, the Block-Number is scoped per IOAM Namespace
       (identified by the Namespace-ID field) and applies to all flows sharing that Namespace.
       The Block-Number MUST be initialized to 0 at the start of operation and wraps from 255 back to 0 on overflow.
       It is incremented sequentially at every measurement interval configured at the encapsulating node.
       When the alternate marking method is not used, the Block-Number SHOULD be set to 0.
         </dd>

        </dl>

      <section anchor="ioam-mpls-sec-psd-3" numbered="true" toc="default">
<name>Multiple IOAM and IOAM-DEX Option-Types in PSMH</name>

    <t>
    An example of multiple Post-Stack Network Actions with the same scope carrying different IOAM 
    Option-Types is shown in <xref target="ure-ioam-network-action-in-mpls-header"/>.
    </t>

     <figure anchor="ure-ioam-network-action-in-mpls-header">
          <name>Example of Multiple Post-Stack Network Actions with IOAM and IOAM-DEX with the Same Scope</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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  PFN  |Reserve|  PSMH-Len     | Type = MNA Post-Stack Header  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  MNA-PS-OP  |R|R|   PS-NAL    | Block-Number  |R|IOAM-Opt-Type|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~  IOAM Option-Type and Data Space [RFC9197] [RFC9326]          ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                                                               .
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  MNA-PS-OP  |R|R|   PS-NAL    | Block-Number  |R|IOAM-Opt-Type|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~  IOAM Option-Type and Data Space [RFC9197] [RFC9326]          ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                 Optional Payload + Padding                    ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ]]></artwork>
        </figure>

   </section>
   </section>

      </section>

<section anchor="ioam-dex-isd-mna-sec" numbered="true" toc="default">
<name>Realization of IOAM-DEX as In-Stack MNA</name>
    <t>
    This document adopts the IOAM-DEX Option-Type format
    defined in <xref target="RFC9326"/> to support IOAM-DEX in an MPLS network using
    MNA In-Stack Data (ISD) <xref target="RFC9994" format="default"/>. 
    </t>

    <t>
    To support the direct export of the operational state and telemetry information,
    the IOAM-DEX-MNA-ISD Binary Large OBject (blob)
    is placed as part of the ISD block in an MPLS label stack according to the MNA encoding procedures 
    defined in <xref target="RFC9994" format="default"/>. 
    </t>

    <t>
    By setting the IHS field, the IOAM-DEX-MNA-ISD can be configured to operate in HbH, I2E, or Select modes <xref target="RFC9789"/> to collect
    the operational state and telemetry information using an MNA Opcode (<xref target="ioam-dex-mna-option-fig"/>).
    </t>

   <figure anchor="ioam-dex-mna-option-fig">
   <name>An Example of IOAM-DEX Encapsulation as an MNA Opcode</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 (value 4)    | TC  |S|    TTL        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |Opcode = TBA2|  13-bit Data (Format B) |P|IHS|S|  NASL |U| NAL |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~1|     IOAM-DEX-MNA-ISD per Figure 5         |S|               ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>

    <t>Here, the enclosed elements are defined as follows:</t>
    <ul spacing="normal">
    <li>The MNA Label (value 4) is defined in <xref target="RFC9994" format="default"/>.</li>
    <li>S (1-bit): The BoS <xref target="RFC3032" format="default"/>.</li>
    <li>P (1-bit): The P bit is set as specified in <xref target="I-D.ietf-mpls-mna-ps-hdr"/>.</li>
    <li>The IHS, U bit, and NAL fields are set as specified in <xref target="RFC9994" format="default"/>.</li>
    <li>NASL (4-bit): The number of LSEs that compose the IOAM-DEX-MNA-ISD blob.</li>
    <li>Opcode (7-bit): Set to TBA2 for the Network Action Opcode for IOAM-DEX in ISD.</li>
    <li>Data (13-bit): Data field is not used and MUST be set to 0.</li>
    <li>IOAM-DEX-MNA-ISD: IOAM-DEX in MPLS Network Action ISD encoding.</li>
      </ul>

    <t>
    IOAM-DEX MAY be carried simultaneously as both In-Stack Data using Opcode TBA2 and Post-Stack Data
    using Opcode TBA1 in the same MPLS packet. Each Network Action operates independently: TBA2 triggers
    direct export at nodes processing the In-Stack NAS, while TBA1 triggers direct export at nodes
    processing the Post-Stack NAS. 
    The Opcodes TBA1 and TBA2 MUST NOT be carried in the same NAS; otherwise the packet MUST be treated as malformed and MUST be dropped.
    </t>

<section anchor="ioam-dex-isd-mna-enc-sec" numbered="true" toc="default">
<name>IOAM-DEX Option-Type Encoding as MNA ISD</name>

    <t>
    The IOAM-DEX-MNA-ISD blob in a NAS uses the LSE Format D, as defined in Section 4.4 of <xref target="RFC9994" format="default"/>,
    that maps to the IOAM-DEX Option-Type format <xref target="RFC9326"/>. In addition to the requirement to preserve the S bit, the most significant bit
    in LSE Format D is always set to 1, avoiding a possible mix-up of the LSE with one of the Base Special Purpose Labels <xref target="RFC9994"/>.
    The format of the IOAM-DEX-MNA-ISD blob in an NAS is shown in <xref target="ioam-dex-fig"/>. 
    </t>

 <figure anchor="ioam-dex-fig">
  <name>IOAM-DEX Option-Type Format for MPLS Network Action ISD</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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |1|         Namespace-ID          | Reserved  |S|     Flags     |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |1|         IOAM-Trace-Type-MNA               |S|O|R| Ext-Flags |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |1|         Flow ID MNA (Optional)            |S|  Flow ID MNA  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |1|         Sequence Number MNA (Optional)    |S|  Seq Num MNA  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
    <t>
    Where fields are defined as follows:
    </t>
    <ul spacing="normal">
    <li>Namespace-ID (16-bit): Identifier of the IOAM Namespace, as defined in Section 3.2 of <xref target="RFC9326"/>.</li>
    
    <li>Reserved (6-bit): The Reserved field MUST be set to 0 on transmit and ignored on receipt.</li>
    
    <li>Flags (8-bit): The flags field comprises eight one-bit subfields. The subfields in the Flags field are
    allocated by IANA in the IOAM DEX Flags registry, as defined in Section 4.2 of <xref target="RFC9326"/>.</li>
    
    <li>
    IOAM-Trace-Type-MNA (22-bit): The IOAM-Trace-Type-MNA corresponds to the IOAM-Trace-Type field
    defined in Section 3.2 of <xref target="RFC9326"/>. The interpretation of bit
    positions, from bit 0 through bit 21, is as specified in <xref target="RFC9197"/>.
    Note that bits as specified
    in <xref target="RFC9197"/> are right-shifted one bit, so for example, bit 0 in
    <xref target="RFC9197"/> (leftmost bit for hop_Lim and node_id in short format)
    is mapped to bit 1 (second leftmost bit) in the MNA encoding.
    The registry that contains the assigned code points is found 
    in IANA's IOAM Trace-Type registry <xref target="IANA-IOAM-Trace-Type"/>.
    </li>
    
    <li>O (1-bit): This is a one-bit flag identical to the interpretation of bit 22 of the IOAM-Trace-Type field
    as defined in Section 3.2 of <xref target="RFC9326"/>, marked as "variable-length Opaque State Snapshot"
    per <xref target="RFC9197"/>; assigned code points are found in IANA's IOAM Trace-Type registry <xref target="IANA-IOAM-Trace-Type"/>.</li>
    
    <li>R (1-bit): This is a one-bit flag identical to the interpretation of bit 23 of the IOAM-Trace-Type field
    as defined in Section 3.2 of <xref target="RFC9326"/>, marked as "reserved" per <xref target="RFC9197"/>;
    assigned code points are found in IANA's IOAM Trace-Type registry <xref target="IANA-IOAM-Trace-Type"/>.
    Similarly to <xref target="RFC9326"/>, the R bit is reserved to allow for future extensions of the IOAM-Trace-Type-MNA bit field,
    i.e., it indicates the presence of the extended
    IOAM-Trace-Type-MNA field in the next LSE in Format D.
    The format of that extended LSE is outside the scope of this document and reserved for future specification.
    </li>

    <li>The concatenation of the 22-bit IOAM-Trace-Type-MNA field with O and R flags, explained above, is 
    identical to the 24-bit IOAM-Trace-Type field in Section 3.2 of <xref target="RFC9326"/>, and in the interpretation of those bits
    as defined in <xref target="RFC9197"/> and assigned code points found in IANA's IOAM Trace-Type registry <xref target="IANA-IOAM-Trace-Type"/>.</li>
    
    <li>Ext-Flags (6-bit): This field comprises six one-bit subfields. The allocation of
    the subfields in the Ext-Flags field is according to Section 4.3 of <xref target="RFC9326"/>.
    Four flags have been assigned by IANA: two as defined in Section 4.3 of <xref target="RFC9326"/> indicating the presence of
    the optional Flow ID MNA and Sequence Number MNA fields, and two as defined in Section 4.1 of <xref target="RFC9630"/> indicating the presence of
    the optional Multicast Branch ID field.
    The length of the Ext-Flags field in the IOAM-DEX Option-Type in MNA
    is shorter by two one-bit fields compared to the length of the Extension Flags field defined in Section 3.2 of <xref target="RFC9326"/>.
    In the 6-bit Ext-Flags field of the IOAM-DEX-MNA-ISD header, four flags have been mapped to those IANA
    assigned flags in the IOAM-DEX Option-Type, and two flags (corresponding to unassigned bits in the
    RFC 9326 Extension-Flags field) remain unassigned.
    <xref target="ext-flag-fig"/> displays the detailed format of the Ext-Flags field.</li>
    
      <li>In the IOAM-DEX Option-Type defined in <xref target="RFC9326"/>, the IOAM-Trace-Type and Reserved fields together form the second 32-bit word, aligning the optional fields to 4-octet boundaries.
    In the case of the IOAM-DEX in MNA, for optional fields such as Flow ID MNA and Sequence Number MNA,
    such alignment is achieved without adding such Reserved field as padding.</li>
 
    <li>Flow ID MNA: An optional 4-octet field containing a 30-bit Flow ID (after removing leading 1 and S bits). The semantics of the Flow ID MNA field are 
    as those of the Flow ID field defined in Section 3.2 of <xref target="RFC9326"/>, with the following differences.
    The Flow ID MNA field carries a 30-bit value, compared to the 32-bit Flow ID field in <xref target="RFC9326"/>;
    therefore, the Flow ID space differs accordingly, and the 30-bit value will wrap around faster than the 32-bit value.
    The most significant bit MUST be set to 1.
    The bit 23 MUST be set according to the definition of the S bit in <xref target="RFC3032"/>.</li>
    
    <li>Sequence Number MNA: An optional 4-octet field containing a 30-bit sequence number (after removing leading 1 and S bits). 
    The semantics of the Sequence Number MNA field are 
    as those of the Sequence Number field defined in Section 3.2 of <xref target="RFC9326"/>, with the following differences.
    The Sequence Number MNA field carries a 30-bit value, compared to the 32-bit Sequence Number field in <xref target="RFC9326"/>;
    therefore, the sequence number space differs accordingly, and the 30-bit value will wrap around faster than the 32-bit value.
    The most significant bit MUST be set to 1.
    The bit 23 MUST be set according to the definition of the S bit in <xref target="RFC3032"/>.
    In MPLS networks, when it is known that the label stack information is used for load-balancing flows, the 19-bit-long part of the
    Sequence Number MNA, starting from the bit 1 position of the LSE,
    MUST remain immutable for a particular packet flow that the value of the Flow ID MNA field identifies.
    In MPLS networks, when it is known that other load-balancing techniques are used, all bits of the Sequence Number MNA field can be varied.
    Mechanisms to learn the load-balancing techniques used by the nodes in MPLS networks are outside the scope of this document.
    </li>

</ul>

<figure anchor="ext-flag-fig">
   <name>Ext-Flags Field Format</name>
  <artwork name="" type="" align="left" alt=""><![CDATA[
                          0 1 2 3 4 5
                         +-+-+-+-+-+-+
                         |F|Q|N|I|A|A|
                         +-+-+-+-+-+-+
   ]]></artwork>
</figure>

    <t>Where fields are defined as follows:</t>
    <ul spacing="normal">
    <li>F (1-bit): One-bit flag. When the F flag is set to 1, it indicates the presence of the Flow ID field in the IOAM-DEX-MNA-ISD header.</li>
    <li>Q (1-bit): One-bit flag. When the Q flag is set to 1, it indicates the presence of the Sequence Number field in the IOAM-DEX-MNA-ISD header. The designation as Q flag is used to avoid conflicting with the existing S bit for Bottom-of-Stack (BoS) in the MPLS header. This flag corresponds to the Sequence Number flag (labeled "S" in <xref target="RFC9630"/>) in the IOAM DEX Extension-Flags registry.</li>
    <li>N (1-bit): One-bit flag. When the N flag is set to 1, it indicates the presence of the Multicast Branching Node ID in the Multicast Branch ID field, as defined in Section 4.1 of <xref target="RFC9630"/>.</li>
    <li>I (1-bit): One-bit flag. When the I flag is set to 1, it indicates the presence of the Multicast Branching Interface Index in the Multicast Branch ID field, as defined in Section 4.1 of <xref target="RFC9630"/>. The N and I flags MUST be both set or both cleared; otherwise the header is considered malformed and the packet MUST be dropped.</li>
    <li>A (1-bit): Unassigned one-bit flags. They MUST be set to zero on transmission and MUST be ignored upon receipt. 
    </li>
    </ul>


</section>

</section>
</section>

    <section anchor="considerations-ioam-dex-mpls" numbered="true" toc="default">
      <name>Considerations for IOAM and IOAM-DEX in MPLS Networks</name>
      
    <section anchor="ingress-to-egress-scope" numbered="true" toc="default">
      <name>Ingress-to-Egress Scope IOAM and IOAM-DEX Network Actions </name>

    <t>The Network Actions with I2E scope carry IOAM Option-Types that
    require processing on the encapsulating and egress nodes only.
    </t>
 
    <t>
    The IOAM Option-Type carried can be the IOAM E2E
    Option-Type (value 3) defined in <xref target="RFC9197" format="default"/>
    or the IOAM-DEX Option-Type (value 4) defined
    in <xref target="RFC9326" format="default"/>.
    The Network Actions with I2E scope MUST NOT carry any IOAM Option-Type that
    requires IOAM processing on the intermediate nodes, as it will
    not be processed by them when the IHS scope is set to "I2E, value 0x0".</t>

        <t>
    The IOAM and IOAM-DEX Network Action procedure with I2E scope is summarized as follows:</t>
         <ul spacing="normal">
          <li>
    The encapsulating node inserts a NAS with the  
    IHS scope set to "I2E, value 0x0", as well as one or more Network Actions for IOAM and IOAM-DEX
    in the MPLS packet.</li>
      <li>The egress node processes the IOAM-Data-Fields using the
    procedures defined in <xref target="RFC9197" format="default"/> and <xref target="RFC9326" format="default"/>.  An example of IOAM
    processing is to export the IOAM-Data-Fields for streaming telemetry.</li>
      <li>The egress node MUST remove the Network Actions and IOAM-Data-Fields
    from the received packet. The decapsulated packet is forwarded 
    downstream similar to the regular data packets or terminated locally.</li>
        </ul>
      </section>
      
    <section anchor="hop-by-hop-scope" numbered="true" toc="default">
      <name>Hop-by-Hop Scope IOAM and IOAM-DEX Network Actions</name>

    <t>The Network Actions with HbH scope carry IOAM Option-Types that require
    processing at the intermediate and/or encapsulating and egress nodes.
    </t>

    <t>
    The IOAM Option-Type carried can be
    Pre-allocated Trace (value 0), POT (value 2), or E2E (value 3) defined in <xref target="RFC9197" format="default"/>, or IOAM-DEX (value 4) defined
    in <xref target="RFC9326" format="default"/>.</t> 

    <t>
    Note that the MPLS Network Action defined in this document is not supported for the IOAM Incremental Trace Option-Type (value 1), which requires HbH processing.
    </t>

    <t>
    The IOAM and IOAM-DEX Network Action procedure with HbH scope is summarized as follows:</t>

        <ul spacing="normal">
          <li>
    The encapsulating node inserts a NAS 
    with the IHS scope set to "HbH, value 0x1", as well as one or more Network Actions for IOAM and IOAM-DEX 
    in the MPLS packet.</li>
          <li>The intermediate node that is enabled for the IOAM function
    processes the IOAM-Data-Fields as defined in
    <xref target="RFC9197" format="default"/> and <xref target="RFC9326" format="default"/>
    when the node recognizes the HbH scope in the NAS.</li>
          <li>The intermediate node forwards the data packet downstream.</li>
          <li>The processing on the egress node is the same as in the I2E case.</li>
        </ul>

    <t>Both HbH and I2E scope Network Actions for IOAM and IOAM-DEX may be carried in the Post-Stack MNA in an MPLS packet.
    In this case, the PSMH carrying HbH-scoped Network Actions MUST be added after the BoS
    and before the PSMH carrying I2E-scoped Network Actions.
    This minimizes the Readable Label
    Depth (RLD) <xref target="I-D.ietf-mpls-mna-ps-hdr"/> required for intermediate node processing.
    </t>
    </section>
      
       <section anchor="node-capability" numbered="true" toc="default">
        <name>Node Capability</name>
    <t>
    An MNA-capable egress node that supports the network action for IOAM and IOAM-DEX may not support the specific IOAM Option-Type or IOAM-Data-Fields 
    carried in the packet.  In that case, the egress node MUST handle the Network Action
    according to the U bit as defined in <xref target="RFC9994" format="default"/> and updated in <xref target="I-D.ietf-mpls-mna-ps-hdr"/>.
    </t>

    <t>
    The MNA-capable intermediate node that does not support the Network Action for IOAM and IOAM-DEX, or the IOAM Option-Type or IOAM-Data-Fields carried in the packet,
    MUST handle the Network Action according to the U bit as defined in <xref target="RFC9994" format="default"/> and updated in <xref target="I-D.ietf-mpls-mna-ps-hdr"/>.
    </t>

    <t>
    The intermediate node that does not support the MNA skips processing the IOAM and IOAM-DEX functions.
    </t>

    <t>
    The encapsulating node needs to know if the intermediate and egress nodes can support the IOAM and IOAM-DEX network actions.
    Information about the IOAM and IOAM-DEX capabilities of the nodes may be configured, collected through management protocols, 
    or distributed by control protocols (such as advertising by routing protocols). 
    The signaling extension for this capability exchange is outside the scope of this document.
    </t>

      </section>
      
        <section anchor="nested-mpls-encapsulation" numbered="true" toc="default">
        <name>Nested MPLS Encapsulation</name>
    <t>
    When a packet is received with an MPLS Network Action for IOAM-DEX in ISD or IOAM and IOAM-DEX in PSD, and the nested MPLS
    encapsulating node needs to add a different Network Action for IOAM-DEX in ISD, the node MUST add
    a new NAS with the network action for IOAM-DEX ISD as part of the new MPLS encapsulation.
    </t>

    <t>
    When a packet is received with an MPLS header, the nested MPLS
    encapsulating node MUST NOT add new Network Action for IOAM and IOAM-DEX in PSD.
    This is because inserting a PSMH in an MPLS-encapsulated packet received from the network is not permitted by  <xref target="I-D.ietf-mpls-mna-ps-hdr"/>.
    </t>

       </section>

     <section anchor="readable-label-depth-consideration" numbered="true" toc="default">
        <name>Readable Label Depth Consideration</name>
    <t>
    The encapsulating node needs to ensure that the IOAM Option-Types and their IOAM-Data-Fields and IOAM-DEX data in a NAS and 
    the associated PSMH are added within the RLD <xref target="I-D.ietf-mpls-mna-ps-hdr"/>
    of the downstream MNA-capable nodes so that they can process the IOAM-Data-Fields and IOAM-DEX data.
    </t>
       </section>
       </section>


           <section anchor="operational" numbered="true" toc="default">
      <name>Operational Considerations</name>
    <t>
    Operational considerations discussed in <xref target="RFC9994" format="default"/> and  
    <xref target="I-D.ietf-mpls-mna-ps-hdr"/>, management considerations discussed in <xref target="RFC9789"/>,
    and management and deployment considerations discussed in <xref target="RFC9197"/> apply to this document.
    The performance considerations discussed in Section 5 of <xref target="RFC9326"/> are also applicable here.
    </t>

    <t>
    Additional operational considerations are described in <xref target="considerations-ioam-dex-mpls"/> for deploying IOAM and IOAM-DEX in MPLS networks.
    Further operational considerations also include policies controlling the processing of the collected operational state and telemetry information, and their transport.
    </t>

    <t>
    An implementation MAY collect the following counters:
    </t>

    <ul>
        <li> Packets with IOAM network actions received</li>
        <li> Packets with IOAM-DEX network actions received</li>
        <li> Packets with IOAM network actions dropped due to unknown IOAM function</li>
        <li> Packets with IOAM-DEX network actions dropped due to unknown IOAM-DEX function</li>
        <li> Packets with IOAM dropped due to malformed network action</li>
        <li> Packets with IOAM-DEX dropped due to malformed network action</li>
    </ul>


    </section>

    <section anchor="security" numbered="true" toc="default">
      <name>Security Considerations</name>
    <t>
    Security considerations discussed in <xref target="RFC9197" format="default"/>, 
    <xref target="RFC9326" format="default"/>, <xref target="RFC9341" format="default"/>, <xref target="RFC9630" format="default"/>, 
    <xref target="RFC9789" format="default"/>, <xref target="RFC9994" format="default"/>, and  
    <xref target="I-D.ietf-mpls-mna-ps-hdr"/> apply to this document.
    </t>

    <t>
    The usage of MPLS Network Actions defined in this document for IOAM and IOAM-DEX is intended for 
    deployment in a single network administrative domain.
    As such, it assumes that the operator enabling the IOAM and IOAM-DEX  
    operations has previously verified the integrity of the path.
    However, operators need to properly secure the IOAM and IOAM-DEX
    in the domain to avoid malicious configuration and use, which could include
    injecting malicious IOAM and IOAM-DEX packets into the domain.
    </t>

    </section>

    <section anchor="iana-consider" numbered="true" toc="default">
    <name>IANA Considerations</name>
      <section anchor="iana-option-consider" numbered="true" toc="default">
      <name>Network Action Opcodes</name>
      <t>IANA is requested to assign code points from its Network Action Opcodes registry
      (created in <xref target="RFC9994" format="default"/> and updated in <xref target="I-D.ietf-mpls-mna-ps-hdr"/>)
      as specified in <xref target="iana-ioam-dex-mna-option-tbl"/>.</t>
      
          <table anchor="iana-ioam-dex-mna-option-tbl" align="center">
          <name>Network Action Opcodes</name>
          <thead>
            <tr>
              <th align="left">Opcode</th>
              <th align="left">Description</th>
              <th align="left">In-Stack Only, Post-Stack Only, In-Stack and Post-Stack</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>

          <tr>
            <td align="left">TBA1</td>
            <td align="left">Network Action for IOAM and IOAM-DEX in PSD</td>
            <td align="left">Post-Stack Only</td>
            <td align="left">This document</td>
          </tr>

           <tr>
             <td align="left">TBA2</td>
             <td align="left">Network Action for IOAM-DEX in ISD</td>
             <td align="left">In-Stack Only</td>
             <td align="left">This document</td>
           </tr>

         </tbody>
        </table>
        
      </section>
      
    </section>


      
      </middle>
  
  <back>
  <references>
  <name>References</name>
  <references>
        <name>Normative References</name>
      <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-mpls-mna-ps-hdr.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3032.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9197.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9326.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9341.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9630.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9789.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9994.xml"/>

    </references>
    
    <references>
    <name>Informative References</name>
      <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-gandhi-ippm-stamp-mpls-hdr.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-ippm-on-path-active-measurements.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5462.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6291.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9613.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9791.xml"/>
      <reference anchor="IANA-IOAM-Trace-Type" target="https://www.iana.org/assignments/ioam/ioam.xhtml#trace-type">
        <front>
            <title>IOAM Trace-Type</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>
        
          </references>
    
    </references>

  <section anchor="appendix-examples" numbered="false" toc="default">
    <name>Appendix A: Examples</name>

     <section anchor="in-stack-post-stack-processing-order" numbered="false" toc="default">
    <name>Example A1: In-Stack and Post-Stack Network Action Processing Order</name>

    <t>
    The PSMH Start Offset Network Action can be added to interleave Post-Stack 
    Network Actions with In-Stack Network Actions.  The following example shows how to process the
    Post-Stack Network Action before some of the In-Stack Network Actions.
    </t>

      <figure anchor="In-Stack-NA-Ordering-3">
        <name>Example of Post-Stack and In-Stack Network Action 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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |           MNA Label (value 4)         | TC  |0|    TTL        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Opcode=L    |      Ancillary Data     |1|IHS|0| NASL=3|U|NAL=0|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Opcode=1    |      Flag-Based NAIs          |0| NAIs  |U|NAL=0|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Opcode=TBA3 |      0                        |0|  0    |U|NAL=0|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Opcode=M    |      Ancillary Data           |1|  AD   |U|NAL=0|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | PFN   |Reserve|    PSMH-Len   | Type = MNA Post-Stack Header  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |Opcode = TBA1|R|R|   PS-NAL    | Block-Number  |R|IOAM-Opt-Type|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~       IOAM Option-Type and Data Space [RFC9197] [RFC9326]     ~
 ~       Beginning from Namespace-ID                             ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>
      </figure>

    <t>
    In this example, shown in <xref target="In-Stack-NA-Ordering-3"/>, opcode L is processed first, followed by opcode 1 for Flag-Based NAIs, 
    then opcode TBA3 (PSMH Start Offset defined in <xref target="I-D.ietf-mpls-mna-ps-hdr"/>), and the opcode TBA1 in the corresponding PSMH,
    and finally opcode M.
    </t>

    <t>
    The network action allocation for Opcode L and Opcode M is outside the scope of this document.
    </t>

  </section>
  </section>
        
        <section numbered="false" toc="default">
      <name>Acknowledgments</name>
<t>
    The authors would like to thank Adrian Farrel and Xueyan Song for reviewing this document and providing review comments.

    The authors would also like to thank Patrick Khordoc, Sagar Soni, Shwetha Bhandari, Vengada Prasad Govindan, Tarek Saad, Stewart Bryant, Xiao Min, Jaganbabu Rajamanickam, and Cheng Li for reviewing the early version of this document. 

    The authors would also like to thank Mach Chen, Andrew Malis, Matthew Bocci, and Nick Delregno for the MPLS-RT expert review of the early version of this document.

    The authors also thank Matthew Bocci for the early Rtgdir review and Giuseppe Fioccola for the PerfMetrDir review, which helped improve this document.
</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[

Zafar Ali
Cisco Systems, Inc.
Email: zali@cisco.com

Frank Brockners
Cisco Systems, Inc.
Germany
Email: fbrockne@cisco.com

Loa Andersson
Huawei Technologies
Email: loa@pi.nu

   ]]></artwork>

    </section>

  </back>

</rfc>
