This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 7 of 24) [12/09/2001 14.47.49] Chapter 27. FTP: File Transfer Protocol file, or list a directory).
2. The client normally chooses an ephemeral port number on the client host for its end
of the data connection. The client issues a passive open from this port.
3. The client sends this port number to the server across the control connection using
the PORT command.
4. The server receives the port number on the control connection, and issues an active
open to that port on the client host. The server's end of the data connection always
uses port 20.
Figure 27.4 shows the state of the connections while step 3 is being performed. We
assume the client's ephemeral port for the control connection is 1173, and the client's
ephemeral port for the data connection is 1174. The command sent by the client is the
PORT command and its arguments are six decimal numbers in ASCII, separated by
commas. The first four numbers specify the IP address on the client that the server should
issue the active open to (126.96.36.199 in this example), and the next two specify the 16bit port number. Since the 16-bit port number is formed from two numbers, its value in
this example is 4 x 256 +150 = 1174. Figure 27.4 PORT command going across FTP control connection.
Figure 27.5 shows the state of the connection when the server issues the active open to the
client's end of the data connection. The server's end point is at port 20. Figure 27.5 FTP server doing active open of data connection.
The server always does the active open of the data connection. Normally the server also
does the active close of the data connection, except when the client is sending a tile to the
server in stream mode, which requires the client to close the connection (which gives the
server the end-of-tile notification).
It is also possible for the client to not issue the PORT command, in which case the server
issues the active open to the same port number being used by the client for its end of the file:///D|/Documents%20and%20Settings/bigini/Docum......
View Full Document
This test prep was uploaded on 04/04/2014 for the course ECE EL5373 taught by Professor Guoyang during the Spring '12 term at NYU Poly.
- Spring '12