<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8762 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8762.xml">
<!ENTITY RFC8972 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8972.xml">
<!ENTITY RFC9197 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9197.xml">
<!ENTITY RFC9326 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9326.xml">
<!ENTITY I-D.ietf-mpls-mna-hdr SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-mna-hdr.xml">
<!ENTITY I-D.ietf-mpls-mna-ps-hdr SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-mna-ps-hdr.xml">
<!ENTITY I-D.ietf-mpls-mna-ioam SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-mna-ioam.xml">
<!ENTITY I-D.ietf-ippm-asymmetrical-pkts SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-ippm-asymmetrical-pkts.xml">
]>
<rfc submissionType="IETF" docName="draft-gandhi-ippm-stamp-mpls-hdr-05" category="std" ipr="trust200902" consensus="true">
    <!-- Generated by id2xml 1.5.0 on 2020-02-06T01:41:26Z -->
    <?rfc compact="yes"?>
    <?rfc text-list-symbols="oo*+-"?>
    <?rfc subcompact="no"?>
    <?rfc sortrefs="no"?>
    <?rfc symrefs="yes"?>
    <?rfc strict="yes"?>
    <?rfc toc="yes"?>
    <front>
    <title abbrev="STAMP Reflecting MPLS Extension Headers">Simple Two-Way Active Measurement Protocol (STAMP) Extensions for Reflecting STAMP Packet MPLS Extension Headers</title>
    <seriesInfo name="Internet-Draft" value="draft-gandhi-ippm-stamp-mpls-hdr-05"/>    
    <author fullname="Rakesh Gandhi" initials="R." role="editor" surname="Gandhi">
    <organization>Cisco Systems, Inc.</organization>
    <address>
    <postal><street>Canada</street>
    </postal>
        <email>rgandhi@cisco.com</email>
    </address>
    </author>
    <author fullname="Tianran Zhou" initials="T." surname="Zhou">
      <organization showOnFrontPage="true">Huawei</organization>
      <address>
        <postal>
          <country>China</country>
        </postal>
        <email>zhoutianran@huawei.com</email>
      </address>
    </author>
    <author fullname="Zhenqiang Li" initials="Z." surname="Li">
      <organization showOnFrontPage="true">China Mobile</organization>
      <address>
        <postal>
          <country>China</country>
        </postal>
        <email>lizhenqiang@chinamobile.com</email>
      </address>
    </author>
    <author fullname="Fabian Ihle" initials="F." surname="Ihle">
      <organization showOnFrontPage="true">University of Tuebingen</organization>
      <address>
        <postal>
          <city>Tuebingen</city>
          <country>Germany</country>
        </postal>
        <email>fabian.ihle@uni-tuebingen.de</email>
      </address>
    </author>
    <date year="2026"/>
    <workgroup>IPPM Working Group</workgroup>

    <abstract>
        <t>
The Simple Two-Way Active Measurement Protocol (STAMP) and its optional extensions can be used for Edge-to-Edge (E2E) active measurements. In Situ Operations, Administration, and Maintenance (IOAM) data fields can be used for recording and collecting Hop-by-Hop (HBH) and E2E operational and telemetry information. This document extends STAMP to reflect MPLS extension headers, including MPLS Network Action Sub-Stacks and Post-Stack MPLS Headers, for HBH and E2E active measurements, for example, using the IOAM data fields.
</t>

    </abstract>
    </front>

    <middle>

   <section title="Introduction" anchor="sect-1">

       <t>
The Simple Two-Way Active Measurement Protocol (STAMP) provides capabilities for the measurement of various performance metrics in IP networks <xref target="RFC8762" format="default"/> without the use of a control channel to pre-signal session parameters. <xref target="RFC8972" format="default"/> defines optional extensions in the form of TLVs for STAMP. STAMP test packets are transmitted along a path between a Session-Sender and a Session-Reflector to measure Edge-to-Edge performance metrics, like delay, delay variation, and packet loss along that path.
</t>

<t>
In Situ Operations, Administration, and Maintenance (IOAM) is used for recording and collecting operational and telemetry information while the packet traverses a path between two points in the network. The IOAM data fields are defined in <xref target="RFC9197" format="default"/>. The information from the collected IOAM data fields can be used to support Hop-by-Hop (HBH) and Edge-to-Edge (E2E) measurement use cases.
</t>

<t>
MPLS packets may carry MPLS Network Action (MNA) Sub-Stacks as defined in <xref target="I-D.ietf-mpls-mna-hdr" format="default"/> and Post-Stack MPLS Header (PSMH) for MNA as defined in <xref target="I-D.ietf-mpls-mna-ps-hdr" format="default"/>.
</t>

<t>
<xref target="I-D.ietf-mpls-mna-ioam" format="default"/> specifies Network Action Sub-Stacks (NASes) and PSMHs to carry the IOAM data fields defined in <xref target="RFC9197" format="default"/> for an MPLS data plane. 
</t>

<t>
It may be desirable to record and collect HBH and E2E operational and telemetry information using active measurement packets between two nodes in a network. This is achieved by augmenting STAMP <xref target="RFC8762" format="default"/>, using optional STAMP extensions defined in <xref target="RFC8972" format="default"/>, to reflect MPLS extension headers, including NASes and PSMHs for MNA, as specified in this document. The procedure defined in this document leverages existing implementations at the midpoint nodes with an MPLS data plane that support NASes and PSMHs for MNA, without any additional requirements.
</t>

   </section>

   <section title="Conventions Used in This Document" anchor="sect-2">
       
   <section title="Requirements Language" anchor="sect-2.1">

               <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 title="Abbreviations" anchor="sect-2.2">

    <t>
    DEX:  Direct Export</t>
    <t>
    ECMP:  Equal Cost Multi-Path</t>
    <t>
    E2E:  Edge-to-Edge</t>
    <t>
    HBH:  Hop-by-Hop</t>
    <t>
    IOAM:  In Situ Operations, Administration, and Maintenance</t>
    <t>
    MNA:  Multiprotocol Label Switching Network Action</t>
    <t>
    MTU:  Maximum Transmission Unit</t>
    <t>
    NAS:  Network Action Sub-Stack</t>
    <t>
    PSMH:  Post-Stack MPLS Header</t>
    <t>
    STAMP:  Simple Two-Way Active Measurement Protocol</t>
    <t>
    TLV:   Type-Length-Value</t>

    </section>

    <section title="STAMP Reference Topology" anchor="sect-2.3">

<t>
In the "STAMP Reference Topology" shown in Figure 1, the STAMP Session-Sender S1 initiates a Session-Sender test packet, and the STAMP Session-Reflector R1 transmits a reply Session-Reflector test packet. Node M1 is a midpoint node that performs an MPLS network action but does not perform any STAMP protocol processing.
</t>

<t>
T1 is a transmit timestamp, and T4 is a receive timestamp added by node S1 in a STAMP test packet payload. T2 is a receive timestamp, and T3 is a transmit timestamp added by node R1 in a STAMP test packet payload.
</t>

   <figure anchor="stamp-reference-topology">
        <name>STAMP Reference Topology</name>
  <artwork name="" type="" align="left" alt=""><![CDATA[
           T1                                       T2   
          /                                           \   
 +-------+    Test Packet  +-------+                   +-------+
 |       | - - - - - - - - |       | - - - - - - - - ->|       |
 |   S1  |=================|   M1  |===================|   R1  |
 |       |<- - - - - - - - |       | - - - - - - - - - |       |
 +-------+                 +-------+ Reply Test Packet +-------+
          \                                           /
           T4                                       T3

 STAMP Session-Sender                     STAMP Session-Reflector
]]></artwork>
    </figure>

    </section>
    </section>

    <section title="Overview" anchor="sect-3">
<t>
<xref target="RFC8972" format="default"/> defines optional extensions for STAMP. The optional extensions are added to the base STAMP test packet defined in <xref target="RFC8762" format="default"/> in the form of TLVs. As specified in <xref target="RFC8972" format="default"/>, both Session-Sender and Session-Reflector test packets are symmetric in size when including all optional TLVs (but excluding headers). The Session-Reflector reflects all received STAMP TLVs from the Session-Sender test packet.
</t>

<t>
As specified in <xref target="RFC8762" format="default"/>, STAMP test packets are transmitted with IP/UDP headers. Since the midpoint nodes do not process the UDP headers in the packets, they are agnostic to the STAMP test packets in the payload.
</t>

<t>
STAMP test packets may carry an MPLS header with MPLS extension headers. This document defines procedures and STAMP extensions for a Session-Reflector to reflect the received MPLS extension headers back to the Session-Sender, including one-way and two-way measurement types.
</t>

<section title="Procedure for Reflecting MPLS Extension Headers" anchor="sect-3.1">

<t>
This document also defines a new TLV option for STAMP, called "Reflected MPLS Header MNA Data" (value TBA1). When a STAMP Session-Sender adds a NAS in the test packet, the Session-Sender MUST add a corresponding "Reflected MPLS Header MNA Data" TLV in the Session-Sender test packet with the length set to the MNA Sub-Stack length (NASL) to receive a copy of that NAS back in the STAMP TLV. 
</t>

<t>
Similarly, when a STAMP Session-Sender adds a PSMH for MNA in the test packet, the Session-Sender MUST add a corresponding "Reflected MPLS Header MNA Data" TLV, with the matching length, in order to receive a copy of that PSMH for MNA. 
</t>

<t>
An example STAMP test packet for carrying NASes and a PSMH for MNA and reflected data in the "Reflected MPLS Header MNA Data" TLVs is shown in Figure 2.
</t>

        <figure anchor="stamp-generic-reflected-mna-data">
        <name>Example Session-Sender and Session-Reflector Test Packet with "Reflected MPLS Header MNA Data" TLVs</name>
    <artwork name="" type="" align="left" alt=""><![CDATA[
 +---------------------------------------------------------------+
 | MPLS Header                                                   |
 ~                                                               ~
 +---------------------------------------------------------------+
 | MNA Sub-Stack-1 I-D.ietf-mpls-mna-hdr                         |
 ~                                                               ~
 +---------------------------------------------------------------+
 ~ ...                                                           ~
 +---------------------------------------------------------------+
 | MNA Sub-Stack-N I-D.ietf-mpls-mna-hdr                         |
 ~                                                               ~
 +---------------------------------------------------------------+
 ~ ...                                                           ~
 +---------------------------------------------------------------+
 | Post-Stack MPLS Header-1 I-D.ietf-mpls-mna-ps-hdr             |
 ~                                                               ~
 +---------------------------------------------------------------+
 | IP Header                                                     |
 +---------------------------------------------------------------+
 | UDP Header                                                    |
 +---------------------------------------------------------------+
 | STAMP Packet RFC 8972                                         |
 ~                                                               ~
 +---------------------------------------------------------------+
 | Reflected MPLS Header MNA Data-1 STAMP TLV (TBA1)             |
 ~                                                               ~
 +---------------------------------------------------------------+
 ~ ...                                                           ~
 +---------------------------------------------------------------+
 | Reflected MPLS Header MNA Data-M STAMP TLV (TBA1)             |
 ~                                                               ~
 +---------------------------------------------------------------+
 | Reflected MPLS Header MNA Data-1 STAMP TLV PSMH (TBA1)        |
 ~                                                               ~
 +---------------------------------------------------------------+

   Note: Value of M <= N        
]]></artwork>
    </figure>

<t>
When adding multiple NASes in the Session-Sender test packet, the corresponding "Reflected MPLS Header MNA Data" TLVs MUST also be added, with lengths matching those of the NAS and Ancillary Data and in the same order, to receive a copy of those NASes. 

When the Session-Sender test packets carry a NAS or a PSMH for MNA that the Session-Sender does not require the Session-Reflector to reflect in Session-Reflector test packets, the Session-Sender MUST NOT add a corresponding "Reflected MPLS Header MNA Data" TLV in the Session-Sender test packets.
</t>

<t>
The number of "Reflected MPLS Header MNA Data" TLVs MUST be less than or equal to the number of NASes plus the number of PSMHs for MNA in a Session-Sender test packet.  
</t>

<t>
When the Session-Reflector receives a STAMP test packet with a NAS and a "Reflected MPLS Header MNA Data" TLV, the Session-Reflector that supports this STAMP TLV MUST copy the entire NAS, including the Ancillary Data and header, into the "Reflected MPLS Header MNA Data" TLV in the Session-Reflector test packet payload. 

When there are multiple NASes in the received Session-Sender test packet, each NAS including Ancillary Data, MUST be processed, in the order from the top of the label stack, and copied into the corresponding "Reflected MPLS Header MNA Data" TLV, if that STAMP TLV exists.

Similarly, the Session-Reflector MUST process the PSMH for MNA and copy the entire PSMH for MNA and the Ancillary Data into the corresponding "Reflected MPLS Header MNA Data" TLV, if that STAMP TLV exists.

When the Session-Reflector receives a STAMP test packet with a NAS or a PSMH for MNA but without a corresponding "Reflected MPLS Header MNA Data" TLV, the Session-Reflector does not copy that NAS or PSMH for MNA into the Session-Reflector test packet.
</t>

<t>
The value field in the "Reflected MPLS Header MNA Data" TLV in Session-Sender test packets can be initialized to zeros.
If the Session-Reflector receives Session-Sender test packets with non-zero values in the 
first 8 bytes (excluding the Ancillary Data field that may change) of the "Requested MPLS Header MNA Data" field (shown in Figure 4) of the "Reflected MPLS Header MNA Data" TLV, the Session-Reflector MUST match the values in the corresponding NAS or PSMH for MNA in the MPLS header before copying the data into the STAMP TLV. 

This mechanism is employed in cases of ambiguity when there are multiple NASes and PSMHs for MNA in the MPLS header of the same length present and not all need to be copied and reflected in the STAMP TLVs.
    
This check is also used when not all NASes and PSMHs for MNA need to be reflected in STAMP TLVs and hence there are no corresponding "Reflected MPLS Header MNA Data" TLVs added for them.
</t>

<t>
As the procedure defined in this document leverages the existing implementations at the midpoint nodes for the NASes and PSMHs for MNA, no additional requirements are specified when carrying these NASes and PSMH for MNA in STAMP test packets. The NASes and PSMH for MNA are processed by the nodes using the same procedures specified in the document that defined them.
</t>

<t>
The Session-Sender and Session-Reflector MUST ensure that the resulting STAMP test packets do not exceed the MPLS MTU after adding "Reflected MPLS Header MNA Data" TLVs. If necessary, one or more "Reflected MPLS Header MNA Data" TLVs MUST be removed to avoid violating the MPLS MTU limit.
</t>

<t>
Note that the use case where the NAS and PSMH for MNA lengths change in the STAMP test packets along the path is outside the scope of this document.
Also, the use case where the NASes and the PSMHs for MNA are added or removed in the MPLS header of the Session-Sender test packets along the path is outside the scope of this document.
</t>

    </section>

<section title="One-Way and Two-Way Measurement Types" anchor="sect-3.2">

<t>
This document defines two measurement types: one-way and two-way measurements.
</t>

<t>
In the two-way measurement type, the Session-Reflector adds new matching NASes and PSMHs for MNA, including Ancillary Data, in the MPLS header of the Session-Reflector test packets in the same order as received in the Session-Sender test packets for the reverse direction measurement. 
The length of the new NASes and PSMHs for MNA added in Session-Reflector test packets is a local decision at the Session-Reflector.
The STAMP Session-Sender enables this by adding "MNA Header Control" Sub-TLV for the "Reflected Test Packet Control" TLV in the Session-Sender test packets.
</t>

<t>
In the one-way measurement type, the Session-Reflector does not add the new matching NASes and the PSMHs for MNA, including Ancillary Data, in the MPLS header of the Session-Reflector test packets corresponding to the received MPLS extension headers in the Session-Sender test packets.
</t>

<t>
The measurement type for a STAMP session is locally provisioned on the STAMP Session-Sender.
</t>

    </section>

<section title="Receiving MPLS Header from the Data Plane on Egress Node" anchor="sect-3.3">
<t>
As specified in Section 9.3, "Penultimate Node Responsibilities" of <xref target="I-D.ietf-mpls-mna-hdr" format="default"/>, 
and Section 6.3, "Penultimate Node Responsibilities" of <xref target="I-D.ietf-mpls-mna-ps-hdr" format="default"/>, for HBH and Ingress-to-Egress (I2E) scopes, 
the last copy of the NASes and the PSMHs for MNA MUST NOT be removed by the penultimate node, and hence they will be received by the egress node.
</t>

<t>
Note that the NAS and the corresponding PSMH for MNA for the "Select" scope are removed from the 
packets on the transit node where the NAS is processed, and hence they will not be received by the egress node. 
</t>

<t>
The STAMP test packets, carrying the MPLS header with the NASes and the PSMHs for MNA for HBH and I2E scopes for HBH and E2E measurements, respectively, will be received by the egress node hosting the Session-Reflector. When the received STAMP test packets are processed by the data plane on the egress node that has the Session-Reflector, the data plane MUST provide the received MPLS header containing the NASes and the PSMH for MNA from the Session-Sender test packets to the Session-Reflector on the node.
</t>

<t>
Similarly, when the received STAMP test packets are processed by the data plane on the egress node in the reverse direction that has the Session-Sender, the data plane MUST provide the received MPLS header containing the NASes and the PSMHs for MNA from the Session-Reflector test packets to the Session-Sender on the node for the two-way measurement type.
</t>

    </section>

    </section>

    <section title="Use Case of Reflecting IOAM Data Fields" anchor="sect-4">
    <t>
In Situ Operations, Administration, and Maintenance (IOAM) is used for recording and collecting operational and telemetry information while the packet traverses a path between two points in the network. The IOAM data fields are defined in <xref target="RFC9197" format="default"/>. Examples of data recorded by IOAM Trace Options include per-hop information, such as node ID, timestamp, queue depth, interface ID, and interface load. The information collected can be used for monitoring ECMP paths, proof-of-transit, and troubleshooting failures in the network. IOAM can be used with STAMP test packets for active measurements. The procedure and STAMP extensions defined in this document can be used to reflect the collected IOAM data fields back to the Session-Sender, where the Session-Sender can use this information to support the HBH and E2E measurement use cases.
</t>

<t>
<xref target="I-D.ietf-mpls-mna-ioam" format="default"/> defines MNA extensions for NASes and PSMHs for MNA to carry the IOAM option types defined in <xref target="RFC9197" format="default"/> for an MPLS data plane. The STAMP Session-Sender and Session-Reflector test packets carry the IOAM option types for recording and collecting HBH and E2E operational and telemetry information for active measurements, as shown in Figure 3. The Session-Sender node, midpoint nodes, and the Session-Reflector node process the IOAM data fields, as defined in <xref target="RFC9197" format="default"/>. Note that using the IOAM option type "Incremental Trace Option-Type" is not supported by <xref target="I-D.ietf-mpls-mna-ioam" format="default"/>.
</t>

        <figure anchor="stamp-reflected-mna-data-tlv">
        <name>Example STAMP Session-Sender and Session-Reflector Test Packet for IOAM with "Reflected MPLS Header MNA Data" TLV</name>
    <artwork name="" type="" align="left" alt=""><![CDATA[
 +---------------------------------------------------------------+
 | MPLS Header                                                   |
 +---------------------------------------------------------------+
 | IOAM MNA Sub-Stack I-D.ietf-mpls-mna-ioam                     |
 ~                                                               ~ 
 +---------------------------------------------------------------+
 | IOAM MNA PSMH I-D.ietf-mpls-mna-ioam                          |
 ~                                                               ~ 
 +---------------------------------------------------------------+
 | IP Header                                                     |
 +---------------------------------------------------------------+
 | UDP Header                                                    |
 +---------------------------------------------------------------+
 | STAMP Packet RFC 8972                                         |
 +---------------------------------------------------------------+
 | Reflected MPLS Header MNA Data STAMP TLV (TBA1)               |
 ~                                                               ~
 +---------------------------------------------------------------+
 | Reflected MPLS Header MNA Data STAMP TLV PSMH (TBA1)          |
 ~                                                               ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
    </figure>

<t>
IOAM Direct Exporting (DEX) <xref target="RFC9326" format="default"/> is applicable with STAMP test packets for the on-path telemetry use case. 
In this case, the Session-Reflector is not required to reflect the IOAM option type since no IOAM data would be recorded in the STAMP test packets.
Hence, the Session-Sender MAY not include a corresponding "Reflected MPLS Header MNA Data" TLV in Session-Sender test packets for the IOAM DEX option type.
</t>


    </section>

    <section title="STAMP Extensions" anchor="sect-5">

    <section title="Reflected MPLS Header MNA Data TLV" anchor="sect-5.1">

<t>
The "Reflected MPLS Header MNA Data" TLV is carried by Session-Sender and Session-Reflector test packets. STAMP test packets MAY carry one or more STAMP TLVs of this type. The same "Reflected MPLS Header MNA Data" TLV Type is used for reflecting different MPLS extension headers, including NASes and PSMHs for MNA. The format of the "Reflected MPLS Header MNA Data" TLV is shown in Figure 4.
</t>

        <figure anchor="stamp-reflected-mna-data">
        <name>Reflected MPLS Header MNA Data TLV</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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |STAMP TLV Flags|  Type=TBA1    |         Length                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                  Requested MPLS Header MNA Data               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                  Reflected MPLS Header MNA Data               |
 ~                                                               ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
    </figure>

<t>
The STAMP TLV fields are defined as follows:
</t>

<t>
Type: STAMP TLV Type (value TBA1).
</t>

<t>
STAMP TLV Flags: The STAMP TLV Flags follow the procedures described in <xref target="RFC8972" format="default"/>.
</t>

<t>
Length: A two-octet field equal to the length of the Data in octets.
</t>

<t>
If, due to some error, such as a mismatch in the length between a NAS or PSMH for MNA and the "Reflected MPLS Header MNA Data" TLV, the Session-Reflector does not use the received "Reflected MPLS Header MNA Data" TLV for reflecting the NAS or PSMH for MNA, the Session-Reflector MUST return the STAMP TLV with the U flag (Unrecognized TLV) set to 1 in the STAMP TLV Flags using the procedure defined in <xref target="RFC8972" format="default"/>.
</t>

    </section>
    
    <section title="MNA Header Control Sub-TLV" anchor="sect-5.2">
<t>
This document defines the "MNA Header Control" Sub-TLV (Type TBA2) for the "Reflected Test Packet Control" TLV (Type 12) introduced in <xref target="I-D.ietf-ippm-asymmetrical-pkts" format="default"/>.
The format of "MNA Header Control" Sub-TLV is shown in Figure 5.
</t>

   <figure anchor="stamp-mna-header-control-sub-tlv">
        <name>MNA Header Control Sub-TLV</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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Sub-TLV Flags |  Type = TBA2  |         Sub-TLV Length = 0    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
    </figure>

<t>
The Sub-TLV fields are defined as follows:
</t>

<t>
Type: Sub-TLV Type (value TBA2).
</t>

<t>
Sub-TLV Flags: The Sub-TLV Flags follow the procedure for STAMP TLV Flags described in <xref target="RFC8972" format="default"/>.
</t>

<t>
Sub-TLV Length: A two-octet field equal to the length of the Data in octets. It is set to 0.
</t>

<t>
When a Session-Sender test packet is received with the "MNA Header Control" Sub-TLV, the Session-Reflector MUST add the new matching NASes and PSMHs for MNA in the MPLS header of the Session-Reflector STAMP test packet in the same order corresponding to the received NASes and PSMHs for MNA in the Session-Sender test packet. 
</t>

<t>
In the absence of this Sub-TLV in the received Session-Sender test packet, the Session-Reflector MAY not add new matching NASes or PSMHs for MNA corresponding to the received NASes and PSMHs for MNA in the Session-Reflector test packet. This behaviour can be based on a local policy on the Session-Reflector.
</t>

<t>
The NASes and PSMHs for MNA received in the Session-Sender test packets MUST be copied and reflected in the corresponding "Reflected MPLS Header MNA Data" TLVs to the Session-Sender regardless of whether the "MNA Header Control" Sub-TLV is present or not.
</t>

<t>
If for any reason, the Session-Reflector cannot add a new matching NAS or PSMH for MNA in the Session-Reflector test packet, for example, if the Session-Reflector does not support the NAS or PSMH for MNA, the Session-Reflector MUST return the STAMP TLV with the C flag (Conformance) set to 1 in the Sub-TLV Flags of the Sub-TLV using the procedure defined in <xref target="I-D.ietf-ippm-asymmetrical-pkts" format="default"/>.
</t>

<t>
STAMP test packets MUST NOT carry more than one "MNA Header Control" Sub-TLV in a "Reflected Test Packet Control" TLV.
If a Session-Sender test packet contains more than one "MNA Header Control" Sub-TLV, the Session-Reflector MUST return the STAMP TLV with 
the U flag (Unrecognized TLV) set to 1 in the STAMP TLV Flags using the procedure defined in <xref target="RFC8972" format="default"/>.
</t>

    </section>

    </section>

    <section title="Operational Considerations" anchor="sect-6">

    <t>
    The operational considerations specified in <xref target="RFC8762" format="default"/> and 
    <xref target="I-D.ietf-mpls-mna-hdr"/> apply to the procedure and extensions defined in this document.
    </t>

    <t>
    In addition, the Management and Deployment Considerations specified in <xref target="RFC9197" format="default"/> 
    also apply when using the IOAM data fields defined in that document.
    </t>

    <t>
    An operator MAY provision a local policy on a Session-Reflector to not copy and reflect the received MPLS extension headers 
    in the Session-Reflector test packets to avoid exposing the collected network information to the Session-Sender.
    </t>

    </section>

    <section title="Security Considerations" anchor="sect-7">

    <t>
    The security considerations specified in <xref target="RFC8762" format="default"/>, 
    <xref target="RFC8972" format="default"/>, <xref target="I-D.ietf-mpls-mna-hdr"/> and 
    <xref target="I-D.ietf-mpls-mna-ps-hdr"/> apply to the procedure and extensions defined in this document.
    In addition, the security considerations specified in <xref target="RFC9197" format="default"/> and 
    <xref target="I-D.ietf-mpls-mna-ioam"/> also apply when using IOAM data fields.
    </t>

    <t>
    The procedures defined in this document are intended for deployment in a single network administrative domain.  
    It is assumed that the operator has verified the integrity of the forward 
    and return paths used to transmit STAMP test packets so that collected network information is not exposed on an undesired node.
    </t>

    <t>
    If desired, attacks can be mitigated by performing basic validation
    checks of the timestamp fields (such as verifying that T2 is later than T1 in the STAMP Reference Topology shown in Figure 1)   
    in received reply test packets at the Session-Sender. The minimal state
    associated with these protocols also limits the extent of measurement
    disruption that can be caused by a corrupt or invalid test packet to a single test cycle.
    </t>

    <t>
    Furthermore, implementations SHOULD NOT assign STAMP Session-IDs <xref target="RFC8972"/> in a predictable
    manner.  In order to avoid predictability, implementations can
    leverage a Cryptographically Secure Pseudorandom Number Generator
    <xref target="NIST-CSPRNG" format="default"/>.
    </t>

    </section>

    <section title="Implementation Status" anchor="sect-8">
    <t>
    Editorial note: Please remove this section prior to publication.
    </t>

    <t>
    An open-source implementation of STAMP with optional TLVs [RFC8972], MPLS Network Action (with In-Stack and Post-Stack Data),
    and the IOAM pre-allocated trace option  <xref target="RFC9197" format="default"/> 
    for one-way and two-way measurement types for Hop-by-Hop delay measurement (for 4 transit nodes) 
    using the extensions defined in this document is available in the Tofino2.
    </t>

    <t>
    https://github.com/uni-tue-kn/stamp-mpls-mna-poc
    </t>

    <t>
    Contact: 
    </t>
    <t>
    Fabian Ihle
    </t>

    <t>
    University of Tuebingen
    </t>
    <t>
    Germany
    </t>

    <t>
    Email: fabian.ihle@uni-tuebingen.de
    </t>

    </section>


    <section title="IANA Considerations" anchor="sect-9">

<t>
IANA has created the "STAMP TLV Types" registry for <xref target="RFC8972" format="default"/>. IANA is requested to allocate a value for the "Reflected MPLS Header MNA Data" TLV Type from the IETF Review TLV range of the same registry.
</t>

    <table anchor="iana-tlv-type-tbl" align="center">
       <name>STAMP TLV Type</name>
        <thead>
          <tr>
            <th align="left">Value</th>
            <th align="center">Description</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">TBA1 </td>
            <td align="center">Reflected MPLS Header MNA Data</td>
            <td align="left">This document</td>
          </tr>
        </tbody>
    </table>

<t>
IANA is requested to allocate a value for the Sub-TLV Type "MNA Header Control" (Type TBA2) for the STAMP TLV Type "Reflected Test Packet Control" (Type 12) defined in <xref target="I-D.ietf-ippm-asymmetrical-pkts" format="default"/>, from the "STAMP Sub-TLV Types" registry.
</t>

   <table anchor="iana-tlv-type-tbl2" align="center">
       <name>Sub-TLV Type for Reflected Test Packet Control TLV</name>
        <thead>
          <tr>
            <th align="left">Value</th>
            <th align="center">Description</th>
            <th align="center">TLV Used</th>        
            <th align="left">Reference</th>
          </tr>
        </thead>
    
        <tbody>
          <tr>
            <td align="left">TBA2</td>
            <td align="center">MNA Header Control</td>
            <td align="center">Reflected Test Packet Control</td>
            <td align="left">This document</td>
        </tr>

        </tbody>
    
    </table>

    </section>

    </middle>

    <back>

    <references title="Normative References">
    &RFC2119; 
    &RFC8174; 
    &RFC8762;
    &RFC8972;
    &I-D.ietf-mpls-mna-hdr;
    &I-D.ietf-mpls-mna-ps-hdr;
    &I-D.ietf-mpls-mna-ioam;
    &I-D.ietf-ippm-asymmetrical-pkts;
    </references>

    <references title="Informative References">
    &RFC9197;
    &RFC9326;

    <reference anchor="NIST-CSPRNG">
          <front>
            <title>Recommendation for Random Number Generation Using Deterministic Random Bit Generators</title>
            <author>
              <organization>NIST Special Publication 800-90A</organization>
            </author>
            <date month="January" year="2012"/>
          </front>
    </reference>

    </references>

    <section title="Acknowledgments" numbered="no" anchor="acknowledgments">

    <t>
    The authors of this document would like to thank Greg Mirsky for reviewing
    this document and providing review comments.
    The authors would also like to thank Fabian Ihle for implementing the
    solution defined in this document in Tofino2. 
    </t>

    </section>

    </back>

    </rfc>
