Simple Two-Way Active Measurement Protocol Optional Extensions
updates
- rfc-8762 — Simple Two-Way Active Measurement Protocol
Extracted elements (31)
The Follow-Up Telemetry TLV exists because a Session-Reflector may only be able to provide an 'SW Local' timestamp in the base packet, but the hosting system may provide a more accurate hardware-assisted timestamp after the fact. This follow-up mechanism improves delay measurement accuracy by minimizing the impact of egress queuing delays.
The Location TLV is designed to detect last-hop IP addresses, ports, and MAC addresses. MAC addresses can indicate a path switch on the last hop; IP addresses and UDP ports reveal NAT routers and changes in NAT mapping that could send STAMP packets to the wrong Session-Reflector.
Unauthenticated STAMP test packets are compatible on the wire with unauthenticated TWAMP-Test (RFC 5357) packets. A Session-Reflector that does not support STAMP extensions will copy TLVs into the reflected packet without processing them, as defined in RFC 8762 Section 4.3.
A Session-Reflector receiving a CoS TLV MUST copy DSCP and ECN from the IP header into DSCP2, MUST verify whether DSCP1 is permitted under local policy, and if permitted MUST set the reflected packet's DSCP to DSCP1; otherwise MUST use the received DSCP and set RP=1.
A Session-Reflector that supports this specification MUST identify a STAMP session using the SSID combined with the 4-tuple, MUST be provisioned with all identifying elements before the session begins, MUST discard non-matching test packets, and MUST copy the SSID value from received packets into reflected packets.
A Session-Sender MUST set U=1 before transmitting; a Session-Reflector MUST set U=1 if it did not understand the TLV, and MUST set U=0 otherwise. If the M flag is set in a reflected packet, the STAMP system MUST stop processing the remainder of the extended packet.
After sending a test packet with the Access Report TLV, the Session-Sender MUST arm a retransmission timer and MUST retransmit if the timer expires before a reflected packet with Access Report TLV is received. Retransmission SHOULD be repeated up to four times; default timer value SHOULD be three seconds.
All authenticated STAMP base packets compatible with this specification MUST additionally authenticate optional TLVs by including the HMAC TLV, with the sole exception of when the only TLV present is the Extra Padding TLV. The HMAC TLV MUST be the last TLV (excluding Extra Padding); if mispositioned it MUST be treated as HMAC verification failure.
An implementation MUST NOT assign the same SSID to different STAMP test sessions. If the SSID is used, it MUST be present in each test packet of the given test session.
For TLVs in the Private Use range (252-254), the Length MUST be at least 4 and the first four octets MUST be the vendor's SMI Private Enterprise Code in network octet order.
If an implementation of a Session-Reflector does not recognize the Type field value, it MUST include a copy of the TLV in the reflected STAMP packet, MUST set the U flag to 1, and MUST skip the processing of the unrecognized TLV.
If HMAC verification by the Session-Reflector fails, it MUST stop processing the received packet, copy TLVs into the reflected packet, and set the I flag to 1 in each copied TLV. If the Session-Sender receives a reflected packet with I flag set, it MUST stop processing TLVs.
The Access Report TLV (Type 6, Length=4) contains an Access ID (4-bit field: 1=3GPP, 2=non-3GPP) and Return Code (1-octet field from the STAMP Return Codes registry). Used by 5G PMF components to report access network status changes.
The Class of Service TLV (Type 4, Length=4) contains DSCP1 (6-bit intended DSCP for reflected packet), DSCP2 (received DSCP at reflector ingress), ECN (2-bit received ECN), and RP (2-bit Reverse Path indicator set to 0 by sender).
The Direct Measurement TLV (Type 5, Length=12) contains three 4-octet counters: S_TxC (Session-Sender transmitted in-profile packets), R_RxC (Session-Reflector received in-profile packets), and R_TxC (Session-Reflector transmitted in-profile packets).
The Extra Padding TLV (Type 1) carries variable-length pseudorandom or zero-filled padding, RECOMMENDED for performing STAMP tests with packets larger than the base STAMP packet (44 octets unauthenticated, 112 octets authenticated). It MAY appear more than once.
The Follow-Up Telemetry TLV (Type 7, Length=16) carries: Sequence Number (4 octets, sequence number of last reflected packet), Follow-Up Timestamp (8 octets, actual transmission time of that packet), and Timestamp Mode (1 octet, timestamping method used).
The HMAC TLV (Type 8, Length=16) carries a 16-octet HMAC digest computed using HMAC-SHA-256 truncated to 128 bits over the concatenation of the base STAMP packet's Sequence Number field and all preceding TLVs. It MUST follow all TLVs except Extra Padding TLV.
The Location TLV (Type 2) is sent by the Session-Sender to query the Session-Reflector's address information. It contains Destination Port (2 octets), Source Port (2 octets), and optional sub-TLVs for MAC addresses and IP addresses (EUI-48, EUI-64, IPv4, IPv6).
The Timestamp Information TLV (Type 3) allows the Session-Sender to request the Session-Reflector's clock synchronization source (Sync Src In/Out, one octet each) and timestamping method (Timestamp In/Out, one octet each) for ingress and egress.
STAMP Return Codes subregistry created for use in the Access Report TLV Return Code field. Initial allocations: 1=Network available, 2=Network unavailable.
STAMP Sub-TLV Types subregistry created for use within the Location TLV. Initial allocations (types 1-9): Source MAC Address, Source EUI-48 Address, Source EUI-64 Address, Destination IP Address, Destination IPv4 Address, Destination IPv6 Address, Source IP Address, Source IPv4 Address, Source IPv6 Address.
STAMP Synchronization Sources subregistry created. Initial values: 1=NTP, 2=PTP, 3=SSU/BITS, 4=GPS/GLONASS/LORAN-C/BDS/Galileo, 5=Local free-running. Used in the Timestamp Information TLV Sync Src fields.
STAMP Timestamping Methods subregistry created. Initial values: 1=HW Assist, 2=SW Local, 3=Control Plane. Used in Timestamp Information TLV Timestamp In/Out fields and Follow-Up Telemetry TLV Timestamp Mode field.
STAMP TLV Flags subregistry created with IETF Review registration procedure. Initial allocations: bit 0=U (Unrecognized TLV), bit 1=M (Malformed TLV), bit 2=I (Integrity check failed).
STAMP TLV Types subregistry created under the STAMP TLV Types registry. Ranges 1-175 (IETF Review), 176-239 (First Come First Served), 240-251 (Experimental), 252-254 (Private Use). Initial allocations: 1=Extra Padding, 2=Location, 3=Timestamp Information, 4=Class of Service, 5=Direct Measurement, 6=Access Report, 7=Follow-Up Telemetry, 8=HMAC.
The CoS TLV allows testing DSCP mapping across domain boundaries; operators must verify permitted CoS values in the Session-Reflector's domain. Implementations of Session-Reflector SHOULD enforce local policy to confirm whether the DSCP1 value from the Session-Sender can be applied.
The HMAC TLV protects the integrity of STAMP extension TLVs but does not protect against replay attacks. Implementations of Session-Sender and Session-Reflector MUST check the M flag and validate the Length field to protect against malformed TLVs.
Each STAMP TLV consists of: STAMP TLV Flags (1 octet), Type (1 octet), Length (2 octets equal to length of Value field in octets), and Value (variable). All multi-byte fields are in network byte order.
The STAMP Session Identifier (SSID) is a two-octet, non-zero unsigned integer placed after the Error Estimate field in both unauthenticated and authenticated test packets (Figures 1-4). It replaces unused MBZ space in the base STAMP packet.
The STAMP TLV Flags field is 8 bits encoding: U (bit 0, Unrecognized), M (bit 1, Malformed), I (bit 2, Integrity check failed), and R (bits 3-7, Reserved, must be zeroed on transmit and ignored on receipt).