What is three-way handshake?
A three-way handshake is a method used on a TCP / IP network to establish a connection between a local host / client and a server. It is a three-step method in which both the client and the server must exchange SYN and ACK packets (acknowledgment packets) before the actual data communication begins.
A three-way handshake is also known as a TCP handshake. A three-way handshake is mainly used to create a TCP socket connection. It works when:
A client node sends a SYN data packet via an IP network to a server in the same or an external network. The goal of this package is to ask if the server is open to new connections.
The destination server must have open ports that can accept and initiate new connections. When the server receives the SYN packet from the client node, it responds and returns an acknowledgment receipt - the ACK packet or the SYN / ACK packet.
The client node receives the SYN / ACK from the server and replies with an ACK packet.
When this process is complete, the connection is established and the host and server can communicate with each other.