<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC0768 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.0768.xml">
<!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 I-D.ietf-ippm-stamp-option-tlv SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-ippm-stamp-option-tlv.xml">
<!ENTITY RFC2104 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2104.xml">
<!ENTITY RFC2113 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2113.xml">
<!ENTITY RFC4868 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4868.xml">
<!ENTITY RFC5884 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5884.xml">
<!ENTITY RFC6335 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6335.xml">
<!ENTITY RFC6437 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6437.xml">
<!ENTITY RFC6936 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6936.xml">
<!ENTITY RFC7820 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7820.xml">
<!ENTITY RFC8029 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8029.xml">
<!ENTITY RFC8085 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8085.xml">
<!ENTITY RFC8126 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml">
<!ENTITY RFC8186 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8186.xml">
<!ENTITY RFC8321 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8321.xml">
<!ENTITY RFC8402 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8402.xml">
<!ENTITY RFC8754 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8754.xml">
<!ENTITY I-D.ietf-pce-binding-label-sid SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-pce-binding-label-sid.xml">
<!ENTITY I-D.ietf-pce-sr-bidir-path SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-pce-sr-bidir-path.xml">
]>
<rfc submissionType="IETF" docName="draft-gandhi-ippm-stamp-srpm-00" category="std" ipr="trust200902">
	<!-- 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 Extensions for Segment Routing">Simple TWAMP (STAMP) Extensions for Segment Routing Networks</title>
	<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>

	<date day="20" month="October" year="2020"/>
	<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) data planes.  This document specifies RFC 8762 
   (Simple Two-Way Active Measurement Protocol (STAMP))
   extensions for Delay and Loss Measurement in Segment Routing networks, for both
   SR-MPLS and SRv6 data planes.</t>

	</abstract>
	</front>

	<middle>
	<section title="Introduction" anchor="sect-1"><t>
   Segment Routing (SR) leverages the source routing paradigm and
   greatly simplifies network operations for Software Defined Networks
   (SDNs).  SR is applicable to both Multiprotocol Label Switching
   (SR-MPLS) and IPv6 (SRv6) data planes.  
   Built-in SR Performance Measurement (PM) is one of the
   essential requirements 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 using probe messages <xref target="RFC8762"/>. 
   It eliminates the need for control-channel signaling by using
   configuration data model to provision a test-channel (e.g. UDP paths). 
   <xref target="I-D.ietf-ippm-stamp-option-tlv"/>
   defines TLV extensions for STAMP messages.</t>

   <t>The STAMP message with a TLV for "direct measurement" can be used for combined Delay + Loss
   measurement <xref target="I-D.ietf-ippm-stamp-option-tlv"/>. However,  in 
   order to use only for loss measurement purpose, it requires the node to 
   support the delay measurement messages and support timestamp for these messages 
   (which may also require clock synchronization). 
   Furthermore, for hardware-based counter collection for direct-mode loss measurement, 
   the optional TLV based processing adds unnecessary overhead
   (as counters are not at well-known locations).</t>

   <t>This document specifies RFC 8762 
   (Simple Two-Way Active Measurement Protocol (STAMP))
   extensions for Delay and Loss Measurement in Segment Routing networks, for both
   SR-MPLS and SRv6 data planes.</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", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in <xref target="RFC2119"/> <xref target="RFC8174"/>
   when, and only when, they appear in all capitals, as shown here.</t>

	</section>

	<section title="Abbreviations" anchor="sect-2.2"><t>
   BSID: Binding Segment ID.</t>

	<t>
   DM: Delay Measurement.</t>

	<t>
   HMAC: Hashed Message Authentication Code.</t>

	<t>
   LM: Loss Measurement.</t>

	<t>
   MPLS: Multiprotocol Label Switching.</t>

	<t>
   NTP: Network Time Protocol.</t>

	<t>
   OWAMP: One-Way Active Measurement Protocol.</t>

	<t>
   PM: Performance Measurement.</t>

	<t>
   PTP: Precision Time Protocol.</t>

	<t>
   SID: Segment ID.</t>

	<t>
   SL: Segment List.</t>

	<t>
   SR: Segment Routing.</t>

	<t>
   SRH: Segment Routing Header.</t>

	<t>
   SR-MPLS: Segment Routing with MPLS data plane.</t>

	<t>
   SRv6: Segment Routing with IPv6 data plane.</t>

	<t>
   SSID: STAMP Session Identifier.</t>

	<t>
   STAMP: Simple Two-way Active Measurement Protocol.</t>

	</section>

	<section title="Reference Topology" anchor="sect-2.3"><t>
   In the reference topology shown below, the sender node R1 initiates a
   performance measurement probe query message and the reflector node R5
   sends a probe response message for the query message received.  The probe
   response message is typically sent to the sender node R1.</t>  

	<figure><artwork><![CDATA[
                       t1                t2
                      /                   \
             +-------+       Query         +-------+
             |       | - - - - - - - - - ->|       |
             |   R1  |=====================|   R5  |
             |       |<- - - - - - - - - - |       |
             +-------+       Response      +-------+
                      \                   /
                       t4                t3
              Sender                        Reflector

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


	<section title="Probe Query Message" anchor="sect-3">
	<section title="Control Code Field Extension for STAMP Messages" anchor="sect-3.1">
	<t>In this document, the Control Code field is defined for delay and loss measurement probe query messages
   for STAMP protocol in unauthenticated and authenticated modes.  
   The modified delay measurement probe query message format is shown in Figure 1. 
   This message format is backwards
   compatible with the message format defined in STAMP <xref target="RFC8762"/> as its reflector MUST
   ignore the received field (previously identified as MBZ).
   With this field, the reflector node does not require
   any additional state for PM (recall that in SR networks, 
   the state is in the probe packet and signaling of the parameters is undesired).   
   The usage of the Control Code is not limited to the SR and can be used for non-SR network.</t>

   <figure title="Sender Control Code in STAMP DM Message" anchor="ure-se-control-code-in-stamp-message"><artwork><![CDATA[
 .                                                               .
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                          Timestamp                            |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Error Estimate        | SSID                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         MBZ                                   |Se Control Code|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                                                               .
 .                                                               .
]]></artwork>
	</figure>

   <t>
   Sender Control Code: Set as follows in STAMP probe query message.</t>
   <t>  </t>
   <t>
   In a Query:</t>

	<t><list hangIndent="4" style="hanging"><t>
       0x0: Out-of-band Response Requested.  Indicates that the probe response
       is not required over the same path in the reverse direction.
       This is also the default behavior.</t>
	</list>
	</t>

	<t><list hangIndent="4" style="hanging"><t>
       0x1: In-band Response Requested.  Indicates that this query has
       been sent over a bidirectional path and the probe response is required
       over the same path in the reverse direction.</t> 
	</list>
	</t>

	<t><list hangIndent="4" style="hanging"><t>
       0x2: No Response Requested.</t>
	</list>
	</t>

	</section>

	<section title="Loss Measurement Query Message Extensions" anchor="sect-3.2">
   <t>In this document, STAMP probe query messages for
   loss measurement are defined as shown in Figure 2 and Figure 3. The message
   formats are hardware efficient due to 
   well-known locations of the counters and payload
   small in size.  They are stand-alone and similar to the delay
   measurement message formats (e.g. location of the Counter and Timestamp). They also  
   do not require backwards
   compatibility and support for the existing DM message formats from
   <xref target="RFC8762"/> as different user-configured destination UDP 
   port is used for loss measurement.</t>

	<figure title="STAMP LM Probe Query Message - Unauthenticated Mode" anchor="ure-lm-probe-query-message-format"><artwork><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Sequence Number                        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Counter                       |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |X|B| Reserved  | Block Number  | SSID                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         MBZ                                   |Se Control Code|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                        MBZ (24 octets)                        |
 |                                                               |
 |                                                               |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
	</figure>

	<figure title="STAMP LM Probe Query Message - Authenticated Mode" anchor="ure-lm-probe-query-message-format-authenticated-mode"><artwork><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Sequence Number                        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (12 octets)                        |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Counter                       |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |X|B| Reserved  | Block Number  | SSID                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         MBZ                                   |Se Control Code|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (64 octets)                        |
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                        HMAC (16 octets)                       |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
	</figure>

	<t>
   Sequence Number (32-bit): As defined in <xref target="RFC8762"/>.</t>

	<t>
   Transmit Counter (64-bit): The number of packets or octets sent by
   the sender node in the query message and by the reflector node in the
   response message.  The counter is always written at the well-known
   location in the probe query and response messages.</t>

	<t>
   Receive Counter (64-bit): The number of packets or octets received at
   the reflector node.  It is written by the reflector node in the probe
   response message.</t>

	<t>
   Sender Counter (64-bit): This is the exact copy of the transmit
   counter from the received query message.  It is written by the
   reflector node in the probe response message.</t>

	<t>
   Sender Sequence Number (32-bit): As defined in <xref target="RFC8762"/>.</t>

	<t>
   Sender TTL: As defined in <xref target="RFC8762"/>.</t>

	<t><list style="hanging" hangIndent="3"><t hangText="LM Flags: The meanings of the Flag bits are:">
	<vspace blankLines="1"/>
	X: Extended counter format indicator.  Indicates the use of
      extended (64-bit) counter values.  Initialized to 1 upon creation
      (and prior to transmission) of an LM query and copied from an LM
      query to an LM response message.  Set to 0 when the LM message is
      transmitted or received over an interface that writes 32-bit
      counter values.
	<vspace blankLines="1"/>
	B: Octet (byte) count.  When set to 1, indicates that the Counter
      1-4 fields represent octet counts.  The octet count applies to all
      packets within the LM scope, and the octet count of a packet sent
      or received includes the total length of that packet (but excludes
      headers, labels, or framing of the channel itself).  When set to
      0, indicates that the Counter fields represent packet counts.
	</t>

	</list>
	</t>

	<t>
   Block Number (8-bit): The Loss Measurement using Alternate-Marking
   method defined in <xref target="RFC8321"/> requires to color the data traffic.  To
   be able to correlate the transmit and receive traffic counters of the
   matching color, the Block Number (or color) of the traffic counters
   is carried by the probe query and response messages for loss
   measurement. The Block Number can also be used to aggregate 
   performance metrics collected.</t>

	<t>
   HMAC: The probe message in authenticated mode includes a key Hashed
   Message Authentication Code (HMAC) <xref target="RFC2104"/> hash.  Each probe
   query and response messages are authenticated by adding Sequence
   Number with Hashed Message Authentication Code (HMAC) TLV.  It can
   use HMAC-SHA-256 truncated to 128 bits (similarly to the use of it in
   IPSec defined in <xref target="RFC4868"/>); hence the length of the HMAC field is 16
   octets.</t>

	<t>
   HMAC uses its own key and the mechanism to distribute the HMAC key is
   outside the scope of this document.</t>

	<t>
   In authenticated mode, only the sequence number is encrypted, and the
   other payload fields are sent in clear text.  The probe message MAY
   include Comp.MBZ (Must Be Zero) variable length field to align the
   packet on 16 octets boundary.</t>

	</section>
	</section>

	<section title="Probe Response Message" anchor="sect-4">
        <section title="Loss Measurement Response Message Extensions" anchor="sect-4.1">
        <t>In this document, STAMP probe response message formats are defined for loss
   measurement as shown in Figure 4 and Figure 5.</t>

	<figure title="STAMP LM Probe Response Message - Unauthenticated Mode" anchor="ure-lm-probe-response-message-format"><artwork><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Sequence Number                        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Counter                       |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |X|B| Reserved  | Block Number  | SSID                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Receive Counter                        |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Sender Sequence Number                 |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Sender Counter                         |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |X|B| Reserved  |Sender Block Nu|   MBZ                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Sender TTL   |      MBZ                                      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
	</figure>

	<figure title="STAMP LM Probe Response Message - Authenticated Mode" anchor="ure-lm-probe-response-message-format-authenticated-mode"><artwork><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Sequence Number                        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (12 octets)                        |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Counter                       |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |X|B| Reserved  | Block Number  | SSID                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (4 octets)                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Receive Counter                        |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (8 octets)                         |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Sender Sequence Number                 |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (12 octets)                        |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Sender Counter                         |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |X|B| Reserved  |Sender Block Nu|   MBZ                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (4 octets)                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Sender TTL   |                                               |
 +-+-+-+-+-+-+-+-+                                               |
 |                        MBZ (15 octets)                        |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                        HMAC (16 octets)                       |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
	</figure>


        </section>
        </section>

	<section title="Node Address TLV Extensions" anchor="sect-5">
        <t>In this document, Node Address TLV is defined for STAMP message <xref target="I-D.ietf-ippm-stamp-option-tlv"/> 
        and has the following format shown in Figure 6:</t>


	<figure title="Node Address TLV Format" anchor="ure-node-address-tlv-format"><artwork><![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      |         Length                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Reserved                      | Address Family                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                           Address                             ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
	</figure>

   <t>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.</t>

   <t>The STAMP TLV Flags are set using the procedures described in <xref target="I-D.ietf-ippm-stamp-option-tlv"/>.</t>

   <t>The following Type is defined and it contains Node Address TLV:</t>

   <t>Destination Node Address (value TBA1):</t>
   <t>
   The Destination Node Address TLV is optional.  The Destination Node
   Address TLV indicates the address of the intended recipient node of the
   probe message.  The reflector node MUST NOT send response message if it
   is not the intended destination node of the probe query message.</t>
	</section>

	<section title="Return Path TLV Extensions" anchor="sect-6"><t>
   For two-way performance measurement, the reflector node needs to send
   the probe response message on a specific reverse path.  The sender
   node can request in the probe query message to the reflector node to
   send a response message back on a given reverse path (e.g. co-routed
   bidirectional path).  This way the reflector node does not require
   any additional state for PM (recall that in SR networks, 
   the state is in the probe packet and signaling of the parameters is undesired).</t>

	<t>
   For one-way performance measurement, the sender node address may not
   be reachable via IP route from the reflector node.  The sender node
   in this case needs to send its reachability path information to the
   reflector node.</t>

	<t>
   <xref target="I-D.ietf-ippm-stamp-option-tlv"/> defines STAMP probe query messages that
   can include one or more optional TLVs.  The TLV Type (value TBA2) is
   defined in this document for Return Path that carries reverse path for STAMP
   probe response messages (in the payload of the message).  The format
   of the Return Path TLV is shown in Figure 7:</t>

	<figure title="Return Path TLV" anchor="ure-return-path-tlv"><artwork><![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="I-D.ietf-ippm-stamp-option-tlv"/>.</t>

   <t>The following Type defined for the Return Path TLV contains the Node Address sub-TLV using the format shown above in Figure 7:</t>

	<t><list style="symbols"><t>Type (value 0): Return Address. Target node address of the
      response message different than the Source Address in the query</t>

	</list>
	</t>

	<figure title="Segment List Sub-TLV in Return Path TLV" anchor="ure-segment-list-sub-tlv-in-return-path-tlv"><artwork><![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      |         Length                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                    Segment(1)                                 |
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                                                               .
 .                                                               .
 .                                                               .

 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                    Segment(n)                                 |
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
	</figure>
	<t>
   The Segment List Sub-TLV (shown above in Figure 8) in the Return Path TLV can be one of the following Types:</t>

	<t><list style="symbols"><t>Type (value 1): SR-MPLS Label Stack of the Reverse Path</t>

	<t>Type (value 2): SR-MPLS Binding SID <xref target="I-D.ietf-pce-binding-label-sid"/> of
      the Reverse SR Policy</t>

	<t>Type (value 3): SRv6 Segment List of the Reverse Path</t>

	<t>Type (value 4): SRv6 Binding SID <xref target="I-D.ietf-pce-binding-label-sid"/> of
      the Reverse SR Policy</t>

	</list>
	</t>

	<t>
   The Return Path TLV is optional. The sender node MUST only insert
   one Return Path TLV in the probe query message and the reflector node
   MUST only process the first Return Path TLV in the probe query
   message and ignore other Return Path TLVs if present. The reflector
   node MUST send probe response message back on the reverse path
   specified in the Return Path TLV and MUST NOT add Return Path TLV in
   the probe response message.</t>

	</section>


	<section title="Security Considerations" anchor="sect-7"><t>
   The performance measurement is intended for deployment in
   well-managed private and service provider networks.  As such, it
   assumes that a node involved in a measurement operation has
   previously verified the integrity of the path and the identity of the
   far-end reflector node.</t>

	<t>
   If desired, attacks can be mitigated by performing basic validation
   and sanity checks, at the sender, of the counter or timestamp fields
   in received measurement response messages.  The minimal state
   associated with these protocols also limits the extent of measurement
   disruption that can be caused by a corrupt or invalid message to a
   single query/response cycle.</t>

	<t>
   Use of HMAC-SHA-256 in the authenticated mode protects the data
   integrity of the probe messages. Cryptographic measures may be enhanced by the correct configuration
   of access-control lists and firewalls.</t>

	</section>

	<section title="IANA Considerations" anchor="sect-8"><t>
   IANA will create a "STAMP TLV Type" registry for <xref target="I-D.ietf-ippm-stamp-option-tlv"/>. 
   IANA is requested to allocate a value for the following 
   Destination Address TLV Type from the IETF Review TLV range of this registry. 
   This TLV is to be carried in the probe messages.</t>

	<t><list style="symbols"><t>Type TBA1: Destination Node Address TLV</t>

	</list>
	</t>

   <t>
   IANA is also requested to allocate a value for the following 
   Return Path TLV Type from the IETF Review TLV range of the same registry. 
   This TLV is to be carried in the probe query messages.</t>

	<t><list style="symbols"><t>Type TBA2: Return Path TLV</t>

	</list>
	</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"/>.  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"/>. 
   Remaining code points are allocated according to <xref target="iana-return-path-tbl"/>:
   </t>

     <texttable anchor="iana-return-path-tbl" title="Return Path Sub-TLV Type Registry">
    <ttcol align="left">Value</ttcol>
    <ttcol align="center">Description</ttcol>
    <ttcol align="left">Reference</ttcol>
     <c>0</c>
    <c>Reserved</c>
    <c>This document</c>
     <c>1 - 175</c>
    <c>Unassigned</c>
    <c>This document</c>
     <c>176 - 239</c>
    <c>Unassigned</c>
    <c>This document</c>
     <c>240 - 251</c>
    <c>Experimental</c>
    <c>This document</c>
     <c>252 - 254</c>
    <c>Private Use</c>
    <c>This document</c>
    <c>255</c>
    <c>Reserved</c>
    <c>This document</c>
   </texttable> 

 
   <t>
   IANA is requested to allocate the values for the following Sub-TLV Types from this registry.</t>

	<t><list style="symbols"><t>Type (value 1): Return Address</t>

	<t>Type (value 2): SR-MPLS Label Stack of the Reverse Path</t>

	<t>Type (value 3): SR-MPLS Binding SID <xref target="I-D.ietf-pce-binding-label-sid"/>
                         of the Reverse SR Policy</t>

	<t>Type (value 4): SRv6 Segment List of the Reverse Path</t>

	<t>Type (value 5): SRv6 Binding SID <xref target="I-D.ietf-pce-binding-label-sid"/> of
                         the Reverse SR Policy</t>

	</list>
	</t>


	</section>

	</middle>

	<back>
	<references title="Normative References">
	&RFC2119;
	&RFC8174;
	&RFC8762;
	&I-D.ietf-ippm-stamp-option-tlv;
	</references>
	<references title="Informative References">
	&RFC2104;
	&RFC4868;
	&RFC8126;
	&RFC8321;
	&I-D.ietf-pce-binding-label-sid;
	</references>
	<section title="Acknowledgments" numbered="no" anchor="acknowledgments"><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 for reviewing this document and
   providing useful comments and suggestions.  The authors would like to
   acknowledge the earlier work on the loss measurement using TWAMP
   described in draft-xiao-ippm-twamp-ext-direct-loss.</t>

	</section>

	</back>

	</rfc>
