Overview
The three-way handshake ensures that both the sender and receiver are ready to communicate and have agreed on initial sequence numbers.
The Steps
- SYN (Synchronize): The client sends a packet with a random sequence number (ISN) and the SYN flag set.
- SYN-ACK (Synchronize-Acknowledge): The server responds with its own ISN, the SYN flag set, and an acknowledgement of the client's ISN.
- ACK (Acknowledge): The client sends a final packet acknowledging the server's ISN.
Purpose
This process prevents old or delayed packets from interfering with a new connection and synchronizes the sequence numbers used for reliable delivery.