The File Transfer Protocol (FTP) is another commonly used application layer protocol. FTP was developed to allow for data transfers between a client and a server. An FTP client is an application that runs on a computer that is used to push and pull data from a server running an FTP daemon (FTPd).
As the figure illustrates, to successfully transfer data, FTP requires two connections between the client and the server, one for commands and replies, the other for the actual file transfer:
- The client establishes the first connection to the server for control traffic, consisting of client commands and server replies.
- The client establishes the second connection to the server for the actual data transfer. This connection is created every time there is data to be transferred.
The data transfer can happen in either direction. The client can download (pull) data from the server or, the client can upload (push) data to the server.