Skip to main content

4. SCTP Association State Diagram

During the life time of an SCTP association, the SCTP endpoint's association progresses from one state to another in response to various events. The events that may potentially advance an association's state include:

  • SCTP user primitive calls, e.g., [ASSOCIATE], [SHUTDOWN], [ABORT]
  • Reception of INIT, COOKIE ECHO, ABORT, SHUTDOWN, etc., control chunks
  • Some timeout events

The state diagram in the figures below illustrates state changes, together with the causing events and resulting actions. Note that some of the error conditions are not shown in the state diagram. Full descriptions of all special cases are found in the text.

Note: Chunk names are given in all capital letters, while parameter names have the first letter capitalized, e.g., COOKIE ECHO chunk type vs. State Cookie parameter.

If more than one event/message can occur that causes a state transition, it is labeled (A), (B), etc.

The following is a detailed illustration of the SCTP association state diagram:

-----        --------              (from any state)
/ \ / \
/ rcv ABORT [ABORT] rcv INIT | |
| ---------- or ---------- --------------- |
| v v v
\ delete TCB snd ABORT generate Cookie \
+---------+ delete TCB snd INIT ACK ---| CLOSED |
+---------+ / \

[ASSOCIATE] / \
--------------- | |
create TCB | |
snd INIT | |
strt init timer rcv valid |
v | COOKIE ECHO |
+------------+ | (1) ----------------
| COOKIE-WAIT| | create TCB (2)
+------------+ | snd COOKIE ACK
| |
| rcv INIT ACK |
| ----------------- |
| snd COOKIE ECHO |
| stop init timer |
| strt cookie timer |
v |
+--------------+ |
| COOKIE-ECHOED| (3) |
+--------------+ |
| |
| rcv COOKIE ACK |
| ----------------- |
| stop cookie timer v
v v
+---------------+
| ESTABLISHED |
+---------------+

(from the ESTABLISHED state only)

|                         /--------+--------\
| [SHUTDOWN] / \
| -------------------| |
| check outstanding | |
| DATA chunks | |
| v |
| +---------+ |
| |SHUTDOWN-| | rcv SHUTDOWN
| |PENDING | |------------------
| +---------+ | check outstanding
| | | DATA chunks
| No more outstanding |
| --------------------- |
| snd SHUTDOWN | |
| strt shutdown timer | |
| v v
| +---------+ +-----------+
| |SHUTDOWN-| (4) | SHUTDOWN- | (5,6)
| |SENT | | RECEIVED |
| +---------+ +-----------+
| | \
| (A) rcv SHUTDOWN ACK | \
| ---------------------- | \rcv:SHUTDOWN
| stop shutdown timer | \ (B)rcv SHUTDOWN
| send SHUTDOWN COMPLETE | \----------------------
| delete TCB | | send SHUTDOWN ACK
| | | start shutdown timer
| | | move to SHUTDOWN-
| | | ACK-SENT
| | |
| v v
| +-----------+ |
| | SHUTDOWN- | (7) |
| | ACK-SENT | |
| +-----------+ |
| | |
| (C)rcv SHUTDOWN COMPLETE |
| |----------------- | |
| | stop shutdown timer |
| | delete TCB | |
| | |
| | (D)rcv SHUTDOWN ACK |
| |-------------- | |
| | stop shutdown timer |
| | send SHUTDOWN COMPLETE |
| | delete TCB | |
| | |
| \ +---------+ /
| \-------------->| CLOSED |<-----------------/
| +---------+

Notes

Note 1) If the State Cookie in the received COOKIE ECHO is invalid (i.e., failed to pass the integrity check), the receiver MUST silently discard the packet. Or, if the received State Cookie is expired (see Section 5.1.5), the receiver MUST send back an ERROR chunk. In either case, the receiver stays in the CLOSED state.

Note 2) If the T1-init timer expires, the endpoint MUST retransmit INIT and restart the T1-init timer without changing state. This MUST be repeated up to 'Max.Init.Retransmits' times. After that, the endpoint MUST abort the initialization process and report the error to the SCTP user.

Note 3) If the T1-cookie timer expires, the endpoint MUST retransmit COOKIE ECHO and restart the T1-cookie timer without changing state. This MUST be repeated up to 'Max.Init.Retransmits' times. After that, the endpoint MUST abort the initialization process and report the error to the SCTP user.

Note 4) In the SHUTDOWN-SENT state, the endpoint MUST acknowledge any received DATA chunks without delay.

Note 5) In the SHUTDOWN-RECEIVED state, the endpoint MUST NOT accept any new send requests from its SCTP user.

Note 6) In the SHUTDOWN-RECEIVED state, the endpoint MUST transmit or retransmit data and leave this state when all data in queue is transmitted.

Note 7) In the SHUTDOWN-ACK-SENT state, the endpoint MUST NOT accept any new send requests from its SCTP user.

The CLOSED state is used to indicate that an association is not created (i.e., doesn't exist).