File Transfer Protocol (FTP)

File Transfer Protocol (FTP)

FTP is used to copy files from one host to another. FTP offers the mechanism for the same in the following manner:

  • FTP creates two processes such as Control Process and Data Transfer Process at both ends i.e. at client as well as at server.
  • FTP establishes two different connections: one is for data transfer and other is for control information.
  • Control connection is made between control processes while Data Connection is made between<=”” b=””>
  • FTP uses port 21 for the control connection and Port 20 for the data connection.

FTP functions on a client-server model. The server hosts the files to be shared and the client provides the interface to access, download, or upload files to the file server.

The computers transferring the files can be within the same network where the FTP server is configured, as well as outside the network (over the Internet).

FTP uses two ports, one for connection and one for sending data.

FTP can run in two modes: active and passive. And, it uses two channels between the client and server: the command channel and the data channel.

The command channel is for sending the commands and responses, and the data channel is for sending the actual data.

As for the active and passive modes, in the active mode, the client launches the command channel, and the server establishes the data channel.

In the passive mode, both the command and data channels are established by the client.