TCP (Transmission Control Protocol) is one of the most important protocols in the TCP/IP suite. TCP is a connection orientated protocol and it is able to establish this connection using a mechanism that is called three way hands shaking.
To be able to describe the mechanism of three way hand shaking, let us just take an example. Consider for example that a user A wants to request some data from the server B. When user A wants to send the data, we consider that Server B is in the listening mode. Before user A can send the data, it must establish a connection, for this purpose it sends a SYN control bit, when the server B receives this packet, it replies with its own SYN bit and an Acknowledgement for the packet that it has just received.
This then travels to the user A, who receives the acknowledgement and also the SYN bit. User A would now need to send an acknowledgement for the SYN bit received from the Server B.
Once the server B receives the acknowledgement, a connection is established. Now the two TCP sockets can exchange data openly since a connection between them has been setup. Three-way hand shaking is required each time two entities which to share data between them.
To be able to describe the mechanism of three way hand shaking, let us just take an example. Consider for example that a user A wants to request some data from the server B. When user A wants to send the data, we consider that Server B is in the listening mode. Before user A can send the data, it must establish a connection, for this purpose it sends a SYN control bit, when the server B receives this packet, it replies with its own SYN bit and an Acknowledgement for the packet that it has just received.
This then travels to the user A, who receives the acknowledgement and also the SYN bit. User A would now need to send an acknowledgement for the SYN bit received from the Server B.
Once the server B receives the acknowledgement, a connection is established. Now the two TCP sockets can exchange data openly since a connection between them has been setup. Three-way hand shaking is required each time two entities which to share data between them.