Top Banner
TCP/IP Protocol Suite 1 File Transfer: File Transfer: FTP and TFTP FTP and TFTP
23
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ftptftp.ppt

TCP/IP Protocol Suite 1

File Transfer:File Transfer:FTP and TFTPFTP and TFTP

Page 2: ftptftp.ppt

TCP/IP Protocol Suite 2

19.1 FILE TRANSFER PROTOCOL (FTP)

File Transfer Protocol (FTP) is the standard mechanism File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from one host to another. provided by TCP/IP for copying a file from one host to another.

Page 3: ftptftp.ppt

TCP/IP Protocol Suite 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.

Note:Note:

Page 4: ftptftp.ppt

TCP/IP Protocol Suite 4

Figure 19.1 FTP

Page 5: ftptftp.ppt

TCP/IP Protocol Suite 5

Figure 19.2 Opening the control connection

Page 6: ftptftp.ppt

TCP/IP Protocol Suite 6

Page 7: ftptftp.ppt

TCP/IP Protocol Suite 7

Figure 19.3 Creating the data connection

Page 8: ftptftp.ppt

TCP/IP Protocol Suite 8

Figure 19.6 Command processing

Page 9: ftptftp.ppt

TCP/IP Protocol Suite 9

Figure 19.7 File transfer

Page 10: ftptftp.ppt

TCP/IP Protocol Suite 10

The following shows an actual FTP session that parallels Example 1. The colored lines show the responses from the server control connection; the black lines show the commands sent by the client. The lines in white with black background shows data transfer.

Example 2

See Next Slide

$ ftp voyager.deanza.fhda.eduConnected to voyager.deanza.fhda.edu.220 (vsFTPd 1.2.1)530 Please login with USER and PASS.Name (voyager.deanza.fhda.edu:forouzan): forouzan331 Please specify the password.

Page 11: ftptftp.ppt

TCP/IP Protocol Suite 11

Example 2

Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp> ls reports227 Entering Passive Mode (153,18,17,11,238,169)150 Here comes the directory listing.

drwxr-xr-x 2 3027 411 4096 Sep 24 2002 businessdrwxr-xr-x 2 3027 411 4096 Sep 24 2002 personaldrwxr-xr-x 2 3027 411 4096 Sep 24 2002 school

226 Directory send OK.ftp> quit221 Goodbye.

Page 12: ftptftp.ppt

TCP/IP Protocol Suite 12

We show an example of anonymous FTP. We assume thatsome public data are available at internic.net.

Example 4

See Next Slide

$ ftp internic.netConnected to internic.net220 Server readyName: anonymous331 Guest login OK, send “guest” as passwordPassword: guestftp > pwd257 ’/’ is current directory

Page 13: ftptftp.ppt

TCP/IP Protocol Suite 13

bin. . .. . .. . .

Example 4

ftp > close221 Goodbyeftp > quit

Page 14: ftptftp.ppt

TCP/IP Protocol Suite 14

19.2 TRIVIAL FILE TRANSFER PROTOCOL (TFTP)

Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol without the sophisticated features of FTP.without the sophisticated features of FTP.

Page 15: ftptftp.ppt

TCP/IP Protocol Suite 15

TFTP uses the services of UDP on the well-known port 69.

Note:Note:

Page 16: ftptftp.ppt

TCP/IP Protocol Suite 16

Figure 19.10 Message categories

Page 17: ftptftp.ppt

TCP/IP Protocol Suite 17

Figure 19.11 RRQ format

Page 18: ftptftp.ppt

TCP/IP Protocol Suite 18

Figure 19.12 WRQ format

Page 19: ftptftp.ppt

TCP/IP Protocol Suite 19

Figure 19.13 DATA format

Page 20: ftptftp.ppt

TCP/IP Protocol Suite 20

Figure 19.14 ACK format

Page 21: ftptftp.ppt

TCP/IP Protocol Suite 21

Figure 19.15 ERROR format

Page 22: ftptftp.ppt

TCP/IP Protocol Suite 22

Page 23: ftptftp.ppt

TCP/IP Protocol Suite 23

Figure 19.18 UDP port numbers used by TFTP