Individual Session Control Feature for the Two-Way Active Measurement Protocol (TWAMP)
updates
- rfc-5357 — A Two-Way Active Measurement Protocol (TWAMP)
Extracted elements (24)
Implementers of Individual Session Control may also wish to implement the 'Reflect Octets' feature because RFC 5357 sessions are established serially and total setup time grows with session count. Reflect Octets allows a Control-Client to distinguish parallel Request-TW-Session commands by having the Server echo back a local index.
The Individual Session Control feature is motivated by the need to start/stop individual test sessions at will using a single TWAMP-Control connection. This permits short-duration tests during longer ones, or conditional diagnostic tests triggered by intermediate results.
The Stop-N-Ack command was introduced to complete symmetry with the Start-N-Ack response — the base TWAMP Stop command had no acknowledgement. This mirrors the Start-ACK pattern and ensures both directions of session control have equivalent handshaking.
An implementation that supports the SERVWAIT timeout option SHOULD also implement the REFWAIT timeout option, and REFWAIT SHOULD be enforced when any test session is in progress (started and not stopped).
If the Control-Client intends to control sessions on an individual basis, it MUST set mode bit 4 in the Setup Response message and MUST use the start/stop commands intended for individual session control. The original Start and Stop commands (2 and 3) and their acknowledgements as defined in RFC 5357 MUST NOT be used.
If the Server sets bit position 4 in the Server Greeting message to indicate Individual Session Control capability, then the Server and Session-Reflector MUST comply with the requirements of this memo to control sessions on an individual basis if desired.
In response to Stop-N-Sessions, the Server MUST reply with one or more Stop-N-Ack commands with Accept fields corresponding to one or more of the SIDs. The Number of Sessions field MUST be one or greater and MUST equal the count of SID fields.
The Number of Sessions field in Start-N-Ack MUST be one or greater, and the number of SID fields that follow MUST be equal to the value in the Number of Sessions field.
The sender MUST manage test sessions according to their SID when using the Individual Session Control feature.
The Server MUST respond to a Start-N-Sessions command with one or more Start-N-Ack messages, which SHOULD be sent as quickly as possible. When using Individual Session Control mode, multiple Start-N-Sessions commands MAY be sent without waiting for acknowledgement.
The Server MUST respond to a Stop-N-Sessions command with one or more Stop-N-Ack messages, which SHOULD be sent as quickly as possible.
The Session-Reflector MUST manage all accepted test sessions according to their SID.
Throughout the memo, bits marked MBZ (Must Be Zero) MUST be set to zero by senders and MUST be ignored by receivers. The HMAC MUST be calculated as defined in Section 3.2 of RFC 4656.
Upon receipt of a Stop-N-Sessions command referencing a specific SID, the Session-Reflector MUST ignore TWAMP-Test packets in that session that arrive within the Timeout window, and MUST NOT generate a test packet to the Session-Sender for those ignored packets.
When Individual Session Control is in use, the Server SHALL suspend SERVWAIT timer monitoring after receiving any Start-N-Sessions command. SERVWAIT monitoring SHALL resume after Stop-N-Sessions is received for all corresponding SIDs (with no sessions in progress), or when REFWAIT expires on all test sessions.
When the Server and Control-Client have agreed to use Individual Session Control mode, the Control-Client, Server, Session-Sender, and Session-Reflector MUST all conform to the requirements of that mode. The original TWAMP-Control Start and Stop commands MUST NOT be used.
The Individual Session Control mode is identified by bit position 4 (value 16) in the 32-bit TWAMP Modes field. The Control-Client MUST also set one mode bit to indicate the chosen security mode (bits 0, 1, 2, or 3), and MAY combine bit 4 with other feature bits.
IANA assigned four command numbers (7–10) in the 'TWAMP-Control Command Numbers' registry: 7=Start-N-Sessions, 8=Start-N-Ack, 9=Stop-N-Sessions, 10=Stop-N-Ack. The registry is managed under 'IETF Consensus' policy and can hold 256 values total.
IANA assigned value 16 (bit position 4) in the 'TWAMP-Modes' registry to indicate 'Individual Session Control' capability. The registry uses a 32-bit field and is managed under 'IETF Consensus' policy. Bit positions 0–4 are now all assigned.
The security considerations that apply to any active measurement of live networks are relevant to this feature. Implementers are referred to the security considerations in RFC 4656 (OWAMP) and RFC 5357 (TWAMP). No new security issues beyond those in the base protocols are introduced.
The Start-N-Ack message (Command Number 8) contains: 1-octet command number, 1-octet Accept field, 2 octets MBZ, 8 octets MBZ, 4-octet Number of Sessions, one or more 16-octet SID fields, and a 16-octet HMAC terminator. All SIDs with the same Accept code may be acknowledged in a single Start-N-Ack message.
The Start-N-Sessions message (Command Number 7) contains: 1-octet command number, 11 octets MBZ, 4-octet Number of Sessions, one or more 16-octet SID fields, and a 16-octet HMAC terminator. The Number of Sessions field MUST be one or greater and MUST equal the count of SID fields that follow.
The Stop-N-Ack message (Command Number 10) contains: 1-octet command number, 1-octet Accept field, 2 octets MBZ, 8 octets MBZ, 4-octet Number of Sessions, one or more 16-octet SID fields, and a 16-octet HMAC terminator.
The Stop-N-Sessions message (Command Number 9) contains: 1-octet command number, 11 octets MBZ, 4-octet Number of Sessions, one or more 16-octet SID fields, and a 16-octet HMAC terminator. The command MUST contain at least one SID and can only be issued by the Control-Client.