Upload
ginger-cummings
View
217
Download
0
Tags:
Embed Size (px)
Citation preview
27-Oct-03 Application Layer
File Transfer Protocol (FTP)
The standard mechanism provided by the Internet for copying a file from one host to another.
The needs: - Different file name conventions Different representation of text and
data Different directory structures
27-Oct-03 Application Layer
FTP (Continued…)
Differs from other client-server applications in that it establishes two connections between the client and the server. They are: - Data connection
Used for data transfer Consists of complex rules due to the variety
of data being transferred Control connection
Used for information control (commands and responses)
Uses very simple rules of one line command or response at a time
27-Oct-03 Application Layer
FTP Model
FTP client has three components User interface Client control process Client data transfer process
FTP server has two components Server control process Server data transfer process
Figure 26.12 FTP
27-Oct-03 Application Layer
FTP Connections
Control connection Maintained during the entire FTP
session Uses port 21 Involves interactive connection
between user and server Data connection
Maintained only during a file transfer Uses port 20
27-Oct-03 Application Layer
FTP Communications
Communication over control connection Uses ASCII character set, similar to
SMTP
Communication over data connection File type Data structure Transmission mode
Figure 26.13 Using the control connection
Figure 26.14 Using the data connection
27-Oct-03 Application Layer
File Transfer
File transfer in FTP can mean one of the following three: - Storing a file Retrieving a file Retrieving a list
Most operating systems provide user interface to access the services of FTP where the chosen activity is automatically converted by the interface to the corresponding FTP commands.
Figure 26.15 File transfer
Figure 26.16 Example 1
List of FTP commands in DOSList of FTP commands in DOS
List of FTP commands in UNIXList of FTP commands in UNIX
Commands
!, $, account, append, ascii, bell, binary, bye, case, cd, cdup, close, cr, delete, debug, dir, discount, form, get, glob, hash, help, lcd, ls, macdef, mdelete, mdir, mget, mkdir, mls, mode, mput, nmap, ntrans, open, prompt, proxy, sendport, put, pwd, quit, quote, recv, remotehelp, rename, reset, rmdir, runique, send, status, struct, sunique, tenex, trace, type, user, verbose,?
27-Oct-03 Application Layer
FTP Connection Example
27-Oct-03 Application Layer
GUI FTP Example