1 / 17

over view rfc 959

over view rfc 959. FILE TRANSFER PROTOCOL (FTP). Contents. The Ftp Model Data transfer functions File transfer functions Declarative specifications State diagrams Typical Ftp scenario. the ftp model. the ftp model. data transfer functions. Data representation and storage

amena
Télécharger la présentation

over view rfc 959

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. overviewrfc 959 FILE TRANSFER PROTOCOL (FTP)

  2. Contents • The Ftp Model • Data transfer functions • File transfer functions • Declarative specifications • State diagrams • Typical Ftp scenario

  3. the ftp model

  4. the ftp model

  5. data transfer functions • Data representation and storage • Establishing data connections • Data connection management • Transmission modes • Error recovery and restart

  6. data transfer functions • 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 • 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 • 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 • 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 • 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 • 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 • Transmission modes • Compressed mode:

  13. file transfer functions • FTP commands • FTP replies

  14. file transfer functions • FTP commands • ABOR - abort a file transfer • CWD - change working directory • DELE - delete a remote file • LIST - list remote files • MDTM - return the modification time of a file • MKD - make a remote directory • NLST - name list of remote directory • PASS - send password • PASV - enter passive mode • PORT - open a data port • PWD - print working directory • QUIT - terminate the connection • RETR - retrieve a remote file • RMD - remove a remote directory • RNFR - rename from • RNTO - rename to

  15. file transfer functions • FTP commands • SITE - site-specific commands • SIZE - return the size of a file • STOR - store a file on the remote host • TYPE - set transfer type • USER - send username • ACCT* - send account information • APPE - append to a remote file • CDUP - CWD to the parent of the current directory • HELP - return help on using the server • MODE - set transfer mode • NOOP - do nothing • REIN* - reinitialize the connection • STAT - return server status • STOU - store a file uniquely • STRU - set file transfer structure • SYST - return system type

  16. state diagrams • Diagram models commands: Note: Success (S), failure (F), error (E), begin (B) and wait (W)

More Related