Stream Control Transmission Protocol
obsoleted by
- rfc-4960 — Stream Control Transmission Protocol
updated by
- rfc-3309 — Stream Control Transmission Protocol (SCTP) Checksum Change
Extracted elements (30)
SCTP was designed because TCP's strict ordering causes head-of-line blocking, its byte-stream model requires application record framing, its single-path model limits high availability, and it is vulnerable to SYN attacks. SCTP addresses all four limitations via multi-streaming, message orientation, multi-homing, and the cookie handshake.
TSNs are decoupled from Stream Sequence Numbers so that reliable delivery (tracked per-TSN via SACK) remains functionally independent of in-order stream delivery. This enables SACK to acknowledge out-of-order TSNs without forcing in-order delivery to the ULP and eliminates head-of-line blocking across streams.
A sender MUST NOT use IPv4-mapped IPv6 addresses in address parameters; a separate IPv4 Address Parameter (Type=5) must be used instead. Omitting all IP address parameters in INIT and INIT ACK is a valid alternative that improves NAT traversal, causing the receiver to use only the source address of the IP datagram.
All integer fields in an SCTP packet MUST be transmitted in network byte order (most significant byte first) unless otherwise stated.
An INIT chunk MUST be the only chunk in the SCTP packet carrying it.
Chunk Type and Parameter Type values encode the required action for unrecognized types in their highest-order two bits: 00=discard packet, 01=discard and report error, 10=skip, 11=skip and report error. Implementations MUST honor this encoding.
DATA chunks MUST NOT be bundled with ABORT. Control chunks (except INIT, INIT ACK, and SHUTDOWN COMPLETE) MAY be bundled with ABORT but MUST appear before the ABORT chunk in the packet.
INIT, INIT ACK, and SHUTDOWN COMPLETE chunks MUST NOT be bundled with any other chunk in a packet.
The Initiate Tag in INIT and INIT ACK MUST NOT be 0; if a received INIT or INIT ACK carries an Initiate Tag of 0, the receiver MUST treat it as an error and close the association by transmitting an ABORT.
The Number of Outbound Streams (OS) and Number of Inbound Streams (MIS) fields in INIT and INIT ACK MUST NOT be set to 0; a receiver of such a value SHOULD abort the association.
TSN arithmetic SHOULD use RFC 1982 serial number arithmetic with SERIAL_BITS=32; an endpoint SHOULD NOT transmit a DATA chunk with a TSN more than 2**31−1 above the beginning TSN of its current send window, as doing so causes comparison ambiguity.
HEARTBEAT and HEARTBEAT ACK chunks probe path reachability per transport address. HEARTBEAT ACK MUST echo the sender-specific Heartbeat Information parameter verbatim and is always sent to the source address of the HEARTBEAT datagram.
SCTP association establishment uses a four-way handshake: initiator sends INIT, responder replies with INIT ACK containing a State Cookie, initiator echoes the cookie in COOKIE ECHO, and responder confirms with COOKIE ACK. The last two legs may carry user data for fast setup.
The State Cookie is a mandatory variable-length parameter (Type=7) in the INIT ACK. It MUST contain all association state and parameter information needed by the responder to recreate the association, plus a MAC, allowing the server to remain stateless until the COOKIE ECHO is verified.
The Transmission Sequence Number (TSN) is a 32-bit per-chunk counter used for reliable delivery and duplicate detection, entirely independent of the per-stream Stream Sequence Number. SACK acknowledges all received TSNs including out-of-order, enabling gap reporting.
The Verification Tag is a 32-bit random value chosen at association startup; every SCTP packet MUST carry the peer's Initiate Tag in the Verification Tag field. Packets with incorrect tags are silently discarded. Exception: INIT packets carry a zero Verification Tag.
IANA maintains the SCTP Chunk Parameter Type registry (0–65535; 65535 reserved for extensions). New parameter types for IETF-defined extensions require IETF consensus.
IANA maintains the SCTP Chunk Type registry (0–255). Chunk types 0–14 are defined by this RFC; 63, 127, 191, 255 are for IETF-defined extensions; remaining ranges are reserved. New assignments require IETF consensus.
IANA maintains the SCTP Error Cause codes registry used in Operation Error (ERROR) and ABORT chunks. This RFC defines ten initial causes (invalid stream identifier, missing mandatory parameter, stale cookie, out of resource, unresolvable address, unrecognized chunk type, invalid mandatory parameter, unrecognized parameters, no user data, cookie received while shutting down). New causes require IETF consensus.
IANA maintains the SCTP Payload Protocol Identifier registry for the 32-bit identifier carried in each DATA chunk. The value 0 indicates no identifier; all other values are assigned by IANA.
SCTP does not provide confidentiality; the document recommends IPsec for confidentiality protection. The Adler-32 checksum provides integrity protection against accidental corruption but offers no cryptographic protection against deliberate tampering.
The State Cookie four-way handshake protects against flooding attacks analogous to TCP SYN floods: the server allocates no state until the COOKIE ECHO carrying a valid MAC is received, so a spoofed INIT wave cannot exhaust server resources.
The Verification Tag mechanism defends against blind masquerade attacks: without knowledge of the 32-bit tag negotiated at association setup, an off-path attacker cannot inject valid SCTP packets into an established association.
SCTP association states are: CLOSED, COOKIE-WAIT (INIT sent), COOKIE-ECHOED (COOKIE ECHO sent), ESTABLISHED, SHUTDOWN-PENDING (SHUTDOWN requested by ULP), SHUTDOWN-SENT, SHUTDOWN-RECEIVED, and SHUTDOWN-ACK-SENT. Transitions are triggered by ULP primitives (ASSOCIATE, SHUTDOWN, ABORT) or received chunks.
Each SCTP chunk is encoded as Chunk Type (8 bits), Chunk Flags (8 bits), Chunk Length (16 bits, includes header), and variable-length Chunk Value. Total chunk length MUST be a multiple of 4 bytes; sender MUST pad with zeros (never more than 3 bytes), receiver MUST ignore padding.
Optional and variable-length parameters within control chunks use a TLV format: Parameter Type (16 bits), Parameter Length (16 bits, includes header), and variable-length Parameter Value. Parameters MUST be padded to a multiple of 4 bytes; padding is not counted in the length field.
The DATA chunk (Type=0) carries: Reserved (5 bits), U/B/E flags (1 bit each), Length (16 bits), TSN (32 bits), Stream Identifier S (16 bits), Stream Sequence Number n (16 bits), Payload Protocol Identifier (32 bits), and variable-length user data.
The INIT chunk (Type=1) has five mandatory fixed fields — Initiate Tag (32 bits), a_rwnd (32 bits), Number of Outbound Streams (16 bits), Number of Inbound Streams (16 bits), and Initial TSN (32 bits) — followed by optional TLV parameters for IPv4/IPv6 addresses, Cookie Preservative, Host Name, and Supported Address Types.
The SACK chunk (Type=3) contains Cumulative TSN Ack (32 bits), a_rwnd (32 bits), Number of Gap Ack Blocks (16 bits), Number of Duplicate TSNs (16 bits), followed by N Gap Ack Block Start/End pairs (each 16 bits, relative to Cumulative TSN Ack), then X Duplicate TSN entries (32 bits each).
The SCTP common header encodes Source Port Number (16 bits), Destination Port Number (16 bits), Verification Tag (32 bits), and Checksum (32 bits), all in network byte order.