Скачать презентацию Internet Applications File Transfer Protocol FTP Data Скачать презентацию Internet Applications File Transfer Protocol FTP Data

5c807eecb09e0e7331cd3f07d611a524.ppt

  • Количество слайдов: 10

Internet Applications: File Transfer Protocol (FTP) Internet Applications: File Transfer Protocol (FTP)

Data transfer before Internet n Magnetic media like tapes and disks: n n An Data transfer before Internet n Magnetic media like tapes and disks: n n An application transferred data on magnetic media The medium was physically moved from one computer to another; Drawback: SLOW Fax: Use the telephone lines; n A fax machine consists of a printer, a scanner, a dial-up modem, and a dedicated computer; n Drawbacks: requires a dedicated machine and a fax transmission is as expensive as a phone conversation. Spring 2002 Computer Networks Applications n

The Internet can be used to transfer data n Benefits: n n n Spring The Internet can be used to transfer data n Benefits: n n n Spring 2002 Efficient: Internet is designed for sending digital data; Less expensive than fax: Internet access is billed a flat rate; Can transfer more types of data than fax, including audio and video. Computer Networks Applications

File Transfer Protocol (FTP) n n A general-purpose protocol that can be used to File Transfer Protocol (FTP) n n A general-purpose protocol that can be used to copy an arbitrary file from one computer to another; one of the oldest network application--predates TCP and IP; Later versions were built on top of TCP/IP; Among the most heavily used applications: n n Spring 2002 FTP generated as much as 1/3 of the traffic on the Internet Was exceeded only by WWW (in 1995). Computer Networks Applications

Issues in designing FTP n n n Must transfer an arbitrary file (size, name, Issues in designing FTP n n n Must transfer an arbitrary file (size, name, . . ) Must accommodate multiple file types; Must connect heterogeneous computers. May have to deal with different: n n n Spring 2002 Data encodings; File names; File protections; Computer Networks Applications

FTP Commands n n FTP is an interactive protocol: it responds to each command FTP Commands n n FTP is an interactive protocol: it responds to each command a user enters; signals when it is ready to execute another command; Examples of FTP commands: n n Spring 2002 Open---connect to a remote computer; Get---retrieve a file from the remote computer; Put---sends a file to the remote computer; Bye---terminate the connection and leave FTP. Computer Networks Applications

Transfer Modes n n FTP defines two types of transfer: textual and binary; Textual: Transfer Modes n n FTP defines two types of transfer: textual and binary; Textual: is used for text files; n n n most text files are encoded in ASCII or EBCDIC ftp can translate from the local to remote character set when transferring a file; Binary: used for all other files (audio, image, numbers, …) Files are copied exactly; n The resulting copy might be meaningless because FTP does not convert values to the local Spring 2002 representation; Computer Networks Applications n

Connections, authorizations and file permissions n The remote system has to verify that the Connections, authorizations and file permissions n The remote system has to verify that the user is authorized to access files: n n n The user has to provide a login name and a password; If the user is authorized he/she may start transferring files; What if the user does not have an account? n n Spring 2002 System administrator can configure FTP to support anonymous FTP; Login name anonymous and password guest (or email address) allows a user access to public files. Computer Networks Applications

A browser can use FTP n n n A WWW browser can be used A browser can use FTP n n n A WWW browser can be used to FTP instead of a dedicated interface; A browser uses FTP as the transfer protocol, when the URL starts with ftp (instead of http) EX: n n Spring 2002 ftp: //ftp. cs. purdue. edu/pub/comer/example --instructs the browser to get file “pub/comer/example” from machine ftp. cs. purdue. edu ftp: //ftp. cs. purdue. edu/pub/comer/ --- displays all files in the directory “pub/comer/” Computer Networks Applications

FTP uses the client-server paradigm: n n n Spring 2002 Local application (or browser) FTP uses the client-server paradigm: n n n Spring 2002 Local application (or browser) is the client Remote FTP program is the server; The FTP server authorizes the connection, locates the file, and uses TCP to send it. Computer Networks Applications