Three Way Handshake

Three Way Handshake

The three-way handshake is a key concept in computer networking, and it refers to the process of establishing a connection between two devices over a network. In this process, the two devices exchange a series of messages in order to ensure that both parties are ready and able to communicate with each other.

Three Way Handshake
Fig 1: Three Way Handshake

The three-way handshake begins when one device, called the client, initiates a connection to another device, called the server. The client sends a SYN (synchronize) packet to the server, which contains a sequence number that the client chooses at random. This sequence number is used to help the server identify future packets that are sent by the client.

When the server receives the SYN packet, it responds with a SYN-ACK (synchronize-acknowledge) packet. This packet contains an acknowledgement number that is set to one greater than the sequence number that was sent in the client's SYN packet. The SYN-ACK packet also includes a randomly generated sequence number of its own.

Finally, the client responds to the server's SYN-ACK packet with an ACK (acknowledge) packet. This packet contains an acknowledgement number that is set to one greater than the sequence number that was sent in the server's SYN-ACK packet. This completes the three-way handshake, and the connection between the client and the server is established.

There are a few important things to note about the three-way handshake. First, it is a crucial step in establishing a reliable and secure connection between two devices over a network. By exchanging sequence numbers and acknowledgement numbers, the client and server are able to establish a clear line of communication and ensure that packets are delivered in the correct order.

Second, the three-way handshake is a key component of the Transmission Control Protocol (TCP), which is one of the most commonly used protocols in computer networking. TCP is a reliable and connection-oriented protocol that is used to transmit data over a network, and the three-way handshake is an important part of its functionality.

Finally, it's worth noting that the three-way handshake can be vulnerable to certain types of attacks, such as SYN flooding. In a SYN flooding attack, an attacker sends a large number of SYN packets to a server in order to overwhelm its resources and prevent it from establishing new connections. There are a variety of ways to mitigate the risks associated with SYN flooding attacks, including using firewalls and limiting the number of connections that a server can accept.

Summary

In summary, the three-way handshake is a fundamental concept in computer networking that is used to establish a reliable and secure connection between two devices over a network. By exchanging sequence numbers and acknowledgement numbers, the client and server are able to ensure that packets are delivered in the correct order and that their communication is secure. While the three-way handshake is a crucial part of modern networking protocols like TCP, it is also vulnerable to certain types of attacks, and it's important to take steps to protect against these threats.

Post a Comment

0 Comments