File Transfer Protocol (FTP) : Mcgraw-Hill ©the Mcgraw-Hill Companies, Inc., 2000
File Transfer Protocol (FTP) : Mcgraw-Hill ©the Mcgraw-Hill Companies, Inc., 2000
CONTENTS
CONNECTIONS COMMUNICATION COMMAND PROCESSING FILE TRANSFER USER INTERFACE ANONYMOUS FTP
McGraw-Hill
FTP uses the services of TCP. It needs two TCP connections. The well-known port 21 is used for the control connection and the well-known port 20 for the data connection.
McGraw-Hill
Figure 20-1
FTP
McGraw-Hill
20.1 CONNECTIONS
McGraw-Hill
Figure 20-2
McGraw-Hill
20.2 COMMUNICATION
McGraw-Hill
Figure 20-3
McGraw-Hill
Figure 20-4
McGraw-Hill
Figure 20-5
McGraw-Hill
20.3
COMMAND PROCESSING
McGraw-Hill
Figure 20-6
Command processing
McGraw-Hill
20.4
FILE TRANSFER
McGraw-Hill
Figure 20-7
File transfer
McGraw-Hill
Example 1
Figure 20.8 shows an example of using FTP for retrieving a list of items in a directory.
McGraw-Hill
Figure 20-8
Example 1
McGraw-Hill
Example 2
McGraw-Hill
Figure 20-9
Example 2
McGraw-Hill
20.5
USER INTERFACE
McGraw-Hill
Example 3
We show some of the user interface commands that accomplish the same task as in Example 1.
McGraw-Hill
Solution % ftp challenger.atc.fhda.edu Connected to challenger.atc.fhda.edu 220 Server ready Name: forouzan Password: xxxxxxx ftp > ls /usr/user/report 200 OK
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
Solution 150 Opening ASCII mode ........... 226 transfer complete ftp > close 221 Goodbye ftp > quit
McGraw-Hill
McGraw-Hill
Example 4
We show an example of using anonymous FTP. We assume that some public data are available at internic.net.
McGraw-Hill
ftp> close
221 Goodbye
ftp> quit
McGraw-Hill The McGraw-Hill Companies, Inc., 2000