Essay record
TCP: Closing Process Finite State Diagram
- Record
- Essay / / 1 min read / 143 words
- Tags
- Unfiled
DISCLOSURE: Some links may be affiliate links. Details
This is a Finite State Diagram of two machines using the Transmission Control Protocol (TCP) to reach the CLOSED state. It is based off information from The TCP/IP Guide.

Sequence
Note: In this configuration, it doesn’t matter who the so-called “client” and “server” are. The only thing that matters is who decides to initiate the closing sequence.
- Initiator: Wants to Close. Send FIN to Responder. Move to FIN-WAIT-1 state.
- Responder: Receive FIN. Send ACK to Initiator. Move to CLOSE-WAIT state.
- Initiator: Receive ACK from Responder. Move to CLOSING state.
- Responder: Wait for application to close on host. On close, send FIN. Move to LAST-ACK state.
- Initiator: Receive FIN from Responder. Send ACK. Move to TIME-WAIT state. Start timer.
- Responder: Recieve ACK from Initiator. Move to CLOSED state.
- Initiator: Upon timer expiration, move to CLOSED state.