Bài giảng TCP/IP - Chapter 20: File Transfer Protocol (FTP)

Tài liệu Bài giảng TCP/IP - Chapter 20: File Transfer Protocol (FTP): Chapter 20File Transfer Protocol(FTP)CONTENTS CONNECTIONS COMMUNICATION COMMAND PROCESSING FILE TRANSFER USER INTERFACE ANONYMOUS FTPFTP 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.Figure 20-1FTPCONNECTIONS20.1Figure 20-2Opening the control connectionCOMMUNICATION20.2Figure 20-3Creating the data connectionFigure 20-4Using the control connectionFigure 20-5Using the data connectionCOMMANDPROCESSING20.3Figure 20-6Command processingFILETRANSFER20.4Figure 20-7File transferExample 1 Figure 20.8 shows an example of using FTP for retrieving a list of items in a directory.Figure 20-8Example 1Example 2 Figure 20.9 shows an example of how an image (binary) file is stored.Figure 20-9Example 2USERINTERFACE20.5Example 3 We show some of the user interface commands that accomplish the same task as in Example 1. Solution% ftp challenger.atc.fhda.eduConnected to challenger.atc.fh...

ppt26 trang | Chia sẻ: honghanh66 | Ngày: 19/03/2018 | Lượt xem: 70 | Lượt tải: 0download
Bạn đang xem trước 20 trang mẫu tài liệu Bài giảng TCP/IP - Chapter 20: File Transfer Protocol (FTP), để tải tài liệu gốc về máy bạn click vào nút DOWNLOAD ở trên
Chapter 20File Transfer Protocol(FTP)CONTENTS CONNECTIONS COMMUNICATION COMMAND PROCESSING FILE TRANSFER USER INTERFACE ANONYMOUS FTPFTP 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.Figure 20-1FTPCONNECTIONS20.1Figure 20-2Opening the control connectionCOMMUNICATION20.2Figure 20-3Creating the data connectionFigure 20-4Using the control connectionFigure 20-5Using the data connectionCOMMANDPROCESSING20.3Figure 20-6Command processingFILETRANSFER20.4Figure 20-7File transferExample 1 Figure 20.8 shows an example of using FTP for retrieving a list of items in a directory.Figure 20-8Example 1Example 2 Figure 20.9 shows an example of how an image (binary) file is stored.Figure 20-9Example 2USERINTERFACE20.5Example 3 We show some of the user interface commands that accomplish the same task as in Example 1. Solution% ftp challenger.atc.fhda.eduConnected to challenger.atc.fhda.edu220 Server readyName: forouzanPassword: xxxxxxxftp > ls /usr/user/report200 OKSolution150 Opening ASCII mode...........226 transfer completeftp > close221 Goodbyeftp > quit ANONYMOUSFTP20.6Example 4 We show an example of using anonymous FTP. We assume that some public data are available at internic.net.Solution% ftp internic.netConnected to internic.net220 Server readyName: anonymous331 Guest login OK, send “guest” as passwordPassword: guestftp > pwd257 ’/’ is current directorySolutionftp > ls200 OK150 Opening ASCII modebinftp> close221 Goodbyeftp> quit

Các file đính kèm theo tài liệu này:

  • pptch20_1224.ppt
Tài liệu liên quan