RFC 9503

Simple Two-Way Active Measurement Protocol (STAMP) Extensions for Segment Routing Networks

πŸ“… published October 2023, from ietf

1. Introduction ✨

Okay so bestie, this is the RFC that glues STAMP onto Segment Routing, and I am obsessed πŸ˜­πŸŽ€

Quick title-block tea 🫢: this one is RFC 9503, titled Simple Two-Way Active Measurement Protocol (STAMP) Extensions for Segment Routing Networks. It came out in October 2023 and it's a Standards Track doc πŸ’œ. The main authors are R. Gandhi (Ed.) from Cisco Systems, C. Filsfils (also Cisco), M. Chen from Huawei, B. Janssens from Colt, and R. Foote from Nokia 🌸. Its ISSN is 2070-1721 ✨. It doesn't obsolete or update any other RFCs, so it's a clean slate πŸ“.

The whole point is that STAMP test packets can be sent along the same path in both directions in SR networks, for both SR-MPLS and SRv6 forwarding planes πŸ¦‹. It does that by extending the optional TLVs from RFC 8972 on top of the base STAMP from RFC 8762 πŸ’….


1.1. Hmm, Wait, Where's My Section 1.1?

Hold up, the original doesn't have a 1.1, so I'm not adding one πŸ™ˆ. Section 1 is just one big intro block, and we're keeping it that way.


Segment Routing (SR) leverages the source routing paradigm for Software-Defined Networks (SDNs) 🧚. SR is applicable to both Multiprotocol Label Switching (SR-MPLS) and IPv6 (SRv6) forwarding planes [RFC8402] πŸ’œ. SR Policies as defined in [RFC9256] are used to steer traffic through 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 ✨. Note that the YANG data model defined in [IPPM-STAMP-YANG] can be used to provision the STAMP Session-Sender and STAMP Session-Reflector πŸŽ€.

STAMP test packets are transmitted along an IP path between a Session-Sender and a Session-Reflector to measure performance delay and packet loss along that IP path πŸ¦‹. In SR networks, it may be desired 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 🫢. This is achieved by using the STAMP [RFC8762] extensions for SR-MPLS and SRv6 networks as specified in this document by augmenting the optional extensions defined in [RFC8972] πŸ’–.

2. Conventions Used in This Document 🌸

2.1. Requirements Language πŸ“œ

Okay, the official key-word rules are the bit you can't mess up πŸ’€. 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 πŸ”₯.

2.2. Abbreviations πŸ“

  • MPLS: Multiprotocol Label Switching
  • SID: Segment Identifier
  • SR: Segment Routing
  • SR-MPLS: Segment Routing over MPLS
  • SRv6: Segment Routing over IPv6
  • SSID: STAMP Session Identifier
  • STAMP: Simple Two-Way Active Measurement Protocol

2.3. Reference Topology 🧚

Picture this, bestie πŸ¦‹. In the reference topology below, the STAMP Session-Sender S1 starts a STAMP test packet, and the STAMP Session-Reflector R1 sends back a reply STAMP test packet πŸ’…. The reply can go back to S1 on the exact same path (same links and nodes), or on a different path in the reverse direction from the one taken toward R1 ✨.

T1 is a transmit timestamp, and T4 is a receive timestamp added by node S1 πŸ’œ. 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, 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 a destination to node R1 (called "tail-end") πŸ‘‘.

                       T1                T2
                      /                   \
             +-------+     Test Packet     +-------+
             |       | - - - - - - - - - ->|       |
             |   S1  |=====================|   R1  |
             |       |<- - - - - - - - - - |       |
             +-------+  Reply Test Packet  +-------+
                      \                   /
                       T4                T3

         STAMP Session-Sender        STAMP Session-Reflector

                     Figure 1: Reference Topology

Lowkey the best diagram in the whole doc 🌈✨

3. Destination Node Address TLV πŸ’–

Sometimes the Session-Sender needs to send test packets with a Destination Address that is not a routable address of the Session-Reflector (so it can't be used as the Source Address of the reply test packet) 😭. This can be handled by encapsulating the STAMP packet in a tunneling protocol, for example. See Appendix A for an example 🧚.

[RFC8972] defines STAMP Session-Sender and Session-Reflector test packets that can include one or more optional TLVs πŸ¦‹. In this document, the TLV Type (value 9 for IPv4 and IPv6) is defined for the Destination Node Address TLV for the STAMP test packet [RFC8972] πŸ’…. The formats of the Destination Node Address TLVs are shown in Figure 2 ✨:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |STAMP TLV Flags|    Type=9     |         Length=4              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                         IPv4 Address                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |STAMP TLV Flags|    Type=9     |         Length=16             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                         IPv6 Address                          |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

            Figure 2: Destination Node Address TLV Formats

The TLV fields work like this 🫢:

  • STAMP TLV Flags: The STAMP TLV Flags follow the procedures described in [RFC8972] and this document πŸŽ€.
  • Type: Type (value 9) for the IPv4 Destination Node Address TLV or IPv6 Destination Node Address TLV πŸ“.
  • Length: A 2-octet field equal to the length of the Address field in octets. The length is 4 octets for an IPv4 address and 16 octets for an IPv6 address 🧚.

The Destination Node Address TLV tells you the address of the intended Session-Reflector node of the test packet πŸ‘‘. If the received Destination Node Address is one of the addresses of the Session-Reflector, it SHOULD be used as the Source Address in the IP header of the reply test packet πŸ’…. If the Destination Node Address TLV is sent, the SSID MUST also be sent πŸ”₯.

A Session-Reflector that recognizes this TLV MUST set the U flag [RFC8972] in the reply test packet to 1 if the Session-Reflector determined that it is not the intended destination as identified in the Destination Node Address TLV 😭. In this case, the Session-Reflector does not use the received Destination Node Address as the Source Address in the IP header of the reply test packet πŸ™ˆ. Otherwise, the Session-Reflector MUST set the U flag in the Destination Node Address TLV in the reply test packet to 0 πŸ’–.

4. Return Path TLV ✨

okay so for end-to-end SR paths, the Session-Reflector might need to send the reply test packet out a specific Return Path πŸ›£οΈ and the Session-Sender can just ask for that in the test packet using a Return Path TLV πŸ’…. the big win is that with this TLV in the Session-Sender's test packet, nobody has to signal and maintain dynamic SR network state for the STAMP sessions on the Session-Reflector. no extra state drama πŸ™Œ

there are two modes for how the Session-Reflector behaves, from Section 4 of [RFC8762]: Stateless and Stateful πŸ¦‹. a Stateful Session-Reflector needs config that matches all the Session-Sender parameters: Source Address, Destination Address, Source UDP Port, Destination UDP Port, and maybe SSID (assuming the SSID is configurable and not auto-generated) 🧚. in that case a local policy can steer the test packet by creating extra states for the STAMP sessions on the Session-Reflector. and in promiscuous operation, a Stateless Session-Reflector will need some indication of how to send the test packet back on a specific path, like for measuring in an ECMP environment 🌈

for links, the Session-Reflector might need to send the reply test packet back out the same incoming link in the reverse direction πŸ”. the Session-Sender can request that in the test packet using a Return Path TLV too πŸ’–

[RFC8972] defines STAMP test packets that can carry one or more optional TLVs ✨. in this doc, TLV Type 10 is defined for the Return Path TLV, which carries the Return Path for the Session-Sender test packet πŸŽ€. here's the format, 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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |STAMP TLV Flags|    Type=10    |         Length                |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                   Return Path Sub-TLVs                        |
    .                                                               .
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Figure 3: Return Path TLV Format

here's what each field means 🫢:

STAMP TLV Flags: these follow the procedures in [RFC8972] and this doc.

Type: Type 10 for the Return Path TLV.

Length: a 2-octet field equal to the length of the Return Path Sub-TLVs field, in octets.

Return Path Sub-TLVs: as defined in Section 4.1.

ok, the rules, bestie, so pay attention 🚨:

  • a Session-Sender MUST NOT put more than one Return Path TLV in the STAMP test packet. πŸ™…β€β™€οΈ
  • a Session-Reflector that supports this TLV MUST only process the first Return Path TLV in the test packet and ignore any other Return Path TLVs if they're there. πŸ‘€
  • a Session-Reflector that supports this TLV MUST reply using the Return Path received in the Session-Sender test packet, as long as no error came up while processing the TLV. βœ…

also, a Session-Reflector that recognizes this TLV MUST set the U flag [RFC8972] in the reply test packet to 1 if it figured out that it can't use the Return Path in the test packet to send the reply test packet 😭. otherwise, the Session-Reflector MUST set the U flag in the reply test packet to 0 πŸ’œ.


4.1. Return Path Sub-TLVs 🧩

the Return Path TLV holds one or more Sub-TLVs that carry the info for the requested Return Path. a Return Path Sub-TLV can carry a Return Path Control Code, a Return Path IP Address, or a Return Path Segment List 🌸.

the STAMP Sub-TLV Flags are set using the procedures in [RFC8972] πŸ“.

these are the no-go combos for a Session-Sender test packet πŸ™ˆ:

  • a Return Path TLV MUST NOT contain more than one Control Code Sub-TLV, Return Address Sub-TLV, or Return Path Segment List Sub-TLV. 🚫
  • a Return Path TLV MUST NOT contain both a Control Code Sub-TLV and a Return Address or Return Path Segment List Sub-TLV. πŸ’€

and the one that's allowed (main character energy, but make it legal) πŸ‘‘:

  • a Return Path TLV MAY contain both a Return Address and a Return Path Segment List Sub-TLV in a Session-Sender test packet. ✨

4.1.1. Return Path Control Code Sub-TLV πŸŽ›οΈ

here's the format of the Control Code Sub-TLV in the Return Path TLV, in Figure 4 πŸ¦‹:

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |STAMP TLV Flags|   Type=1      |         Length=4              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                   Control Code Flags                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    Figure 4: Format of the Control Code Sub-TLV in the Return Path TLV

the fields, explained 🧁:

Type: Type 1 for the Return Path Control Code. the Session-Sender can ask the Session-Reflector to send the reply test packet based on the flags in the Control Code Flags field 🎯.

STAMP TLV Flags: these follow the procedures in [RFC8972] and this doc.

Length: a 2-octet field equal to the length of the Control Code flags, which is 4 octets.

Control Code Flags (32 bits): the Reply Request Flag is at bit 31 (least significant bit) and works like this πŸ”‘:

  • 0x0: No Reply Requested
  • 0x1: Reply Requested on the Same Link

all other bits are reserved and must be transmitted as 0 and ignored by the receiver 🀫.

now the vibes for each setting 🌈:

when the Reply Request flag is set to 0x0 in the Session-Sender test packet, the Session-Reflector does NOT send a reply test packet to the Session-Sender and just ends the STAMP test packet there πŸ›‘. only the one-way measurement applies in this case. the Session-Reflector can optionally stream performance metrics via telemetry using the info from the received test packet πŸ“Š. all other Return Path Sub-TLVs MUST be ignored in this case πŸ™…β€β™€οΈ.

when the Reply Request flag is set to 0x1 in the Session-Sender test packet, the Session-Reflector sends the reply test packet over the same incoming link where the test packet came in, going back in the reverse direction toward the Session-Sender πŸ”. that link can be a physical interface, a virtual link, a LAG [IEEE802.1AX], or a LAG member πŸ”—. all other Return Path Sub-TLVs MUST be ignored in this case too. and if you're using LAG member links, the STAMP extension for the Micro-Session ID TLV defined in [STAMP-ON-LAG] can be used to identify the link πŸ†”.


4.1.2. Return Address Sub-TLVs πŸ“¬

the STAMP reply test packet can be sent to the Session-Sender at the specified Return Address in the Return Address Sub-TLV, instead of going to the Source Address in the Session-Sender test packet πŸ’Œ.

here are the formats of the IPv4 and IPv6 Return Address Sub-TLVs in the Return Path TLV, shown in Figure 5 πŸŽ€:

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |STAMP TLV Flags|     Type=2    |         Length=4              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                    Return IPv4 Address                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |STAMP TLV Flags|     Type=2    |         Length=16             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    |                    Return IPv6 Address                        |
    |                                                               |
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

       Figure 5: Formats of the Return Address Sub-TLVs in the Return
                                  Path TLV

the fields 🧸:

Type: Type 2 for the Return IPv4 Address or Return IPv6 Address.

the Return Address asks the Session-Reflector to send the reply test packet to the specified address, rather than to the Source Address in the Session-Sender test packet πŸ“.

STAMP TLV Flags: these follow the procedures in [RFC8972] and this doc.

Length: a 2-octet field equal to the length of the Return Address field, in octets. it's 4 octets for an IPv4 address and 16 octets for an IPv6 address πŸ“.


4.1.3. Return Path Segment List Sub-TLVs πŸ›€οΈ

the format of the Segment List Sub-TLVs in the Return Path TLV is shown in Figures 6 and 7. the Segments carried in Segment List Sub-TLVs are described in [RFC8402]. the segment entries MUST be in network order 🌐.

the Session-Sender MUST only insert one Return Path Segment List Sub-TLV in the test packet, and the Segment List MUST contain at least one Segment 🧠. the Session-Reflector MUST only process the first Return Path Segment List Sub-TLV in the test packet and ignore any other Return Path Segment List Sub-TLVs if they're present πŸ‘‘.

the fields, bestie πŸ’«:

the Return Path Segment List Sub-TLV can be one of these Types:

  • Type (value 3): SR-MPLS Label Stack of the Return Path 🏷️
  • Type (value 4): SRv6 Segment List of the Return Path 🧭

STAMP TLV Flags: these follow the procedures in [RFC8972] and this doc.

Length: a 2-octet field equal to the length of the Segment List field, in octets. the length MUST NOT be 0 πŸ™…β€β™€οΈπŸ’…

4.1.3.1. Return Path SR-MPLS Label Stack Sub-TLV ✨

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |STAMP TLV Flags|     Type=3    |         Length                |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |      Segment(1)                       | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    .                                                               .
    .                                                               .
    .                                                               .
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |      Segment(n) (bottom of stack)     | TC  |S|      TTL      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     Figure 6: Format of the SR-MPLS Label Stack Sub-TLV in the Return
                                  Path TLV

okay so the SR-MPLS Label Stack is basically a list of 32-bit Label Stack Entries (LSEs) πŸ’–. Each one holds a 20-bit label value, an 8-bit Time-To-Live (TTL) value, a 3-bit Traffic Class (TC) value, and a 1-bit End-of-Stack (S) field πŸŽ€. The length of the Sub-TLV modulo 4 MUST be 0. Yes, it's a strict rule, bestie, no cap πŸ’….

As an example 🧚, an SR-MPLS Label Stack Sub-TLV could carry only the Binding SID Label [PCE-BINDING-LABEL-SID] of the Return SR-MPLS Policy 🌸. The Binding SID Label of the Return SR-MPLS Policy is local to the Session-Reflector, so it's a local-only vibe πŸ¦‹. The mechanism to signal the Binding SID Label to the Session-Sender is outside the scope of this document, so that's a different story for another day πŸ™ˆ.

As another example ✨, an SR-MPLS Label Stack Sub-TLV could include the Path Segment Identifier Label of the Return SR-MPLS Policy in the Segment List of the SR-MPLS Policy. Iconic πŸ‘‘.


4.1.3.2. Return Path SRv6 Segment List Sub-TLV ✨

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |STAMP TLV Flags|     Type=4    |         Length                |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    |      Segment(1) (128-bit IPv6 Address)                        |
    |                                                               |
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    .                                                               .
    .                                                               .
    .                                                               .
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    |      Segment(n) (128-bit IPv6 Address) (bottom of stack)      |
    |                                                               |
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Figure 7: Format of the SRv6 Segment List Sub-TLV in the Return
                                  Path TLV

so the SRv6 Segment List is a list of 128-bit IPv6 addresses 🌈 representing the SRv6 SIDs. The length of the Sub-TLV modulo 16 MUST be 0 πŸ’€, so keep that math right, fr fr.

As an example 🫢, a Return Path SRv6 Segment List Sub-TLV could carry only the SRv6 Binding SID [PCE-BINDING-LABEL-SID] of the Return SRv6 Policy πŸ’œ. The SRv6 Binding SID of the Return SRv6 Policy is local to the Session-Reflector, so it stays on that side πŸ“. The mechanism to signal the SRv6 Binding SID to the Session-Sender is outside the scope of this document πŸ™ƒ.

As another example πŸ’…, a Return Path SRv6 Segment List Sub-TLV could include the SRv6 Path Segment Identifier of the Return SRv6 Policy in the Segment List of the SRv6 Policy. Main character energy, literally πŸ”₯.


5. Interoperability with TWAMP Light ✨

This document does not introduce any additional considerations for interoperability with the Two-Way Active Measurement Protocol (TWAMP) Light than those described in Section 4.6 of [RFC8762]. Basically, if you're already doing TWAMP Light stuff, the rules are the ones you already know πŸŽ€.

As described in [RFC8762], there are two possible combinations for such an interoperability use case πŸ¦‹:

  • STAMP Session-Sender with TWAMP Light Session-Reflector
  • TWAMP Light Session-Sender with STAMP Session-Reflector

If any of the STAMP extensions defined in this document are used by STAMP Session-Sender, the TWAMP Light Session-Reflector will view them as the Packet Padding field πŸ™ˆ. Lowkey a very chill outcome, ngl 🌸.


6. Security Considerations πŸ’€

Okay bestie, this part is SERIOUS 😭, so pay attention. The security considerations specified in [RFC8762] and [RFC8972] also apply to the extensions defined in this document πŸ”₯. Specifically, the authenticated mode and the message integrity protection using Hashed Message Authentication Code (HMAC), as defined in Section 4.4 of [RFC8762], also apply to the procedures 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 STAMP extensions in this document. Not optional, iykyk πŸ‘‘.

If desired, attacks can be mitigated by performing basic validation checks of the timestamp fields (such as T2 is later than T1 in the reference topology in Section 2.3) in received reply test packets at the Session-Sender. The minimal state associated with these protocols also limit the extent of measurement disruption that can be caused by a corrupt or invalid test packet to a single test cycle. πŸ›‘οΈβœ¨

The usage of STAMP extensions defined in this document is intended for deployment in a single network administrative domain 🏠. As such, the Session-Sender address, Session-Reflector address, and Return Path are provisioned by the operator for the STAMP session. It is assumed that the operator has verified the integrity of the Return Path and identity of the far-end Session-Reflector 🧐.

The STAMP extensions defined in this document may be used for potential address spoofing 😬. For example, a Session-Sender may specify a Return Path IP Address that is different from the Session-Sender address. The Session-Reflector MAY drop the Session-Sender test packet when it cannot determine whether the Return Path IP Address is local on the Session-Sender. To help the Session-Reflector to make that determination, the Return Path IP Address may also be provisioned by the operator, for example, in an access control list πŸŽ€.


7. IANA Considerations 🌷

IANA has allocated a value for the Destination Address TLV Type and a value for the Return Path TLV Type from the IETF Review TLV range in the "STAMP TLV Types" registry [RFC8972] as follows πŸ“:

    +=======+=======================================+===========+
    | Value | Description                           | Reference |
    +=======+=======================================+===========+
    | 9     | Destination Node IPv4 or IPv6 Address | RFC 9503  |
    +-------+---------------------------------------+-----------+
    | 10    | Return Path                           | RFC 9503  |
    +-------+---------------------------------------+-----------+

                       Table 1: STAMP TLV Types

IANA has created the "Return Path Sub-TLV Types" registry πŸ—‚οΈ. All code points in the range 1 through 175 in this registry shall be allocated according to the "IETF Review" procedure as specified in [RFC8126]. Code points in the range 176 through 239 shall be allocated according to the "First Come First Served" procedure as specified in [RFC8126]. Remaining code points shall be allocated according to Table 2 ✨:

                +=========+=========================+
                | Range   | Registration Procedures |
                +=========+=========================+
                | 1-175   | IETF Review             |
                +---------+-------------------------+
                | 176-239 | First Come First Served |
                +---------+-------------------------+
                | 240-251 | Experimental Use        |
                +---------+-------------------------+
                | 252-254 | Private Use             |
                +---------+-------------------------+

                     Table 2: Return Path Sub-TLV
                            Types Registry

IANA has allocated values for the following Sub-TLV Types in the "Return Path Sub-TLV Types" registry πŸ’•:

   +=======+========================================+===========+
   | Value | Description                            | Reference |
   +=======+========================================+===========+
   | 0     | Reserved                               | RFC 9503  |
   +-------+----------------------------------------+-----------+
   | 1     | Return Path Control Code               | RFC 9503  |
   +-------+----------------------------------------+-----------+
   | 2     | Return IPv4 or IPv6 Address            | RFC 9503  |
   +-------+----------------------------------------+-----------+
   | 3     | SR-MPLS Label Stack of the Return Path | RFC 9503  |
   +-------+----------------------------------------+-----------+
   | 4     | SRv6 Segment List of the Return Path   | RFC 9503  |
   +-------+----------------------------------------+-----------+
   | 255   | Reserved                               | RFC 9503  |
   +-------+----------------------------------------+-----------+

                 Table 3: Return Path Sub-TLV Types

IANA has created the "Return Path Control Code Flags" registry for Return Path Control Code Sub-TLVs πŸ¦‹. All code points in the bit position 31 (counting from bit 31 as the least significant bit) through 12 in this registry shall be allocated according to the "IETF Review" procedure as specified in [RFC8126]. Code points in the bit position 11 through 8 shall be allocated according to the "First Come First Served" procedure as specified in [RFC8126]. Remaining code points shall be allocated according to Table 4 🌈:

                 +=======+=========================+
                 | Range | Registration Procedures |
                 +=======+=========================+
                 | 31-12 | IETF Review             |
                 +-------+-------------------------+
                 | 11-8  | First Come First Served |
                 +-------+-------------------------+
                 | 7-4   | Experimental Use        |
                 +-------+-------------------------+
                 | 3-0   | Private Use             |
                 +-------+-------------------------+

                     Table 4: Return Path Control
                         Code Flags Registry

IANA has allocated a value in the "Return Path Control Code Flags" registry as follows ⭐:

                +=======+===============+===========+
                | Value | Description   | Reference |
                +=======+===============+===========+
                | 31    | Reply Request | RFC 9503  |
                +-------+---------------+-----------+

                  Table 5: Return Path Control Code
                                Flags

8. References ✨

8.1. Normative References πŸ“šβœ¨

Okay bestie, these are the normative references, the ones you absolutely need to read to get the spec right πŸ’… Here's the full list, verbatim:

   [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. 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 Optional Extensions", RFC 8972,
              DOI 10.17487/RFC8972, January 2021,
              <https://www.rfc-editor.org/info/rfc8972>.

8.2. Informative References 🌸

These ones are the extra reading, the "ooh tell me more" section 🧚 Still super useful, just not strictly required to implement the thing:

   [IEEE802.1AX]
              IEEE, "IEEE Standard for Local and metropolitan area
              networks -- Link Aggregation", IEEE Std 802.1AX-2014,
              DOI 10.1109/IEEESTD.2014.7055197, December 2014,
              <https://doi.org/10.1109/IEEESTD.2014.7055197>.

   [IPPM-STAMP-YANG]
              Mirsky, G., Min, X., and W. S. Luo, "Simple Two-way Active
              Measurement Protocol (STAMP) Data Model", Work in
              Progress, Internet-Draft, draft-ietf-ippm-stamp-yang-11,
              13 March 2023, <https://datatracker.ietf.org/doc/html/
              draft-ietf-ippm-stamp-yang-11>.

   [PCE-BINDING-LABEL-SID]
              Sivabalan, S., Filsfils, C., Tantsura, J., Previdi, S.,
              and C. Li, Ed., "Carrying Binding Label/Segment Identifier
              (SID) in PCE-based Networks.", Work in Progress, Internet-
              Draft, draft-ietf-pce-binding-label-sid-16, 27 March 2023,
              <https://datatracker.ietf.org/doc/html/draft-ietf-pce-
              binding-label-sid-16>.

   [RFC8126]  Cotton, M., Leiba, B., and T. Narten, "Guidelines for
              Writing an IANA Considerations Section in RFCs", BCP 26,
              RFC 8126, DOI 10.17487/RFC8126, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.

   [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>.

   [RFC8545]  Morton, A., Ed. and G. Mirsky, Ed., "Well-Known Port
              Assignments for the One-Way Active Measurement Protocol
              (OWAMP) and the Two-Way Active Measurement Protocol
              (TWAMP)", RFC 8545, DOI 10.17487/RFC8545, March 2019,
              <https://www.rfc-editor.org/info/rfc8545>.

   [RFC9256]  Filsfils, C., Talaulikar, K., Ed., Voyer, D., Bogdanov,
              A., and P. Mattes, "Segment Routing Policy Architecture",
              RFC 9256, DOI 10.17487/RFC9256, July 2022,
              <https://www.rfc-editor.org/info/rfc9256>.

   [STAMP-ON-LAG]
              Li, Z., Zhou, T., Guo, J., Mirsky, G., and R. Gandhi,
              "Simple Two-Way Active Measurement Protocol Extensions for
              Performance Measurement on LAG", Work in Progress,
              Internet-Draft, draft-ietf-ippm-stamp-on-lag-05, 17
              October 2023, <https://datatracker.ietf.org/doc/html/
              draft-ietf-ippm-stamp-on-lag-05>.

Appendix A. Destination Node Address TLV Use-Case Example πŸŽ€

Okay, the use case! STAMP test packets can get wrapped up in one of two ways πŸ¦‹ Either (1) an SR-MPLS Label Stack plus an IPv4 header with a Destination Address from the 127/8 range, or (2) an outer IPv6 header and a Segment Routing Header (SRH) with an inner IPv6 header whose Destination Address is from the ::1/128 range.

Now the ECMP drama 😀 In an ECMP environment, the hashing function in forwarding may decide the outgoing path using the Source Address, Destination Address, UDP ports, IPv6 flow-label, etc. from the packet. So for IPv4, different values of an IPv4 Destination Address from the 127/8 range may be used in the IPv4 header of the STAMP test packets to measure different ECMP paths. For IPv6, different values of flow-label may be used in the IPv6 header of the STAMP test packets to measure different ECMP paths. Clever, right? 🧠

Here's the catch πŸ’€ In those cases, the STAMP test packets may reach a node that is not the Session-Reflector for this STAMP session in an error condition. That unintended node may transmit a reply test packet that can result in the reporting of invalid measurement metrics. Yikes, bad data.

The fix is the Destination Node Address TLV πŸ™Œ The intended Session-Reflector address can be carried in that TLV to help detect this error. Main character energy for the TLV, honestly πŸ‘‘


Acknowledgments 🫢

The authors would like to thank Thierry Couture for the discussions on the use cases for Performance Measurement in Segment Routing. The authors would also like to thank Greg Mirsky, Mike Koldychev, Gyan Mishra, Tianran Zhou, Al Morton, Reshad Rahman, Zhenqiang Li, Frank Brockners, Henrik Nydell, and Cheng Li for providing comments and suggestions. πŸ’œ

Thank you to Joel Halpern for the Gen-ART review, Martin Duke for the AD review, and Kathleen Moriarty for the Security review. πŸ™ The authors would also like to thank Robert Wilton, Γ‰ric Vyncke, Paul Wouters, John Scudder, Roman Danyliw, Lars Eggert, Erik Kline, Warren Kumari, and Jim Guichard for the IESG review. The whole squad showed up πŸ₯Ή


Contributors 🧚

The following person has contributed substantially to this document 🌈

Daniel Voyer
Bell Canada
Email: daniel.voyer@bell.ca

Authors' Addresses πŸ’–

Meet the authors! πŸ¦‹

Rakesh Gandhi (editor)
Cisco Systems, Inc.
Canada
Email: rgandhi@cisco.com
Clarence Filsfils
Cisco Systems, Inc.
Email: cfilsfil@cisco.com
Mach(Guoyi) Chen
Huawei
Email: mach.chen@huawei.com
Bart Janssens
Colt
Email: Bart.Janssens@colt.net
Richard Foote
Nokia
Email: footer.foote@nokia.com
πŸ“¦ where this page comes from