Simple Two-Way Active Measurement Protocol
updated by
- rfc-8972 — Simple Two-Way Active Measurement Protocol Optional Extensions
Extracted elements (31)
STAMP adopts HMAC-SHA-256 truncated to 128 bits (following RFC 4868 / IPsec practice) rather than HMAC-SHA-1 used in TWAMP, improving integrity protection at the cost of authenticated-mode interoperability with TWAMP Light.
STAMP was designed with an inherent separation of control (vendor-specific configuration or orchestration) and test functions to provide deterministic behavior and simplify deployment. Interoperability problems with TWAMP Light—caused by underspecification in RFC 5357—motivated a clean standalone specification.
The MBZ field in the Session-Sender unauthenticated packet is sized at 30 octets to match the size of the base reflected packet, implementing the symmetrical size behavior from RFC 6038 without requiring per-session size negotiation.
A STAMP Session-Reflector receiving a packet smaller than the STAMP base packet transmits only the base reflected packet (Figure 5). If the received packet is larger, the Session-Reflector copies the remainder to return a symmetrically-sized packet, accommodating TWAMP Light senders that add padding.
STAMP extensions (defined in STAMP-OPTION) are transparent to a TWAMP Light Session-Reflector, which will view them as Packet Padding, enabling forward-compatible deployment of STAMP senders against legacy TWAMP Light reflectors.
STAMP interoperates with TWAMP Light only in unauthenticated mode because STAMP uses HMAC-SHA-256 while TWAMP uses HMAC-SHA-1. Two use cases are supported: STAMP Session-Sender with TWAMP Light Session-Reflector, and TWAMP Light Session-Sender with STAMP Session-Reflector.
A STAMP Session-Sender implementation MUST be able to use destination UDP port numbers from the User Ports and Dynamic Ports ranges (RFC 6335). Before using User Ports range numbers, the possible network impact MUST be carefully studied and agreed upon by all users of the network domain.
A STAMP Session-Sender MUST use UDP port 862 (TWAMP-Test Receiver Port) as the default destination UDP port number.
By default, a STAMP Session-Reflector implementation MUST receive STAMP-Test packets on UDP port 862 and MUST be configurable to accept packets from User Ports and Dynamic Ports ranges.
HMAC MUST be verified as early as possible to avoid using or propagating corrupted data.
If confidentiality protection for STAMP is required, a STAMP-Test session MUST use a secured transport such as a dedicated IPsec tunnel or DTLS.
In stateful mode, the STAMP Session-Reflector MUST maintain a state for each configured STAMP-Test session, uniquely associating packets with a session and incrementing a per-session sequence number by one for each transmitted reply.
In the TWAMP Light Session-Sender / STAMP Session-Reflector interoperability scenario, if the TWAMP Light Session-Sender does not support port 862, the test management system MUST set the STAMP Session-Reflector to the appropriate port, and the Session-Reflector MUST be set to use NTP as the default timestamp format.
The load of STAMP-Test packets offered to a network MUST be carefully estimated and the possible impact on existing services MUST be thoroughly analyzed before launching the test session; RFC 8085 provides guidance.
The MBZ field in all STAMP packets MUST be all zeroed on transmission and MUST be ignored on receipt.
The STAMP node MUST support the NTP version 4 64-bit timestamp format (RFC 5905) and MAY support the IEEE 1588v2 PTP truncated 64-bit timestamp format (RFC 8186); NTP is the default.
To mitigate possible attack vectors, the control and management of a STAMP-Test session MUST use secured transport.
When using STAMP over the Internet with User Ports range destination port numbers, the possible impact of STAMP-Test packets MUST be thoroughly analyzed and the use MUST be agreed upon by nodes hosting the Session-Sender and Session-Reflector before starting the session.
A STAMP session is the bidirectional packet flow between one specific Session-Sender and one particular Session-Reflector for a time duration. Session configuration and management (CLI, OSS/BSS, SNMP, NETCONF/YANG SDN) are outside the scope of this document.
By default STAMP uses symmetrical packets: the Session-Reflector returns a packet equal in size to the packet it received. The MBZ padding in the Session-Sender packet is sized to equalize the base sender and reflector packet sizes.
STAMP uses HMAC-SHA-256 truncated to 128 bits (16-octet HMAC field) for authenticated mode integrity protection. HMAC covers the first 96 octets (six 16-octet blocks) of the packet. Key management and distribution are out of scope.
The Sequence Number field in the Session-Sender packet is 4 octets, starting at zero for each new session and incremented by one with each transmitted packet.
Since STAMP session control and management are outside the protocol's scope, only a general requirement is specified: control and management MUST use secured transport, and test load MUST be analyzed before deployment to avoid impacting existing services.
STAMP uses UDP port 862 (allocated for OWAMP-Test/TWAMP-Test). The attack risk and mitigation measures for use of this registered port documented in RFC 8545 Section 6 apply equally to STAMP.
The STAMP Session-Reflector operates in two modes: stateless (copies Sequence Number from received packet; only round-trip loss is measurable) and stateful (maintains per-session state and independently increments Sequence Number; both near-end and far-end packet loss are computable).
Error Estimate field (2 octets, Figure 3): S bit, Z bit (0=NTP 64-bit, 1=PTPv2 truncated), Scale (6 bits), Multiplier (8 bits). The Z field governs the timestamp format for both Timestamp and Receive Timestamp fields.
Session-Reflector authenticated test packet (Figure 6) mirrors the unauthenticated reflector format with expanded MBZ padding between each field to achieve 16-octet block alignment, and appends HMAC (16 octets) at the end of the PDU.
Session-Reflector unauthenticated test packet (Figure 5): Sequence Number (4), Timestamp (8), Error Estimate (2), MBZ (2), Receive Timestamp (8), Session-Sender Sequence Number (4), Session-Sender Timestamp (8), Session-Sender Error Estimate (2), MBZ (2), Ses-Sender TTL (1), MBZ (3).
Session-Sender authenticated test packet (Figure 4) is 112 octets: Sequence Number (4), MBZ (12), Timestamp (8), Error Estimate (2), MBZ (70), HMAC (16); MBZ fields pad the packet to a multiple of 16 octets and are included in the HMAC computation.
Session-Sender unauthenticated test packet (Figure 2) is minimum 44 octets: Sequence Number (4 octets), Timestamp (8 octets), Error Estimate (2 octets), MBZ (30 octets).
The Session-Sender TTL field in the Session-Reflector packet is one octet and carries a copy of the IPv4 TTL (or IPv6 Hop Limit) from the received STAMP-Test packet, enabling TTL-based path analysis.