telecom • networking • design

an EventHelix.com blog


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