<?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-01" 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 MNA">Supporting In Situ Operations, Administration and Maintenance Using MPLS Network Actions</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-mpls-mna-ioam-01"/>
    
     <author fullname="Rakesh Gandhi" initials="R." surname="Gandhi" role="editor">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Canada</street>
        </postal>
        <email>rgandhi@cisco.com</email>
      </address>
    </author>
  
    <author initials="G." surname="Mirsky" fullname="Greg Mirsky" role="editor">
      <organization>Ericsson</organization>
      <address>
        <email>gregimirsky@gmail.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="Haoyu Song" initials="H." surname="Song">
      <organization>Futurewei Technologies</organization>
      <address>
        <postal>
        <street> </street>
          <city/>
          <country>USA</country>
        </postal>
        <email>haoyu.song@futurewei.com</email>
      </address>
    </author>

    <author fullname="Bin Wen" initials="B." surname="Wen">
      <organization>Comcast</organization>
      <address>
        <email>Bin_Wen@cable.comcast.com</email>
      </address>
    </author>
  
    <date year="2025"/>
    
    <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,
is an on-path telemetry method to collect and transport the operational state
and telemetry information using, for example, Preallocated or Incremental IOAM Option,
that can be used to calculate various performance metrics.
RFC 9326 defined the IOAM Direct Export (IOAM-DEX) Option 
in which the operational state and telemetry information are collected according
to the specified profile and exported in a manner and format defined by a local policy.
   </t>
   <t>
   MPLS Network Actions (MNA) techniques are meant to indicate actions to be performed on any combination of
Label Switched Paths (LSPs), MPLS packets, and the node itself, and also to transfer data needed for these actions.
This document explores the MNA mechanisms to collect and transport the on-path operational state, and telemetry information
IOAM data fields, including IOAM-DEX Option.
</t>
    </abstract>
  </front>
  <middle>

    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
In situ OAM (IOAM) <xref target="RFC9197"/> is an on-path telemetry method to collect and transport the operational state
and telemetry information that can be used to calculate various performance metrics.
Several IOAM Option types (e.g., Pre-allocated and Incremental) use the user packet to collect the operational state
and telemetry information. Such a mechanism transports the collected information to an IOAM decapsulating
node (typically located at the edge of the IOAM domain within the data packet).
IOAM Direct Export (IOAM-DEX) <xref target="RFC9326"/> is
an IOAM Option type. In IOAM-DEX, the operational state and telemetry
information are collected according to the specified profile and exported
in a manner and format defined by a local policy.
</t>

<t>
MPLS Network Actions (MNA) techniques <xref target="I-D.ietf-mpls-mna-fwk"/>
indicate actions to be performed on any combination of
Label Switched Paths (LSPs), MPLS packets, the node itself,
and also allow for the transfer of data needed for these actions.
 <xref target="I-D.ietf-mpls-mna-hdr"/> defines mechanisms for carrying Network Action Sub-Stack (NAS)
as part of the MPLS label stack, i.e., In-Stack Data (ISD) MNA solution.
<xref target="I-D.jags-mpls-ps-mna-hdr"/> defines mechanisms for carrying MNA and Ancillary Data (AD) outside the MPLS label stack,
i.e., as Post-Stack Data (PSD) MNA solution. <xref target="I-D.ietf-mpls-mna-usecases"/> describes various use cases
that can be realized using MNA techniques, including IOAM Pre-allocated, Incremental, and IOAM-DEX Option types.
</t>

<t>
This document describes how MNA can be used for collecting and transporting on-path operational state
and telemetry information using IOAM data fields for IOAM Option types, including IOAM-DEX.
Specifying the mechanism of exporting collected information in case of the IOAM-DEX Option is outside the scope of this document.
</t>

      </section>
      
      <section numbered="true" toc="default">
        <name>Conventions Used in this Document</name>
    
         <section title="Acronyms">

          <t>OAM:                  Operations, Administration, and Maintenance</t>
          <t>HBH:                  Hop-By-Hop</t>
          <t>I2E:                     Ingress-To-Egress</t>
          <t>IHS:                    Ingress-To-Egress (I2E), Hop-By-Hop (HBH) or Select Scope</t>
          <t>IOAM:                  In situ OAM</t>
          <t>IOAM-DEX:          IOAM Direct Export</t>
          <t>IOAM-DEX-ISD-MNA: IOAM Direct Export as In-Stack Data MPLS Network Action</t>
          <t>ISD:                 In-Stack Data</t>
          <t>PSD:                Post-Stack Data</t>
          <t>PSH:                Post-Stack Header</t>
          <t>LSP:               Label Switched Path</t>
          <t>LSE:               Label Stack Entry</t>
           <t>MPLS:          Multiprotocol Label Switching</t>
            <t>MNA:          MPLS Network Action</t>
            <t>NAI:             Network Action Indicator</t>
            <t>NAS:           Network Action Sub-stack</t>
            <t>NASL:         Network Action Sub-stack Length</t>
         </section>    
         
        <section numbered="true" toc="default">
          <name>Requirements Language</name>
          <t>
   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
   NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
   "MAY", and "OPTIONAL" in this document are to be interpreted as
   described in BCP 14 <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>
    
    <section anchor="ioam-trace-option-application" numbered="true" toc="default">
      <name>Applicability of IOAM Option Types in an MPLS Network</name>
      <t>
Pre-allocated, Incremental, and Edge-to-Edge IOAM Option types <xref target="RFC9197"/> use user packets to collect and transport
the operational state and telemetry information. In some environments, for example, data center networks, this technique
is useful as the available bandwidth and the use of jumbo frames can accommodate the increase of the packet payload.
This document defines the PSD MNA-based (<xref target="I-D.jags-mpls-ps-mna-hdr"/>) solution supporting
Pre-allocated, Incremental, and Edge-to-Edge IOAM Option types (<xref target="ioam-mpls-sec"/>).
</t>
<t>
However, for some use cases, e.g., mobile backhaul, in which network resources are closely controlled,
collecting and transporting the telemetry information within a data packet
may noticeably decrease the cost-efficiency of network operations. Although the operational state and
telemetry information are essential for network automation (Section 4 of <xref target="RFC8969"/>),
its delivery is not as critical as user packets. As such,
collecting and transporting the operational state and telemetry information using the management plane
is a viable option for some environments. IOAM-DEX <xref target="RFC9326"/> is capable of collecting all of IOAM data fields
defined in <xref target="RFC9197"/>. The processing and transport of the collected information are controlled by a local policy which
is outside the scope of this specification. The performance considerations discussed in Section 5 of <xref target="RFC9326"/> are applicable here.
In this document, the realizations of IOAM-DEX using ISD MNA approach (<xref target="I-D.ietf-mpls-mna-hdr"/> and
PSD MNA (<xref target="I-D.jags-mpls-ps-mna-hdr"/>) are defined in <xref target="ioam-dex-isd-mna-sec"/> and <xref target="ioam-mpls-sec"/>, respectively.
</t>
</section>

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

<section anchor="ioam-mpls-sec" numbered="true" toc="default">
<name>Signaling of IOAM as a Post-Stack Data MPLS Network Action</name>
<t>
The presence of a PSD MNA is signaled using a Network Action Sub-stack is defined in <xref target="I-D.jags-mpls-ps-mna-hdr"/>
and 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 Network Action Sub-Stack Signaling a Post Stack Data MNA.</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |               MNA Label               | TC  |0|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Opcode     |      Data (Format B)    |P|IHS|0|U| NASL  | NAL |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Opcode     |      Data (Format C)          |0|U| Data  | NAL |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                Label                  | TC  |1|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                Post-Stack Header (Optional)                   |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                           IOAM                                ~
 ~                      Post-stack Data                          ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                          Payload                              ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>

        <t>The MNA Label is defined in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>.</t>

    <t>The IHS scope field defined in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/> is used to indicate 
    that I2E or HBH or Select processing is required for the  Network Action and Ancillary Data.</t> 

     <t>
    If both edge and intermediate nodes need to process the IOAM data fields  
    then IHS scope MUST be set to "HBH, value 0x1". If only edge nodes need to process 
    the IOAM data fields then IHS scope MUST be set to "I2E, value 0x0".
    The HBH scope allows to skip the IOAM data processing on the intermediate nodes 
    i.e., avoids the need to parse all IOAM data fields to detect the HBH option type.</t>

    <t>The U Flag for Unknown Action Handling is specified in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>.</t>

    <t>The Network Action Sub-Stack Length (NASL) is set as specified in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>.</t>

    <t>Opcode (7 bits) value is TBA1 (for In-Stack Network Action with PSD for IOAM) 
    carrying IOAM Option-Type(s) defined in <xref target="RFC9197" format="default"/>.

    Opcode value is TBA2 (for In-Stack Network Action with PSD for IOAM DEX) carrying the IOAM DEX  
    Option-Type defined in <xref target="RFC9326" format="default"/>.
    The In-Stack indication of PSD
    IOAM and IOAM DEX Network Actions can be carried in Format B or
    Format C LSE.
    </t>

    <t>
    A packet may carry more than one In-Stack Network Actions with PSD for IOAM and IOAM DEX in an MNA Sub-Stack
    (for example, for different IOAM Option-Types). There may be
    a different In-Stack Network Actions (other than for the IOAM) in an MNA Sub-Stack.
    </t>

    <t>
    Data (10 bits, next to the Opcode field) in LSE contains the offset for PSD for this In-Stack Network Action 
    in 4-octets units after BOS LSE to the start of the Post-Stack Network Action Opcode.
    Due to the Post-Stack Header, minimum value for the offset is 1 (i.e, 4-octets).
    </t>

    <t>
    Additional IOAM data fields may be added in the In-Stack NAS additional data LSE Format D as required by
    the network action.
    </t>

    <t>Length of Network Action (NAL) is set to 0 if no additional LSE Format D is added for the network action.
    </t>

   <t>
   The Post-Stack Network Action encoding contains IOAM Post-Stack Network Action Opcode, 
   length in number of 4-octet units, and IOAM Option-Type with
   IOAM data fields in 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.4 of <xref target="RFC9197" format="default"/>
   and Section 3 of <xref target="RFC9326" format="default"/>).
   </t>
   
        <figure anchor="ioam-psd-encaps-fig">
          <name>An Example of Post-Stack Data MNA Carrying IOAM.</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                    | TC  |1|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |N N N N|Version| PS-HDR-LEN    | TYPE = POST-STACK-HDR-MNA = 1 |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
 |PS-NA-OPCODE |R|U|   PS-NAL    |R|R| BLOCK-NUMBER|IOAM-OPT-TYPE|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                         IOAM Data                             ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
  
     <t>The PSD MNA carrying IOAM is shown in <xref target="ioam-psd-encaps-fig"/>.
     The following fields defined in <xref target="I-D.jags-mpls-ps-mna-hdr"/>:</t>

    <dl newline="false" spacing="normal" indent="2">
         <dt>NNNN:</dt>
         <dd>
         The value of the first nibble is defined in <xref target="I-D.jags-mpls-ps-mna-hdr" format="default"/>.
         </dd>
         <dt>PS-HDR-LEN (8 bits):</dt>
         <dd>
         IOAM PSD MNA Total Length in four-octet units. This excludes the Post-Stack Header.
         </dd>
         <dt>TYPE:</dt>
         <dd>
         TYPE is defined for POST-STACK-HDR-MNA (value 1) in <xref target="I-D.jags-mpls-ps-mna-hdr" format="default"/>. 
         </dd>
    </dl>

  <t>The Post-Stack Network Action encoding contains IOAM Post-Stack Network Action Opcode, 
   length in number of 4-octet units, and IOAM Option-Type with   
   IOAM data fields in ancillary data as shown in Figure 1.
   The IOAM data fields MUST follow the definitions corresponding to their  
   IOAM-Option-Types (e.g., see Section 4.4 of <xref target="RFC9197" format="default"/>
   and Section 3 of <xref target="RFC9326" format="default"/>). </t>

     <figure anchor="ure-ioam-network-action-in-mpls-header">
          <name>Example Post-Stack Network Actions with IOAM and IOAM Direct Export Data Fields</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                                | TC  |1|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |N N N N|Version| PS-HDR-LEN    | TYPE = POST-STACK-HDR-MNA = 1 |PSH
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|<-+
 |PS-NA-OPCODE |R|U|   PS-NAL    |R|R| BLOCK-NUMBER|IOAM-OPT-TYPE|  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  I
 |                                                               |  O
 |                                                               |  A
 ~   IOAM Option and Data Space [RFC9197] [RFC9326]              ~  M
 |                                                               |  |
 |                                                               |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 .                                                               .
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |PS-NA-OPCODE |R|U|   PS-NAL    |R|R| BLOCK-NUMBER|IOAM-OPT-TYPE|  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  I
 |                                                               |  O
 |                                                               |  A
 ~   IOAM Option and Data Space [RFC9197] [RFC9326]              ~  M
 |                                                               |  |
 |                                                               |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |                                                               |
 |                                                               |
 ~                 Optional Payload + Padding                    ~
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ]]></artwork>
        </figure>

   <t>The Post-Stack Header (PSH) is added with the following fields 
      as defined in <xref target="I-D.jags-mpls-ps-mna-hdr" format="default"/>.</t>

    <dl newline="false" spacing="normal" indent="2">
         <dt>NNNN:</dt>
         <dd>
         The first 4-bit as defined in <xref target="I-D.jags-mpls-ps-mna-hdr" format="default"/>.
         </dd>
         <dt>PS-HDR-LEN (8 bits):</dt>
         <dd>
         Post-Stack Header Total Length in 4-octet units. This excludes the Post-Stack Header.
         </dd>
         <dt>TYPE:</dt>
         <dd>
         TYPE is defined for POST-STACK-HDR-MNA (value 1) in <xref target="I-D.jags-mpls-ps-mna-hdr" format="default"/>. 
         </dd>
    </dl>

    <t>
    </t>

    <t>An IOAM data fields is added in the Post-Stack Network Action containing the following fields:</t>
        <dl newline="false" spacing="normal" indent="2">

          <dt>PS-NA-OPCODE:</dt>
          <dd>
         IANA allocated value TBA3 (Post-Stack Network Action for IOAM) for IOAM Option-Type defined in <xref target="RFC9197" format="default"/>,
   and TBA4 (Post-Stack Network Action for IOAM DEX) for IOAM DEX Option-Type defined <xref target="RFC9326" format="default"/>. 
   Editor's Note: Post-Stack Network Action Opcode value TBA3 can be the same value as In-Stack Network Action Opcode value TBA1
   and opcode TBA4 can be the same value as opcode TBA2 to avoid creating a mapping table.
    </dd>

          <dt>IOAM-OPT-TYPE:</dt>
          <dd>
       7-bit field defining the IOAM Option-Type, as defined in
       the "IOAM Option-Type Registry" specified in <xref target="RFC9197" format="default"/> 
       and <xref target="RFC9326" format="default"/>).
    </dd>

          <dt>IOAM-HDR-LEN:</dt>
          <dd>
       7-bit unsigned integer. Length of the IOAM data fields in 4-octet units. This excludes the first 4-octet unit starting from PS-NA-OPCODE. 
         </dd>
          <dt>IOAM Option and Data Space:</dt>
          <dd>
       IOAM data fields as specified by the
       IOAM-OPT-Type field.  IOAM data fields are defined corresponding to
       the IOAM-Option-Type (e.g., see Section 4.4 of
       <xref target="RFC9197" format="default"/> and Section 3 of
       <xref target="RFC9326" format="default"/>.
    </dd>

          <dt>U:</dt>
          <dd>
       The Unknown Post-Stack Network Action handling including unsupported IOAM Option-Type or IOAM data fields handling.
    </dd>

          <dt>BLOCK-NUMBER:</dt>
          <dd>
       The Block Number for alternate marking method can be used to aggregate the IOAM data collected
       in data plane, e.g., to compute measurement metrics for each block of
       a data flow.  It is also used to correlate the IOAM data on different nodes.
    </dd>
        </dl>
</section>

<section anchor="ioam-dex-isd-mna-sec" numbered="true" toc="default">
<name>Realization of IOAM-DEX as an In-Stack Data MPLS Network Action</name>
<t>
<xref target="I-D.ietf-mpls-mna-usecases"/> recognizes the importance of IOAM in MPLS networks
and lists it as one of the use cases that might be supported using MNA techniques.
<xref target="I-D.ietf-mpls-mna-fwk"/> defines the architectural elements that compose MNA.
This document uses all the elements of the IOAM-DEX Option-Type format
defined in <xref target="RFC9326"/> to support IOAM-DEX in an MPLS network using
MPLS Network Action (MNA) framework <xref target="I-D.ietf-mpls-mna-fwk"/> and architecture as in-stack data (ISD) MNA
<xref target="I-D.ietf-mpls-mna-hdr"/>. The IOAM-DEX in MNA header is using LSE Format D, as defined in Section 4.4 <xref target="I-D.ietf-mpls-mna-hdr"/>
mapping IOAM-DEX Option Type format <xref target="RFC9326"/>. In addition to the requirement to preserve the Bottom of Stack field, 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.
The format of IOAM-DEX in MNA is shown in <xref target="ioam-dex-fig"/>. 
</t>

 <figure anchor="ioam-dex-fig">
   <name>IOAM-DEX Option Type Format for the In-Stack Data MPLS Network Action Framework</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          |    Resv   |0|     Flags     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|            IOAM-Trace-Type-MNA            |S|O|R| Ext-Flags |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     Flow ID MNA                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Sequence Number MNA (Optional)                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
</figure>
<t>
Where fields are defined as follows:
</t>
<ul spacing="normal">
<li>Namespace-ID is a 16-bit identifier of the IOAM Namespace, as defined in <xref target="RFC9197"/>.</li>
<li>S is a one-bit the Bottom of Stack <xref target="RFC3032"/>.</li>
<li>Flags is an eight-bit field comprised of eight one-bit subfields. The subfields in the Flags field are
allocated by IANA in IOAM DEX Flags registry, as defined in Section 4.2 of <xref target="RFC9326"/>.</li>
<li>IOAM-Trace-Type-MNA is a 22-bit field. The interpretation of bit positions in the IOAM-Trace-Type-MNA is as specified in
IANA's IOAM Trace-Type registry <xref target="IANA-IOAM-Trace-Type"/> from Bit 0 through Bit 21.</li>
<li>O is the one-bit flag identical to the interpretation of Bit 22 variable-length Opaque State Snapshot
in IANA's IOAM Trace-Type registry <xref target="IANA-IOAM-Trace-Type"/>.</li>
<li>E is a one-bit flag identical to the interpretation of Bit 23 Reserved
in IANA's IOAM Trace-Type registry <xref target="IANA-IOAM-Trace-Type"/>. E flag can be used to indicate
the presence of the Extended IOAM-Trace-Type-MNA field in the next Label Stack Element (LSE).</li>
<li>R (Reserved) is a one-bit flag  identical to the interpretation of Bit 23 in IANA's IOAM Trace-Type registry <xref target="IANA-IOAM-Trace-Type"/>. 
It MUST be zeroed on the transmission and ignored on receipt.
Similarly to <xref target="RFC9197"/>, it is reserved to allow for future extensions of the IOAM-Trace-Type-MNA bit field.</li>
<li>The concatenation of IOAM-Trace-Type-MNA, O, and R fields, explained above, is identical to IOAM-Trace-Type in the interpretation of its bits,
assigned in IANA's IOAM Trace-Type registry <xref target="IANA-IOAM-Trace-Type"/>. Also, note that the Bit 7 field, i.e., checksum complement,
is handled as defined in <xref target="RFC9326"/>.</li>
<li>Ext-Flags is a six-bit field comprised of six one-bit subfields. The allocation of
the subfields in the Ext-Flags field is according to Section 4.3 of <xref target="RFC9326"/>. The allocated flags indicate the presence of
the optional Flow ID and/or Sequence Number fields in the IOAM-DEX-ISD-MNA header. The length of the Ext-Flags field in 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"/>. Mapping of these two bit positions
is for further study.
<xref target="ext-flag-fig"/> displays the detailed format of the Ext-Flags field.</li>
<li>Optional fields, i.e., Flow ID and Sequence Number, according to <xref target="RFC9326"/>, immediately follow the Reserved field used
to align optional fields at the four-octet word boundary. In the case of IOAM-DEX in MNA, such alignment can be achieved without using padding.</li>
<li>Flow ID MNA is an optional four-octet field. The semantics of the Flow ID MNA field is
as of the Flow ID field defined in Section 3.2 of <xref target="RFC9326"/>. The most significant bit MUST be set to 1.
Bit 23 MUST be set according to the definition of Bottom of Stack field in <xref target="RFC3032"/>.</li>
<li> Sequence Number MNA is an optional four-octet field. The semantics of the Sequence Number MNA field is
as of the Sequence Number field defined in Section 3.2 of <xref target="RFC9326"/>. The most significant bit MUST be set to 1.
Bit 23 MUST be set according to the definition of Bottom of Stack field in <xref target="RFC3032"/>. In MPLS network
environments where a 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, where other load-balancing techniques are used, all bits of the Sequence Number MNA field can be variated.
</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|S|U|U|U|U|
+-+-+-+-+-+-+
]]></artwork>
</figure>
<t>Where fields are defined as follows:</t>
<ul spacing="normal">
<li>F - one-bit flag. When the flag is set to 1, it indicates the presence of the Flow ID field in the IOAM-DEX-ISD-MNA header.</li>
<li>S - one-bit flag. When the flag is set to 1, it indicates the presence of the Sequence Number field in the IOAM-DEX-ISD-MNA header.</li>
<li>U - unassigned one-bit flag. It MUST be zeroed on transmission and the value MUST be ignored upon receipt.</li>
</ul>

      <t>
      To support the direct export of the operational state and telemetry information,
      the IOAM-DEX-ISD-MNA blob (binary large object), as shown in <xref target="ioam-dex-fig"/>
      can be placed as part of the ISD block in an MPLS label stack according to the MNA encoding principles
      defined in <xref target="I-D.ietf-mpls-mna-hdr"/>. 
    Using the IHS field, the IOAM-DEX-ISD-MNA can be performed in Hop-by-Hop,
      Ingress-to-Egress, or Select modes <xref target="I-D.ietf-mpls-mna-fwk"/> of collecting
      the operational state and telemetry information, as MNA Opcode (<xref target="ioam-dex-mna-option-fig"/>).
     Policies controlling the processing of the collected operational state and telemetry information,
     and its transport are outside the scope of this document.
      </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               | TC  |0|    TTL        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode = TBA6 |        Data           |P|IHS|0| Res |U|  NASL |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                       IOAM-DEX-ISD-MNA                        ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>

<t>Where the enclosed elements are defined as follows:</t>
<ul spacing="normal">
<li>MNA Label (value TBA5) is a base Special Purpose Label (bSPL) assigned by IANA per the request in <xref target="I-D.ietf-mpls-mna-hdr"/>.</li>
<li>S - the Bottom of Stack field <xref target="RFC3032"/>.</li>
<li>P, IHS, Res, U, and NASL fields are as specified in Section 4.2 of <xref target="I-D.ietf-mpls-mna-hdr"/>.</li>
<li>NASL - number of LSEs that compose the IOAM-DEX-ISD-MNA blob.</li>
<li>Opcode is MNA-IOAM-DEX opcode (value TBA6) assigned by IANA <xref target="iana-option-consider"/>.</li>
<li>IOAM-DEX-ISD-MNA - IOAM Direct Export in In-Stack Data MPLS Network Action encoding</li>
      </ul>
</section>
</section>

    <section anchor="sect-7" numbered="true" toc="default">
      <name>Considerations for IOAM and IOAM Direct Export in MPLS Networks</name>
      
    <section anchor="sect-4" numbered="true" toc="default">
      <name>Ingress-To-Egress Scope IOAM and IOAM Direct Export Network Actions</name>

        <t>The I2E IOAM data fields carry the IOAM Option-Type(s) that
    require processing on the encapsulating and decapsulating nodes only.
   </t>

   <t>
    The IOAM Option-Type carried can be IOAM Edge-To-Edge 
    Option-Type (value 3) defined in <xref target="RFC9197" format="default"/>
    as well as DEX Option-Type (value 4) defined 
    in <xref target="RFC9326" format="default"/>.
    The I2E IOAM data fields SHOULD NOT carry any IOAM Option-Type that
    require IOAM processing on the intermediate nodes as it will
    not be processed by them when IHS scope is set to "I2E, value 0x0".</t>
  
      <section anchor="sect-4.2" numbered="true" toc="default">
        <name>Procedure</name>
        <t>
    The I2E IOAM and IOAM Direct Export Network Action procedure is summarized as following:</t>
        <ul spacing="normal">
          <li>
    The encapsulating node inserts an MNA Sub-Stack with the MNA Label with 
    IHS scope set to "I2E, value 0x0", one or more In-Stack Network Actions with PSD and one 
    or more IOAM data fields in the Post-Stack Network Actions in the MPLS packet.</li>
      <li>The intermediate nodes do not process the HBH IOAM data fields.</li>
          <li>The decapsulating node MAY punt the IOAM data fields from the packet with the receive timestamp  
    to the slow path for processing.  
    The receive timestamp is required by the various 
    I2E OAM use-cases, including streaming telemetry. 
    Note that the packet is not necessarily punted to the control-plane.</li>
          <li>The decapsulating 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 decapsulating node MUST remove the Network Actions and IOAM data fields
    from the received packet. The decapsulated packet is forwarded 
    downstream or terminated locally similar to the regular data packets.</li>
        </ul>
      </section>
      </section>
      
    <section anchor="sect-5" numbered="true" toc="default">
      <name>Hop-By-Hop Scope IOAM and IOAM Direct Export Network Actions</name>

        <t>The HBH IOAM data fields carry the Option-Type(s) that require
    processing at the intermediate and/or encapsulating and decapsulating nodes.
    </t>

    <t>
    The IOAM Option-Type carried can be IOAM
    Pre-allocated Trace Option-Type (value 0), IOAM Incremental Trace Option-Type (value 1) 
    and IOAM Proof of Transit (POT) Option-Type (value 2), and Edge-To-Edge 
    Option-Type (value 3) defined in <xref target="RFC9197" format="default"/> as well as 
    DEX Option-Type (value 4) defined 
    in <xref target="RFC9326" format="default"/>.</t> 

    <t>
    Editor's note: IPv6 option is not supported for HBH IOAM Incremental Trace Option-Type (value 1).
    Similarly, MPLS network action is also not supported for HBH IOAM Incremental Trace Option-Type (value 1).
    </t>

      <section anchor="sect-5.1" numbered="true" toc="default">
        <name>Procedure </name>
        <t>
    The Hop-By-Hop IOAM and IOAM Direct Export Network Action procedure is summarized as following:</t>
        <ul spacing="normal">
          <li>
    The encapsulating node inserts an MNA Sub-Stack containing MNA Label, 
    with IHS scope set to "HBH, value 0x1", one or more In-Stack Network Actions for IOAM with PSD, 
    and one or more IOAM data fields in the Post-Stack Network Actions in the MPLS packet.</li>
          <li>The intermediate node enabled with HBH IOAM function
    processes the data packet including 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 MNA Sub-Stack.</li>
          <li>The intermediate node MAY punt the IOAM data fields from the packet with the receive timestamp  
    to the slow path for processing when the node recognizes the HBH scope.  
    The receive timestamp is required by the various 
    HBH OAM use-cases, including streaming telemetry. 
    Note that the packet is not necessarily punted to the control-plane.</li>
          <li>The intermediate node forwards the data packet downstream.</li>
          <li>The processing on the decapsulating node is same as I2E case.</li>
        </ul>

    <t>Both HBH and I2E Scope IOAM may be required in an MPLS packet. 
    In this case, 
    the Post-Stack Network action with HBH IOAM data fields MUST be added after the BOS 
    and before the Post-Stack Network Action with I2E IOAM data fields.
    This way, the RLD for the intermediate nodes is minimized.
    </t>
    </section>
    </section>
      
          <section anchor="sect-7.2" numbered="true" toc="default">
        <name>Node Capability</name>
        <t>
    The decapsulating node that has to remove the IOAM data fields
    and perform the IOAM function may not be capable of
    supporting it.  The encapsulating node needs to know if the
    decapsulating node can support the IOAM function.  The signaling
    extension for this capability exchange is outside the scope of this
    document.</t>
        <t>The intermediate node that is not capable of supporting the IOAM functions
    defined in this document, can simply skip the IOAM processing.</t>
    <t>The node that does not recognize the MNA Label received at the top of the label stack will drop the packet.</t>
      </section>
      
            <section anchor="sect-7.3" numbered="true" toc="default">
        <name>Nested MPLS Encapsulation</name>
   <t>
   When a packet is received with MPLS Encapsulated Network Action for IOAM, the nested MPLS
   encapsulating node that needs to add different Network Action for IOAM, the node MUST add
   a new MNA Sub-Stack with the Network Action for IOAM as part of the new MPLS encapsulation.
   </t>
       </section>

     <section anchor="sect-7.4" numbered="true" toc="default">
        <name>Readable Label Depth Consideration</name>
    <t>
    The encapsulating node needs to make sure that the IOAM data fields in Post-Stack Network Action are added within the Readable Label 
    Depth (RLD) of the downstream MNA capable nodes in order for them to be able to process the IOAM.
    </t>
       </section>
       </section>
      
    <section anchor="iana-consider" numbered="true" toc="default">
    <name>IANA Considerations</name>
      <section anchor="iana-option-consider" numbered="true" toc="default">
      <name>IOAM, IOAM-DEX as PSD MNA, and IOAM-DEX-ISD-MNA as an MPLS Network Action Opcodes</name>
      <t>IANA is requested to codepoints from its Network Action Opcodes registry
    (creation requested in <xref target="I-D.ietf-mpls-mna-hdr"/>)
      as specified in <xref target="iana-ioam-dex-mna-option-tbl"/>.</t>
      
          <table anchor="iana-ioam-dex-mna-option-tbl" align="center">
          <name>IOAM-DEX as an In-Stack Data MPLS Network Action Opcode</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">TBA1 </td>
            <td align="left">In-Stack Network Action with PSD for IOAM</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">TBA2</td>
            <td align="left">In-Stack Network Action with PSD for IOAM Direct Export</td>
            <td align="left">This document</td>
          </tr>
            <tr>
              <td align="left">TBA6</td>
              <td align="left">IOAM-DEX as an In-Stack Data MPLS Network Action Indicator</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
        
      </section>
      
     <section anchor="IANAFlagsPSD" numbered="true" toc="default">
      <name>Post-Stack Network Action Opcodes </name>

    <t>
    The IOAM and IOAM DEX Network Action Opcodes from Post-Stack Network Action Opcode 
    registry (to be created by in <xref target="I-D.jags-mpls-ps-mna-hdr" format="default"/>) are defined 
    in this document as follows.
    </t>

    <t>
    Editor's Note: Post-Stack Network Action Opcode value TBA3 can be the same value as In-Stack Network Action Opcode value TBA1
    and opcode TBA4 can be the same value as opcode TBA2 to avoid creating a mapping table.
    </t>

     <table anchor="iana-nh-type-tbl" align="center">
       <name>Post-Stack Network Action Opcodes</name>
        <thead>
          <tr>
            <th align="left">Value</th>
            <th align="left">Description</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>

          <tr>
        <td align="left">TBA3</td>
            <td align="left">Post-Stack Network Action for IOAM</td>
            <td align="left">This document</td>
          </tr>

          <tr>
        <td align="left">TBA4</td>
            <td align="left">Post-Stack Network Action for IOAM Direct Export</td>
            <td align="left">This document</td>
          </tr>
        </tbody>
     </table>

    </section>
    </section>
    
    <section anchor="security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
 Security considerations discussed in <xref target="RFC9197"/>, <xref target="RFC9326"/>, and
 <xref target="I-D.ietf-mpls-mna-fwk"/> apply to this document. 
      </t>
      <t>
    The usage of MPLS extensions defined in this document for IOAM is intended for 
    deployment in a single network administrative domain.
    As such, it assumes that the operator enabling the IOAM 
    operation has previously verified the integrity of the path.
    Still, operators need to properly secure the IOAM
    in the domain to avoid malicious configuration and use, which could include
    injecting malicious IOAM packets into the domain.
    </t>
    </section>
    
      </middle>
  
  <back>
  <references>
  <name>References</name>
  <references>
        <name>Normative References</name>
      <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.8174.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9197.xml"/>
      <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-mpls-mna-fwk.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.3032.xml"/>
      <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-mpls-mna-hdr.xml"/>
      <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-jags-mpls-ps-mna-hdr.xml"/>

    </references>
    
    <references>
    <name>Informational References</name>
      <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-mpls-mna-usecases.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8969.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 numbered="false" toc="default">
      <name>Acknowledgments</name>
<t>
The authors would like to thank Patrick Khordoc, Sagar Soni, Shwetha Bhandari, Vengada Prasad Govindan, Tarek Saad, Stewart Bryant, Xiao Min, Jaganbabu Rajamanickam, and Cheng Li for providing many useful comments. 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.
</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

Loa Andersson
Huawei Technologies
Email: loa@pi.nu

Frank Brockners
Cisco Systems, Inc.
Hansaallee 249, 3rd Floor
DUESSELDORF, NORDRHEIN-WESTFALEN  40549
Germany
Email: fbrockne@cisco.com

Voitek Kozak
Comcast
Email: Voitek_Kozak@comcast.com

   ]]></artwork>

    </section>

  </back>
</rfc>
