File transfer protocol
Since the Internet came into existence, we have been working with FTP. It was in the limelight even when the Internet was still a closed network used by the government and other corporate organizations.
FTP uses the TCP protocol to initiate and transfer files over a designated channel. There will be two channels created; one is the command channel, and the other one is specifically a data channel. The command channel will be used to send and receive the commands and their responses. The data channel is used to send data between the client and the server.
Commonly, port 21
is used by the FTP server to listen for the connection, and any random port on the client to send and receive data. As per the standard, port 21
will be used for the command channel and port 20
for the data channel. However, you will observe random port numbers used to transfer TCP data segments.
Dissecting FTP communications
There are two types of mode a client uses to communicate with the server: active...