Internet-Draft | Using STAMP for Segment Routing | February 2024 |
Gandhi, et al. | Expires 30 August 2024 | [Page] |
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 describes procedures for Performance Measurement in SR networks using Simple Two-Way Active Measurement Protocol (STAMP) defined in RFC 8762 and its optional extensions defined in RFC 8972 and further augmented in RFC 9503. The procedure described is used for links, end-to-end SR paths (including SR Policies and SR Flexible Algorithm IGP paths) as well as Layer-3 and Layer-2 services in SR networks, and is applicable to both SR-MPLS and SRv6 data planes.¶
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 30 August 2024.¶
Copyright (c) 2024 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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
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 [RFC8402]. SR takes advantage of the Equal-Cost Multipaths (ECMPs) between source and transit nodes, between transit nodes and between transit and destination nodes. SR Policies as defined in [RFC9256] are used to steer traffic through a specific, user-defined paths using a stack of Segments. A comprehensive SR Performance Measurement (PM) toolset is one of the essential requirements to measure network performance to provide Service Level Agreements (SLAs).¶
The Simple Two-Way Active Measurement Protocol (STAMP) provides capabilities for the measurement of various performance metrics in IP networks [RFC8762] without the use of a control channel to pre-signal session parameters. [RFC8972] defines optional extensions, in the form of TLVs, for STAMP. [RFC9503] augments that framework to define STAMP extensions for SR networks.¶
This document describes procedures for Performance Measurement in SR networks using STAMP defined in [RFC8762] and its optional extensions defined in [RFC8972] and further augmented in [RFC9503]. The procedure described is used for links, end-to-end SR paths [RFC8402] (including SR Policies [RFC9256] and SR Flexible Algorithm (Flex-Algo) IGP paths [RFC9350]) as well as Layer-3 (L3) and Layer-2 (L2) services in SR networks, and is applicable to both SR-MPLS and SRv6 data planes.¶
STAMP requires protocol support on the Session-Reflector to process the received test packets, and hence the received test packets need to be punted from the fast path in data plane and return test packets need to be generated. This limits the scale for number test sessions and the ability to provide faster measurement interval. This document enhances the procedure for Performance Measurement using STAMP to improve the scale for number of sessions and the interval for measurement of SR paths, for both SR-MPLS and SRv6 data planes by using timestamp and forward network programming function.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
ECMP: Equal Cost Multi-Path.¶
HMAC: Hashed Message Authentication Code.¶
I2E: Ingress-To-Egress.¶
IHS: Ingress-To-Egress, Hop-By-Hop or Select Scope.¶
L2: Layer-2.¶
L3: Layer-3.¶
MBZ: Must be Zero.¶
MNA: MPLS Network Action.¶
MPLS: Multiprotocol Label Switching.¶
PSID: Path Segment Identifier.¶
SHA: Secure Hash Algorithm.¶
SID: Segment ID.¶
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.¶
TSF: Timestamp and Forward.¶
TTL: Time To Live.¶
VPN: Virtual Private Network.¶
As shown in Figure 1, Reference Topology, the STAMP Session-Sender S1 initiates a STAMP Session-Sender test packet and the STAMP Session-Reflector R1 transmits a reply STAMP test packet. The reply STAMP test packet may be transmitted to the STAMP Session-Sender S1 on the same path (same set of links and nodes) or a different path in the reverse direction from the path taken towards the Session-Reflector R1.¶
The T1 is a transmit timestamp, and T4 is a receive timestamp added by node S1. The T2 is a receive timestamp, and T3 is a transmit timestamp added by node R1.¶
The nodes S1 and R1 may be connected via a link or an SR path [RFC8402]. The link may be a physical interface, virtual link, or Link Aggregation Group (LAG) [IEEE802.1AX], or LAG member. The SR path may be an SR Policy [RFC9256] on node S1 (called "head-end") with destination to node R1 (called "tail-end") or SR Flex-Algo IGP path [RFC9350].¶
For performance measurement in SR networks, the STAMP Session-Sender and Session-Reflector can use the base test packets defined [RFC8762]. However, the STAMP test packets defined in [RFC8972] are preferred in SR environment because of the optional extensions. The STAMP test packets are encapsulated using IP/UDP header and use the Destination UDP port 862 [RFC8762], by default. In this document, the STAMP test packets using IP/UDP header are considered for SR networks, where the STAMP test packets are further encapsulated with an SR-MPLS or SRv6 header. The STAMP test packets MUST carry the same IP/SR encapsulation as used by the data packets on the SR path under measurement.¶
The STAMP test packets are transmitted in one-way, two-way, loopback, or loopback with timestamp and forward function, measurement mode in SR networks. Note that one-way and two-way measurement modes are referred to in [RFC8762] and are further described in this document for SR networks.¶
The procedure defined in [RFC8762] is used to measure packet loss based on the transmission and reception of the STAMP test packets. The optional STAMP extensions defined in [RFC8972] are used for direct measurement of packet loss in SR networks. The measurement modes defined in this document are also applicable to measure packet loss in SR networks.¶
The STAMP test packets are transmitted on the same path as the data traffic flow under measurement to measure the delay and packet loss experienced by the data traffic flow.¶
Typically, the STAMP test packets are transmitted along an IP path between a Session-Sender and a Session-Reflector to measure delay and packet loss along that IP path. Matching forward and reverse direction paths for STAMP test packets, even for directly connected nodes are not guaranteed.¶
If it is desired in SR networks that the same path (same set of links and nodes) between the Session-Sender and Session-Reflector be used for the STAMP test packets in both directions, it is achieved by using the optional STAMP extensions for SR-MPLS and SRv6 networks specified in [RFC9503]. The STAMP Session-Reflector uses the return path parameters for the reply test packet from the received Session-Sender test packet, as described in [RFC9503].¶
An example of a STAMP Reference Model with some of the typical measurement parameters for STAMP test sessions is shown in Figure 2.¶
A Destination UDP port number MUST be selected for STAMP function as described in [RFC8762]. The same Destination UDP port can be used for STAMP test sessions for links, end-to-end SR paths, and L3 and L2 services in SR networks. In this case, the Destination UDP port does not distinguish between the link, end-to-end SR path, or L3 and L2 service STAMP test sessions. The Source UDP port is chosen by the Session-Sender. The same or different UDP Source port can be used for different STAMP test sessions and for STAMP test sessions for links, end-to-end SR paths, and L3 and L2 services in SR networks.¶
Examples of the Timestamp Format is Precision Time Protocol 64-bit truncated (PTPv2) [IEEE1588] and Network Time Protocol (NTP). By default, the Session-Reflector replies in kind to the timestamp format received in the received Session-Sender test packet, as indicated by the "Z" flag in the Error Estimate field as described in [RFC8762] and it can be based on the Session-Reflector capability.¶
Examples of Performance Measurement Mode are one-way, two-way, loopback, and loopback with timestamp and forward function as described in this document for SR networks.¶
Examples of Delay Metric Type are one-way delay, round-trip delay, near-end (forward direction) and far-end (backward direction) delay as defined in [RFC8762], and loopback delay as defined in this document.¶
Examples of Packet Loss Metric Type are round-trip, near-end (forward direction) and far-end (backward direction) packet loss as defined in [RFC8762].¶
When using the authentication mode for the STAMP test sessions, the matching Authentication Type (e.g., HMAC-SHA-256) and Keychain MUST be configured on STAMP Session-Sender and STAMP Session-Reflector [RFC8762].¶
In case of One-Way Protocol Mode (default protocol mode is Two-Way), Session-Reflector does not transmit reply test packet.¶
The controller shown in Figure 2 is used for provisioning STAMP test sessions on Session-Sender and Session-Reflector. Note that the YANG data model defined for STAMP in [I-D.ietf-ippm-stamp-yang] can be used to provision the Session-Sender and Session-Reflector and also for streaming telemetry of the operational data.¶
The content of an example Session-Sender test packet using an IP and UDP header [RFC0768] is shown in Figure 3. The payload contains the Session-Sender test packet defined in Section 3 of [RFC8972] as transmitted in an IP network. Note that [RFC8972] updates the Session-Sender test packet defined in [RFC8762] with optional STAMP Session Identifier (SSID). The SR encapsulation of the STAMP test packet is further described later in this document.¶
The Session-Sender test packet as shown in Figure 3 is transmitted over the link for delay measurement. The local and remote IP addresses of the link MUST be used as Source and Destination Addresses in the IP header of the Session-Sender test packets, respectively. For IPv6 links, the link local addresses [RFC7404] can be used in the IPv6 header. An SR encapsulation (e.g., containing adjacency SID of the link) can also be added for transmitting the Session-Sender test packets for links.¶
The Session-Sender can use the local Address Resolution Protocol (ARP) table or any other similar method to obtain the IP and MAC addresses for the links for transmitting STAMP packets.¶
Note that the Session-Sender test packet is further encapsulated with a Layer-2 header containing Session-Reflector MAC address as the Destination MAC address and Session-Sender MAC address as the Source MAC address for Ethernet links.¶
For LAG member links, the STAMP extension for the Micro-Session ID TLV defined in [RFC9534] is used to identify the member link.¶
An SR-MPLS Policy Candidate-Path can contain one or more Segment Lists. Each SR-MPLS Segment List contains a list of 32-bit Label Stack Entry (LSE) that includes a 20-bit label value, 8-bit Time-To-Live (TTL) value, 3-bit Traffic-Class (TC) value and 1-bit End-Of-Stack (S) field. A Session-Sender test packet MUST be transmitted using each Segment List of the SR-MPLS Policy Candidate-Path for delay measurement.¶
The content of an example Session-Sender test packet for an SR-MPLS Policy using the same SR-MPLS encapsulation as the data traffic is shown in Figure 4.¶
The head-end node address of the SR-MPLS Policy MUST be used as the Source Address in the IP header of the Session-Sender test packet. The endpoint address of the SR-MPLS Policy MUST be used as the Destination Address in the IP header of the Session-Sender test packet.¶
The Segment List can be empty in the case of a single-hop SR path with Implicit NULL label. The Session-Reflector may need to receive Session-Sender test packets with no MPLS header, for example, when using Penultimate Hop Popping (PHP). In both these cases, the Destination Address in IP header ensures the test packet reaches the Session-Reflector.¶
In the case of SR-MPLS Policy with Color-Only Destination Steering, with endpoint as unspecified address (the null endpoint is 0.0.0.0 for IPv4 or :: for IPv6 (all bits set to the 0 value)) as defined in Section 8.8.1 of [RFC9256], the loopback address from the range 127/8 for IPv4, or the loopback address ::1/128 for IPv6 [RFC4291] can be used as the Destination Address in the IP header of the Session-Sender test packets, respectively. In this case, the SR-MPLS encapsulation MUST ensure the Session-Sender test packets reach the endpoint of the SR Policy (for example, by adding the Prefix SID of the SR-MPLS Policy endpoint in the Segment List if required).¶
The Path Segment Identifier (PSID) [RFC9545] of an SR-MPLS Policy (either for Segment List or for Candidate-Path) can be added in the Segment List of the STAMP test packets as shown in Figure 4, and can be used for direct measurement as described in Section "Direct Measurement in SR Networks".¶
An SRv6 Policy Candidate-Path can contain one or more Segment Lists. Each Segment List can contain a number of SRv6 SIDs as defined in [RFC8986]. A Session-Sender test packet MUST be transmitted using each Segment List of the SRv6 Policy Candidate-Path for delay measurement. A packet can contain an outer IPv6 header and SRv6 Segment Routing Header (SRH) carrying a Segment List as described in [RFC8754].¶
The content of an example Session-Sender test packet for an SRv6 Policy using the same IPv6/SRH encapsulation as the data traffic is shown in Figure 5.¶
The head-end node address of the SRv6 Policy MUST be used as the Source Address in the IPv6 header of the Session-Sender test packet.¶
The Segment List of the SRv6 Policy Candidate-Path can be empty. In this case, the endpoint address of the SRv6 Policy is used as the Destination Address in the IPv6 header of the Session-Sender test packet.¶
Note that the Session-Sender test packets can be transmitted with or without adding the inner IP header with Source Address of the Session-Sender and Destination Address of the Session-Reflector after the IPv6/SRH. In case of Penultimate Segment Popping (PSP), where IPv6/SRH encapsulation is removed on the penultimate node, Inner IP header MUST be added for the test packets to reach the Session-Reflector node. When inner IP header is not added, the Session-Sender MUST ensure that the Session-Sender test packets using the Segment List reach the Session-Reflector (for example, by adding the Prefix SID or IPv6 address of the SR Policy endpoint in the Segment List if required).¶
The SRv6 network programming is described in [RFC8986]. The procedure defined for Upper-Layer (UL) Header processing for SRv6 End SIDs in Section 4.1.1 of [RFC8986] MUST be used to process the IPv6/UDP header in the received Session-Sender test packets on the Session-Reflector.¶
The Path Segment Identifier (PSID) [I-D.ietf-spring-srv6-path-segment] of the SRv6 Policy (either for Segment List or for Candidate-Path) can be added in the Segment List of the STAMP test packets as shown in Figure 5 and can be used for direct measurement as described in Section "Direct Measurement for Links and SR Paths".¶
The delay measurement procedure for end-to-end SR paths is also applicable to SR-MPLS and SRv6 Flex-Algo IGP paths.¶
Flex-Algo in IGP in SR networks [RFC9350] has Prefix SIDs advertised by the nodes for each Flex-Algo. The STAMP test packets for delay measurement MUST be transmitted on the Flex-Algo path using the same SR encapsulation as the data traffic under measurement.¶
For delay measurement of an SR-MPLS Flex-Algo IGP path, the Session-Sender test packets MUST carry the Flex-Algo Prefix SID of the Session-Reflector for that Flex-Algo IGP path in the MPLS header.¶
For delay measurement of an SRv6 Flex-Algo IGP path, the Session-Sender test packets MUST carry the Flex-Algo Prefix SIDs of the Session-Sender and Session-Reflector for that Flex-Algo IGP path as the Source Address and Destination Address in the IPv6 header, respectively.¶
The delay measurement procedure for end-to-end SR-MPLS and SRv6 Policies is equally applicable to the P2MP SR-MPLS and SRv6 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] Candidate-Path). The Session-Sender root node MUST transmit the Session-Sender test packets using the Segment Lists and that may contain replication SIDs [RFC9524] for delay measurement.¶
The Source Address in the Session-Sender test packets MUST be set to the address of the root-node of the P2MP SR-MPLS and SRv6 Policy.¶
For P2MP SR-MPLS path, the Destination Address in the Session-Sender test packets MUST be set to a loopback address from the range 127/8 for IPv4, or the loopback address ::1/128 for IPv6. The SR encapsulation MUST ensure the Session-Sender test packets reach the leaf nodes of the P2MP SR Policy.¶
The Session-Reflector on the leaf node MUST add its address as Source Address in the Session-Reflector test packet. The P2MP root node measures the delay and packet loss for each leaf node independently using the Source Address of the leaf node from the received Session-Reflector reply test packets.¶
The [I-D.mirsky-ippm-asymmetrical-pkts] defines extensions for using STAMP for performance measurement in multicast environment. Those extensions also apply to the performance measurement for P2MP SR Policies.¶
The delay measurement procedure defined in this document for end-to-end SR path is also applicable to L3 services in an SR network for both SR-MPLS and SRv6 data planes.¶
For delay measurement of end-to-end L3 service over SR-MPLS path, the same SR-MPLS label stack as the data packets of the L3 service including the L3VPN SR-MPLS label (advertised by the Session-Reflector) is used to transmit Session-Sender test packets.¶
An IP header (as shown in Figure 3) MUST be added in the Session-Sender test packets after the SR-MPLS encapsulation. The Destination Address on the Session-Reflector added in the IP header MUST be reachable via the IP table lookup associated with the L3VPN SR-MPLS label.¶
For delay measurement of end-to-end L3 service over SRv6 path, the same IPv6/SRH encapsulation as the data packets of the L3 service including the L3VPN SRv6 SID instantiated on the Session-Reflector (for example, End.DT6 SID instance, End.DT4 SID instance, etc. defined in [RFC8986]) is used to transmit Session-Sender test packets.¶
An inner IP header (as shown in Figure 3) MAY be added in the Session-Sender test packets after the IPv6/SRH encapsulation. The Destination Address on the Session-Reflector added in the inner IP header MUST be reachable via the IPv4 or IPv6 table lookup associated with the L3VPN SRv6 SID.¶
The delay measurement procedure defined in this document for end-to-end SR path is also applicable to L2 services in an SR network for both SR-MPLS and SRv6 data planes.¶
For delay measurement of end-to-end L2 service over SR-MPLS path, the same SR-MPLS label stack as the data packets of the L2 service including the L2VPN SR-MPLS label (advertised by the Session-Reflector) is used to transmit Session-Sender test packets.¶
The L2VPN SR-MPLS label is added with a TTL value of 1 in order to punt the Session-Sender test packet from data plane to CPU or slow path on Session-Reflector for STAMP processing.¶
An IP header (as shown in Figure 3) MUST be added in the Session-Sender test packets after the MPLS header. It contains the Source Address of the Session-Sender and Destination Address of the Session-Reflector.¶
For delay measurement of end-to-end L2 service over SRv6 path, the same IPv6/SRH encapsulation as the data packets of the L2 service including the L2VPN SRv6 SID instantiated on the Session-Reflector (for example, End.DT2U SID instance defined in [RFC8986]) is used to transmit Session-Sender test packets.¶
An L2 header MAY also be added (after the IPv6/SRH encapsulation) in the Session-Sender test packets that contains the Session-Sender MAC address as Source MAC address and Session-Reflector MAC address as Destination MAC address. The Destination MAC address added in the L2 header MUST be reachable via the L2 MAC table lookup associated with the L2VPN SRv6 SID.¶
An inner IP header (as shown in Figure 3) MAY also be added in the Session-Sender test packets after the IPv6/SRH and L2 header (if present). It contains the Source Address of the Session-Sender and Destination Address of the Session-Reflector.¶
The Session-Reflector decapsulates the outer IP header (if present) and the SR header (SR-MPLS header or IPv6/SRH if present) from the received Session-Sender test packets. The Session-Reflector reply test packet is generated using the information from the IP/UDP header of the received Session-Sender test packet as shown in Figure 6.¶
The payload contains the Session-Reflector test packet defined in Section 3 of [RFC8972].¶
In one-way measurement mode, a reply test packet with the contents as shown in Figure 6 is transmitted by the Session-Reflector, for links, end-to-end SR paths and L3 and L2 services in SR networks. The Session-Reflector reply test packet can be transmitted in the reverse direction on the same path as the forward direction or a different path than the forward direction to the Session-Sender.¶
In this mode, as per Reference Topology, all timestamps T1, T2, T3, and T4 are collected by the STAMP test packets. However, only timestamps T1 and T2 are used to measure one-way delay as (T2 - T1). Note that the delay value (T2 - T1) is referred to as near-end (forward direction) one-way delay and the delay value (T4 - T3) is referred to as far-end (backward direction) one-way delay. The one-way measurement mode requires the clocks on the Session-Sender and Session-Reflector to be synchronized.¶
In one-way protocol mode, Session-Reflector does not generate and transmit reply test packet upon receiving Session-Sender test packet. The Session-Sender can request in the test packet to the Session-Reflector to not transmit the reply test packet using the "No Reply Requested" flag in the Control Code Sub-TLV in the Return Path TLV defined in [RFC9503]. Alternatively, Session-Reflector can be provisioned with protocol mode as one-way or using a different destination UDP port. In this case, only timestamps T1 and T2 are collected by the STAMP Session-Sender test packets and one-way delay value (T2 - T1) is measured by the Session-Reflector.¶
In two-way measurement mode, a reply test packet as shown in Figure 6 SHOULD be transmitted by the Session-Reflector on the same path in the reverse direction as the forward direction, e.g., on the same link in the reverse direction or on the reverse SR path associated with the forward SR path [I-D.ietf-pce-sr-bidir-path].¶
In two-way measurement mode for links, the Session-Sender may request in the test packet to the Session-Reflector to transmit the reply test packet back on the same link in the reverse direction, for example, in an ECMP environment. It can use the "Reply Requested on the Same Link" flag in the Control Code Sub-TLV in the Return Path TLV defined in [RFC9503] for this request.¶
In two-way measurement mode for end-to-end SR paths and L3 and L2 services, the Session-Sender may request in the test packet to the Session-Reflector to transmit the reply test packet back on a specific reverse SR path, for example, in an ECMP environment or in SR Flex-Algo IGP environment. It can use a Segment List sub-TLV in the Return Path TLV defined in [RFC9503] for this request.¶
In this mode, as per Reference Topology, all timestamps T1, T2, T3, and T4 are collected by the STAMP test packets. All four timestamps are used to measure round-trip delay as ((T4 - T1) - (T3 - T2)).¶
The content of an example Session-Reflector reply test packet transmitted for two-way measurement mode of an end-to-end SR-MPLS Policy using the same SR-MPLS encapsulation as the data traffic in the reverse direction is shown in Figure 7.¶
The content of an example Session-Reflector reply test packet transmitted for two-way measurement mode of an end-to-end SRv6 Policy using the same IPv6/SRH encapsulation as the data traffic in the reverse direction is shown in Figure 8.¶
The procedure defined for Upper-Layer Header processing for SRv6 End SIDs in Section 4.1.1 in [RFC8986] MUST be used to process the IPv6/UDP header in the received Session-Reflector reply test packets on the Session-Sender.¶
The Session-Sender test packets are transmitted in loopback measurement mode to measure loopback delay of a bidirectional circular path. In this mode, the received Session-Sender test packets MUST NOT be punted out of the fast path in data plane (i.e., to slow path or control-plane) at the Session-Reflector. In other words, the Session-Reflector does not process them and generate Session-Reflector test packets. This is a new measurement mode, not defined by the STAMP process in [RFC8762].¶
In this mode, as shown in Figure 9, Reference Topology for Loopback Measurement Mode, the Session-Sender test packet received back at the Session-Sender retrieves the timestamp T1 from the test packet and collects the receive timestamp T4 locally. Both these timestamps are used to measure the loopback delay as (T4 - T1). The loopback delay includes the STAMP test packet processing delay on the Session-Reflector component. The Session-Reflector processing delay component includes only the time required to loop the STAMP test packet from the incoming interface to the outgoing interface in the data plane. The Session-Reflector does not timestamp the Session-Sender test packets and hence does not need timestamping capability.¶
The Session-Sender MUST set the Destination UDP port to the UDP port it uses to receive the return Session-Reflector test packets (other than the UDP Destination port 862 which is used by the STAMP Session-Reflector). The same UDP port can be used as the Source UDP port in the Session-Sender test packet.¶
The Session-Reflector does not support the STAMP process, hence the loopback function simply processes the encapsulation including IP and SR headers (but does not process the UDP header) to forward the received Session-Sender test packet to the Session-Sender without STAMP modifications defined in [RFC8762].¶
The Session-Sender can use the STAMP Session ID (SSID) field in the received reply STAMP test packet or local configuration to identify its STAMP test session that uses the loopback mode. In this mode, at the Session-Sender, the 'Session-Sender Sequence Number', 'Session-Sender Timestamp', 'Session-Sender Error Estimate', and 'Session-Sender TTL' fields MUST be set to zero in the transmitted STAMP test packets and MUST be ignored in the received STAMP test packets.¶
In loopback mode for links, an inner IP header for the return path is added in the Session-Sender test packets as shown in Figure 10 and it MUST set the Destination Address equal to the Session-Sender address.¶
The Session-Sender test packets in loopback mode may be transmitted with a Layer-2 header for the forward path as shown in Figure 11, containing Session-Reflector MAC address as the Destination Address and Session-Sender MAC address as the Source MAC address of Ethernet links. An SR encapsulation (e.g., containing adjacency SID of the link) can also be added for the forward path after the Layer-2 header.¶
An SR-MPLS path uses an MPLS header for carrying a Segment List in MPLS label stack. In the case of loopback mode for SR-MPLS paths, the Session-Sender test packet can either carry the Segment List of the forward SR-MPLS path only or both the forward and the reverse SR-MPLS paths in MPLS header as shown in Figure 12.¶
In the case of SR-MPLS Policy using Penultimate Hop Popping (PHP), the Session-Sender MUST ensure that the STAMP test packets reach the SR-MPLS Policy endpoint (for example, by adding the Prefix SID of the SR-MPLS Policy endpoint in the Segment List of the forward path if required).¶
To receive the return Session-Sender test packet on a specific SR-MPLS path in an ECMP environment, the SR-MPLS label stack needs to carry the specific reverse direction SR-MPLS path, in addition to the forward direction SR-MPLS path. For example, it can carry the corresponding SR-MPLS label stack of the Segment List of the reverse SR-MPLS Policy Candidate-Path [I-D.ietf-pce-sr-bidir-path] or the Binding SID of the reverse SR-MPLS Policy or the SR-MPLS Prefix Segment Identifier of the Session-Sender. For SR-MPLS Flex-Algo IGP paths, it MUST carry the matching SR-MPLS Flex-Algo Prefix SID label of the Session-Sender.¶
The IP header of the Session-Sender test packets MUST set the Destination Address equal to the Session-Sender address as shown in Figure 10.¶
In the case of loopback mode for SR-MPLS paths, the MPLS header can carry the SR-MPLS label stack of the forward SR path only.¶
The IP header for the return path of the Session-Sender test packets MUST set the Destination Address equal to the Session-Sender address as shown in Figure 10 to forward the packet to the Session-Sender.¶
The Session-Reflector decapsulates the MPLS header and forwards the packet using the IP header for the return path.¶
An SRv6 path uses an IPv6 header and SRv6 Segment Routing Header (SRH) for carrying a Segment List as described in [RFC8754]. In the case of loopback mode for SRv6 paths, the Session-Sender test packet can either carry the Segment List of the forward SRv6 path only or both the forward and the reverse SRv6 paths in IPv6/SRH as shown in Figure 13.¶
The Session-Sender MUST ensure that the Session-Sender test packets using the Segment List reach the SRv6 Policy endpoint (for example, by adding the Prefix SID or IPv6 address of the SRv6 Policy endpoint in the Segment List if required).¶
To receive the return Session-Sender test packet on a specific SRv6 path in an ECMP environment, the SRv6 Segment List needs to carry the specific reverse direction SRv6 path, in addition to the forward direction SRv6 path. For example, it can carry the corresponding Segment List of the reverse SRv6 Policy Candidate-Path [I-D.ietf-pce-sr-bidir-path] or the Binding SID of the reverse SRv6 Policy or the SRv6 Prefix Segment Identifier of the Session-Sender. For SRv6 Flex-Algo IGP paths, it MUST carry the matching SRv6 Flex-Algo Prefix SID of the Session-Sender.¶
An inner IP header MAY be added in the Session-Sender test packet and that has the Destination Address equal to the Session-Sender address as shown in Figure 10.¶
In the case of loopback mode for SRv6 paths, the Session-Sender test packet can contain the Segment List of the forward SRv6 path only.¶
An inner IP header for return path MUST be added in the Session-Sender test packets that has the Destination Address equal to the Session-Sender address as shown in Figure 10 to forward the packet to the Session-Sender.¶
The Session-Reflector decapsulates the outer IPv6/SRH headers and forwards the packet using the inner IP header for the return path.¶
The loopback measurement mode is also applicable to L3 services in SR networks for both SR-MPLS and SRv6 data planes.¶
In loopback mode for L3 service over SR-MPLS path, the same SR-MPLS label stack as the data packets of the L3 service including the L3VPN SR-MPLS label (advertised by the Session-Reflector) is used to transmit Session-Sender test packets.¶
An IP header for return path MUST be added in the Session-Sender test packets that has the Destination Address equal to the Session-Sender address as shown in Figure 10 to forward the packet to the Session-Sender. In this case, the Destination Address added in the IP header for the return path MUST be reachable via the IP table lookup associated with the L3VPN SR-MPLS label added.¶
The Session-Reflector decapsulates the MPLS header and forwards the packet using the IP header for the return path (after adding SR-MPLS encapsulation for the reverse direction L3 service).¶
In loopback mode for L3 service over SRv6 path, the same IPv6/SRH encapsulation as the data packets of the L3 service including the L3VPN SRv6 SID instantiated on the Session-Reflector (for example, End.DT6 SID instance, End.DT4 SID instance, etc. defined in [RFC8986]) is used to transmit Session-Sender test packets.¶
An inner IP header for return path MUST be added in the Session-Sender test packets that has the Destination Address equal to the Session-Sender address as shown in Figure 10 to forward the packet to the Session-Sender. In this case, the Destination Address added in the inner IP header for the return path MUST be reachable via the IPv4 or IPv6 table lookup associated with the L3VPN SRv6 SID added.¶
The Session-Reflector decapsulates the outer IPv6/SRH and forwards the packet using the inner IP header for the return path (after adding IPv6/SRv6 encapsulation for the reverse direction L3 service).¶
The loopback measurement mode is also applicable to L2 services in an SR network for both SR-MPLS and SRv6 data planes.¶
Editor's Note: This mode is currently under investigation.¶
In loopback mode for L2 service over SR-MPLS path, the same SR-MPLS label stack as the data packets of the L2 service including the L2VPN SR-MPLS label (advertised by the Session-Reflector) is used to transmit Session-Sender test packets.¶
An IP header for return path MUST be added in the Session-Sender test packets that has the Destination Address equal to the Session-Sender address as shown in Figure 10 to forward the packet to the Session-Sender.¶
The Session-Reflector decapsulates the MPLS header and forwards the packet using the IP header for the return path.¶
Editor's Note: This mode is currently under investigation.¶
In loopback mode for L2 service over SRv6 path, the same IPv6/SRH encapsulation as the data packets of the L2 service including the L2VPN SRv6 SID instantiated on the Session-Reflector (for example, End.DT2U SID instance defined in [RFC8986]) is used to transmit Session-Sender test packets.¶
An L2 header for return path is added (after the IPv6/SRH encapsulation) in the Session-Sender test packets that contains the Session-Sender MAC Address as Source and Destination MAC address. The Destination MAC address added in the L2 header MUST be reachable via the L2 MAC table lookup associated with the L2VPN SRv6 SID.¶
An inner IP header for return path MUST be added in the Session-Sender test packets that has the Destination Address equal to the Session-Sender address as shown in Figure 10 to forward the packet to the Session-Sender.¶
The Session-Reflector decapsulates the outer IPv6/SRH header and L2 header and forwards the packet (after adding IPv6/SRv6 encapsulation for the reverse direction L2 service).¶
This document defines a new STAMP measurement mode, called "loopback mode with timestamp and forward" that uses network programming function. In this mode, the timestamps T1, T2, and T4, all in data plane, are collected by the Session-Sender test packet as shown in Figure 14. The network programming function is used to optimize the "operations of punt test packet and generate return test packet" on the Session-Reflector, as timestamping is implemented in fast path in data plane. This helps to achieve higher number of STAMP test session scale and faster measurement interval.¶
The Session-Sender adds transmit timestamp (T1) in the payload of the Session-Sender test packet. The Session-Reflector adds the receive timestamp (T2) in the payload of the received test packet in fast path in data plane without punting the test packet (e.g., to slow path or control-plane). The network programming function carried by the test packet enables the Session-Reflector to add the receive timestamp (T2) at the specific offset in the payload of the test packet.¶
For an end-to-end SR path including SR Policy, STAMP Session-Sender test packets are transmitted in loopback mode with timestamp and forward function as described in the following sub-sections.¶
The loopback measurement mode with timestamp and forward network programming function for SR-MPLS paths is described below.¶
MPLS Network Action (MNA) Sub-Stack defined in [I-D.ietf-mpls-mna-hdr] is used for SR-MPLS data plane for "timestamp and forward" network programming function for the STAMP test packets. The MNA Sub-Stack carries the MNA Label (bSPL value TBA1) as defined in [I-D.ietf-mpls-mna-hdr]. A new MNA Opcode (value MNA.TSF) is defined for the Timestamp and Forward network action.¶
In the Session-Sender test packets for SR-MPLS Policies paths, the MNA Sub-Stack with Opcode MNA.TSF is added in the MPLS header as shown in Figure 15, to collect "Receive Timestamp" field in the payload of the test packet. The Ingress-to-Egress (I2E), Hop-By-Hop (HBH), Select scope (IHS) is set to "I2E" when return path is IP/UDP. The Network Action Sub-Stack Length (NASL) is set to 0 when there is no Label Stack Entry (LSE) after the MNA.TSF Opcode in the MNA Sub-Stack. The U flag is set to skip the network action and forward the packet (and not drop the packet).¶
The Label Stack for the reverse direction SR-MPLS path can be added after the MNA Sub-Stack to receive the return test packet on a specific path. The Ingress-to-Egress (I2E), Hop-By-Hop (HBH), Select scope (IHS) is set to "Select" when the return path is SR-MPLS.¶
When a Session-Reflector receives a packet with MNA Sub-Stack with Opcode MNA.TSF, after timestamping the packet in STAMP payload at the specific offset, the Session-Reflector pops the MNA Sub-Stack (after completing any other network actions) and forwards the packet using the next label or IP header in the packet (just like the data packets for the traffic flow).¶
New MPLS Network Action Opcode is defined called "Timestamp and Forward Network Action, MNA.TSF". The MNA.TSF Opcode is statically configured on the STAMP Session-Reflector node with a value from "Private Use from Range 111-126". The timestamp format for 64-bit PTPv2 and NTP to be added in the STAMP payload is statically configured for MNA.TSF. The offset in the STAMP payload (e.g., for unauthenticated mode with offset 16 bytes) is also statically configured for MNA.TSF.¶
The STAMP Session-Sender needs to know if the Session-Reflector can process the MNA Sub-Stack with Opcode MNA.TSF to avoid dropping the test packets. The signaling extension for this capability exchange or local configuration are outside the scope of this document.¶
The loopback measurement mode with timestamp and forward network programming function for SRv6 paths is described below.¶
The [RFC8986] defines SRv6 Endpoint Behaviours for SRv6 nodes. A new SRv6 Endpoint Behaviour is defined for "Timestamp and Forward (TSF)" network programming function for the STAMP test packets.¶
In the Session-Sender test packets for SRv6 Policies, Timestamp and Forward Endpoint Function (End.TSF) is carried with the target Segment Identifier (SID) in SRH [RFC8754] as shown in Figure 16, to collect "Receive Timestamp" field in the payload of the test packet. The Segment List for the reverse direction path can be added after the target SID to receive the return test packet on a specific path. When a Session-Reflector receives a packet with Timestamp and Forward Endpoint (End.TSF) for the target SID, which is local, after timestamping the packet at the specific offset, the Session-Reflector forwards the packet using the next SID in the SRH or inner IPv6 header in the packet (just like the data packets for the traffic flow).¶
New SRv6 Endpoint Behavior is defined called "Endpoint Behavior bound to SID with Timestamp and Forward (End.TSF)". The End.TSF is a node SID instantiated at STAMP Session-Reflector node. The End.TSF is statically configured on the STAMP Session-Reflector node and not advertised into the routing protocols. The timestamp format for 64-bit PTPv2 and NTP to be added in the STAMP payload is statically configured for End.TSF. The offset in the STAMP payload (e.g., for unauthenticated mode with offset 16 bytes) is also statically configured for End.TSF.¶
The STAMP Session-Sender needs to know if the Session-Reflector can process the Timestamp and Forward Endpoint Function to avoid dropping test packets. The signaling extension for this capability exchange or local configuration are outside the scope of this document.¶
The procedure described in Section 4 and Section 5 for delay measurement in SR networks using STAMP test packets is used similarly for round-trip, near-end (forward direction) and far-end (backward direction) inferred packet loss measurement in SR networks. This provides only an approximate view of the data packet loss.¶
In case of loopback mode, and loopback mode with timestamp and forward function, only the round-trip packet loss measurement is applicable.¶
The STAMP "Direct Measurement" TLV (Type 5) defined in [RFC8972] can be used in SR networks for data packet loss measurement. The STAMP test packets with this TLV are transmitted using the procedures described in Section 4 for delay measurement using STAMP test packets to collect the Session-Sender transmit counters and Session-Reflector receive and transmit counters of the data packet flows for direct measurement.¶
The PSID carried in the received data packet for the traffic flow under measurement can be used to measure receive data packets (for receive traffic counter) for an end-to-end SR path on the Session-Reflector. The PSID in the received Session-Sender test packet header can be used to associate the receive traffic counter to the end-to-end SR path on the Session-Reflector. In the case of L3 and L2 services in SR networks, the associated SR-MPLS service labels or SRv6 service SIDs, can be used for receive traffic counters.¶
In case of loopback mode, and loopback mode with timestamp and forward function, the direct measurement is not applicable.¶
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 STAMP test packets need to be transmitted to traverse different ECMP paths to measure end-to-end 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 delay measurement.¶
For SR-MPLS Policy, sweeping of MPLS entropy label [RFC6790] values can be used in Session-Sender test packets and Session-Reflector reply test packets to take advantage of the hashing function in data plane to influence the ECMP path taken by them.¶
In IPv4 header of the Session-Sender test packets and Session-Reflector reply test packets sweeping of Destination Address from the range 127/8 can be used to exercise ECMP paths taken by them when using MPLS header.¶
As specified in [RFC6437], Flow Label field in the outer IPv6 header can also be used for sweeping to exercise different IPv6 ECMP paths.¶
The STAMP test session state monitoring allows to know if the performance measurement test is active or idle. The threshold-based notification for delay and packet loss may not be generated if the delay and packet loss values do not change significantly. For an unambiguous monitoring, the controller needs to distinguish the cases whether the performance measurement is active, or delay and packet loss values are not changing significantly to cross the threshold.¶
The STAMP test session state is initially notified as active as soon as one or more reply test packets are received at the Session-Sender. The STAMP test session state is notified as idle (or failed) when consecutive N number of reply test packets are not received at the Session-Sender after the session state is notified as active, where N (consecutive packet loss count) is a locally provisioned value. In this case, the failed state of the STAMP test session on the Session-Sender also indicates that the connectivity failure.¶
The processing rules described in this section are applicable to the STAMP test packets for links, end-to-end SR paths, and L3 and L2 services in SR networks.¶
The TTL field in the IPv4 and MPLS headers of the Session-Sender and Session-Reflector test packets MUST be set to 255 as per Generalized TTL Security Mechanism (GTSM) [RFC5082].¶
The Hop Limit (HL) field in all IPv6 headers of the Session-Sender and Session-Reflector test packets MUST be set to 255 as per Generalized TTL Security Mechanism (GTSM) [RFC5082].¶
The Router Alert IP option (RAO) [RFC2113] MUST NOT be set in the STAMP test packets to be able to punt the test packets using the UDP ports for STAMP.¶
The Flow Label field in the IPv6 header of the STAMP test packet is set to the value that is used by the data packets for the traffic flow on the SR path being measured by the Session-Sender.¶
The Session-Reflector SHOULD return the same Flow Label value it received in the STAMP test packet IPv6 header in the STAMP reply test packet, and it can be based on the local policy on the Session-Reflector.¶
For IPv4 test packets, where the hardware is not capable of re-computing the UDP checksum or adding checksum complement [RFC7820], the Session-Sender and Session-Reflector can set the UDP checksum value to 0 [RFC8085].¶
For IPv6 test packets, where the hardware is not capable of re-computing the UDP checksum or adding checksum complement [RFC7820], the Session-Sender and Session-Reflector can use the procedure defined in [RFC6936] for the UDP checksum (with value set to 0) for the UDP ports used for the STAMP sessions and it can be based on the local policy.¶
Editorial note: Please remove this section prior to publication.¶
The following routing platforms running IOS-XR operating system have participated in an interop testing for one-way, two-way and loopback measurement modes:¶
* Cisco 8802 (based Cisco Silicon One Q200)¶
* Cisco ASR9904 with Lightspeed linecard and Tomahawk linecard¶
* Cisco NCS5500 (based on Broadcom Jericho1 platform)¶
* Cisco NCS5700 (based on Broadcom Jericho2 platform)¶
The security considerations specified in [RFC8762], [RFC8972], and [RFC9503] also apply to the procedures described in this document.¶
Use of HMAC-SHA-256 in the authenticated mode protects the data integrity of the STAMP test packets. The message integrity protection using HMAC defined in Section 4.4 of [RFC8762] can be used with the procedure described in this document.¶
STAMP uses the well-known UDP port number that could become a target of denial of service (DoS) or could be used to aid on-path attacks. Thus, the security considerations and measures to mitigate the risk of the attack documented in Section 6 of [RFC8545] equally apply to the procedures described in this document.¶
The procedures defined in this document is intended for deployment in a single network administrative domain. As such, the Session-Sender address, Session-Reflector address, and forward and return paths are provisioned by the operator for the STAMP session. It is assumed that the operator has verified the integrity of the forward and return paths of the STAMP test packets.¶
When using the procedures defined in [RFC6936], the security considerations specified in [RFC6936] also apply.¶
The security considerations specified in [I-D.ietf-mpls-mna-hdr] are also applicable to the procedures for the SR-MPLS data plane defined in this document.¶
SRv6 STAMP test packets can use the HMAC protection authentication defined for SRH in [RFC8754].¶
The security considerations specified in [RFC8986] are also applicable to the procedures for the SRv6 data plane defined in this document.¶
This document does not require any IANA action.¶
The authors would like to thank Thierry Couture and Ianik Semco for the discussions on the use-cases for Performance Measurement in Segment Routing. The authors would also like to thank Greg Mirsky, Gyan Mishra, Xie Jingrong, and Mike Koldychev for reviewing this document and providing useful comments and suggestions. Patrick Khordoc, Haowei Shi, Amila Tharaperiya Gamage, Pengyan Zhang, Ruby Lin and Radu Valceanu have helped improve the mechanisms described in this document.¶
The following people have substantially contributed to this document:¶
Bart Janssens Colt Email: Bart.Janssens@colt.net¶
Navin Vaghamshi Reliance Email: Navin.Vaghamshi@ril.com¶
Moses Nagarajah Telstra Email: Moses.Nagarajah@team.telstra.com¶
Amit Dhamija Arrcus India Email: amitd@arrcus.com¶