Presentation is loading. Please wait.

Presentation is loading. Please wait.

OVER VIEW RFC 959 FILE TRANSFER PROTOCOL (FTP). C ONTENTS  The Ftp Model  Data transfer functions  File transfer functions  Declarative specifications.

Similar presentations


Presentation on theme: "OVER VIEW RFC 959 FILE TRANSFER PROTOCOL (FTP). C ONTENTS  The Ftp Model  Data transfer functions  File transfer functions  Declarative specifications."— Presentation transcript:

1 OVER VIEW RFC 959 FILE TRANSFER PROTOCOL (FTP)

2 C ONTENTS  The Ftp Model  Data transfer functions  File transfer functions  Declarative specifications  State diagrams  Typical Ftp scenario

3 THE FTP MODEL

4

5 DATA TRANSFER FUNCTIONS 1. Data representation and storage 2. Establishing data connections 3. Data connection management 4. Transmission modes 5. Error recovery and restart

6 DATA TRANSFER FUNCTIONS 1. Data representation and storage Data types: ASCII type: This is the default type and must be accepted by all FTP implementations. It is intended primarily for the transfer of text files, except when both hosts would find the EBCDIC type more convenient. EBCDIC type: This type is intended for efficient transfer between hosts which use EBCDIC for their internal character representation. Image type (Binary): Image type is intended for the efficient storage and retrieval of files and for the transfer of binary data. It is recommended that this type be accepted by all FTP implementations. Local type: Allows two computers with identical setups to send data in a proprietary format without the need to convert it to ASCII

7 DATA TRANSFER FUNCTIONS 1. Data representation and storage Data structures: File structure: is the default to be assumed if the STRU command has not been used. In file-structure there is no internal structure and the file is considered to be a continuous sequence of data bytes. Record structure: must be accepted for "text" files (i.e., files with TYPE ASCII or EBCDIC) by all FTP implementations. Page structure: To transmit files that are discontinuous, FTP defines a page structure.

8 DATA TRANSFER FUNCTIONS 2. Establishing data connections The server has completed sending data in a transfer mode that requires a close to indicate EOF. The server receives an ABORT command from the user. The port specification is changed by a command from the user. The control connection is closed legally or otherwise. An irrecoverable error condition occurs

9 DATA TRANSFER FUNCTIONS 3. Data connection management Default Data Connection Ports: All FTP implementations must support use of the default data connection ports, and only the User-PI may initiate the use of non-default ports. Negotiating Non-Default Data Ports: The User-PI may specify a non-default user side data port with the PORT command. The User-PI may request the server side to identify a non-default server side data port with the PASV command. Since a connection is defined by the pair of addresses, either of these actions is enough to get a different data connection, still it is permitted to do both commands to use new ports on both ends of the data connection.

10 DATA TRANSFER FUNCTIONS 4. Transmission modes Stream mode: The data is transmitted as a stream of bytes. There is no restriction on the representation type used; record structures are allowed. If the structure is a file structure, the EOF is indicated by the sending host closing the data connection and all bytes are data bytes.

11 DATA TRANSFER FUNCTIONS 4. Transmission modes Block mode: The file is transmitted as a series of data blocks preceded by one or more header bytes. The header bytes contain a count field, and descriptor code. The count field indicates the total length of the data block in bytes, thus marking the beginning of the next data block (there are no filler bits). The descriptor codes are indicated by bit flags in the descriptor byte. Four codes have been assigned, where each code number is the decimal value of the corresponding bit in the byte (Code: 128, 64, 32, 16)

12 DATA TRANSFER FUNCTIONS 4. Transmission modes Compressed mode:

13 FILE TRANSFER FUNCTIONS 1. FTP commands 2. FTP replies

14 FILE TRANSFER FUNCTIONS 1. FTP commands ABORABOR - abor t a file transfer CWDCWD - c hange w orking d irectory DELEDELE - dele te a remote file LISTLIST - list remote files MDTMMDTM - return the m o d ification t i m e of a file MKDMKD - m a k e a remote d irectory NLSTNLST - n ame l i st of remote directory PASSPASS - send pass word PASVPASV - enter pas si v e mode PORTPORT - open a data port PWDPWD - p rint w orking d irectory QUITQUIT - terminate the connection RETRRETR - retr ieve a remote file RMDRMD - r e m ove a remote d irectory RNFRRNFR - r e n ame fr om RNTORNTO - r e n ame to

15 FILE TRANSFER FUNCTIONS 1. FTP commands SITESITE - site -specific commands SIZESIZE - return the size of a file STORSTOR - stor e a file on the remote host TYPETYPE - set transfer type USERUSER - send user name ACCTACCT* - send acc oun t information APPEAPPE - appe nd to a remote file CDUPCDUP - CWD to the parent of the current directory HELPHELP - return help on using the server MODEMODE - set transfer mode NOOPNOOP - do nothing REINREIN* - rein itialize the connection STATSTAT - return server stat us STOUSTOU - sto re a file u niquely STRUSTRU - set file transfer stru cture SYSTSYST - return syst em type

16

17 STATE DIAGRAMS Diagram models commands: Note: Success (S), failure (F), error (E), begin (B) and wait (W)


Download ppt "OVER VIEW RFC 959 FILE TRANSFER PROTOCOL (FTP). C ONTENTS  The Ftp Model  Data transfer functions  File transfer functions  Declarative specifications."

Similar presentations


Ads by Google