Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Background, Protocol
Kozierok, Chapter 72
Michael S. Borella
Copyright (C) 1995-2006
All rights reserved
Background
Access mode
emulates a UNIX
command line
Single-threaded:
one operation at a
time
Left window
displays local
directory tree and
files
Right window
displays remote
directory tree and
files
Bottom windows
displays files being
transferred
1971:
– Initial specification in RFC 141
1985:
– Harmonization of implementations into an international
standard in RFC 959
1994:
– Firewall and NAT friendly FTP defined in RFC 1579
Commands:
– USER: Allows client to enter username
– PASS: Allows client to enter password
– LIST: list files and directories
– PASV: Asks the server to operate in passive mode
– PORT: IP address and port number on which the client will use to
receive the next file
– RETR: Get a file from the server
– STOR: Send a file to the server
– CWD: Change working directory
– TYPE: File type – usually ASCII or binary
– QUIT: Log off of the server
Response codes:
– 1yz: Positive preliminary reply – the server has started processing
the command and will issue another response code soon
– 2yz: Positive completion reply – the server has successfully
executed the command
– 3yz: Positive intermediate reply – the command has been sent but
another command is expected before the server can continue
– 4yz: Transient negative reply – the command has failed but might
succeed if it is issued again later
– 5yz: Permanent negative reply – the command has failed
on
FTP control session established
Format of the response IP and Command to initiate data session: LIST, RETR, etc.
port from the server is the same
as the PORT command ACK
PASV
The client will issue the PASV
command each time a data Remember that
64,12,168,19,209,52
an ephemeral source
– If the user manually requests port (e.g., 2760)
passive mode, the PASV FTP data session
command will be sent without an IP 192.1.0.101 port 2760 -> IP 64.12.168.19 port 53556
Server
1076993353.925931 | IP 64.12.168.19->192.168.1.101 (len:48,id:20820,frag:0) | TCP 21->1780
(PA,829024536,3716486712,65320) FTP control 220-28
indicates
readiness 1076993354.045123 | IP 192.168.1.101->64.12.168.19 (len:40,id:21581,DF,frag:0) | TCP 1780->21
(A,3716486712,829024544,17032)
User quits
1076993383.268784 | IP 192.168.1.101->64.12.168.19 (len:46,id:21614,DF,frag:0) | TCP 1780->21
FTP (PA,3716486864,829025024,16552) FTP control QUIT
program,
server
indicates 1076993383.305500 | IP 64.12.168.19->192.168.1.101 (len:54,id:20843,frag:0) | TCP 21->1780
success (PA,829025024,3716486870,65320) FTP control 221 Goodbye.
Filezilla, http://filezilla.sourceforge.net/.