Connected: An Internet Encyclopedia
FTP Protocol Overview

Top: Connected: An Internet Encyclopedia
Up: Topics
Up: Functions
Up: File Transfer

Search: |  | Search Depth: |
Search Type: | String RegEx | Search Options: | NoCase WholeWord

### FTP Protocol Overview

FTP, the File Transfer Protocol, documented in RFC 959, is one of oldest Internet protocols still in widespread use. FTP is implemented using the TCP Protocol.

As shown in the following diagram, FTP uses seperate command and data connections. The Protocol Interpreter (PI) implements the FTP protocol itself, while the Data Transfer Process (DTP) actually performs data transfer. The FTP protocol and the data transfer use entirely seperate TCP sessions.

                                                -------------
                                                |/---------\|
                                                ||   User  ||    --------
                                                ||Interface|<--->| User |
                                                |\----^----/|    --------
                      ----------                |     |     |
                      |/------\|  FTP Commands  |/----V----\|
                      ||Server|<---------------->|   User  ||
                      ||  PI  ||   FTP Replies  ||    PI   ||
                      |\--^---/|                |\----^----/|
                      |   |    |                |     |     |
          --------    |/--V---\|      Data      |/----V----\|    --------
          | File |<--->|Server|<---------------->|  User   |<--->| File |
          |System|    || DTP  ||   Connection   ||   DTP   ||    |System|
          --------    |\------/|                |\---------/|    --------
                      ----------                -------------

                      Server-FTP                   USER-FTP

          NOTES: 1. The data connection may be used in either direction.
                 2. The data connection need not exist all of the time.

FTP servers listen on port 21. Data connections are initiated by the server from its port 20, to a port on the client identified in a PORT command.

Connected: An Internet Encyclopedia
FTP Protocol Overview