tailieunhanh - Lecture TCP-IP protocol suite - Chapter 20: File Transfer Protocol (FTP)

Upon completion you will be able to: Understand the connections needed for FTP file transfer be familiar with FTP commands and responses know the differences between FTP and TFTP be familiar with TFTP message types understand TFTP flow and error control. | Chapter 20 File Transfer Protocol (FTP) CONTENTS CONNECTIONS COMMUNICATION COMMAND PROCESSING FILE TRANSFER USER INTERFACE ANONYMOUS FTP 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. Figure 20-1 FTP CONNECTIONS Figure 20-2 Opening the control connection COMMUNICATION Figure 20-3 Creating the data connection Figure 20-4 Using the control connection Figure 20-5 Using the data connection COMMAND PROCESSING Figure 20-6 Command processing FILE TRANSFER Figure 20-7 File transfer Example 1 Figure shows an example of using FTP for retrieving a list of items in a directory. Figure 20-8 Example 1 Example 2 Figure shows an example of how an image (binary) file is stored. Figure 20-9 Example 2 USER INTERFACE Example 3 We show some of the user interface commands that accomplish the same task as in Example 1. Solution % ftp Connected to 220 Server ready Name: forouzan Password: xxxxxxx ftp > ls /usr/user/report 200 OK Solution 150 Opening ASCII mode . 226 transfer complete ftp > close 221 Goodbye ftp > quit ANONYMOUS FTP Example 4 We show an example of using anonymous FTP. We assume that some public data are available at . Solution % ftp Connected to 220 Server ready Name: anonymous 331 Guest login OK, send “guest” as password Password: guest ftp > pwd 257 ’/’ is current directory Solution ftp > ls 200 OK 150 Opening ASCII mode bin ftp> close 221 Goodbye ftp> quit | Chapter 20 File Transfer Protocol (FTP) CONTENTS CONNECTIONS COMMUNICATION COMMAND PROCESSING FILE TRANSFER USER INTERFACE ANONYMOUS FTP 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. Figure 20-1 FTP CONNECTIONS Figure 20-2 Opening the control connection COMMUNICATION Figure 20-3 Creating the data connection Figure 20-4 Using the control connection Figure 20-5 Using the data connection COMMAND PROCESSING Figure 20-6 Command processing FILE TRANSFER Figure 20-7 File transfer Example 1 Figure shows an example of using FTP for retrieving a list of items in a directory. Figure 20-8 Example 1 Example 2 Figure shows an example of how an image (binary) file is stored. Figure 20-9 Example 2 USER INTERFACE Example 3 We show some of the user interface commands that accomplish the same task as in Example 1. Solution % ftp Connected to 220 Server ready Name: forouzan Password: xxxxxxx ftp > ls /usr/user/report 200 OK Solution 150 Opening ASCII mode . 226 transfer complete ftp > close 221 Goodbye ftp > quit ANONYMOUS FTP Example 4 We show an example of using anonymous FTP. We assume that some public data are available at . Solution % ftp Connected to 220 Server ready Name: anonymous 331 Guest login OK, send “guest” as password Password: guest ftp > pwd 257 ’/’ is current directory Solution ftp > ls 200 OK 150 Opening ASCII mode bin ftp> close 221 Goodbye ftp> quit

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.