| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
FTP Data Connection Management, Normal (Active) and Passive Data Connections and Port Usage (Page 3 of 4) Passive Data Connections The second method is called a passive data connection. The client tells the server to be passive, that is, to accept an incoming data connection initiated by the client. The server replies back giving the client the server IP address and port number that it should use. The Server-DTP then listens on this port for an incoming TCP connection from the User-DTP. By default, the user machine uses the same port number it used for the control connection, as in the active case. However, here again, the client can choose to use a different port number for the data connection if necessary (typically an ephemeral port number.) Let's consider our example again, with the control connection from port 1678 on the client to port 21 on the server, but this time consider data transfer using a passive connection, as illustrated in Figure 291. The client would issue the PASV command to tell the server it wanted to use passive data control. The Server-PI would reply back with a port number for the client to use, say port 2223. The Server-PI would then instruct the Server-DTP to listen on this port 2223. The User-PI would instruct the User-DTP to create a connection from client port 1742 to server port 2223. The server would acknowledge this and then data could be sent and received, again in either direction.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||