IBM Support

Flowchart of TCP connections and their definition

How To


Summary

To have a comprehensive TCP state flowchart.

Objective

This document describes the different TCP connection states.

Steps

TCP states flowchart:
TCP connection flowchart
A connection can be in one of the following states:
  • CLOSED: a TCP connection is inactive and no data can be sent.
  • LISTEN: the TCP server is waiting for a client to open a new connection.
  • SYN_RECVD: a TCP server has received the first TCP message from the client in the three-way TCP open hand-shake.
  • SYN_SENT: a TCP client has sent its first message in the three-way handshake. This message has the SYN bit set. 
  • ESTABLISHED: the connection can start to send and receive data.
  • FIN_WAIT_1: one side of a TCP connection shuts down by sending a message with the FIN bit set and waits for a FIN from the other side of the connection.
  • FIN_WAIT_2: one side of a TCP connection has sent a FIN and received the ACK from the other side of the connection.
  • CLOSE_WAIT: one side of a TCP connection receives a shutdown from the other side of the connection by receiving a message with the FIN bit set. It sends a message with the ACK bit set acknowledging the FIN.
  • CLOSING: one side of a connection in FIN_WAIT_1 state gets a shutdown from the other side by receiving a FIN message and sends an ACK for that FIN and awaits the other side to send its final ACK.
  • TIME_WAIT: one side of a connection sends its final ACK. The connection waits for a period of time to be sure of the other side has terminated completely.
  • RST_ACT: one side of a connection sends its final FIN and awaits a final ACK from the other side of the connection. Upon reception of the final ACK, the connection is closed.

Document Location

Worldwide

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cw0AAAQ","label":"Networking->TCPIP"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Document Information

Modified date:
07 October 2020

UID

ibm16343935