From: Luis Santos (luis_santos@xxxxxxx)
Date: Wed Feb 14 2001 - 06:33:39 GMT-3
FTP works with 2 types of connections: data and control. The control
connection is established from the client and hits the server on TCP port
21. The control connection uses a telnet type protocol to pass commands to
the FTP server (such as username, password, commands like ls, pwd, etc.)
Whenever a command requires a transfer of data to the client (such as the
output of the 'ls' command or a file transfer issued with a 'get' command)
the server will open a connection from its TCP port 20 to a dynamic port on
the client. The dynamic port on the client is negotiated via the PORT
command in which the client tells the server on which IP address and port it
will be listening for the data connection - that's why in the Windows ftp
client you will see a "200 PORT command successful" whenever a command
generated output that needed to be transfered via the data connection, other
FTP clients may hide this message.
The behavior I described above is that of normal FTP (active FTP if you
will), there is another type of FTP called passive. The difference is that
the client initiates both the control and data connections. The other
difference is that the port used for data transfer will no longer be 20 but
rather a dynamic port on the server which is negotiated through the PASV
command. So with passive FTP port 20 is never used.
I would assume the RFC that documents FTP have all this info so you may want
to check it out.
-Luis
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
Tariq Sharif
Sent: Wednesday, February 14, 2001 9:01 AM
To: Ccielab@Groupstudy. Com
Subject: FTP Port Numbers
I can't find ant clear explanation of which FTP Port Numbers (20, 21) port
are used where (client/server) & when. Pls help!
Many thanks & regards.
Tariq Sharif
This archive was generated by hypermail 2.1.4 : Thu Jun 13 2002 - 10:28:48 GMT-3