TCP IP Illustrated

connection management ephemeral data port lets first

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: /homenet2run/tcpip/tcp-ip-illustrated/ftp_file.htm (8 of 24) [12/09/2001 14.47.49] Chapter 27. FTP: File Transfer Protocol control connection (1173 in this example). This is OK, since the server's port numbers for the two connections are different: one is 20 and the other is 21. Nevertheless, in the next section we'll see why current implementations normally don't do this. 27.3 FTP Examples We now look at some examples using FTP: its management of the data connection, how text files are sent using NVT ASCII, FTP'S use of the Telnet synch signal to abort an inprogress transfer, and finally the popular "anonymous FTP." Connection Management: Ephemeral Data Port Let's first look at FTP's connection management with a simple FTP session that just lists a file on the server. We run the client on the host svr4 with the -d flag (debug). This tells it to print the commands and replies that are exchanged across the control connection. All the lines preceded by ---> are sent by the client to the server, and the lines that begin with a 3-digit number are the server's replies. The client's interactive prompt is ftp>. svr4 % ftp -d bsdi Connected to bsdi. 220 bsdi FTP server (Version 5.60) ready. Name (bsdi:rstevens): ---> USER rstevens 331 Password required for rstevens. Password: ---> PASS XXXXXXX 230 User rstevens logged in. ftp> dir hello.c -d option for debug output client does active open of control connection server responds it is ready client prompts us for a login name we type RETURN, so client sends default we type our password; it's not echoed client sends it as cleartext ask for directory listing of a single file ---> PORT 140,252,13,34,4,150 see figure 27.4 200 PORT command successful. ---> LIST hello.c 150 Opening ASCII mode data connection for /bin/ls. -rw-r--r-- 1 rstevens staff 38 Jul 17 12:47 hello.c 226 Transfer complete. output by client remote: hello.c 56 bytes received in 0.03 seconds (1.8 Kbytes/s) file:///D|/Documents%20and%20Settings/bigini/Docum.../h...
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.

Ask a homework question - tutors are online