Saturday 31 March 2012

Why FTP uses two ports and HTTP one?


Well. i tried to find answer for this question but I am still not very clear on this. Below reasons i came across for choosing two ports for FTP.

1) By using two ports, the data channel is separated from the control channel. This is to not to interfere with the control messages (on port 21), and for other who are trying to connect. Also this will separate full-duplex data flow on port 20. The control channel is basically a Telnet channel, and is not optimize for  receiving relatively large flows of data.







2) In order to avoid the extra headers and details for each and every packets which will consume the bandwidth.
A separate port is used for data connection.

3) In the original FTP RFC (114) there is a reference in the Endnotes to RFC 103, which dicusses NCP communications and the problem
of not having enough buffer space on the receiving host to accept a control command if the data and control ports are not separated,






Please post in comments what you think about it. Also which reason you believe could be true or its all ??