The TCP 3-Way Handshake is the process used to establish a reliable connection between a client and server before data transmission in the Transmission Control Protocol (TCP). It ensures that both parties are ready for communication.
Steps:
1. SYN (Synchronize):
– The client sends a SYN message (synchronize) to the server, indicating that it wants to establish a connection. It also includes an initial sequence number (ISN).
2. SYN-ACK (Synchronize-Acknowledge):
– The server responds with a SYN-ACK message. It acknowledges the client’s SYN by incrementing the client’s sequence number by 1 and sends its own SYN request to the client with the server’s ISN.
3. ACK (Acknowledge):
– The client acknowledges the server’s SYN by sending an ACK message, which includes the server’s ISN incremented by 1.
After the handshake is complete, a full-duplex communication channel is established, and data transfer can begin. The handshake ensures that both sides are synchronized and ready to exchange data reliably.