What is a Three-Way Handshake?

by Tahshina

A Three-Way Handshake, or TCP Three-Way Handshake is a connection made between the client and the server. TCP stands for Transmission Control Protocol. As the name suggests, this process requires three steps to establish network security for data transfer.

The Three Steps

In the three steps process, the client and server exchange synchronization and acknowledgment before the real data starts the communication process. Synchronization initiates communication, and acknowledgment helps to confirm the other side that their SYN is successfully received.

Step 1:

The first step requires the client to establish a connection with the server. This happens when the client sends a segment to the server. It sends a SYN (Synchronize Sequence Number) to inform it that the communication should begin.  The SYN is a random number so that no intruder can interrupt during the transfer. Thus, it establishes network security.

Step 2:

The server responds to the client in the second step with the help of the SYN-ACK signal set. SYN is to identify the sequence number of the segments. ACK (Acknowledgment Sequence Number) signifies the system’s response. ACK is an increment in the sequence number sent by a host in the first step.

Step 3:

Finally, the client acknowledges the server’s response by sending an increment in its sequence number sent in step two. Thus, it forms a secure and stable connection so the actual data transfer process can begin.


To better understand the three-way handshake and its role in network security, lets’ take a look at the following example:

  1. If there is a host Y and a server S, then the three-way handshake will first require Y to send a communication request to S. Let us say that Y’s random sequence number is 4321, then this indicates the beginning of the sequence number for the data.
  2. S will receive this packet, and it will respond to Y with its sequence number. Furthermore, the response from S also includes an acknowledgment number which is 4322.
  3. Now Y responds to the server through its acknowledgment number (an increment in S sequence number).

It establishes network security between the two (host and server), and they can transfer data over a secure path. Once the process of data transmission terminates, TCP also terminates the connection between host and server automatically.
It’s critical to secure data as it transmits between the host and server. Thus, in order to ensure secure transfer of data, a three-way handshake is a complete and reliable procedure.
See our penetration test services at https://aardwolfsecurity.com

You may also like

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More