Chapter 20 File Transfer Protocol (FTP)
CONTENTS <ul><li>CONNECTIONS </li></ul><ul><li>COMMUNICATION </li></ul><ul><li>COMMAND PROCESSING </li></ul><ul><li>FILE T...
FTP uses the services of TCP.  It needs two TCP connections.  The well-known port 21 is used  for the control connection  ...
Figure  20-1 FTP
CONNECTIONS 20.1
Figure  20-2 Opening the control connection
COMMUNICATION 20.2
Figure  20-3 Creating  the data  connection
Figure  20-4 Using the control connection
Figure  20-5 Using the data connection
COMMAND PROCESSING 20.3
Figure  20-6 Command processing
FILE TRANSFER 20.4
Figure  20-7 File transfer
Example 1 Figure 20.8 shows an example of using FTP for retrieving a list of items in a directory.
Figure  20-8 Example 1
Example 2 Figure 20.9 shows an example of how an image (binary) file is stored.
Figure  20-9 Example 2
USER INTERFACE 20.5
Example 3 We show some of the user interface commands that accomplish the same task as in Example 1.
Solution %   ftp challenger.atc.fhda.edu Connected to challenger.atc.fhda.edu 220 Server ready Name:   forouzan Password: ...
Solution 150 Opening ASCII mode ........... 226 transfer complete ftp >   close 221 Goodbye ftp >   quit
ANONYMOUS FTP 20.6
Example 4 We show an example of using anonymous FTP. We assume that some public data are available at internic.net.
Solution %  ftp internic.net Connected to internic.net 220 Server ready Name:   anonymous 331 Guest login OK, send “guest”...
Solution ftp >   ls 200 OK 150 Opening ASCII mode bin … ftp>  close 221 Goodbye ftp>  quit
Upcoming SlideShare
Loading in …5
×

Ch20

320 views
264 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
320
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Ch20

  1. 1. Chapter 20 File Transfer Protocol (FTP)
  2. 2. CONTENTS <ul><li>CONNECTIONS </li></ul><ul><li>COMMUNICATION </li></ul><ul><li>COMMAND PROCESSING </li></ul><ul><li>FILE TRANSFER </li></ul><ul><li>USER INTERFACE </li></ul><ul><li>ANONYMOUS FTP </li></ul>
  3. 3. 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.
  4. 4. Figure 20-1 FTP
  5. 5. CONNECTIONS 20.1
  6. 6. Figure 20-2 Opening the control connection
  7. 7. COMMUNICATION 20.2
  8. 8. Figure 20-3 Creating the data connection
  9. 9. Figure 20-4 Using the control connection
  10. 10. Figure 20-5 Using the data connection
  11. 11. COMMAND PROCESSING 20.3
  12. 12. Figure 20-6 Command processing
  13. 13. FILE TRANSFER 20.4
  14. 14. Figure 20-7 File transfer
  15. 15. Example 1 Figure 20.8 shows an example of using FTP for retrieving a list of items in a directory.
  16. 16. Figure 20-8 Example 1
  17. 17. Example 2 Figure 20.9 shows an example of how an image (binary) file is stored.
  18. 18. Figure 20-9 Example 2
  19. 19. USER INTERFACE 20.5
  20. 20. Example 3 We show some of the user interface commands that accomplish the same task as in Example 1.
  21. 21. 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
  22. 22. Solution 150 Opening ASCII mode ........... 226 transfer complete ftp > close 221 Goodbye ftp > quit
  23. 23. ANONYMOUS FTP 20.6
  24. 24. Example 4 We show an example of using anonymous FTP. We assume that some public data are available at internic.net.
  25. 25. Solution % ftp internic.net Connected to internic.net 220 Server ready Name: anonymous 331 Guest login OK, send “guest” as password Password: guest ftp > pwd 257 ’/’ is current directory
  26. 26. Solution ftp > ls 200 OK 150 Opening ASCII mode bin … ftp> close 221 Goodbye ftp> quit

×