A Very Simplified Description of TCP 3-Way Handshake (SYN,SYN-ACK,ACK)
June 17, 2011
Posted by on
TCP 3-Way Handshake is used to establish TCP socket connections and tear down TCP socket connections over the network.
From this image, we can see the TCP’s three-way handshaking technique is referred to as the 3-way handshake: SYN, SYN-ACK, ACK, SYNchronize and ACKnowledge messages are indicated by a bit inside the header of the TCP segment.
When the communication between two computers ends, another 3-way communication is performed to tear down the TCP socket connection. This setup and teardown of a TCP socket connection is part of what qualifies TCP a reliable protocol. TCP also acknowledges that data is successfully received and guarantees the data is reassembled in the correct order.
Note that UDP is connectionless. That means UDP doesn’t establish connections as TCP does, so UDP does not perform this 3-way handshake and for this reason, it is referred to as an unreliable protocol.