Other TCP Connection Establishment Methods

In this lesson, we'll look at some unconventional ways that connection establishment may occur.

In the last lesson, we looked at the most common way that TCP connection establishment could occur. Now, let’s look at some other ways it can successfully occur.

A TCP Three-way Handshake FSM

TCP connection establishment can be described with a four-state Finite State Machine (FSM) as shown below. In this FSM, X/YX/Y indicates that segment XX was transmitted and segment YY was received. Init is the initial state

Press + to interact
TCP FSM for connection establishment
TCP FSM for connection establishment

Client-Side

Let’s carve out the paths in this FSM. Here’s the three-way handshake path.

  1. A client host starts in the Init state.
  2. It then sends a SYN segment and enters the SYN Sent state where it waits for a SYN+ACK segment.
  3. When a SYN+ACK is recieved in the SYN SENT state, it replies with an ACK segment and enters the Established state where data can be exchanged.

Server-Side

  1. On the other hand, a server host starts in the Init state.

  2. When a server process starts to listen to a destination port, the underlying TCP entity creates a TCP control block and a queue to process incoming SYN segments. Upon reception of a SYN segment, the server’s TCP entity replies with a SYN+ACK and enters the SYN RCVD state.

  3. It remains in this state until it receives an ACK segment that acknowledges its SYN+ACK segment, and with this it then enters the Established state.

Simultaneous Connection Establishment

Apart from these two paths in the TCP connection establishment, shown in the above FSM, there is a third way that a connection can be established: when both the client and the server send a SYN segment to open a TCP connection.

Press + to interact
Simultaneous TCP Connection Opening
Simultaneous TCP Connection Opening
1 of 2

Both sides must know the port number for each other in this case. It doesn’t have to be a well-known port number or the same on both sides.

Feel free to ask any questions related to the lesson in the following widget. Our AI will answer them and help you better understand the topic

Powered by AI
3 Prompts Remaining
Prompt AI WidgetOur tool is designed to help you to understand concepts and ask any follow up questions. Ask a question to get started.

Quick Quiz!

1

Simultaneous connection may result in more segments being exchanged than a regular three-way handshake.

A)

True

B)

False

Question 1 of 20 attempted

Coming up, we’ll look at a few scenarios in which connection establishment can go wrong and how TCP handles it.

Create a free account to view this lesson.

Continue your learning journey with a 14-day free trial.

By signing up, you agree to Educative's Terms of Service and Privacy Policy