TCP Connection Establishment: Three-way Handshake

In this lesson, we'll discuss how a TCP connection is established!

A TCP connection is established by using a three-way handshake, which we briefly touched upon in a previous lesson. The connection establishment phase uses the sequence number, the acknowledgment number, and the SYN flag.

Initiating a Connection

When a client host wants to open a TCP connection with a server host, it creates and sends a TCP segment with:

  • The SYN flag set
  • The sequence number set to a random initial value. So the sequence numbers do not start with 0! Can you guess why?