3 way handshake

TCP 3 way hadshake is a method to establish and  brake down TCP socket connections.This is a connection oriented protocol. That’s why TCP uses specific control parameters as control bits:

  • URG. Urgent pointer field significant
  • ACK. Acknowledgement filed significant
  • PSH. Push Function
  • RST. Reset connection
  • SYN. Synchronize sequence numbers
  • FIN. No more data from sender

The protocol operation is as follow:
I can suppose that we have got a client host and server host. Client wants to stablish a comunication with the server.
Server is listen and waiting for a connection request from any remote client. This action is called passive open.

1 – Client send a connection request.

SYN ————>

2 – Server has received a SYN from the client and it send back an aknowledgment.

<———— SYN-ACK

3 – Client sends an ACK back to the server.

ACK ————>

Connection is stablished till the client sends a FIN to end.

This is a capture  taken with Wireshark

Checking frame by frame, you can see each flag: