TCP Connections: The Three-Way Handshake
The three-way handshake in TCP (also called the three message handshake) is the method used to establish and tear down network connections. This handshaking technique is referred to as the 3-way handshake or as "SYN-SYN-ACK" (or more accurately SYN, SYN-ACK, ACK). The TCP handshaking mechanism is designed so that two hosts attempting to communicate can negotiate the parameters of the network connection before beginning communication.
Below is a simplified description of the TCP 3-way handshake process. Refer to the diagram to the right as you examine the list of events on the left.
| EVENT | DIAGRAM |
Host A sends a TCP SYNchronize packet to Host B Host B receives A's SYN Host B sends a SYNchronize-ACKnowledgement Host A receives B's SYN-ACK Host A sends ACKnowledge Host B receives ACK. TCP connection is ESTABLISHED. |
![]() |
SYNchronize and ACKnowledge messages are indicated by a bit inside the TCP header of the segment.
TCP knows the state of a network connection by using the SYNchronize and ACKnowledge messages when establishing a network connection. TCP can break up a message, transmit the pieces and reassemble them even if they are received out of order. Once connected, TCP signals the Application Layer to begin data transfer and communication. TCP segments the Application Layer data, lables the data and passes the data down the protocol stack to the Network, Data Link and Physical layers.
Because the host receiving TCP segments always sends ACKnowledgements to the sender, TCP always knows the state of the connection.
