telecom • networking • design

an blog

1 Comment

TCP slow start sequence diagrams

TCP is an end to end protocol which operates over the heterogeneous Internet. TCP has no advance knowledge of the network characteristics, thus it has to adjust its behavior according to the current state of the network. TCP has built in support for congestion control. Congestion control ensures that TCP does not pump data at a rate higher than what the network can handle.

In this sequence diagram we will analyze “Slow start”, an important part of the congestion control mechanisms built right into TCP. As the name suggests, “Slow Start” starts slowly, increasing its window size as it gains confidence about the networks throughput.

TCP slow start overview

An overview of TCP slow start.

TCP slow start with socket level details

A detailed look at TCP slow start with socket level state transition details.

Analyze TCP slow start from the server point of view

A sequence diagram describing the slow start with a focus on server end interactions.

Client focused view of the slow start

A final look at slow start. This time with a focus on the client side.

1 Comment

TCP 3-way handshake based setup and connection release

TCP (Transmission Control Protocol) provides a reliable end to end service that delivers packets over the Internet. Packets are delivered in sequence without loss or duplication.

This sequence diagram explores following:

  1. The three-way handshake to establish a TCP
  2. Data transfer using the byte oriented sequence numbers
  3. Release of a TCP connection.

TCP connection setup and release sequence diagram

The TCP connection 3-way set and release is discussed with focus on socket setup and release.

High level flow of a TCP connection

Socket level details are hidden. Get a high level view of the interactions.

Server socket level view of the TCP connection

Just focus on the server socket handling of a TCP connection.

Client socket interactions in a TCP connection

Focus on the client socket level interactions.

TCP connection context diagram

Examine the relationship between different entities involved in a TCP connection.

Leave a comment

FTP File Transfer Protocol Sequence Diagram

Here we explore the sequence of interactions in a typical FTP (File Transfer Protocol) session. The example here illustrates the use of multiple TCP connections by FTP. We will cover how FTP establishes a telnet TCP connection (TCP Port 21) to control the overall flow of the FTP transfer.

Then we examine the use of TCP Port 20 for establishing TCP connections for directory transfer and file retrieval.

The complete sequence diagram can be divided into the following steps:

  • DNS Query to obtain the IP address for the FTP Server
  • FTP Telnet connection setup and login. (USER and PASS commands)
  • Obtaining a directory listing (PORT and LIST command)
  • Changing directory (CWD command)
  • Downloading a file using FTP get (PORT and RETR command)

These phases are analyzed with sequence diagrams and context diagrams that provide multiple views of the FTP interactions.

FTP protocol sequence diagram

FTP High Level Overview

FTP control port (TCP port 21) handling

FTP data port (TCP port 20) handling

FTP context diagram