Stream Control Transmission Protocol (SCTP) Congestion Control
1. Overview of SCTP Architecture
The Stream Control Transmission Protocol (SCTP) (RFC 4960) is an advanced, message-oriented transport protocol that combines the best features of UDP and TCP while introducing revolutionary features for carrier-grade telephony signaling (SS7 over IP) and mission-critical systems.
+--------------------------------------------------------------------------+
| TRANSPORT PROTOCOL COMPARISON |
+--------------------------+-----------------------+-----------------------+
| Feature | TCP | SCTP |
+--------------------------+-----------------------+-----------------------+
| Data Model | Byte-Stream | Message-Oriented Chunks|
| Connection Endpoint | Single IP (Socket) | Multiple IPs (Multi-Homing)|
| Internal Streams | 1 Stream (HoL Block) | Multi-Streaming (No HoL)|
| Handshake Security | 3-Way (SYN Flood weak)| 4-Way (Cookie-Secured)|
| Framing Boundaries | No boundaries | Preserves boundaries |
| Congestion Control | Per Connection | Independent Per Path |
+--------------------------+-----------------------+-----------------------+
2. Core Breakthroughs of SCTP
A. Multi-Homing
An SCTP connection (called an Association) can bind to multiple IP addresses on each endpoint (e.g., dual ISP connections or multiple physical NICs).
- One IP path is designated as the Primary Path for active data transmission.
- Alternate IPs are continuously monitored via periodic HEARTBEAT chunks.
- If the primary link fails, SCTP fails over transparently to an alternate IP path without breaking the active transport association!
Endpoint A (Multi-Homed) Endpoint B (Multi-Homed)
IP A1 ===================== [ Primary Path ] ===================== IP B1
IP A2 --------------------- [ Alternate Path ] ------------------- IP B2
(Heartbeat probe)
B. Multi-Streaming (Eliminating Head-of-Line Blocking)
In TCP, all data shares a single stream; if packet #2 is lost, packets #3, #4, #5 are stalled in buffers (Head-of-Line Blocking).
- SCTP supports up to independent Streams within a single association.
- If data in Stream 1 experiences packet loss, data in Streams 2, 3, and 4 is delivered immediately to the application without any delay!
C. Four-Way Handshake with State Cookie (Anti-SYN Flood)
INITINIT-ACK(contains an encrypted State Cookie; the server allocates zero memory buffers at this stage!)COOKIE-ECHO(client returns cookie)COOKIE-ACK(server verifies cryptographic cookie and allocates association memory).- Completely immune to denial-of-service SYN Flood attacks.
3. SCTP Congestion Control Mechanics
SCTP implements congestion control algorithms mathematically modeled after TCP (Slow Start, Congestion Avoidance, Fast Retransmit), but heavily adapted for multi-homing and chunked transmission:
1. Independent Tracking Per Destination IP Address:
Because a multi-homed endpoint sends data across different physical routes with distinct bottlenecks, SCTP maintains an independent set of congestion variables for every destination IP address:
- (Congestion Window per path).
- (Slow Start Threshold per path).
- (Smoothed Round-Trip Time per path).
2. Slow Start:
- Governs initial transmission or recovery after idle periods.
- increases by the number of previously unacknowledged bytes confirmed by each new SACK:
- Generates exponential window growth () per RTT until .
3. Congestion Avoidance (Additive Increase):
- Once , the algorithm switches to linear growth:
- Increases by approximately per entire RTT.
4. SACK (Selective Acknowledgment) & Fast Retransmit:
- SCTP uses Selective Acknowledgment (SACK) Chunks that report:
- Cumulative TSN Ack: Transmission Sequence Number up to which all chunks arrived.
- Gap Ack Blocks: Explicit start and end ranges of out-of-order chunks received.
- Fast Retransmit: If a missing Transmission Sequence Number (TSN) is reported missing in 4 consecutive SACK chunks (compared to 3 in TCP), SCTP immediately retransmits the missing chunk without waiting for the retransmission timer.
5. Multi-Homed Retransmission Policy:
When a chunk must be retransmitted due to timeout or fast retransmit, SCTP routes the retransmission to an alternate destination IP address rather than the failed primary path, maximizing the probability of successful delivery through an uncontested network path!
4. Key Exam Questions & Takeaways
- How does SCTP solve the Head-of-Line (HoL) blocking problem of TCP?
- By dividing an association into multiple independent logical streams. Packet loss within one stream only delays that specific stream; all other streams continue delivering data packets to the application layer without interruption.
- How does SCTP handle congestion control on multi-homed endpoints?
- It maintains distinct, independent values for
cwnd,ssthresh, andRTTfor each remote destination IP address, ensuring congestion on one network path does not distort transmission metrics on an alternate path.
- It maintains distinct, independent values for
- Why is the 4-way SCTP handshake immune to SYN flood attacks?
- In response to the initial
INITchunk, the server generates an encrypted state cookie and sends it back inINIT-ACKwithout allocating any kernel state or buffer memory. Memory is only allocated after the client returns the validCOOKIE-ECHO.
- In response to the initial