<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" docName="draft-ietf-ippm-stamp-srpm-04" category="std" ipr="trust200902" consensus="yes" obsoletes="" updates="" xml:lang="en" sortRefs="false" symRefs="true" tocInclude="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.12.0 -->
  <!-- Generated by id2xml 1.5.0 on 2020-02-06T01:41:26Z -->
    <front>
    <title abbrev="Simple TWAMP Extensions for SR Networks">Simple TWAMP (STAMP) Extensions for Segment Routing Networks</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-ippm-stamp-srpm-04"/>
    <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="Clarence Filsfils" initials="C." surname="Filsfils">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <email>cfilsfil@cisco.com</email>
      </address>
    </author>
    <author fullname="Daniel Voyer" initials="D." surname="Voyer">
      <organization>Bell Canada</organization>
      <address>
        <email>daniel.voyer@bell.ca</email>
      </address>
    </author>
    <author fullname="Mach(Guoyi) Chen" initials="M." surname="Chen">
      <organization>Huawei</organization>
      <address>
        <email>mach.chen@huawei.com</email>
      </address>
    </author>
    <author fullname="Bart Janssens" initials="B." surname="Janssens">
      <organization>Colt</organization>
      <address>
        <email>Bart.Janssens@colt.net</email>
      </address>
    </author>
    <author fullname="Richard Foote" initials="R." surname="Foote">
      <organization>Nokia</organization>
      <address>
        <email>footer.foote@nokia.com</email>
      </address>
    </author>
    <date day="05" month="July" year="2022"/>
    <workgroup>IPPM Working Group</workgroup>
    <abstract>
      <t>
   Segment Routing (SR) leverages the source routing paradigm.  SR is
   applicable to both Multiprotocol Label Switching (SR-MPLS) and IPv6
   (SRv6) forwarding planes.  This document specifies RFC 8762 
   (Simple Two-Way Active Measurement Protocol (STAMP))
   extensions for SR networks, for both SR-MPLS and SRv6 forwarding 
   planes by augmenting the optional extensions defined in RFC 8972.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   Segment Routing (SR) leverages the source routing paradigm 
   for Software Defined Networks
   (SDNs).  SR is applicable to both Multiprotocol Label Switching
   (SR-MPLS) and IPv6 (SRv6) forwarding planes <xref target="RFC8402" format="default"/>.  
   SR Policies as defined in <xref target="I-D.ietf-spring-segment-routing-policy" format="default"/> are used
   to steer traffic through a specific, user-defined paths using a stack of Segments. 
   A comprehensive SR Performance Measurement (PM) toolset is one of the
   essential requirements to measure network performance to provide Service Level Agreements (SLAs).</t>

      <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.
   Note that the YANG data model defined in <xref target="I-D.ietf-ippm-stamp-yang" format="default"/>
   can be used to provision the STAMP Session-Sender and STAMP Session-Reflector.</t>

      <t>The STAMP test packets are transmitted along an IP path between a Session-Sender 
   and a Session-Reflector to measure performance delay and packet loss along that IP path.  
   It may be desired in SR networks that the same path (same set of links and nodes) between the 
   Session-Sender and Session-Reflector is used for the STAMP test packets in both directions.  
   This is achieved by using the STAMP <xref target="RFC8762" format="default"/> extensions for 
   SR-MPLS and SRv6 networks specified in this document by augmenting 
   the optional extensions defined in <xref target="RFC8972" format="default"/>.</t>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>Conventions Used in This Document</name>
      <section anchor="sect-2.1" numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>
   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/>
   when, and only when, they appear in all capitals, as shown here.</t>
      </section>
      <section anchor="sect-2.2" numbered="true" toc="default">
        <name>Abbreviations</name>
        <t>
   MPLS: Multiprotocol Label Switching.</t>
        <t>
   PM: Performance Measurement.</t>
        <t>
   SID: Segment ID.</t>
        <t>
   SL: Segment List.</t>
        <t>
   SR: Segment Routing.</t>
        <t>
   SR-MPLS: Segment Routing with MPLS forwarding plane.</t>
        <t>
   SRv6: Segment Routing with IPv6 forwarding plane.</t>
        <t>
   SSID: STAMP Session Identifier.</t>
        <t>
   STAMP: Simple Two-Way Active Measurement Protocol.</t>
      </section>
      <section anchor="sect-2.3" numbered="true" toc="default">
        <name>Reference Topology</name>
        <t>
   In the reference topology shown below, the STAMP Session-Sender S1 initiates a
   STAMP test packet and the STAMP Session-Reflector R1
   transmits a reply STAMP test packet.  The reply test packet may be transmitted 
   to the Session-Sender S1 on the same path (same set of links and nodes) or a different path 
   in the reverse direction from the path taken towards the Session-Reflector R1.</t>
        <t>The nodes S1 and R1 may be
   connected via a link or an SR path <xref target="RFC8402" format="default"/>.  
   The link may be a physical interface, virtual link, 
   or Link Aggregation Group (LAG) <xref target="IEEE802.1AX" format="default"/>, or LAG member. 
   The SR path may be an SR Policy <xref target="I-D.ietf-spring-segment-routing-policy" format="default"/> 
   on node S1 (called head-end) with destination to node R1 (called tail-end).</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
                       T1                T2
                      /                   \
             +-------+     Test Packet     +-------+
             |       | - - - - - - - - - ->|       |
             |   S1  |=====================|   R1  |
             |       |<- - - - - - - - - - |       |
             +-------+  Reply Test Packet  +-------+
                      \                   /
                       T4                T3

         STAMP Session-Sender        STAMP Session-Reflector

                       Reference Topology
]]></artwork>
      </section>
    </section>


    <section anchor="sect-3" numbered="true" toc="default">
      <name>Verification Check Flag in TLV</name>
      <t>The STAMP TLV option in <xref target="RFC8972" format="default"/> defines the use of the 8-bit flags field common to all STAMP TLVs.</t> 
 
      <t>A one-bit flag called Verification Check (V) flag is defined at position (TBA3) in the flags field of the STAMP TLV. A Session-Sender MUST set the V flag to 0 before transmitting an extended STAMP test packet when reply test packet is required. A Session-Reflector MUST set the V flag to 1 for any STAMP TLV that it supports that includes a requirement that cannot be met or is in conflict with the Session-Reflector processing or capability. The V flag MUST be set to 0 by the Session-Reflector when the requirement from the request is met.</t>

      <t>A Session-Sender MUST set the V flag 
   to 1 before transmitting an extended STAMP test packet when test packet reply is not required.  A
   Session-Reflector MUST NOT reply and MUST drop the test packet if the Session-Reflector 
   determined for any STAMP TLV that is supports that includes a requirement that cannot be met or is in conflict with the Session-Reflector processing or capability. 
   </t>

    </section>
    
    <section anchor="sect-4" numbered="true" toc="default">
      <name>Destination Node Address TLV</name>
      <t>The Session-Sender may need to transmit test packets to the 
    Session-Reflector with a different destination address 
    that is not matching an address on the Session-Reflector 
    e.g. when the STAMP test packet is encapsulated by a tunneling protocol 
    or an MPLS Segment List with destination IPv4 address from 127/8 range or Segment Routing 
    Header (SRH) with destination IPv6 address ::1/128. 
    When using IPv4 destination address from 127/8 range (e.g. for testing ECMPs), the STAMP 
    test packet may not reach the intended Session-Reflector in an error condition, 
    and an un-intended node may transmit reply test packet resulting in reporting of 
    invalid measurement metrics. 
      </t>
      <t><xref target="RFC8972" format="default"/> defines STAMP test packets that
    can include one or more optional TLVs.
    In this document, Destination Node Address TLV (Type TBA1) 
    is defined for STAMP test packet <xref target="RFC8972" format="default"/> 
    and has the following format shown in Figure 1:</t>
      <figure anchor="ure-node-address-tlv-format">
        <name>Destination Node Address TLV Format</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                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                           Address                             .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <t>The Length field is used to decide the Address Family of the Address.</t>
      <t>The STAMP TLV Flags are set using the procedures described in <xref target="RFC8972" format="default"/>.</t>
      <t>The Destination Node Address TLV is optional.  The Destination Node
   Address TLV indicates the address of the intended Session-Reflector node of the test packet.
   The Session-Reflector MUST add the received Destination Node Address TLV in the reply test packet to ensure
   the symmetric reply test packet size and to transmit the STAMP TLV Flags to the Session-Sender.
      </t>

      <t>A Session-Sender MUST set the V flag
   to 0 before transmitting an extended STAMP test packet when test packet reply is required.  A
   Session-Reflector that supports this TLV, MUST set the V flag in the reply test packet to 1 if the Session-Reflector 
   determined that it is not the intended Destination as identified in the Destination
   Node Address TLV.
   Otherwise, the Session-Reflector MUST set the V flag in the
   reply test packet to 0.</t>
      <t>A Session-Sender MUST set the V flag 
   to 1 before transmitting an extended STAMP test packet when test packet reply is not required.  A
   Session-Reflector that supports this TLV, MUST NOT reply and MUST drop the test packet if the Session-Reflector 
   determined that it is not the intended Destination as identified in the Destination
   Node Address TLV. </t>

    </section>


    <section anchor="sect-5" numbered="true" toc="default">
      <name>Return Path TLV</name>
      <t>
   For end-to-end SR paths, the Session-Reflector may need to transmit the reply test 
   packet on a specific return path.  The Session-Sender
   can request this in the test packet to the Session-Reflector using a Return Path TLV. 
   With this TLV carried in the Session-Sender test packet,
   signaling and maintaining dynamic SR network state for the
   STAMP sessions on the Session-Reflector are avoided.</t>

      <t>For links, the Session-Reflector may need to transmit the reply test
   packet on the same incoming link in the reverse direction. 
   The Session-Sender can request this in the test packet 
   to the Session-Reflector using a Return Path TLV.</t>

      <t><xref target="RFC8972" format="default"/> defines STAMP test packets that
   can include one or more optional TLVs.  In this document, the TLV Type (value TBA2) is
   defined for the Return Path TLV that carries the return path for the Session-Sender 
   test packet. The format of the Return Path TLV is shown in Figure 2:</t>
      <figure anchor="ure-return-path-tlv">
        <name>Return Path 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=TBA2   |         Length                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                   Return Path Sub-TLVs                        |
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>


      <t>The STAMP TLV Flags are set using the procedures described in <xref target="RFC8972" format="default"/>.</t>
      <t>The Return Path TLV is optional. The Session-Sender MUST only insert
   one Return Path TLV in the STAMP test packet.
   The Session-Reflector that supports this TLV,
   MUST only process the first Return Path TLV in the test
   packet and ignore other Return Path TLVs if present, 
   and it MUST add the received Return Path TLV (including all Sub-TLVs) in the reply test packet to ensure the symmetric reply 
   test packet size and to transmit the STAMP TLV Flags to the Session-Sender.
   The Session-Reflector that supports this TLV MUST reply using the Return Path
   received in the Session-Sender test packet. In the case where the Session-Reflector does not 
   support this TLV, the procedure 
   defined in <xref target="RFC8762" format="default"/> is followed by the Session-Reflector.</t>

   <t>A Session-Sender MUST set the V flag
   to 0 before transmitting an extended STAMP test packet when test packet reply is required.  A
   Session-Reflector that supports this TLV, MUST set the V flag in the reply test packet to 1 if the Session-Reflector 
   determined that it cannot use the return path in the test packet to transmit the reply test packet.
   Otherwise, the Session-Reflector MUST set the V flag in the
   reply test packet to 0.</t>

   <t>A Session-Sender MUST set the V flag 
   to 1 before transmitting an extended STAMP test packet when test packet reply is not required.  A
   Session-Reflector that supports this TLV, MUST NOT reply and MUST drop the test packet if the Session-Reflector 
   determined that it cannot use the return path in the test packet to transmit the reply test packet.
   </t>

    <section anchor="sect-5.1" numbered="true" toc="default">
        <name>Return Path Sub-TLVs</name>
        <t>The Return Path TLV contains one or more Sub-TLVs to carry 
   the information for the requested return path. 
   A Return Path Sub-TLV can carry Return Path Control Code, 
   Return Path IP Address or Return Path Segment List.</t>
        <t>The STAMP Sub-TLV Flags are set using the procedures described in <xref target="RFC8972" format="default"/>.</t>
        <t>When Return Path Sub-TLV is present in the Session-Sender test packet,
   the Session-Reflector that supports this TLV,
   MUST transmit reply test packet using the return path information 
   specified in the Return Path Sub-TLV.</t>
        <t>A Return Path TLV MUST NOT contain both Control Code Sub-TLV as 
   well as Return Address or Return Segment List Sub-TLV.</t>
        <section anchor="sect-4.1.1" numbered="true" toc="default">
          <name>Return Path Control Code Sub-TLV</name>
          <t>The format of the Return Path Control Code Sub-TLV is shown in Figure 3. The Type of the Return Path 
    Control Code Sub-TLV is defined as following:</t>
          <ul spacing="normal">
            <li>Type (value 1): Return Path Control Code. 
    The Session-Sender can request the Session-Reflector
    to transmit the reply test packet based on the flags defined in the Control Code field.</li>
          </ul>
          <figure anchor="ure-control-code-return-path-tlv">
            <name>Control Code Sub-TLV in Return Path 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=1      |         Length                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                   Control Code                                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>
          <t>Control Code Flags (32-bit): Defined as follows.</t>
          <dl newline="false" spacing="normal" indent="4">
            <dt/>
            <dd>
       0x0: No Reply Requested.</dd>
          </dl>
          <dl newline="false" spacing="normal" indent="4">
            <dt/>
            <dd>
       0x1: Reply Requested on the Same Link.</dd>
          </dl>
          <t>When Control Code flag is set to 0x0 in the Session-Sender test packet, 
    the Session-Reflector does not
    transmit reply test packet to the Session-Sender and terminates the
    STAMP test packet. Only the one-way measurement is applicable in this case.
    Optionally, the Session-Reflector may locally stream performance metrics
    via telemetry using the information from the received test packet.
    All other Return Path Sub-TLVs MUST be ignored in this case.</t>
          <t>When Control Code flag is set to 0x1 in the Session-Sender test packet, 
    the Session-Reflector transmits the reply test packet over the same incoming link 
    where the test packet is received in the reverse direction towards the Session-Sender.
    All other Return Path Sub-TLVs MUST be ignored in this case.</t>
        </section>
        <section anchor="sect-5.1.2" numbered="true" toc="default">
          <name>Return Address Sub-TLV</name>
          <t>The STAMP reply test packet may be transmitted to the Session-Sender  
   to a different destination address on the Session-Sender using Return Path TLV.
   For this, the Session-Sender can specify in the test packet the receiving destination 
   node address for the Session-Reflector reply test packet.
   When transmitting the STAMP test packet to a different destination address, the Session-Sender 
   MUST follow the procedure defined in Section 4.3 of <xref target="RFC8762" format="default"/>.</t>
          <t>The format of the Return Address Sub-TLV is shown in Figure 4.
   The Address Family field indicates the type of the address, and it
   SHALL be set to one of the assigned values in the "IANA Address Family Numbers" registry.
   The Type of the Return Address Sub-TLV is defined as following:</t>
          <ul spacing="normal">
            <li>Type (value 2): Return Address. Destination node address of the
    Session-Reflector reply test packet different than the Source Address in the Session-Sender test packet.</li>
          </ul>
          <figure anchor="ure-return-node-address-tlv-format">
            <name>Return Address Sub-TLV in Return Path 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=2    |         Length                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Reserved                      | Address Family                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                           Address                             .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>
        </section>
        <section anchor="sect-5.1.3" numbered="true" toc="default">
          <name>Return Segment List Sub-TLVs</name>
          <t>The format of the Segment List Sub-TLVs in the Return Path TLV is shown in Figures 5, 6, and 7.
    The segment entries MUST be in network order. 
    The Segment List Sub-TLV can be one of the following Types:</t>
          <ul spacing="normal">
            <li>Type (value 3): SR-MPLS Label Stack of the Return Path</li>
            <li>Type (value 4): SRv6 Segment List of the Return Path</li>
            <li>Type (value 5): Structured SRv6 Segment List of the Return Path</li>
          </ul>
          <figure anchor="ure-sr-mpl-segment-list-sub-tlv-in-return-path-tlv">
            <name>SR-MPLS Segment List Sub-TLV in Return Path 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=3    |         Length                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                    Segment(1)                                 |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                                                               .
 .                                                               .
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                    Segment(n) (bottom of stack)               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>
          <figure anchor="ure-srv6segment-list-sub-tlv-in-return-path-tlv">
            <name>SRv6 Segment List Sub-TLV in Return Path 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=4    |         Length                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                    Segment(1)                                 |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                                                               .
 .                                                               .
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                    Segment(n) (bottom of stack)               |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>
          <figure anchor="ure-s-srv6segment-list-sub-tlv-in-return-path-tlv">
            <name>Structured SRv6 Segment List Sub-TLV in Return Path 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=5    |         Length                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |    LB Length  |  LN Length    | Fun. Length   |  Arg. Length  | 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
 |                                                               |
 |                    Segment(1)                                 |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                                                               .
 .                                                               .
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |    LB Length  |  LN Length    | Fun. Length   |  Arg. Length  | 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
 |                                                               |
 |                    Segment(n) (bottom of stack)               |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>
          <t>An SR-MPLS Label Stack Sub-TLV may carry only Binding SID 
   <xref target="I-D.ietf-pce-binding-label-sid" format="default"/> of the Return SR-MPLS Policy.</t>
          <t>An SRv6 Segment List Sub-TLV and Structured SRv6 Segment List Sub-TLV may carry only Binding SID 
   <xref target="I-D.ietf-pce-binding-label-sid" format="default"/> of the Return SRv6 Policy.</t>
	  <t>A Structured SRv6 Segment List Sub-TLV is used carry the structure and behavior 
   for SRv6 SIDs <xref target="RFC8986" format="default"/> used in the Return SRv6 path as shown in Figure 7. 
   The structure is intended for informational use by the control and management planes.         
   The fields in the structure of the Sub-TLV are defined as follows <xref target="RFC8986" format="default"/>:</t>
          <ul spacing="normal">
            <li>LB Length: 1 octet. SRv6 SID Locator Block (LB) length in bits.</li>
            <li>LN Length: 1 octet. SRv6 SID Locator Node (LN) length in bits.</li>
            <li>Fun. Length: 1 octet. SRv6 SID Function length in bits.</li>
            <li>Arg. Length: 1 octet. SRv6 SID Arguments length in bits.</li>
          </ul>
	  <t>In Structured SRv6 Segment List Sub-TLV, the sum of all four sizes MUST be less than or equal to 128 bits.  
   If the sum of all four sizes is larger than 128 bits, the Sub-TLV MUST NOT be used by the Session-Reflector.</t>
          <t>The Session-Sender MUST only insert one Segment List Return Path Sub-TLV
   in the test packet.  The Session-Reflector MUST only process
   the first Segment List Return Path Sub-TLV in the test packet and ignore other
   Segment List Return Path Sub-TLVs if present.</t>
          <t>Note that in addition to P2P SR paths, the Return Segment List Sub-TLV is 
   also applicable to P2MP SR paths.
   For example, for P2MP SR paths, it may only carry the Node Segment Identifier of 
   the Session-Sender in order for the reply test packet to follow an SR path
   to the Session-Sender.</t>
        </section>
      </section>
    </section>
    <section anchor="sect-6" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   The usage of STAMP protocol is intended for deployment in limited
   domains <xref target="RFC8799" format="default"/>.  As such, it assumes that a node involved in STAMP
   protocol operation has previously verified the integrity of the path
   and the identity of the far-end Session-Reflector.</t>
      <t>If desired, attacks can be mitigated by performing basic validation
   and sanity checks, at the Session-Sender, of the timestamp fields
   in received reply test packets.  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>The security considerations specified in <xref target="RFC8762" format="default"/>
   and <xref target="RFC8972" format="default"/> also apply to the extensions
   defined in this document.  Specifically, the
   message integrity protection using HMAC, as defined in <xref target="RFC8762" format="default"/>
   Section 4.4, also apply to the procedure described in this document.</t>
      <t>STAMP uses the well-known UDP port number that could become 
   a target of denial of service (DoS) or could
   be used to aid man-in-the-middle (MITM) attacks.
   Thus, the security considerations and measures to mitigate the 
   risk of the attack documented in Section 6 of <xref target="RFC8545" format="default"/>
   equally apply to the STAMP extensions in this document.</t>
      <t>The STAMP extensions defined in this document may be used for
   potential "proxying" attacks.  For example, a Session-Sender
   may specify a return path that has a destination different from that
   of the Session-Sender.  But normally, such attacks will not happen in an
   SR domain where the Session-Senders and Session-Reflectors belong to the same
   domain.  In order to prevent using the extension defined
   in this document for proxying any possible attacks, the return path
   has destination to the same node where the forward path is from.
   The Session-Reflector may drop the Session-Sender test packet when it cannot
   determine whether the Return Path has the destination to the
   Session-Sender.  That means, the Session-Sender
   should choose a proper source address according to the specified Return
   Path to help the Session-Reflector to make that decision.
      </t>
    </section>
    <section anchor="sect-7" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
   IANA has created the "STAMP TLV Types" registry for <xref target="RFC8972" format="default"/>. 
   IANA is requested to allocate a value for the 
   Destination Address TLV Type and a value for the 
   Return Path TLV Type from the IETF Review TLV range of the same registry. </t>


      <table anchor="iana-tlv-type-tbl" align="center">
        <name>STAMP TLV Types</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">Destination Node Address TLV</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">TBA2</td>
            <td align="center">Return Path TLV</td>
            <td align="left">This document</td>
          </tr>
        </tbody>
      </table>
 

   <t>NOTE: The following experimental values will be used until IANA early allocation is received: </t>
   <t>
   o   Destination Node Address TLV Value 240
   </t>
   <t>
   o   Return Path TLV Value 241
   </t>

   <t>
   IANA is requested to create a sub-registry for "Return Path Sub-TLV Type".
   All code points in the range 1 through 175 in this registry shall be
   allocated according to the "IETF Review" procedure as specified in
   <xref target="RFC8126" format="default"/>.  Code points in the range 176 through 239 in this
   registry shall be allocated according to the "First Come First
   Served" procedure as specified in <xref target="RFC8126" format="default"/>. 
   Remaining code points are allocated according to <xref target="iana-return-path-tbl" format="default"/>:
      </t>
      <table anchor="iana-return-path-tbl" align="center">
        <name>Return Path Sub-TLV Type Registry</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">1 - 175</td>
            <td align="center">IETF Review</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">176 - 239</td>
            <td align="center">First Come First Served</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">240 - 251</td>
            <td align="center">Experimental Use</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">252 - 254</td>
            <td align="center">Private Use</td>
            <td align="left">This document</td>
          </tr>
        </tbody>
      </table>
      <t>
   IANA is requested to allocate the values for the following Sub-TLV Types from this registry.</t>
      <table anchor="iana-return-path-reg-types" align="center">
        <name>Return Path Sub-TLV Types</name>
        <thead>
          <tr>
            <th align="left">Type</th>
            <th align="center">Description</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">0</td>
            <td align="center">Reserved</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">1</td>
            <td align="center">Return Path Control Code</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">2</td>
            <td align="center">Return Address</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">3</td>
            <td align="center">SR-MPLS Label Stack of the Return Path</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">4</td>
            <td align="center">SRv6 Segment List of the Return Path</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">5</td>
            <td align="center">Structured SRv6 Segment List of the Return Path</td>
            <td align="left">This document</td>
          </tr>
          <tr>
            <td align="left">255</td>
            <td align="center">Reserved</td>
            <td align="left">This document</td>
          </tr>
        </tbody>
      </table>
      <t>IANA has created the "STAMP TLV Flags" subregistry.
   IANA is requested to allocate the following bit position in the "STAMP TLV Flags" subregistry.</t>
      <table anchor="iana-return-flags-tbl" align="center">
        <name>STAMP TLV Flags</name>
        <thead>
          <tr>
            <th align="left">Bit Position</th>
            <th align="center">Symbol</th>
            <th align="center">Description</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">TBA3</td>
            <td align="center">V</td>
            <td align="center">Verification Check Flag</td>
            <td align="left">This document</td>
          </tr>
        </tbody>
      </table>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8762" target="https://www.rfc-editor.org/info/rfc8762" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8762.xml">
          <front>
            <title>Simple Two-Way Active Measurement Protocol</title>
            <author initials="G." surname="Mirsky" fullname="G. Mirsky">
              <organization/>
            </author>
            <author initials="G." surname="Jun" fullname="G. Jun">
              <organization/>
            </author>
            <author initials="H." surname="Nydell" fullname="H. Nydell">
              <organization/>
            </author>
            <author initials="R." surname="Foote" fullname="R. Foote">
              <organization/>
            </author>
            <date year="2020" month="March"/>
            <abstract>
              <t>This document describes the Simple Two-way Active Measurement Protocol (STAMP), which enables the measurement of both one-way and round-trip performance metrics, like delay, delay variation, and packet loss.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8762"/>
          <seriesInfo name="DOI" value="10.17487/RFC8762"/>
        </reference>
        <reference anchor="RFC8972" target="https://www.rfc-editor.org/info/rfc8972" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8972.xml">
          <front>
            <title>Simple Two-Way Active Measurement Protocol Optional Extensions</title>
            <author initials="G." surname="Mirsky" fullname="G. Mirsky">
              <organization/>
            </author>
            <author initials="X." surname="Min" fullname="X. Min">
              <organization/>
            </author>
            <author initials="H." surname="Nydell" fullname="H. Nydell">
              <organization/>
            </author>
            <author initials="R." surname="Foote" fullname="R. Foote">
              <organization/>
            </author>
            <author initials="A." surname="Masputra" fullname="A. Masputra">
              <organization/>
            </author>
            <author initials="E." surname="Ruffini" fullname="E. Ruffini">
              <organization/>
            </author>
            <date year="2021" month="January"/>
            <abstract>
              <t>This document describes optional extensions to Simple Two-way Active Measurement Protocol (STAMP) that enable measurement of performance metrics. The document also defines a STAMP Test Session Identifier and thus updates RFC 8762.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8972"/>
          <seriesInfo name="DOI" value="10.17487/RFC8972"/>
        </reference>
        <reference anchor="RFC8986" target="https://www.rfc-editor.org/info/rfc8986" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8986.xml">
          <front>
            <title>Segment Routing over IPv6 (SRv6) Network Programming</title>
            <author initials="C." surname="Filsfils" fullname="C. Filsfils" role="editor">
              <organization/>
            </author>
            <author initials="P." surname="Camarillo" fullname="P. Camarillo" role="editor">
              <organization/>
            </author>
            <author initials="J." surname="Leddy" fullname="J. Leddy">
              <organization/>
            </author>
            <author initials="D." surname="Voyer" fullname="D. Voyer">
              <organization/>
            </author>
            <author initials="S." surname="Matsushima" fullname="S. Matsushima">
              <organization/>
            </author>
            <author initials="Z." surname="Li" fullname="Z. Li">
              <organization/>
            </author>
            <date year="2021" month="February"/>
            <abstract>
              <t>The Segment Routing over IPv6 (SRv6) Network Programming framework enables a network operator or an application to specify a packet processing program by encoding a sequence of instructions in the IPv6 packet header.</t>
              <t>Each instruction is implemented on one or several nodes in the network and identified by an SRv6 Segment Identifier in the packet.</t>
              <t>This document defines the SRv6 Network Programming concept and specifies the base set of SRv6 behaviors that enables the creation of interoperable overlays with underlay optimization.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8986"/>
          <seriesInfo name="DOI" value="10.17487/RFC8986"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC8402" target="https://www.rfc-editor.org/info/rfc8402" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8402.xml">
          <front>
            <title>Segment Routing Architecture</title>
            <author initials="C." surname="Filsfils" fullname="C. Filsfils" role="editor">
              <organization/>
            </author>
            <author initials="S." surname="Previdi" fullname="S. Previdi" role="editor">
              <organization/>
            </author>
            <author initials="L." surname="Ginsberg" fullname="L. Ginsberg">
              <organization/>
            </author>
            <author initials="B." surname="Decraene" fullname="B. Decraene">
              <organization/>
            </author>
            <author initials="S." surname="Litkowski" fullname="S. Litkowski">
              <organization/>
            </author>
            <author initials="R." surname="Shakir" fullname="R. Shakir">
              <organization/>
            </author>
            <date year="2018" month="July"/>
          </front>
          <seriesInfo name="RFC" value="8402"/>
          <seriesInfo name="DOI" value="10.17487/RFC8402"/>
        </reference>
        <reference anchor="RFC8126" target="https://www.rfc-editor.org/info/rfc8126" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml">
          <front>
            <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
            <author initials="M." surname="Cotton" fullname="M. Cotton">
              <organization/>
            </author>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <author initials="T." surname="Narten" fullname="T. Narten">
              <organization/>
            </author>
            <date year="2017" month="June"/>
          </front>
          <seriesInfo name="BCP" value="26"/>
          <seriesInfo name="RFC" value="8126"/>
          <seriesInfo name="DOI" value="10.17487/RFC8126"/>
        </reference>
        <reference anchor="RFC8545" target="https://www.rfc-editor.org/info/rfc8545" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8545.xml">
          <front>
            <title>Well-Known Port Assignments for the One-Way Active Measurement Protocol (OWAMP) and the Two-Way Active Measurement Protocol (TWAMP)</title>
            <author initials="A." surname="Morton" fullname="A. Morton" role="editor">
              <organization/>
            </author>
            <author initials="G." surname="Mirsky" fullname="G. Mirsky" role="editor">
              <organization/>
            </author>
            <date year="2019" month="March"/>
          </front>
          <seriesInfo name="RFC" value="8545"/>
          <seriesInfo name="DOI" value="10.17487/RFC8545"/>
        </reference>
        <reference anchor="RFC8799" target="https://www.rfc-editor.org/info/rfc8799" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8799.xml">
          <front>
            <title>Limited Domains and Internet Protocols</title>
            <author initials="B." surname="Carpenter" fullname="B. Carpenter">
              <organization/>
            </author>
            <author initials="B." surname="Liu" fullname="B. Liu">
              <organization/>
            </author>
            <date year="2020" month="July"/>
          </front>
          <seriesInfo name="RFC" value="8799"/>
          <seriesInfo name="DOI" value="10.17487/RFC8799"/>
        </reference>
        <reference anchor="I-D.ietf-spring-segment-routing-policy" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-spring-segment-routing-policy.xml" target="https://www.ietf.org/archive/id/draft-ietf-spring-segment-routing-policy-22.txt">
          <front>
            <title>Segment Routing Policy Architecture</title>
            <author fullname="Clarence Filsfils">
              <organization>Cisco Systems</organization>
            </author>
            <author fullname="Ketan Talaulikar">
              <organization>Cisco Systems</organization>
            </author>
            <author fullname="Daniel Voyer">
              <organization>Bell Canada</organization>
            </author>
            <author fullname="Alex Bogdanov">
              <organization>British Telecom</organization>
            </author>
            <author fullname="Paul Mattes">
              <organization>Microsoft</organization>
            </author>
            <date month="March" day="22" year="2022"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-spring-segment-routing-policy-22"/>
        </reference>
        <reference anchor="I-D.ietf-pce-binding-label-sid" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-pce-binding-label-sid.xml" target="https://www.ietf.org/archive/id/draft-ietf-pce-binding-label-sid-15.txt">
          <front>
            <title>Carrying Binding Label/Segment Identifier in PCE-based Networks.</title>
            <author fullname="Siva Sivabalan">
              <organization>Ciena Corporation</organization>
            </author>
            <author fullname="Clarence Filsfils">
              <organization>Cisco Systems, Inc.</organization>
            </author>
            <author fullname="Jeff Tantsura">
              <organization>Microsoft Corporation</organization>
            </author>
            <author fullname="Stefano Previdi">
              <organization>Huawei Technologies</organization>
            </author>
            <author fullname="Cheng Li (editor)">
              <organization>Huawei Technologies</organization>
            </author>
            <date month="March" day="20" year="2022"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-pce-binding-label-sid-15"/>
        </reference>
        <reference anchor="I-D.ietf-ippm-stamp-yang" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-ippm-stamp-yang.xml" target="https://www.ietf.org/archive/id/draft-ietf-ippm-stamp-yang-09.txt">
          <front>
            <title>Simple Two-way Active Measurement Protocol (STAMP) Data Model</title>
            <author fullname="Greg Mirsky">
              <organization>ZTE Corp.</organization>
            </author>
            <author fullname="Xiao Min">
              <organization>ZTE Corp.</organization>
            </author>
            <author fullname="Wei S Luo">
              <organization>Ericsson</organization>
            </author>
            <date month="July" day="12" year="2021"/>
            <abstract>
              <t>   This document specifies the data model for implementations of
   Session-Sender and Session-Reflector for Simple Two-way Active
   Measurement Protocol (STAMP) mode using YANG.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-ippm-stamp-yang-09"/>
        </reference>
        <reference anchor="IEEE802.1AX">
          <front>
            <title>IEEE Standard for Local and metropolitan area networks - Link Aggregation</title>
            <author>
              <organization>
       IEEE Std. 802.1AX
              </organization>
            </author>
            <date month="November" year="2008"/>
          </front>
        </reference>
      </references>
    </references>
    <section numbered="false" anchor="acknowledgments" toc="default">
      <name>Acknowledgments</name>
      <t>
   The authors would like to thank Thierry Couture for the discussions
   on the use-cases for Performance Measurement in Segment Routing.  The authors
   would also like to thank Greg Mirsky, Mike Koldychev, Gyan Mishra, Tianran Zhou, 
   Al Mortons, Reshad Rahman, Zhenqiang Li, Frank Brockners, 
   and Cheng Li for providing comments and suggestions.</t>
    </section>
  </back>
</rfc>
