When FTP is running on a server, it constantly monitors port 21, the FTP control port, for a request for service from the FTP server. To connect to the FTP server, the FTP client computer sends a request to TCP port number 21 on the server computer.
For example, assume that computer A is the FTP client, computer B is the FTP server, and that they have the following IP addresses.
Computer A (FTP client) | Computer B (FTP server) |
IP address: 172.16.16.10 | IP address: 10.155.22.99 |
The communication between the FTP client and FTP server follows this process.
FTP 10.155.22.99
Source IP Address | 172.16.16.10 |
Source TCP Port Number | 1028 |
Destination IP Address | 10.155.22.99 |
Destination TCP Port Number | 21 |
The packet cannot be accidentally delivered to a wrong port address on the server because the packet contains the correct port number before it leaves the client computer.