Application Layer Protocol : FTP

FTP or File Transfer Protocol is an application-layer protocol for file transfer.

  • The user interacts with FTP using the FTP user agent.
  • The user then adds the remote host so that the client can start up making a TCP connection to the server.
  • Once the connection is made the authorisation details like Username and Password are taken and the authorization is completed.
  • After this the user uploads the files required.

FTP connection comprises of two parts:

  1. Control connection: This happens in the port 21. The control connection refers to the establishment of connection by sending in details like the username, password, get puts etc.
  2. Data connection: Data connection infers for the transfer of files across the client and server. Basically we can only transfer one file at a time.

Data connection is non-persistent but Control connection is persistent.


  • FTP uses the out-band connection where control connection is established separately from the data transfer whereas, HTTP uses the in-band connection where both the object transfer and connection takes place together.
  • FTP makes use of the state of the user, but HTTP does not.

FTP Comments and Replies

  • RETR filename
  • STOR filename