0% found this document useful (0 votes)
316 views5 pages

TCP State Transition Overview

The TCP state transition diagram shows the various states a TCP connection can be in during its lifecycle. It starts in CLOSED state and transitions through states like SYN_SENT, ESTABLISHED, and FIN_WAIT_1 as the connection is established and data is exchanged. It eventually transitions to CLOSED state when both sides close the connection by sending FIN packets and acknowledging receipt. The diagram details the specific events like receiving/sending SYN, FIN, or ACK packets that cause a transition between each state.

Uploaded by

mOrtyy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
316 views5 pages

TCP State Transition Overview

The TCP state transition diagram shows the various states a TCP connection can be in during its lifecycle. It starts in CLOSED state and transitions through states like SYN_SENT, ESTABLISHED, and FIN_WAIT_1 as the connection is established and data is exchanged. It eventually transitions to CLOSED state when both sides close the connection by sending FIN packets and acknowledging receipt. The diagram details the specific events like receiving/sending SYN, FIN, or ACK packets that cause a transition between each state.

Uploaded by

mOrtyy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

TCP State Transition Diagram

State State Description Event and Transition


This is the default state that each connection Passive Open: A server begins the process of connection setup by doing a
starts in before the process of establishing it passive open on a TCP port. At the same time, it sets up the data
begins. The state is called “fictional” in the structure (transmission control block or TCB) needed to manage the
standard. The reason is that this state connection. It then transitions to the LISTEN state.
CLOSED represents the situation where there is no
connection between devices—it either hasn't Active Open, Send SYN: A client begins connection setup by sending
been created yet, or has just been destroyed. a SYN message, and also sets up a TCB for this connection. It then
If that makes sense. J transitions to the SYN-SENT state.

A device (normally a server) is waiting to Receive Client SYN, Send SYN+ACK: The server device receives
receive a synchronize (SYN) message from a a SYN from a client. It sends back a message that contains its
LISTEN client. It has not yet sent its own SYN and also acknowledges the one it received. The server moves to
own SYN message. the SYN-RECEIVED state.

Receive SYN, Send ACK: If the device that has sent its SYN message


receives a SYN from the other device but not an ACK for its own SYN, it
acknowledges the SYN it receives and then transitions to SYN-
The device (normally a client) has sent RECEIVED to wait for the acknowledgment to its SYN.
a synchronize (SYN) message and is waiting
SYN-SENT for a matching SYN from the other device
(usually a server). Receive SYN+ACK, Send ACK: If the device that sent the SYN receives
both an acknowledgment to its SYN and also a SYN from the other device,
it acknowledges the SYN received and then moves straight to
the ESTABLISHED state.

The device has both received


SYN-RECEIVED a SYN (connection request) from its partner Receive ACK: When the device receives the ACK to the SYN it sent, it
and sent its own SYN. It is now waiting for transitions to the ESTABLISHED state.
an ACK to its SYN to finish connection setup.

The “steady state” of an open TCP Close, Send FIN: A device can close the connection by sending a message
connection. Data can be exchanged freely with the FIN (finish) bit sent and transition to the FIN-WAIT-1 state.
once both devices in the connection enter
ESTABLISHED this state. This will continue until the Receive FIN: A device may receive a FIN message from its connection
connection is closed for one reason or partner asking that the connection be closed. It will acknowledge this
another. message and transition to the CLOSE-WAIT state.
Close, Send FIN: The application using TCP, having been informed the
The device has received a close request (FIN) other process wants to shut down, sends a close request to the TCP
from the other device. It must now wait for the
CLOSE-WAIT application on the local device to acknowledge layer on the machine upon which it is running. TCP then sends a FIN to
the remote device that already asked to terminate the connection. This
this request and generate a matching request. device now transitions to LAST-ACK.

A device that has already received a close Receive ACK for FIN: The device receives an acknowledgment for its
request and acknowledged it, has sent its close request. We have now sent our FIN and had it acknowledged, and
LAST-ACK own FIN and is waiting for an ACK to this received the other device's FIN and acknowledged it, so we go straight
request. to the CLOSED state.

Receive ACK for FIN: The device receives an acknowledgment for its


close request. It transitions to the FIN-WAIT-2 state.
A device in this state is waiting for an ACK for
FIN-WAIT-1 a FIN it has sent, or is waiting for a connection
termination request from the other device. Receive FIN, Send ACK: The device does not receive an ACK for its
own FIN, but receives a FIN from the other device. It acknowledges it,
and moves to the CLOSING state.

A device in this state has received an ACK for its


request to terminate the connection and is now Receive FIN, Send ACK: The device receives a FIN from the other device.
FIN-WAIT-2 waiting for a matching FIN from the other It acknowledges it and moves to the TIME-WAIT state.
device.

The device has received a FIN from the other


Receive ACK for FIN: The device receives an acknowledgment for its
CLOSING device and sent an ACK for it, but not yet
close request. It transitions to the TIME-WAIT state.
received an ACK for its own FIN message.

The device has now received a FIN from the


other device and acknowledged it, and sent its
own FIN and received an ACK for it. We are Timer Expiration: After a designated wait period, device transitions to
TIME-WAIT done, except for waiting to ensure the ACK is the CLOSED state.
received and prevent potential overlap with new
connections.
• [Link]
• http://
[Link]/free/t_TCPOperationalO
[Link]

You might also like