TCP Three Way Handshake

The TCP three way handshake is the process for establishing a TCP connection. A TCP connection is established as shown in the below example. In this example, we assume a client computer is contacting a server to send it some information.

  1. The client sends a packet with the SYN bit set and a sequence number of N.
  2. The server sends a packet with an ACK number of N+1, the SYN bit set and a sequence number of X.
  3. The client sends a packet with an ACK number of X+1 and the connection is established.
  4. The client sends the data.

The first three steps in the above process is called the three way handshake which is used to establish a TCP connection.