The TCP three-way handshake is a process that is used in a TCP/IP network to create a connection between a client and a server. It involves the exchange of three packets: SYN, SYN-ACK, and ACK. The goal of the TCP three-way handshake is to establish a reliable, flow-controlled connection between the two endpoints. This means that the connection is able to ensure that the data is transmitted without errors, losses, or duplications, and that the data is sent at a rate that both sides can handle.
The TCP three-way handshake works as follows:
The client initiates the connection by sending a SYN packet to the server. The SYN packet contains a random sequence number that indicates the starting point of the data that the client will send.
The server responds to the client by sending a SYN-ACK packet. The SYN-ACK packet contains the server’s own sequence number and an acknowledgment number that is equal to the client’s sequence number plus one. This indicates that the server has received the client’s SYN packet and is ready to receive data from the client.
The client completes the handshake by sending an ACK packet to the server. The ACK packet contains an acknowledgment number that is equal to the server’s sequence number plus one. This indicates that the client has received the server’s SYN-ACK packet and is ready to send data to the server.
After the TCP three-way handshake is completed, the connection is established and the data transfer can begin.
References: The answer can be verified by using the following resources:
TCP 3-Way Handshake Process - GeeksforGeeks
TCP 3-Way Handshake (SYN, SYN-ACK,ACK) - Guru99
Akamai Blog | What is a TCP Three-Way Handshake?
What is a Three-Way Handshake? - Definition from Techopedia
What is TCP 3-Way Handshake, Benefits, and Drawbacks? - Networking Signal