The client uses an ephemeral port and issues an active open. The server issues a passive open on the well-known port 21 and waits for a client. Forouzan, McGraw-Hill Companies, Inc., 2007Ħ Control Connection There are two steps: Forouzan, McGraw-Hill Companies, Inc., 2007ĥ FTP Ameera Almasoud Based on Data Communications and Networking, 4th Edition. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. FTP uses two well-known TCP ports: Port 21 is used for the control connection, port 20 is used for the data connection. The data connection, on the other hand, needs more complex rules due to the variety of data types transferred. Forouzan, McGraw-Hill Companies, Inc., 2007Ĥ FILE TRANSFER The control connection uses very simple rules of communication.
We need to transfer only a line of command or a line of response at a time. Separation of commands and data transfer makes FTP more efficient. One connection is used for data transfer, the other for control information (commands and responses). Forouzan, McGraw-Hill Companies, Inc., 2007ģ FILE TRANSFER FTP differs from other client-server applications in that it establishes two connections between the hosts. All of these problems have been solved by FTP in a very simple and elegant approach. Two systems may have different directory structures. Two systems may have different ways to represent text and data. Before transferring, some problems must be dealt with first, such as: two systems may use different file name conventions.
Although transferring files from one system to another seems simple and straightforward. Forouzan, McGraw-Hill Companies, Inc., 2007Ģ FILE TRANSFER File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from one host to another. Ch26 Ameera Almasoud Ameera Almasoud Based on Data Communications and Networking, 4th Edition.