TCP IP Illustrated

1 sending a file from the client to the server 2

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ne contains a hyphen instead of a space after the 3digit reply code, and the final line contains the same 3-digit reply code, followed by a space. For example, the HELP command could generate the reply: 214- The following commands are recognized (* =>'s unimplemented). PORT MSAM* RNTO NLST USER STOR MKD PASV MRSQ* ABOR SITE PASS APPE XMKD SYST ACCT* TYPE MLFL* MRCP* DELE RMD STAT SMNT* STRU MAIL* ALLO CWD XRMD HELP REIN* MODE MSND* REST XCWD PWD RETR NOOP QUIT MSOM* RNFR LIST XPWD 214 Direct comments to [email protected] CDUP XCUP STOU SIZE MDTM Connection Management There are three uses for the data connection. 1. Sending a file from the client to the server. 2. Sending a file from the server to the client. 3. Sending a listing of files or directories from the server to the client. The FTP server sends file listings back across the data connection, rather than as multiline replies across the control connection. This avoids any line limits that restrict the size of a directory listing and makes it easier for the client to save the output of a directory listing into a file, instead of printing the listing to the terminal. We've said that the control connection stays up for the duration of the client-server connection, but the data connection can come and go, as required. How are the port numbers chosen for the data connection, and who does the active open and passive open? First, we said earlier that the common transmission mode (under Unix the only transmission mode) is the stream mode, and that the end-of-file is denoted by closing the data connection. This implies that a brand new data connection is required for every file transfer or directory listing. The normal procedure is as follows: 1. The creation of the data connection is under control of the client, because it's the client that issues the command that requires the data connection (get a file, put a file:///D|/Documents%20and%20Settings/bigini/Docum.../homenet2run/tcpip/tcp-ip-illustrated/ftp_file.htm (...
View Full Document

Ask a homework question - tutors are online