RFC 4960: SCTP: Message-oriented transport over multiple paths
Summary
In September 2007, Randall Stewart edited RFC 4960, the revised specification of the Stream Control Transmission Protocol, a reliable transport protocol alongside TCP and UDP. SCTP transmits messages instead of a byte stream, supports several independent streams per connection and can use several network paths at once. Originally developed for telephone signalling over IP, it lives on today mainly in mobile networks and in WebRTC data channels.
What TCP does not offer applications
RFC 4960 states the limits of TCP openly: strict ordering forces head-of-line blocking even when an application needs only partial or no ordering. The byte stream forces applications to add their own message boundaries. And a TCP connection is tied to exactly one address per side.
SCTP solves this with messages that arrive whole, several streams in which a lost packet only holds up its own stream, and multihoming, in which an endpoint has several addresses and switches to another path if one fails.
Protection during connection setup
An SCTP connection, called an association, starts with a four-way handshake. The server initially stores no state but sends a signed cookie that the client must return. Attacks in the style of SYN floods therefore come to nothing. A CRC32c checksum protects the packets.
On the internet SCTP nevertheless remained rare, because many NAT routers and firewalls only know TCP and UDP. WebRTC therefore encapsulates SCTP in DTLS over UDP. RFC 9260 replaced RFC 4960 in June 2022.
Ideas
- SCTP transmits messages with their boundaries preserved.
- Several streams avoid blocking one another.
- Multihoming allows switching to other network paths.
- A cookie in the four-way handshake protects against connection floods.
- Messages can be delivered unordered on request.
- Middleboxes slow the spread of new transport protocols.
Insights
- A technically superior transport protocol hardly catches on in the open internet if middleboxes do not understand it; QUIC therefore moved to UDP.
- Stateless connection setup with cookies is an effective pattern against resource attacks.
Facts
- RFC 4960 appeared in September 2007 and replaces RFC 2960 from October 2000.
- SCTP uses a CRC32c checksum.
- RFC 9260 from June 2022 replaces RFC 4960.
- WebRTC data channels according to RFC 8831 from January 2021 use SCTP.
References
- RFC 4960: Stream Control Transmission Protocol
- RFC 9260: Stream Control Transmission Protocol (2022)
- RFC 8831: WebRTC Data Channels (2021)
- RFC 6951: UDP Encapsulation of SCTP Packets (2013)
Remarks
- RFC 2960 names the transport of telephone network signalling messages over IP as the original purpose.
Recommendations
- Operate SCTP services only if all firewalls and NAT devices along the way support it.
- Disable unneeded SCTP kernel modules on Linux to reduce the attack surface.
- Consider QUIC as an alternative for new applications with several streams.
Read the RFC at the RFC Editor
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.