Connected: An Internet Encyclopedia
FTP Protocol Overview

Up: Connected: An Internet Encyclopedia
Up: Topics
Up: Functions
Up: File Transfer
Prev: File Transfer
Next: TFTP Protocol Overview

FTP Protocol Overview

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 separate 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 separate 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.

For a discussion of running FTP through firewalls, see RFC 1579.


Next: TFTP Protocol Overview

Connected: An Internet Encyclopedia
FTP Protocol Overview