What is TCP 3-Way Handshake, Benefits, and Drawbacks?

What is TCP 3-Way Handshake?

A 3-way handshake is a method used in a TCP/IP network to create a connection between two computers. It is the process of sending SYN, SYN-ACK, and ACK packets back and forth between the two machines to establish communication.

The three-way handshake is used to establish a connection before sending data. Once the connection is established, data can be transferred using a three-way handshake.

The process is as follows:

1. The first machine (the client) sends a SYN packet to the second machine (the server).

2. The server then responds with an SYN-ACK packet.

3. Finally, the client responds with an ACK packet, and the connection is established.

TCP 3way handshake

Benefits of TCP 3-Way Handshake

  • The three-way handshake is a simple and effective way to establish a connection between two computers.
  • It is also used to ensure that the data being transferred is not corrupt or lost.
  • The three-way handshake is a reliable way to establish a connection.
  • It helps to prevent “SYN floods,” which are a type of Denial of Service (DoS) attack.
  • It is relatively simple and easy to understand.

Drawbacks of TCP 3-Way Handshake:

  • The three-way handshake may add unnecessary overhead to the data transfer process, and it may not be necessary for all types of data transfers.
  • It is also relatively slow, as each packet must be acknowledged by the other machine before the next one can be sent.
  • If any of the packets are lost or corrupted, the entire process must be repeated.

Importance of TCP 3-way handshake in BGP:

The TCP three-way handshake is important in the Border Gateway Protocol (BGP) for several reasons.

  • First, it helps to ensure that the data being transferred is not corrupt or lost.
  • Second, it helps to prevent “SYN floods” which are a type of Denial of Service (DoS) attack.

An SYN flood is a type of DoS attack in which the attacker sends a large number of SYN packets to the victim, overwhelming the victim’s ability to respond to them all. This can cause the victim’s machine to crash or become unresponsive.

The TCP three-way handshake helps to prevent SYN floods by requiring that each SYN packet be acknowledged by the other machine before the next one can be sent. This slows down the rate at which the attacker can send SYN packets, giving the victim time to process them all.

TCP 3-Way Handshake works on which Layer

The TCP three-way handshake works on the Transport layer of the OSI model. The SYN, SYN-ACK, and ACK packets are all considered to be Transport layer protocols.

How TCP 3-Way Handshake Works on the Application HTTPS

When a user tries to access a website over HTTPS, their browser will initiate a TCP three-way handshake with the server. The server will then respond with a SYN-ACK packet, and the client will respond with an ACK packet.

Once the connection is established, the browser will send an HTTPS request to the server. The server will then respond with the website’s data, which will be encrypted using SSL/TLS.

Does TCP 3-Way Handshake Work for all Web Services :

No, not all web services use TCP three-way handshake. Some web services, such as those using the UDP protocol, do not use a three-way handshake. Others, such as those using the HTTP protocol, use a different method of establishing a connection. HTTPS is the only web service that uses a three-way handshake.

How often is the TCP 3-Way Handshake used?

The TCP 3-way handshake is used every time a connection is established between two computers. This includes when a user tries to access a website when two computers are transferring data over a network, and when two computers are sending emails.

Leave a Comment