N5ken's technical blog

Just another WordPress.com site

A Very Simplified Description of TCP 3-Way Handshake (SYN,SYN-ACK,ACK)

TCP 3-Way Handshake is used to establish TCP socket connections and tear down TCP socket connections over the network.

3 way handshake

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.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: