120 likes | 314 Views
FTP – File Transfer Protocol. 5 דברים שלא ידעתם על FTP. FTP is commonly run on two ports , 20 and 21. FTP run exclusively over TCP . FTP is separated into control and data Control – commands Data – file tranfers The control follows the same protocol as Telnet.
E N D
5 דברים שלא ידעתם על FTP • FTP is commonly run on two ports, 20 and 21. • FTP run exclusively over TCP. • FTPis separated into control and data • Control – commands • Data – file tranfers • The control follows the same protocol as Telnet
5 דברים שלא ידעתם על FTP • FTP has 3 transmission modes: • Stream mode - The data is transmitted as a stream of bytes. EOF or EOR will be indicated by a two-byte control word the first byte all 1’s the second byte 1 for EOR 2 for EOF 3 for both. • Block mode – The data is transmitted as a series of data blocks each preceded by a header
+----------------+----------------+----------------+ | Descriptor | Byte Count | 8 bits | 16 bits | +----------------+----------------+----------------+ • The header has 3 bytes: • First byte called Descriptor Code : • 128 End of data block is EOR • 64 End of data block is EOF • 32 Suspected errors in data block • 16 Data block is a restart marker • Last two bytes are the block byte count
Compressed mode • Compressed mode has 3 type of data being sent • regular • Compressed • Filler bytes (space)
Compressed Mode • Compressed mode has 3 type of data being sent • Escape sequence
Commands • Various commands for your enjoyment • User • Pass • Acct – account • Cwd – change working directory • Cdup • Smnt – mount different directory
Commands • Various commands for your enjoyment • Rein – restarts connection • Quit – logs out
Commands • TRANSFER PARAMETER COMMANDS • Port • Pasv – requests the server to listen • Type – ascii /image… • Stru – File structure (fie/record/page) • Mode – transfer mode (stream/compressed/block)
Commands • FTP SERVICE COMMANDS • Retr – retrieves the file • Stor – tells the server to upload the file and save it • Stou – same only different name • Appe – append the data to the file • Allo – asks the server to allocate space for the file to be uploaded • And so on…