TCP 3-WAY Handshake vs TCP Half-Open

Reply
Highlighted
L5 Sessionator

TCP 3-WAY Handshake vs TCP Half-Open

 

  1. TCP 3-Way handshake –

 

TCP is a connection-oriented protocol, a connection needs to be established before two devices can communicate. TCP uses a process called three-way handshake to negotiate the sequence and acknowledgment fields and start the session. Here is a graphical representation of the process.

 

The three way handshake process consists of three steps:

 

  1. Host A initiates the connection by sending the TCP SYN packet to the destination host. The packet contains the random sequence number (e.g. 5432) which marks the beginning of the sequence numbers for data that the Host A will transmit.

 

  1. The Server receives the packet and responds with its own sequence number. The response also includes the acknowledgment number, which is Host A’s sequence number incremented by 1 (in our case, that would be 5433).

 

SutareMayur_0-1583080012609.png

 

  1. Host A acknowledges the response of the Server by sending the acknowledgment number, which is the Server’s sequence number incremented by 1.

Post TCP 3 way handshake, the data transfer starts. After the data transmission process is finished, the connection will get terminated by sending FIN (FINISHED) flag which does graceful termination of connection.

 

 

 

TCP Half Open connection –

TCP connections are called Half Open connections when the third step of the 3-Way handshake sending final ACK to the server fails (as shown in below figure) or if one of the hosts closes the connection without acknowledging the other.

 

SutareMayur_1-1583080012619.png

 

 

Half Open connection process is given below –

 

  1. Host initializes the request by sending SYN packet.
  2. Server replies to the client with SYN_ACK, and at this point server reserves some resource for the client and waits for the final ACK to arrive (Acknowledgment message).
  3. However, the client does not respond to the server with final Acknowledgment.

 

So an established connection is said to be "half-open" if one of the TCPs has closed or aborted the connection at its end without the knowledge of the other, or if the two ends of the connection have become desynchronized owing to a crash that resulted in loss of memory. Such connections will automatically become reset if an attempt is made to send data in either direction. However, half-open connections are expected to be unusual.

 

 

I hope, this article helps you. Your inputs, suggestions or questions are always welcome.

 

Mayur

 

 



Mayur
Highlighted
L2 Linker

Nice article Mayur ! Thanks for sharing it.

Highlighted
L2 Linker

Informative, thanks.

Highlighted
L1 Bithead

More informative. Good one.

Regards,
Thiru
Tags (1)
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!