SlideShare a Scribd company logo
File Transfer Protocol CS-328 Dick Steflik
FTP RFC 959 uses two TCP Ports  one for control one for data transfers command-response protocol control port uses telnet protocol to negotiate session US-ASCII <crlf> is end-of-line character
Active Mode FTP Client connect from a random unprivileged port (n > 1023) to the servers command port (21) and sends port command to tell server to connect to n+1 then listens on the next higher unprivileged port (n+1) for server responses. The server connects from it’s data port (20) to the client data port (n+1)  Client Server 20 21 1026 1027 1 2 3 4
Passive Mode FTP Client opens two random unprivileged ports ( n > 1023 and n+1; ex 1026 and 1027) and connects the first port (n) to server command port  21 and issues a pasv command (server sends port to use for data); client connects to servers specified data port, server completes connection.  Client Server 20 21 1026 1027 1 2 2024 3 4
Transfer Files in a Heterogeneous Host Environment Due to multiple hardware types and operating systems file are converted to four environmentally neutral data type for transport and the converted to local types at the destination ASCII A NVT-ASCII EBCDIC E EBCDIC Text IMAGE I Raw binary, series of octets LOCAL L Raw binary using a variable byte size Client responsibility to tell server data type to use Default data type, unless otherwise specified is ASCII
File Structures Operating System store files in different structures FTP defined file structures for transporting files File F Unstructured, sequence of bytes Record R Series of records Page P Series of data blocks (pages) Default file structure is File (F) File Structure specified using  STRU  command
Transmission Modes Mode is used to specify additional coding or sequencing performed on data independent of data type and file structure Stream S stream of bytes, if record structure  EOF sent as record indication; if file  eof indicated by closing stream Block B file sent as sequence of  blocks  preceded by header info allows restart  of an interruped transfer Compressed C data compressed using run length  encoding
FTP Commands USER R User name, userid for access control PASS O  Password for access control ACCT O  Account info CWD O Change working directory CDUP O Change to parent directory SMNT O Structure mount, mount a different file system QUIT R informs server that client wants out REIN O restarts session at authentication phase PORT R Host addr and data port to use
FTP Commands (more) PASV O Passive; informs server that client will contact  to set up data connections, ask server to sent  port info TYPE R Data type,  type of subsequent transfers STRU R File structure MODE R Transfer mode RETR R Retrieve, download the file from server STOR R Store, upload the specified to server STOU O Store unique, same as store but server picks  unique file name
FTP Commands (more) APPE O Append, upload file to server, if file name  exists, append the upload ALLO O Allocate, sometimes used to preallocate space REST O Restart, restart an interrupted transfer RNFR O Rename file from filename RNTO O Rename file to ABOR O Abort, ask server to abort last command DELE O Delete specified file RMD O Remove directory MKD O Make directory
FTP Commands (more) PWD O Print working directory LIST O Request directory listing NLST O Request just a file name list SITE O Site parameters, allow client to specify site  specific options and parameters SYST O request server operating system STAT O Request server to send status of current xfr HELP O general and command specific NOOP R ask server to send a positive reply
FTP Responses Each command generates a server response 3 digit code, text, <crlf> use 3 digit code as driver for GUI Clients or programatic implementations use text for Command line clients
Responses 1yz - Positive preliminary reply - command is being acted  upon;    expect a final reply code before sending another command 2yz - Positive completion reply - command was successfully    executed;  new command may be sent 3yz  - Positive intermediate reply - command was accepted, but the    final result is being delayed because other information needs to    be supplied from the client; reply is used for sequencing    command groups 4yz - Transient negative completion reply - command failed, but the    condition is temporary 5yz -  Permanent negative completion reply - command failed and    will always fail if given again; the command should not be    attempted again
Response x0z - Refers to command syntax x1z - Indicates information returned by  commands    requesting information  such as status or help x2z - Refers to the state of the control or data connections x3z - The reply is associated with the login process and    accounting procedures x4z - Reserved for future use x5z - Refers to the state of the requested file transfer or    other file system command

More Related Content

PPT
patelchodu
PPTX
File transfer protocol (ftp) in application
PDF
Ftp (file transfer protocol)
PPT
Using an FTP client - Client server computing
PDF
TFTP - Trivial File Transfer Protocol
PPTX
An overview of ftp
PDF
FTP - File Transfer Protocol
patelchodu
File transfer protocol (ftp) in application
Ftp (file transfer protocol)
Using an FTP client - Client server computing
TFTP - Trivial File Transfer Protocol
An overview of ftp
FTP - File Transfer Protocol

What's hot (20)

PPTX
File Transfer Protocol
PPTX
Computer network
PPT
PPTX
File Transfer Protocol
PPTX
PPTX
PDF
Ftp server
PPT
Ftp tftp
PPTX
13 coms 525 tcpip - applications - file transfer protocol
PPT
Netkitmig
PPTX
FTP & TFTP
PDF
Lecture 7 -_ftp,_tftp,_telnet_and_ssh
DOCX
File transfer protocol
PPTX
PDF
Lec 8(FTP Protocol)
DOCX
Tftp client server communication
PPTX
FTP Client and Server | Computer Science
PPTX
Ftp server
PPTX
File tranfer protocol
File Transfer Protocol
Computer network
File Transfer Protocol
Ftp server
Ftp tftp
13 coms 525 tcpip - applications - file transfer protocol
Netkitmig
FTP & TFTP
Lecture 7 -_ftp,_tftp,_telnet_and_ssh
File transfer protocol
Lec 8(FTP Protocol)
Tftp client server communication
FTP Client and Server | Computer Science
Ftp server
File tranfer protocol
Ad

Viewers also liked (9)

PPT
Electronic mail
PPTX
FILE TRANSFER PROTOCOL BY LAXMI $ Group
PPT
PPTX
Email - electronic mail
PPTX
50 Essential Content Marketing Hacks (Content Marketing World)
PDF
10 Insightful Quotes On Designing A Better Customer Experience
PPTX
How to Build a Dynamic Social Media Plan
PDF
Learn BEM: CSS Naming Convention
PDF
SEO: Getting Personal
Electronic mail
FILE TRANSFER PROTOCOL BY LAXMI $ Group
Email - electronic mail
50 Essential Content Marketing Hacks (Content Marketing World)
10 Insightful Quotes On Designing A Better Customer Experience
How to Build a Dynamic Social Media Plan
Learn BEM: CSS Naming Convention
SEO: Getting Personal
Ad

Similar to F T P (20)

PPT
ftp.07f.ppt
PPT
Telnet and FTP.ppt
PPT
Ftp
PPTX
Ftp: a slideshow on File transfer protocol
PPSX
File Transfer Protocol
PPT
(Ftp) file transfer protocol
PPT
Ftp.75 to 76
PPTX
BITM3730Week10.pptx
PPTX
File Transfer Protocol (FTP)
PPTX
TCP/ip protocol suite is used for network sharing protocol
PPT
Application layer protocols
PPT
PPTX
DNS & HTTP overview
PPT
file transfer and access utilities
PPTX
Web Dev Research
PPT
Chapter3
PPTX
Unit 5 Email FTP Rks.pps.ppt_20240425_112130_0000.pptx
PPT
Sem 1 Ch 11
PPT
W14-15L28-29 Process to Process Communication.ppt
PPT
Nf Sp4
ftp.07f.ppt
Telnet and FTP.ppt
Ftp
Ftp: a slideshow on File transfer protocol
File Transfer Protocol
(Ftp) file transfer protocol
Ftp.75 to 76
BITM3730Week10.pptx
File Transfer Protocol (FTP)
TCP/ip protocol suite is used for network sharing protocol
Application layer protocols
DNS & HTTP overview
file transfer and access utilities
Web Dev Research
Chapter3
Unit 5 Email FTP Rks.pps.ppt_20240425_112130_0000.pptx
Sem 1 Ch 11
W14-15L28-29 Process to Process Communication.ppt
Nf Sp4

F T P

  • 1. File Transfer Protocol CS-328 Dick Steflik
  • 2. FTP RFC 959 uses two TCP Ports one for control one for data transfers command-response protocol control port uses telnet protocol to negotiate session US-ASCII <crlf> is end-of-line character
  • 3. Active Mode FTP Client connect from a random unprivileged port (n > 1023) to the servers command port (21) and sends port command to tell server to connect to n+1 then listens on the next higher unprivileged port (n+1) for server responses. The server connects from it’s data port (20) to the client data port (n+1) Client Server 20 21 1026 1027 1 2 3 4
  • 4. Passive Mode FTP Client opens two random unprivileged ports ( n > 1023 and n+1; ex 1026 and 1027) and connects the first port (n) to server command port 21 and issues a pasv command (server sends port to use for data); client connects to servers specified data port, server completes connection. Client Server 20 21 1026 1027 1 2 2024 3 4
  • 5. Transfer Files in a Heterogeneous Host Environment Due to multiple hardware types and operating systems file are converted to four environmentally neutral data type for transport and the converted to local types at the destination ASCII A NVT-ASCII EBCDIC E EBCDIC Text IMAGE I Raw binary, series of octets LOCAL L Raw binary using a variable byte size Client responsibility to tell server data type to use Default data type, unless otherwise specified is ASCII
  • 6. File Structures Operating System store files in different structures FTP defined file structures for transporting files File F Unstructured, sequence of bytes Record R Series of records Page P Series of data blocks (pages) Default file structure is File (F) File Structure specified using STRU command
  • 7. Transmission Modes Mode is used to specify additional coding or sequencing performed on data independent of data type and file structure Stream S stream of bytes, if record structure EOF sent as record indication; if file eof indicated by closing stream Block B file sent as sequence of blocks preceded by header info allows restart of an interruped transfer Compressed C data compressed using run length encoding
  • 8. FTP Commands USER R User name, userid for access control PASS O Password for access control ACCT O Account info CWD O Change working directory CDUP O Change to parent directory SMNT O Structure mount, mount a different file system QUIT R informs server that client wants out REIN O restarts session at authentication phase PORT R Host addr and data port to use
  • 9. FTP Commands (more) PASV O Passive; informs server that client will contact to set up data connections, ask server to sent port info TYPE R Data type, type of subsequent transfers STRU R File structure MODE R Transfer mode RETR R Retrieve, download the file from server STOR R Store, upload the specified to server STOU O Store unique, same as store but server picks unique file name
  • 10. FTP Commands (more) APPE O Append, upload file to server, if file name exists, append the upload ALLO O Allocate, sometimes used to preallocate space REST O Restart, restart an interrupted transfer RNFR O Rename file from filename RNTO O Rename file to ABOR O Abort, ask server to abort last command DELE O Delete specified file RMD O Remove directory MKD O Make directory
  • 11. FTP Commands (more) PWD O Print working directory LIST O Request directory listing NLST O Request just a file name list SITE O Site parameters, allow client to specify site specific options and parameters SYST O request server operating system STAT O Request server to send status of current xfr HELP O general and command specific NOOP R ask server to send a positive reply
  • 12. FTP Responses Each command generates a server response 3 digit code, text, <crlf> use 3 digit code as driver for GUI Clients or programatic implementations use text for Command line clients
  • 13. Responses 1yz - Positive preliminary reply - command is being acted upon; expect a final reply code before sending another command 2yz - Positive completion reply - command was successfully executed; new command may be sent 3yz - Positive intermediate reply - command was accepted, but the final result is being delayed because other information needs to be supplied from the client; reply is used for sequencing command groups 4yz - Transient negative completion reply - command failed, but the condition is temporary 5yz - Permanent negative completion reply - command failed and will always fail if given again; the command should not be attempted again
  • 14. Response x0z - Refers to command syntax x1z - Indicates information returned by commands requesting information such as status or help x2z - Refers to the state of the control or data connections x3z - The reply is associated with the login process and accounting procedures x4z - Reserved for future use x5z - Refers to the state of the requested file transfer or other file system command