SPRING Working Group                                      R. Gandhi, Ed.
Internet-Draft                                               C. Filsfils
Intended status: Standards Track Informational                       Cisco Systems, Inc.
Expires: July 16, August 14, 2021                                        D. Voyer
                                                             Bell Canada
                                                                 M. Chen
                                                                  Huawei
                                                             B. Janssens
                                                                    Colt
                                                        January 12,
                                                       February 10, 2021

 Performance Measurement Using Simple TWAMP (STAMP) for Segment Routing
                                Networks
                   draft-gandhi-spring-stamp-srpm-04
                   draft-gandhi-spring-stamp-srpm-05

Abstract

   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 procedure for sending
   and processing probe query and response messages describes procedures for
   Performance Measurement (PM) in Segment Routing networks.  The procedure uses SR networks using the mechanisms defined
   in RFC 8762 (Simple Two-Way Active Measurement Protocol (STAMP)) and
   its TLV optional extensions for Performance Measurement. defined in RFC 8972 and draft-gandhi-ippm-
   stamp-srpm.  The procedure specified described is applicable to SR-MPLS and
   SRv6 data planes and is used for both Links links and end-to-end SR Paths paths
   including SR Policies.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on July 16, August 14, 2021.

Copyright Notice

   Copyright (c) 2020 2021 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   3
     2.1.  Requirements Language . . . . . . . . . . . . . . . . . .   3
     2.2.  Abbreviations . . . . . . . . . . . . . . . . . . . . . .   3
     2.3.
     2.2.  Reference Topology  . . . . . . . . . . . . . . . . . . .   4
   3.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . .   5
     3.1.  Example Provisioning STAMP Reference Model . . . . . . . . . . . . . . .   6   5
   4.  Probe Messages  . . . . . . . . . . . . .  Delay Measurement for Links and SR Paths  . . . . . . . . . .   7
     4.1.  Probe Query Message . . . .  Session-Sender Test Packet  . . . . . . . . . . . . . . .   7
       4.1.1.  Delay Measurement Query Message . . .  Session-Sender Test Packet for Links  . . . . . . . .   7
       4.1.2.  Loss Measurement Query Message  . . . . . . . . . . .   8
       4.1.3.  Probe Query  Session-Sender Test Packet for Links . . . . SR Paths . . . . . . .   7
     4.2.  Session-Reflector Test Packet . . . . .   8
       4.1.4.  Probe Query for SR Policy . . . . . . . . .   9
       4.2.1.  One-way Delay Measurement Mode  . . . . .   9
     4.2.  Probe Response Message . . . . . .  10
       4.2.2.  Two-way Delay Measurement Mode  . . . . . . . . . . .  11
       4.2.1.  One-way  10
       4.2.3.  Round-trip Delay Measurement Mode . . . . . . . . . .  12
     4.3.  Delay Measurement for P2MP SR Policies  . . . .  11
       4.2.2.  Two-way Measurement Mode . . . . .  13
     4.4.  Additional STAMP Test Packet Processing Rules . . . . . .  14
       4.4.1.  TTL . . .  11
       4.2.3.  Loopback Measurement Mode . . . . . . . . . . . . . .  13
     4.3.  Additional Probe Message Processing Rules . . . . . . . .  14
       4.3.1.  TTL and
       4.4.2.  IPv6 Hop Limit  . . . . . . . . . . . . . . . . . . .  14
       4.3.2.
       4.4.3.  Router Alert Option . . . . . . . . . . . . . . . . .  14
       4.3.3.  UDP Checksum  15
   5.  Packet Loss Measurement for Links and SR Paths  . . . . . . .  15
   6.  Direct Measurement for Links and SR Paths . . . . . . . . . .  15
   7.  Session Status for Links and SR Paths . . . .  14
   5.  Performance Measurement for P2MP SR Policies . . . . . . . .  15
   6.
   8.  ECMP Support for SR Policies  . . . . . . . . . . . . . . . .  16
   7.  Performance Delay and Liveness Monitoring . . . . . . . . . .  16
   8.  15
   9.  Security Considerations . . . . . . . . . . . . . . . . . . .  17
   9.  16
   10. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  17
   10.
   11. References  . . . . . . . . . . . . . . . . . . . . . . . . .  17
     10.1.
     11.1.  Normative References . . . . . . . . . . . . . . . . . .  17
     10.2.
     11.2.  Informative References . . . . . . . . . . . . . . . . .  18  17
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  20  19
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  20  19

1.  Introduction

   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. planes [RFC8402].  SR takes advantage of
   the Equal-
   Cost Equal-Cost Multipaths (ECMPs) between source and transit nodes,
   between transit nodes and between transit and destination nodes.  SR
   Policies as defined in [I-D.ietf-spring-segment-routing-policy] are
   used to steer traffic through a specific, user-defined paths using a
   stack of Segments.  Built-in SR Performance Measurement (PM) is one
   of the essential requirements to provide Service Level Agreements
   (SLAs).

   The Simple Two-way Active Measurement Protocol (STAMP) provides
   capabilities for the measurement of various performance metrics in IP
   networks using probe messages [RFC8762].  It eliminates the need for
   control-channel signaling control protocol by
   using configuration data and management model to provision a test-channel (e.g.  UDP paths).
   [I-D.ietf-ippm-stamp-option-tlv] and manage test
   sessions.  [RFC8972] defines TLV optional extensions for STAMP.
   [I-D.gandhi-ippm-stamp-srpm] defines STAMP
   messages.

   This document specifies procedures extensions for sending SR
   networks.

   The STAMP supports two modes of STAMP Session-Reflector: Stateless
   and processing probe
   query Stateful as described in Section 4 of [RFC8762].  In Stateless
   mode, maintenance of each STAMP test session on Session-Reflector is
   avoided.  In SR networks, as the state is in the packet, the
   signaling of the parameters and response messages creating extra states in the network
   are undesired.  Hence, Stateless mode of Session-Reflector is
   preferred in SR networks.

   This document describes procedures for Performance Measurement in SR
   networks.  The procedure uses
   networks using the mechanisms defined in STAMP [RFC8762]
   (STAMP) and its TLV
   optional extensions [I-D.ietf-ippm-stamp-option-tlv] for
   Performance Measurement. defined in [RFC8972] and
   [I-D.gandhi-ippm-stamp-srpm].  The procedure specified described is applicable
   to SR-MPLS and SRv6 data planes and is used for both Links links and end-to-
   end end-
   to-end SR Paths paths including SR Policies and Flex-Algo IGP Paths.  Unless
   otherwise specified, the mechanisms defined in [RFC8762] and
   [I-D.ietf-ippm-stamp-option-tlv] are not modified by this document. [RFC8402].

2.  Conventions Used in This Document

2.1.  Requirements Language

   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 [RFC2119] [RFC8174]
   when, and only when, they appear in all capitals, as shown here.

2.2.  Abbreviations

   BSID: Binding Segment ID.

   DM: Delay Measurement.

   ECMP: Equal Cost Multi-Path.

   HMAC: Hashed Message Authentication Code.

   LM: Loss Measurement.

   MPLS: Multiprotocol Label Switching.

   NTP: Network Time Protocol.

   OWAMP: One-Way Active Measurement Protocol.

   PM: Performance Measurement.

   PSID: Path Segment Identifier.

   PTP: Precision Time Protocol.

   SHA: Secure Hash Algorithm.

   SID: Segment ID.

   SL: Segment List.

   SR: Segment Routing.

   SRH: Segment Routing Header.

   SR-MPLS: Segment Routing with MPLS data plane.

   SRv6: Segment Routing with IPv6 data plane.

   SSID: STAMP Session Identifier.

   STAMP: Simple Two-way Active Measurement Protocol.

   TC: Traffic Class.

2.3.

   TTL: Time To Live.

2.2.  Reference Topology

   In the reference topology shown below, the sender node STAMP Session-Sender R1
   initiates a
   performance measurement probe query message STAMP test packet and the reflector node R5
   sends STAMP Session-Reflector R3
   transmits a probe response message for the query message received. reply test packet.  The
   probe response message reply test packet is typically sent transmitted
   back to the sender node R1.

   SR is enabled on nodes STAMP Session-Sender R1 and R5. on the same path or a different
   path in the reverse direction.

   The nodes R1 and R5 R3 may be
   directly connected via a Link link or there exists an SR
   path [RFC8402].  The link may be a Point-to-Point (P2P) physical interface, virtual link,
   or Link Aggregation Group (LAG) [IEEE802.1AX], or LAG member link.
   The SR Path e.g. path may be an SR Policy

   [I-D.ietf-spring-segment-routing-policy] on node R1 (called head-end)
   with destination to node R5 R3 (called tail-
   end).

                          t1                t2 tail-end).

                          T1                T2
                         /                   \
                +-------+       Query     Test Packet     +-------+
                |       | - - - - - - - - - ->|       |
                |   R1  |=====================|   R5   R3  |
                |       |<- - - - - - - - - - |       |
                +-------+       Response  Reply Test Packet  +-------+
                         \                   /
                          t4                t3
                 Sender                        Reflector
                          T4                T3

            STAMP Session-Sender        STAMP Session-Reflector

                          Reference Topology

3.  Overview

   For one-way and two-way delay measurements performance measurement in Segment Routing SR networks, the probe messages STAMP test packets
   defined in [RFC8762] are used.  For
   direct-mode and inferred-mode loss measurements, the probe messages its optional extensions defined in [RFC8972]
   and [I-D.gandhi-ippm-stamp-srpm] are used.  For both Links used as described in this
   document.  The procedures are used to measure one-way, two-way and
   end-to-end SR Paths including
   round-trip delay as well as packet loss metrics in an SR Policies and Flex-Algo IGP Paths, no
   PM state for network.

   For performance delay or and packet loss measurement, STAMP Session-
   Sender test packets are transmitted in-band on the same path as the
   data traffic flow under measurement need to be created on measure the
   reflector node R5.

   Separate UDP destination port numbers are user-configured for delay and packet
   loss measurements from experienced by the range specified in [RFC8762].  As
   specified in [RFC8762], data traffic flow.  It is also desired that
   Session-Reflector reply test packets are transmitted in-band on the reflector supports
   same path in the destination UDP
   port 862 for delay measurement probe messages by default. reverse direction.  This UDP
   port however, is not used for loss measurement probe messages.  The
   sender uses achieved in SR networks
   by using the STAMP extensions defined in
   [I-D.gandhi-ippm-stamp-srpm].

   A destination UDP port number following the guidelines specified in
   Section 6 is selected as described in [RFC6335]. [RFC8762].
   The same destination UDP port is used for
   Links and SR Paths and the reflector is unaware if the query is for
   the Links or SR Paths.  The number of UDP ports with PM functionality
   needs to be minimized due to limited hardware resources.

   For Performance Measurement, probe query and response messages are
   sent as following:

   o  For delay measurement, the probe messages are sent on the
      congruent path of the data traffic by the sender node, and are
      used to measure the delay experienced by the actual data traffic
      flowing on the Links link and end-to-end SR Paths.

   o  For loss measurement, the probe messages are sent on the congruent path of the data traffic by the sender node, and are used to
      collect the receive traffic counters for the incoming link or
      incoming SID where the probe query messages are received at the
      reflector node (incoming link or incoming SID needed since the
      reflector node does not have PM state present).

   The In-Situ Operations, Administration, and Maintenance (IOAM)
   mechanisms for SR-MPLS defined in [I-D.gandhi-mpls-ioam-sr] and for
   SRv6 defined in [I-D.ali-spring-ioam-srv6] are used to carry PM
   information such as timestamp in-band as part of the data packets,
   and are outside the scope of this document.
   STAMP test sessions.

3.1.  Example Provisioning STAMP Reference Model

   An example of a provisioning STAMP reference model and typical measurement
   parameters
   for each user-configured including the destination UDP port for performance delay
   and loss measurements STAMP test session
   is shown in the following Figure 1:

                              +------------+
                              | Controller |
                              +------------+
                                  /    \
     Destination UDP Port        /      \    Destination UDP port
   Measurement Protocol          /    \        Measurement Protocol
   Measurement Type             /      \       Measurement Type
     Delay/Loss                /        \        Delay/Loss
     Authentication Mode & Key  /        \   Authentication Mode & Key
     Delay Measurement Mode    /          \
     Timestamp Format         /            \
     Packet Loss Measurement Mode
   Delay Measurement Mode Type        /              \   SSID (Wildcard)
   Loss Measurement Mode
                            /                \
                           v                  v
                       +-------+          +-------+
                       |       |          |       |
                       |   R1  |============|   R5  |==========|   R3  |
                       |       |  SR Path          |       |
                       +-------+  Or Link          +-------+
                      Sender              Reflector

                STAMP Session-Sender  STAMP Session-Reflector

                  Figure 1: Example Provisioning STAMP Reference Model

   Example of Measurement Protocol is STAMP, example of the Timestamp Format is PTPv2 [IEEE1588] or NTP and example NTP.  Example
   of the Loss Delay Measurement Mode is one-way, two-way and round-trip mode as
   described in this document.  Example of Packet Loss Type is inferred-mode or direct-mode.

   The mechanisms to provision round-
   trip packet loss [RFC8762].

   When using the authenticated mode for delay measurement, the sender matching
   Authentication Type (e.g.  HMAC-SHA-256) and reflector nodes Key are
   outside user-configured
   on STAMP Session-Sender and STAMP Session-Reflector [RFC8762].

   The STAMP Session-Reflector R3 uses the timestamp format from the
   received STAMP test packet.  In addition, the STAMP Session-Reflector
   R3 uses the scope parameters of the return path for the reply test packet
   from the received STAMP test packet, as described in this document.  The provisioning

   Note that the controller in the reference model is not
   used intended for
   signaling the PM SR parameters for STAMP test sessions between the reflector STAMP
   Session-Sender and sender
   nodes STAMP Session-Reflector.  In addition, maintenance
   of each STAMP test session on Session-Reflector and creating extra
   state are avoided in an SR networks.

   The reflector node R5 uses the parameters for the timestamp format
   and delay measurement mode (i.e. one-way or two-way mode) from the
   received probe query message.

4.  Probe Messages

4.1.  Probe Query Message network.

   The probe messages YANG data model defined in [RFC8762] are [I-D.ietf-ippm-stamp-yang] can be used for delay
   measurement
   to provision the STAMP Session-Sender and STAMP Session-Reflector.

4.  Delay Measurement for Links and end-to-end SR Paths including SR Policies.
   For loss measurement, the probe messages defined in [I-D.gandhi-ippm-
   stamp-srpm] are used.

4.1.1.  Delay Measurement Query Message

4.1.  Session-Sender Test Packet

   The message content for delay measurement probe query message of an example STAMP Session-Sender test packet using an
   UDP header [RFC0768] is shown in Figure 2.  The DM probe query
   message is sent with user-configured Destination UDP port number for
   DM.  The Destination UDP port cannot be used as Source port, since
   the message does not have any indication to distinguish between the
   query and response message.  The payload of the DM probe query
   message contains the delay measurement message
   STAMP Session-Sender test packet defined in [RFC8762].

    +---------------------------------------------------------------+
    | IP Header                                                     |
    .  Source IP Address = Sender Session-Sender IPv4 or IPv6 Address      .
    .  Destination IP Address = Reflector Address=Session-Reflector IPv4 or IPv6 Address      . Address.
    .  Protocol = UDP                                               .
    .                                                               .
    +---------------------------------------------------------------+
    | UDP Header                                                    |
    .  Source Port = As chosen by Sender Session-Sender                    .
    .  Destination Port = User-configured Port for Delay Measurement. | 862                .
    .                                                               .
    +---------------------------------------------------------------+
    | Payload = DM Message Test Packet as specified in Section 4.2 of RFC 8762 |
    .                                                               .
    +---------------------------------------------------------------+

               Figure 2: DM Probe Query Message

   Timestamp field Example Session-Sender Test Packet

4.1.1.  Session-Sender Test Packet for Links

   The STAMP Session-Sender test packet as shown in Figure 2 is eight bytes and use
   transmitted over the format defined in
   Section 4.2.1 link for delay measurement.  The local and
   remote IP addresses of [RFC8762].  It is recommended to use the IEEE 1588v2
   Precision Time Protocol (PTP) truncated 64-bit timestamp format
   [IEEE1588] link are used as specified Source and Destination
   Addresses.

4.1.2.  Session-Sender Test Packet for SR Paths

   The delay measurement for end-to-end SR path in [RFC8186], SR network is
   applicable to both end-to-end SR-MPLS and SRv6 paths including SR
   Policies.

   The STAMP Session-Sender IPv4 or IPv6 address is used as the Source
   Address.  The SR Policy endpoint IPv4 or IPv6 address is used as the
   Destination Address.

   In the case of Color-Only Destination Steering, with hardware support in
   Segment Routing networks.

4.1.1.1.  Delay Measurement Authentication Mode

   When using IPv4 endpoint of
   0.0.0.0 or IPv6 endpoint of ::0
   [I-D.ietf-spring-segment-routing-policy], the authenticated mode loopback address from
   the range 127/8 for delay measurement, IPv4, or the matching
   authentication type (e.g.  HMAC-SHA-256) and key are user-configured
   on both loopback address ::1/128 for IPv6 is
   used as the Destination Address, respectively.

4.1.2.1.  Session-Sender Test Packet for SR-MPLS Policies

   An SR-MPLS Policy may contain a number of Segment Lists.  A STAMP
   Session-Sender test packet is transmitted for each Segment List of
   the SR-MPLS Policy.  The content of an example STAMP Session-Sender
   test packet for an end-to-end SR-MPLS Policy is shown in Figure 3.

    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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                Segment(1)             | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    .                                                               .
    .                                                               .
    .                                                               .
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                Segment(n)             | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                PSID                   | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                Test Packet as shown in Figure 2               |
    .                                                               .
    +---------------------------------------------------------------+

      Figure 3: Example Session-Sender Test Packet for SR-MPLS Policy

   The Segment List (SL) can be empty in case of a single-hop SR-MPLS
   Policy with Implicit NULL label.

   The Path Segment Identifier (PSID)
   [I-D.ietf-spring-mpls-path-segment] of an SR-MPLS Policy can be
   carried in the sender MPLS header as shown in Figure 3, and reflector nodes. can be used for
   direct measurement as described in Section 7.

4.1.2.2.  Session-Sender Test Packet for SRv6 Policies

   An SRv6 Policy may contain a number of Segment Lists.  A separate user-configured
   destination UDP port STAMP
   Session-Sender test packet is transmitted for each Segment List of
   the SRv6 Policy.  An SRv6 Policy can contain an SRv6 Segment Routing
   Header (SRH) carrying a Segment List as described in [RFC8754].  The
   content of an example STAMP Session-Sender test packet for an end-to-
   end SRv6 Policy is shown in Figure 4.

   The SRv6 network programming is described in
   [I-D.ietf-spring-srv6-network-programming].  The procedure defined
   for upper-layer header processing for SRv6 SIDs in
   [I-D.ietf-spring-srv6-network-programming] is used to process the
   IPv6/UDP header in the received test packets on the Session-
   Reflector.

    +---------------------------------------------------------------+
    | IP Header                                                     |
    .  Source IP Address = Session-Sender IPv6 Address              .
    .  Destination IP Address = Destination IPv6 Address            .
    .                                                               .
    +---------------------------------------------------------------+
    | SRH as specified in RFC 8754                                  |
    .  <PSID, Segment List>                                         .
    .                                                               .
    +---------------------------------------------------------------+
    | IP Header                                                     |
    .  Source IP Address = Session-Sender IPv6 Address              .
    .  Destination IP Address = Session-Reflector IPv6 Address      .
    .  Protocol = UDP                                               .
    .                                                               .
    +---------------------------------------------------------------+
    | UDP Header                                                    |
    .  Source Port = As chosen by Session-Sender                    .
    .  Destination Port = User-configured Port | 862                .
    .                                                               .
    +---------------------------------------------------------------+
    | Payload = Test Packet as specified in Section 4.2 of RFC 8762 |
    .                                                               .
    +---------------------------------------------------------------+

       Figure 4: Example Session-Sender Test Packet for SRv6 Policy

   The Segment List (SL) may be empty and no SRH may be carried.

   The Path Segment Identifier (PSID)
   [I-D.ietf-spring-srv6-path-segment] of the delay measurement SRV6 Policy can be carried
   in
   authentication mode due to the different probe message format.

4.1.2.  Loss Measurement Query Message

   The message content for loss measurement probe query message using
   UDP header [RFC0768] is SRH as shown in Figure 3.  The LM probe query
   message is sent with user-configured Destination UDP port number for
   LM, which is a different Destination UDP port number than DM.
   Separate Destination UDP ports are used for direct-mode 4 and inferred-
   mode loss measurements.  The Destination UDP port cannot can be used for direct
   measurement as
   Source port, since described in Section 7.

4.2.  Session-Reflector Test Packet

   The STAMP Session-Reflector reply test packet is transmitted using
   the message does not have any indication to
   distinguish between IP/UDP information from the query and response message. received test packet.  The LM probe
   query message contains the payload for loss measurement as defined content of
   an example STAMP Session-Reflector reply test packet is shown in
   [I-D.gandhi-ippm-stamp-srpm].
   Figure 5.

    +---------------------------------------------------------------+
    | IP Header                                                     |
    .  Source IP Address = Sender Session-Reflector IPv4 or IPv6 Address   .
    .  Destination IP Address                                       .
    .              = Reflector IPv4 or IPv6 Source IP Address from Received Test Packet    .
    .  Protocol = UDP                                               .
    .                                                               .
    +---------------------------------------------------------------+
    | UDP Header                                                    |
    .  Source Port = As chosen by Sender Session-Reflector                 .
    .  Destination Port = User-configured Source Port for Loss Measurement from Received Test Packet     .
    .                                                               .
    +---------------------------------------------------------------+
    | Payload = LM Message Test Packet as specified in [I-D.gandhi-ippm-stamp-srpm]| Section 4.3 of RFC 8762 |
    .                                                               .
    +---------------------------------------------------------------+

              Figure 3: LM Probe Query Message

4.1.2.1.  Loss 5: Example Session-Reflector Test Packet

4.2.1.  One-way Delay Measurement Authentication Mode

   When using

   In one-way delay measurement mode, a reply test packet as shown in
   Figure 5 is transmitted by the authenticated mode STAMP Session-Reflector, for loss measurement, both
   links and SR Policies.  The reply test packet may be transmitted on
   the matching
   authentication type (e.g.  HMAC-SHA-256) same path or a different path in the reverse direction.

   The STAMP Session-Sender address may not be reachable via IP route
   from the STAMP Session-Reflector.  The STAMP Session-Sender in this
   case can send its reachability path information to the STAMP Session-
   Reflector using the Return Path TLV defined in
   [I-D.gandhi-ippm-stamp-srpm].

   In this mode, as per Reference Topology, all timestamps T1, T2, T3,
   and key T4 are user-configured
   on both collected by the sender test packets.  However, only timestamps
   T1 and reflector nodes.  A separate user-configured
   destination UDP port is T2 are used for the loss measurement in
   authentication mode due to the different message format.

4.1.3.  Probe Query for Links

   The probe query message measure one-way delay as defined in Figure 2 for (T2 - T1).

4.2.2.  Two-way Delay Measurement Mode

   In two-way delay measurement
   and mode, a reply test packet as shown in
   Figure 3 for loss measurement are used for Links which may be
   physical, virtual or LAG (bundle), LAG (bundle) member, numbered/
   unnumbered Links.  The probe messages are pre-routed over 5 is transmitted by the Link
   for both delay and loss measurement.  The local and remote IP
   addresses of STAMP Session-Reflector in-band on the
   same path in the reverse direction, e.g. on the reverse direction
   link are used as Source and Destination Addresses.
   They can also be IPv6 link local address as probe messages are pre-
   routed.

4.1.4.  Probe Query for or associated reverse SR Policy

   The performance path [I-D.ietf-pce-sr-bidir-path].

   For two-way delay and loss measurement mode for segment routing is
   applicable links, the STAMP Session-
   Reflector needs to both end-to-end SR-MPLS and SRv6 Policies.

   The sender IPv4 or IPv6 address is used as transmit the source address.  The
   endpoint IPv4 or IPv6 address reply test packet in-band on the same
   link where the test packet is used as received.  The STAMP Session-Sender can
   request in the destination address.  In test packet to the case of SR Policy with IPv4 endpoint of 0.0.0.0 or IPv6 endpoint
   of ::0 [I-D.ietf-spring-segment-routing-policy], STAMP Session-Reflector to transmit
   the loopback address
   from range 127/8 for IPv4, or reply test packet back on the loopback address ::1/128 for IPv6
   is used as same link using the destination address, respectively.  In this case, Node
   Address Control Code
   Sub-TLV in the Return Path TLV [I-D.gandhi-ippm-stamp-srpm] defined in
   [I-D.gandhi-ippm-stamp-srpm].

   For two-way delay measurement mode for end-to-end SR paths, the STAMP
   Session-Reflector needs to transmit the reply test packet in-band on
   a specific reverse path.  The STAMP Session-Sender can be sent request in the probe
   query message
   test packet to identify the intended destination node.  The
   reflector node MUST NOT send response message if it is not STAMP Session-Reflector to transmit the
   intended destination node reply test
   packet back on a given reverse path using a Segment List sub-TLV in
   the Node Address Return Path TLV [I-D.gandhi-ippm-
   stamp-srpm].

4.1.4.1.  Probe Query Message defined in [I-D.gandhi-ippm-stamp-srpm].

   In this mode, as per Reference Topology, all timestamps T1, T2, T3,
   and T4 are collected by the test packets.  All four timestamps are
   used to measure two-way delay as ((T4 - T1) - (T3 - T2)).

4.2.2.1.  Session-Reflector Test Packet for SR-MPLS Policy Policies

   The probe query messages content of an example STAMP Session-Reflector reply test packet
   transmitted in-band on the same path as the data traffic flow under
   measurement for performance two-way delay measurement of an end-to-end SR-MPLS
   Policy is sent using its SR-MPLS header containing the MPLS
   segment list as shown in Figure 4. 6.

    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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                Segment(1)             | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    .                                                               .
    .                                                               .
    .                                                               .
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                Segment(n)             | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                PSID                   | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |   Message                Test Packet as shown in Figure 2 for DM or Figure 3 for LM 5               |
    .                                                               .
    +---------------------------------------------------------------+

    Figure 4: 6: Example Probe Query Message Session-Reflector Test Packet for SR-MPLS Policy

   The Segment List (SL) can be empty to indicate Implicit NULL label
   case

4.2.2.2.  Session-Reflector Test Packet for a single-hop SR Policy. SRv6 Policies

   The Path Segment Identifier (PSID)
   [I-D.ietf-spring-mpls-path-segment] content of the SR-MPLS Policy is used for
   accounting received traffic an example STAMP Session-Reflector reply test packet
   transmitted in-band on the egress node for loss measurement.

4.1.4.2.  Probe Query Message for SRv6 Policy

   An SRv6 Policy setup using the SRv6 Segment Routing Header (SRH) and
   a Segment List same path as defined in [RFC8754].  The SRv6 network programming
   is defined in [I-D.ietf-spring-srv6-network-programming].  The probe
   query messages the data traffic flow under
   measurement for performance two-way delay measurement of an end-to-end SRv6
   Policy is sent using its SRH with Segment List as SRH is shown in Figure 5. 7.

   The procedure defined for upper-layer header processing for SRv6 SIDs
   in [I-D.ietf-spring-srv6-network-programming] is used to process the
   UDP header in the received probe query messages.

    +---------------------------------------------------------------+
    | IP Header                                                     |
    .  Source IP Address = Sender IPv6 Address                      .
    .  Destination IP Address = Destination IPv6 Address            .
    .                                                               .
    +---------------------------------------------------------------+
    | SRH as specified also used to process
   the IPv6/UDP header in RFC 8754                                  |
    .  <Segment List>                                               .
    .                                                               . the received reply test packets on the
   Session-Sender.

    +---------------------------------------------------------------+
    | IP Header (as needed)                                                     |
    .  Source IP Address = Sender Session-Reflector IPv6 Address           .
    .  Destination IP Address = Reflector Destination IPv6 Address            .
    .                                                               .
    +---------------------------------------------------------------+
    | UDP Header                                                    |
    .  Source Port = As chosen by Sender                            .
    .  Destination Port = User-configured Port                      .
    .                                                               .
    +---------------------------------------------------------------+
    | Payload = DM Message SRH as specified in Section 4.2 of RFC 8762 8754                                  |
    . Payload = LM Message specified in [I-D.gandhi-ippm-stamp-srpm].  <Segment List>                                               .
    .                                                               .
    +---------------------------------------------------------------+

           Figure 5: Example Probe Query Message for SRv6 Policy

4.2.  Probe Response Message

   The probe response message is sent using the IP/UDP information from
   the received probe query message.  The content of the probe response
   message is shown in Figure 6.
    +---------------------------------------------------------------+
    | IP Header                                                     |
    .  Source IP Address = Reflector IPv4 or Session-Reflector IPv6 Address           .
    .  Destination IP Address                                       .
    .              = Source IP IPv6 Address from Query Received Test Packet  .
    .  Protocol = UDP                                               .
    .                                                               .
    +---------------------------------------------------------------+
    | UDP Header                                                    |
    .  Source Port = As chosen by Reflector Session-Reflector                 .
    .  Destination Port = Source Port from Query Received Test Packet     .
    .                                                               .
    +---------------------------------------------------------------+
    | Payload = DM Message Test Packet as specified in Section 4.3 of RFC 8762 |
    . Payload = LM Message specified in [I-D.gandhi-ippm-stamp-srpm].
    .                                                               .
    +---------------------------------------------------------------+

      Figure 6: Probe Response Message

4.2.1.  One-way 7: Example Session-Reflector Test Packet for SRv6 Policy

4.2.3.  Round-trip Delay Measurement Mode

   In one-way measurement mode, the probe response message as defined in
   Figure 6 is

   The STAMP Session-Sender test packets are sent back out-of-band in loopback mode to the sender node, for both Links
   and SR Policies.
   measure round-trip delay of a bidirectional path.  The Sender Control Code is set IP header of
   the STAMP Session-Sender test packet contains the Destination Address
   equals to "Out-of-band
   Response Requested".  In this delay measurement mode, as per
   Reference Topology, all timestamps t1, t2, t3, and t4 are collected
   by the probes.  However, only timestamps t1 STAMP Session-Sender address and t2 are used the Source Address
   equals to
   measure one-way delay the STAMP Session-Reflector address.  Optionally, the STAMP
   Session-Sender test packet can carry the return path information
   (e.g.  return path label stack for SR-MPLS) as (t2 - t1).

   For one-way performance measurement, part of the sender node address may SR header.
   This way, the received Session-Sender test packets are not
   be reachable via IP route from punted out
   of the reflector node.  The sender node fast path in this case needs to send its reachability forwarding (to slow path information to or control-plane) at the
   reflector node using Return Path TLV defined in [I-D.gandhi-ippm-
   stamp-srpm].

4.2.2.  Two-way Measurement Mode

   In two-way measurement mode, when using a bidirectional path,
   STAMP Session-Reflector.  Also, the
   probe response message as defined in Figure 6 Session-Reflector does not
   process them and generate reply test packets.

   As the reply test packet is sent back to not generated by the
   sender node on STAMP Session-
   Reflector, the congruent path of STAMP Session-Sender ignores the data traffic on 'Session-Sender
   Sequence Number', 'Session-Sender Timestamp', 'Session-Sender Error
   Estimate', and 'Session-Sender TTL' in the same
   reverse direction Link or associated reverse SR Policy
   [I-D.ietf-pce-sr-bidir-path].  The Sender Control Code is set to "In-
   band Response Requested". received test packet.

   In this delay measurement mode, as per Reference Topology, all the timestamps t1, t2, t3, T1 and t4 T4 are
   collected by the probes.  All four test packets.  Both these timestamps are used to
   measure two-way round-trip delay as ((t4 - t1) (T4 - (t3 - t2)).

   For two-way measurement mode T1).

4.3.  Delay Measurement for Links, the probe response message is
   sent back P2MP SR Policies

   The Point-to-Multipoint (P2MP) SR path that originates from a root
   node terminates on the incoming physical interface where the probe query
   message is received.

   For two-way multiple destinations called leaf nodes (e.g.
   P2MP SR Policy [I-D.ietf-pim-sr-p2mp-policy]).

   The procedures for performance measurement mode described in this document
   for P2P SR Policy, the reflector node needs
   to send Policies are used for the probe response message on a specific reverse path. P2MP SR Policies as listed
   below.

   o  The
   sender STAMP Session-Sender root node can request transmits test packets using
      the Tree-SID defined in [I-D.ietf-pim-sr-p2mp-policy] for the probe query message to P2MP
      SR-MPLS Policy as shown in Figure 8.  The STAMP Session-Sender
      test packets may contain the reflector
   node to send a response message back on a given reverse path (e.g.
   co-routed bidirectional path) using Return Path TLV replication SID as defined in [I-
   D.gandhi-ippm-stamp-srpm].  This way
      [I-D.ietf-spring-sr-replication-segment].

   o  The Destination Address is set to the reflector node does not
   require any additional SR state loopback address from the
      range 127/8 for PM (recall that IPv4, or the loopback address ::1/128 for IPv6.

   o  Each STAMP Session-Reflector leaf node transmits its node address
      in SR networks, the state is Source Address of the reply test packets shown in Figure 5.
      This allows the probe packet and signaling STAMP Session-Sender root node to identify the
      STAMP Session-Reflector leaf nodes of the parameters is
   undesired).

4.2.2.1.  Probe Response Message for SR-MPLS Policy P2MP SR Policy.

   o  The message content for sending probe response message P2MP root node measures the delay for two-way
   performance measurement of an end-to-end SR-MPLS Policy is shown in
   Figure 7. each P2MP leaf node
      individually.

    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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                Segment(1)             | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    .                                                               .
    .                                                               .
    .                                                               .
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                Segment(n)             | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                Message as shown in Figure 6                   |
    .                                                               .
    +---------------------------------------------------------------+

        Figure 7: Example Probe Response Message for SR-MPLS Policy

   The Path Segment Identifier (PSID)
   [I-D.ietf-spring-mpls-path-segment] of the forward SR Policy in the
   probe query can be used to find the associated reverse SR Policy
   [I-D.ietf-pce-sr-bidir-path] to send the probe response message for
   two-way measurement of SR Policy unless when using STAMP message with
   Return Path TLV.

4.2.2.2.  Probe Response Message for SRv6 Policy

   The message content for sending probe response message on the
   congruent path of the data traffic for two-way performance
   measurement of an end-to-end SRv6 Policy with SRH is shown in
   Figure 8.  The procedure defined for upper-layer header processing
   for SRv6 SIDs in [I-D.ietf-spring-srv6-network-programming] is used
   to process the UDP header in the received probe response messages.

    +---------------------------------------------------------------+
    | IP Header                                                     |
    .  Source IP Address = Reflector IPv6 Address                   .
    .  Destination IP Address = Destination IPv6 Address            .
    .                                                               .
    +---------------------------------------------------------------+
    | SRH as specified in RFC 8754                                  |
    .  <Segment List>                                               .
    .                                                               .
    +---------------------------------------------------------------+
    | IP Header (as needed)                                         |
    .  Source IP Address = Reflector IPv6 Address                   .
    .  Destination IP Address = Source IPv6 Address from Query      .
    .                                                               .
    +---------------------------------------------------------------+ 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | UDP Header              Tree-SID                 | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    .  Source Port = As chosen by Sender                                                               .
    .  Destination Port = User-configured Port                                                               .
    .                                                               .
    +---------------------------------------------------------------+
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | Payload = DM Message   Test Packet as specified shown in Section 4.3 of RFC 8762 Figure 2                            |
    . Payload = LM Message specified in [I-D.gandhi-ippm-stamp-srpm].
    .                                                               .
    +---------------------------------------------------------------+
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    Figure 8: Example Probe Response Message Session-Sender Test Packet with Tree-SID for SRv6 SR-
                                MPLS Policy

4.2.3.  Loopback Measurement Mode

   The Loopback measurement mode can be used to measure round-trip delay measurement for a bidirectional SR Path.  The IP header of the probe query
   message contains the destination address equals to the sender address
   and the source address equals to the reflector address.  Optionally,
   the probe query message P2MP SR-MPLS Policy can carry the reverse path information (e.g.
   reverse path label stack for SR-MPLS) as part of the SR header.  The
   probe messages are not punted at the reflector node and it does not
   process them and generate response messages.  The Sender Control Code
   is set to use
   the default value Node SID of 0.  In this mode, as the probe packet
   is not punted on the reflector node for processing, the querier
   copies the 'Sequence Number' Session-Sender in 'Session-Sender Sequence Number'
   directly.  In this delay measurement mode, as per Reference Topology, the timestamps t1 and t4 are collected by MPLS header of the probes.  Both these
   timestamps are used to measure round-trip delay as (t4 - t1).

4.3. Session-
   Sender test packet.

4.4.  Additional Probe Message STAMP Test Packet Processing Rules

   The processing rules defined described in this section are applicable to the
   STAMP messages for delay and loss measurement test packets for Links links and end-to-
   end end-to-end SR Paths paths including SR
   Policies.

4.3.1.

4.4.1.  TTL and Hop Limit

   The TTL field in the IPv4 and MPLS headers of the probe query
   messages STAMP Session-
   Sender and STAMP Session-Reflector reply test packets is set to 255 [RFC8762].  Similarly, the Hop Limit field 255,
   except in the IPv6 and SRH headers of the probe query messages is set to 255
   [RFC8762]. following cases.

   When using the Destination IPv4 Address from the range 127/8, the TTL
   field in the IPv4 header IPv4 header is set to 1.

   For link delay, the TTL field in the STAMP test packet is set to 1 in
   one-way and two-way delay measurement modes.

4.4.2.  IPv6 Hop Limit

   The Hop Limit field in the IPv6 and SRH headers of the STAMP Session-
   Sender and STAMP Session-Reflector reply test packets is set to 1 [RFC8029].  Similarly, when 255,
   except in the following cases.

   When using the Destination IPv6 Address from the ::FFFF:127/104 range, of loopback address ::1/128,
   the Hop Limit field in the IPv6 header is set to 1.

   For Link performance delay and loss measurements, link delay, the TTL or Hop Limit field in the probe message STAMP test packet is set
   to 1 in both one-way and two-
   way two-way delay measurement modes.

4.3.2.

4.4.3.  Router Alert Option

   The Router Alert IP option (RAO) [RFC2113] is not set in the probe
   messages.

4.3.3.  UDP Checksum

   The UDP Checksum Complement for delay and loss measurement messages
   follows the procedure defined in [RFC7820] and can be optionally used
   with the procedures defined in this document.

   For IPv4 and IPv6 probe messages, where the hardware is not capable
   of re-computing the UDP checksum or adding checksum complement
   [RFC7820], the sender node sets the UDP checksum to 0 [RFC6936]
   [RFC8085].  The receiving node bypasses the checksum validation and
   accepts the STAMP
   test packets with UDP checksum value 0 for the UDP port being
   used for delay links and loss measurements. end-to-end SR paths.

5.  Performance  Packet Loss Measurement for P2MP SR Policies

   The Point-to-Multipoint (P2MP) SR Path that originates from a root
   node terminates on multiple destinations called leaf nodes (e.g.
   P2MP SR Policy [I-D.ietf-pim-sr-p2mp-policy] or P2MP Transport
   [I-D.shen-spring-p2mp-transport-chain]).

   The procedures for delay Links and loss measurement described in this
   document for P2P SR Policies are also equally applicable to the P2MP SR Policies. Paths

   The procedure described in Section 4 for one-way delay measurement is defined as
   following:

   o  The sender root node sends probe query messages using the Tree-SID
      defined in [I-D.ietf-pim-sr-p2mp-policy]
   STAMP test packets can be used to detect (test) packet loss for the P2MP SR-MPLS
      Policy as shown in Figure 9.

   o links
   and end-to-end SR paths.  The probe query messages can contain Sequence Number field in the replication SID STAMP test
   packet is used as
      defined described in [I-D.ietf-spring-sr-replication-segment].

   o  The Destination Address is set Section 4 "Theory of Operation" of
   [RFC8762], to the loopback address from range
      127/8 for IPv4, or the loopback address ::1/128 detect forward, reverse and round-trip packet loss.

6.  Direct Measurement for IPv6 address.

   o  Each reflector leaf node sends its IP address Links and SR Paths

   The STAMP "Direct Measurement" TLV (Type 5) defined in the Source
      Address of the probe response messages as shown [RFC8972] can
   be used in Figure 9.  This
      allows SR networks.  The STAMP test packets with this TLV are
   transmitted using the sender root node procedures described in Section 4 to identify collect
   the reflector leaf nodes transmit and receive counters of the P2MP SR Policy.

   o  The P2MP root node measures the delay and loss performance data flow for
      each P2MP leaf node of the links and
   end-to-end P2MP SR Policy.

    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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |              Tree-SID                 | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    .                                                               .
    .                                                               .
    .                                                               .
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |   Message as shown paths.  Note that in Figure 2 for DM this case, the STAMP test packets
   may follow the same or Figure 3 a different path than the data flow under
   direct measurement.

   The PSID carried in the received data packet for LM      |
    .                                                               .
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Figure 9: Example Probe Query with Tree-SID the traffic flow
   under measurement can be used to measure receive data packets for SR-MPLS Policy
   end-to-end SR path on the STAMP Session-Reflector.  The probe query messages PSID in the
   received Session-Sender test packet header can also be sent using used to associate
   the scheme defined
   for P2MP Transport using Chain Replication that may contain Bud SID
   as defined in [I-D.shen-spring-p2mp-transport-chain].

   The considerations receive traffic counter on the Session-Reflector for two-way mode the end-to-
   end SR path.

7.  Session Status for Links and SR Paths

   The STAMP test session status allows to know if the performance
   measurement for
   P2MP SR Policy (e.g. for bidirectional is active on the links and end-to-end SR Path) paths.  The
   STAMP test session status initially is declared succeeded when one or
   more reply test packets are received at the STAMP Session-Sender.
   The STAMP test session status is declared failed when consecutive N
   number of reply test packets are outside not received at the scope
   of this document.

6. STAMP Session-
   Sender, where N is locally provisioned value.

8.  ECMP Support for SR Policies

   An SR Policy can have ECMPs between the source and transit nodes,
   between transit nodes and between transit and destination nodes.
   Usage of Anycast SID [RFC8402] by an SR Policy can result in ECMP
   paths via transit nodes part of that Anycast group.  The probe
   messages test packets
   need to be sent transmitted to traverse different ECMP paths to measure
   performance
   delay of an SR Policy.

   Forwarding plane has various hashing functions available to forward
   packets on specific ECMP paths.  The mechanisms described in
   [RFC8029] and [RFC5884] for handling ECMPs are also applicable to the
   performance
   delay measurement.

   In IPv4 header of the probe messages, STAMP Session-Sender test packets, sweeping of
   Destination Address from the range 127/8 can be used to exercise
   particular ECMP paths.  Note that in the loopback mode for round-trip
   delay measurement, both the forward and the return paths must be SR-
   MPLS paths in this case.

   As specified in [RFC6437], Flow Label field in the outer IPv6 header
   can also be used for sweeping.

   The considerations for performance loss measurement for sweeping to exercise different IPv6 ECMP paths of an SR Policy are outside the scope of this document.

7.  Performance Delay and Liveness Monitoring

   Liveness monitoring is required for connectivity verification and
   continuity check in an SR network. paths.

   The procedure defined "Destination Node Address" TLV [I-D.gandhi-ippm-stamp-srpm] can
   be carried in this
   document for delay measurement using the STAMP probe messages can
   also be applied Session-Sender test packet to liveness monitoring of Links and SR Paths.  The
   one-way or two-way measurement mode can be used for liveness
   monitoring.  Liveness failure is notified when consecutive N number
   of probe response messages are not received back at identify the sender
   intended destination node,
   where N is locally provisioned value.  Note that for one-way and two-
   way modes, the failure detection interval and scale for number of
   probe messages need to account for the processing of the probe query
   messages which need to be punted example, when using IPv4 Destination
   Address from the forwarding fast path (to
   slow path or control plane) and response messages need to be injected
   on the reflector node.  This range 127/8.  The STAMP Session-Reflector must not
   transmit reply test packet if it is improved by using not the probes intended destination node
   in
   loopback mode.

8. the "Destination Node Address" TLV [I-D.gandhi-ippm-stamp-srpm].

9.  Security Considerations

   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.
   STAMP Session-Reflector.

   If desired, attacks can be mitigated by performing basic validation
   and sanity checks, at the sender, STAMP Session-Sender, of the counter or
   timestamp fields in received measurement response messages. 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 message
   packet to a single query/response test cycle.

   Use of HMAC-SHA-256 in the authenticated mode protects the data
   integrity of the probe messages. test packets.  SRv6 has HMAC protection
   authentication defined for SRH [RFC8754].  Hence, probe messages test packets for
   SRv6 may not need authentication mode.  Cryptographic measures may be
   enhanced by the correct configuration of access-control lists and
   firewalls.

9.

   The security considerations specified in [RFC8762] and [RFC8972] also
   apply to the procedures described in this document.

10.  IANA Considerations

   This document does not require any IANA action.

10.

11.  References

10.1.

11.1.  Normative References

   [RFC0768]  Postel, J., "User Datagram Protocol", STD 6, RFC 768,
              DOI 10.17487/RFC0768, August 1980,
              <https://www.rfc-editor.org/info/rfc768>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8762]  Mirsky, G., Jun, G., Nydell, H., and R. and R. Foote, "Simple
              Two-Way Active Measurement Protocol", RFC 8762,
              DOI 10.17487/RFC8762, March 2020,
              <https://www.rfc-editor.org/info/rfc8762>.

   [RFC8972]  Mirsky, G., Min, X., Nydell, H., Foote, R., Masputra, A.,
              and E. Ruffini, "Simple Two-Way Active Measurement Protocol",
              Protocol Optional Extensions", RFC 8762, 8972,
              DOI 10.17487/RFC8762, March 2020,
              <https://www.rfc-editor.org/info/rfc8762>. 10.17487/RFC8972, January 2021,
              <https://www.rfc-editor.org/info/rfc8972>.

   [I-D.gandhi-ippm-stamp-srpm]
              Gandhi, R., Filsfils, C., Voyer, D., Chen, M., and B.
              Janssens, "Simple TWAMP (STAMP) Extensions for Segment
              Routing", draft-gandhi-ippm-stamp-srpm-00
              Routing Networks", draft-gandhi-ippm-stamp-srpm-02 (work
              in progress), October 2020.

   [I-D.ietf-ippm-stamp-option-tlv]
              Mirsky, G., Min, X., Nydell, H., Foote, R., Masputra, A., February 2021.

   [I-D.ietf-spring-srv6-network-programming]
              Filsfils, C., Camarillo, P., Leddy, J., Voyer, D.,
              Matsushima, S., and E. Ruffini, "Simple Two-way Active Measurement
              Protocol Optional Extensions", draft-ietf-ippm-stamp-
              option-tlv-09 Z. Li, "SRv6 Network Programming",
              draft-ietf-spring-srv6-network-programming-28 (work in
              progress), August December 2020.

10.2.

11.2.  Informative References

   [IEEE1588]
              IEEE, "1588-2008 IEEE Standard for a Precision Clock
              Synchronization Protocol for Networked Measurement and
              Control Systems", March 2008.

   [RFC2113]  Katz, D., "IP Router Alert Option", RFC 2113,
              DOI 10.17487/RFC2113, February 1997,
              <https://www.rfc-editor.org/info/rfc2113>.

   [RFC5884]  Aggarwal, R., Kompella, K., Nadeau, T., and G. Swallow,
              "Bidirectional Forwarding Detection (BFD) for MPLS Label
              Switched Paths (LSPs)", RFC 5884, DOI 10.17487/RFC5884,
              June 2010, <https://www.rfc-editor.org/info/rfc5884>.

   [RFC6335]  Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S.
              Cheshire, "Internet Assigned Numbers Authority (IANA)
              Procedures for the Management of the Service Name and
              Transport Protocol Port Number Registry", BCP 165,
              RFC 6335, DOI 10.17487/RFC6335, August 2011,
              <https://www.rfc-editor.org/info/rfc6335>.

   [RFC6437]  Amante, S., Carpenter, B., Jiang, S., and J. Rajahalme,
              "IPv6 Flow Label Specification", RFC 6437,
              DOI 10.17487/RFC6437, November 2011,
              <https://www.rfc-editor.org/info/rfc6437>.

   [RFC6936]  Fairhurst, G. and M. Westerlund, "Applicability Statement
              for the Use of IPv6 UDP Datagrams with Zero Checksums",
              RFC 6936, DOI 10.17487/RFC6936, April 2013,
              <https://www.rfc-editor.org/info/rfc6936>.

   [RFC7820]  Mizrahi, T., "UDP Checksum Complement in the One-Way
              Active Measurement Protocol (OWAMP) and Two-Way Active
              Measurement Protocol (TWAMP)", RFC 7820,
              DOI 10.17487/RFC7820, March 2016,
              <https://www.rfc-editor.org/info/rfc7820>.

   [RFC8029]  Kompella, K., Swallow, G., Pignataro, C., Ed., Kumar, N.,
              Aldrin, S., and M. Chen, "Detecting Multiprotocol Label
              Switched (MPLS) Data-Plane Failures", RFC 8029,
              DOI 10.17487/RFC8029, March 2017,
              <https://www.rfc-editor.org/info/rfc8029>.

   [RFC8085]  Eggert, L., Fairhurst, G., and G. Shepherd, "UDP Usage
              Guidelines", BCP 145, RFC 8085, DOI 10.17487/RFC8085,
              March 2017, <https://www.rfc-editor.org/info/rfc8085>.

   [RFC8186]  Mirsky, G. and I. Meilik, "Support of the IEEE 1588
              Timestamp Format in a Two-Way Active Measurement Protocol
              (TWAMP)", RFC 8186, DOI 10.17487/RFC8186, June 2017,
              <https://www.rfc-editor.org/info/rfc8186>.

   [RFC8402]  Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L.,
              Decraene, B., Litkowski, S., and R. Shakir, "Segment
              Routing Architecture", RFC 8402, DOI 10.17487/RFC8402,
              July 2018, <https://www.rfc-editor.org/info/rfc8402>.

   [RFC8754]  Filsfils, C., Ed., Dukes, D., Ed., Previdi, S., Leddy, J.,
              Matsushima, S., and D. Voyer, "IPv6 Segment Routing Header
              (SRH)", RFC 8754, DOI 10.17487/RFC8754, March 2020,
              <https://www.rfc-editor.org/info/rfc8754>.

   [I-D.ietf-spring-segment-routing-policy]
              Filsfils, C., Talaulikar, K., Voyer, D., Bogdanov, A., and
              P. Mattes, "Segment Routing Policy Architecture", draft-
              ietf-spring-segment-routing-policy-08
              ietf-spring-segment-routing-policy-09 (work in progress),
              July
              November 2020.

   [I-D.ietf-spring-sr-replication-segment]
              Voyer, D., Filsfils, C., Parekh, R., Bidgoli, H., and Z.
              Zhang, "SR Replication Segment for Multi-point Service
              Delivery", draft-ietf-spring-sr-replication-segment-00
              (work in progress), July 2020.

   [I-D.shen-spring-p2mp-transport-chain]
              Shen, Y., Zhang, Z., Parekh, R., Bidgoli, H., and Y.
              Kamite, "Point-to-Multipoint Transport Using Chain
              Replication in Segment Routing", draft-shen-spring-p2mp-
              transport-chain-02 draft-ietf-spring-sr-replication-segment-02
              (work in progress), April October 2020.

   [I-D.ietf-pim-sr-p2mp-policy]
              Voyer, D., Filsfils, C., Parekh, R., Bidgoli, H., and Z.
              Zhang, "Segment Routing Point-to-Multipoint Policy",
              draft-ietf-pim-sr-p2mp-policy-00
              draft-ietf-pim-sr-p2mp-policy-01 (work in progress), July
              October 2020.

   [I-D.ietf-spring-mpls-path-segment]
              Cheng, W., Li, H., Chen, M., Gandhi, R., and R. Zigler,
              "Path Segment in MPLS Based Segment Routing Network",
              draft-ietf-spring-mpls-path-segment-03 (work in progress),
              September 2020.

   [I-D.ietf-spring-srv6-network-programming]
              Filsfils, C., Camarillo, P., Leddy, J., Voyer, D.,
              Matsushima, S., and Z. Li, "SRv6 Network Programming",
              draft-ietf-spring-srv6-network-programming-24 (work in
              progress), October 2020.

   [I-D.gandhi-mpls-ioam-sr]
              Gandhi, R., Ali, Z., Filsfils, C., Brockners, F., Wen, B.,
              and V. Kozak, "MPLS Data Plane Encapsulation for In-situ
              OAM Data", draft-gandhi-mpls-ioam-sr-03 (work in
              progress), September 2020.

   [I-D.ali-spring-ioam-srv6]
              Ali, Z., Gandhi, R., Filsfils, C., Brockners, F., Kumar,
              N., Pignataro, C.,

   [I-D.ietf-spring-srv6-path-segment]
              Li, C., Cheng, W., Chen, M., Dhody, D., and G. Dawra,
              "Segment Routing Header encapsulation R. Gandhi,
              "Path Segment for In-situ OAM
              Data", draft-ali-spring-ioam-srv6-02 SRv6 (Segment Routing in IPv6)", draft-
              ietf-spring-srv6-path-segment-00 (work in progress),
              November 2019. 2020.

   [I-D.ietf-pce-sr-bidir-path]
              Li, C., Chen, M., Cheng, W., Gandhi, R., and Q. Xiong,
              "PCEP
              "Path Computation Element Communication Protocol (PCEP)
              Extensions for Associated Bidirectional Segment Routing
              (SR) Paths", draft-ietf-pce-sr-bidir-path-03 draft-ietf-pce-sr-bidir-path-05 (work in
              progress), September January 2021.

   [I-D.ietf-ippm-stamp-yang]
              Mirsky, G., Min, X., and W. Luo, "Simple Two-way Active
              Measurement Protocol (STAMP) Data Model", draft-ietf-ippm-
              stamp-yang-06 (work in progress), October 2020.

Acknowledgments

   The authors would like to thank Thierry Couture for the discussions
   on the use-cases for Performance Measurement in Segment Routing. segment routing.  The
   authors would also like to thank Greg Mirsky Mirsky, Gyan Mishra, Xie
   Jingrong, and Mike Koldychev for reviewing this document and
   providing useful comments and suggestions.  Patrick Khordoc and Radu Valceanu, both from Cisco Systems
   Valceanu have helped
   significantly improve the mechanisms defined described in this
   document.  The
   authors would also like to thank Sam Aldrin for the discussions to
   check for broken path.

Authors' Addresses

   Rakesh Gandhi (editor)
   Cisco Systems, Inc.
   Canada

   Email: rgandhi@cisco.com

   Clarence Filsfils
   Cisco Systems, Inc.

   Email: cfilsfil@cisco.com
   Daniel Voyer
   Bell Canada

   Email: daniel.voyer@bell.ca

   Mach(Guoyi) Chen
   Huawei

   Email: mach.chen@huawei.com

   Bart Janssens
   Colt

   Email: Bart.Janssens@colt.net