DOC PREVIEW
Berkeley ELENG 122 - FTP - File Transfer Protocol

This preview shows page 1 out of 4 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

File Transfer Protocol FTP Allows a user to copy files to from remote hosts Usage FTP File Transfer Protocol A predecessor of the Web RFC 959 in 1985 EE 122 Intro to Communication Networks No URL hypertext and helper applications to assist user Fall 2007 WF 4 5 30 in Cory 277 Requirements for the user Vern Paxson o o o o o TAs Lisa Fowler Daniel Killebrew Jorge Ortiz http inst eecs berkeley edu ee122 Materials with thanks to Jennifer Rexford Ion Stoica and colleagues at Princeton and UC Berkeley Client connects to the FTP server User provides a login id and password to become authenticated User can explore the directories User can download files from and upload files to the server 1 How Do You Transfer Files Today Know the name of the server machine Have an account on the machine Can find the directory where the files are stored Know whether the file is text or binary Know what tool to run to render and edit the file 2 Why Study FTP HTTP the usual Web transfer mechanism http FTP Helps cement familiarity with text status code based protocols similar to SMTP Illustrates use of multiple concurrent connections You may not have realized that you use it ftp links in web pages e g www kernel org One for control commands replies Another connection for data depending on the command sftp E g to upload your project files to EECS inst machines Illustrates reversal of roles BitTorrent and other file sharing software For data connection FTP user s process plays the server role FTP server plays the client role scp We ll later use FTP as an example when looking at issues with Network Address Translation NAT Any others 3 Example Commands 4 Server Response Codes Authentication 1xx positive preliminary reply USER specify the user name for login PASS specify the user s password The action is being started but expect another reply before sending the next command 2xx positive completion reply Exploring the files The action succeeded and a new command can be sent LIST list the files for the given file specification CWD change to the given directory 3xx positive intermediate reply Downloading and uploading files The command was accepted but another command is now required TYPE set type to ASCII A or binary image I RETR retrieve the given file STOR upload the given file 4xx transient negative completion reply The command failed and should be retried later Closing the connection 5xx permanent negative completion reply QUIT close the FTP connection 5 The command failed and should not be retried 6 1 FTP Data Transfer Creating the Data Connection Client acts like a server Use separate data connection to Creates a socket Send lists of files LIST Retrieve a file RETR Upload a file STOR o Assigned an ephemeral port number by the kernel Listens on socket Waits to hear from FTP server control control data socket 7 Creating Data Connection cont 8 Creating Data Connection cont Then the server initiates the data connection But the server doesn t know the port number Connects to the socket on the client machine Client accepts to complete the connection After listening client tells it to the server Via the PORT command on the control connection Data now flows along second connection first connection remains open for more commands replies PORT IP address port 9 FTP Communication Overview Why Out of Band Control Avoids need to mark end of data transfer Client User Interface Data transfer ends by closing data connection Control connection stays up User Can abort a transfer without killing control connection Server File System Server PI tcp 21 Server DTP tcp 20 tcp random Command Connection tcp random Data Connection User PI User DTP 10 Avoids requiring the user to log in again Done with an ABOR on the control connection File System Third party file transfer between two hosts Data connection could go to a different host o Send a different client IP address to the server o e g user coordinates transfer between two servers Protocol Interpreter PI Data Transfer Protocol DTP 11 However Rarely needed and presents security issues 12 2 Example What It Looks Like to the User Issue command Traffic captured using tcpdump s 0 w ftp trace host ftp ee lbl gov ftp ftp ee lbl gov Connected ee lbl gov ftptoftp ee lbl gov 220NOTICE TO USERS This computer is a Federal computer system and is the property of the United States Government It is for authorized use only Users authorized or unauthorized have no explicit or implicit expectation of privacy Issue command LOG OFF IMMEDIATELY if you do not agree to the conditions stated in this warning ftp ftp ee lbl gov Your ip address is 128 32 48 169 The local time is Wed Sep 27 15 04 44 2006 220 131 243 1 10 FTP server ready Name ftp ee lbl gov ee122 anonymous 331 Anonymous login ok send your complete email address as your password 13 14 ftp ls bro 200 PORT command successful 150 Opening ASCII mode data connection for file list bro 0 9 current tar gz OLD bro 0 9a7 tar gz bro 0 9a8 tar gz bro 0 9a9 tar gz bro change log txt bro libidmef 0 7 2 modified tar gz bro pub 0 7 stable tar gz bro pub 0 8 stable tar gz bro pub 0 8a87 tar gz bro pub 0 8a88 tar gz bro pub 0 9a4 tar gz bro pub 0 9a4a tar gz 226 Transfer complete remote bro 283 bytes received in 0 0013 seconds 218 37 Kbytes s ftp Password 230 Anonymous access granted restrictions apply Remote system type is UNIX Using binary mode to transfer files ftp pwd 257 is current directory ftp 15 16 What It Looks Like On The Wire ftp get bro 0 9a9 tar gz TYPO 200 PORT command successful 550 bro 0 9a9 tar gz TYPO No such file or directory ftp get bro 0 9a9 tar gz 200 PORT command successful 150 Opening BINARY mode data connection for bro 0 9a9 tar gz 3440652 bytes 226 Transfer complete local bro 0 9a9 tar gz remote bro 0 9a9 tar gz 3440652 bytes received in 0 81 seconds 4161 86 Kbytes s ftp cd 250 CWD command successful ftp pwd 257 is current directory ftp cd secret files 550 secret files No such file or directory ftp quit 221 Goodbye 17 ftp ftp ee lbl gov Issue command Server sends this text ftp exactly ftp ee lbl gov 220 NOTICE TO USERS This computer is a Federal computer system and is the property LOG OFF IMMEDIATELY if you do not agree to the conditions stated in this warning Your ip address is 128 32 48 169 The local time is Wed Sep 27 15 04 44 2006 220 131 243 1 10 FTP server ready Name ftp ee lbl gov ee122 anonymous Client sends USER anonymous Server replies with exactly this text 331 Anonymous login ok send your complete email address as


View Full Document

Berkeley ELENG 122 - FTP - File Transfer Protocol

Documents in this Course
Lecture 6

Lecture 6

22 pages

Wireless

Wireless

16 pages

Links

Links

21 pages

Ethernet

Ethernet

10 pages

routing

routing

11 pages

Links

Links

7 pages

Switches

Switches

30 pages

Multicast

Multicast

36 pages

Switches

Switches

18 pages

Security

Security

16 pages

Switches

Switches

18 pages

Lecture 1

Lecture 1

56 pages

OPNET

OPNET

5 pages

Lecture 4

Lecture 4

16 pages

Ethernet

Ethernet

65 pages

Models

Models

30 pages

TCP

TCP

16 pages

Wireless

Wireless

48 pages

Load more
Download FTP - File Transfer Protocol
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view FTP - File Transfer Protocol and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view FTP - File Transfer Protocol and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?