Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
File Transfer Protocol
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Communication and data transfer=== [[File:Passive FTP Verbindung.svg|thumb|Illustration of starting a passive connection using port 21]] FTP may run in ''active'' or ''passive'' mode, which determines how the data connection is established.<ref name="slack">{{cite web |title=Active FTP vs. Passive FTP, a Definitive Explanation |url=http://slacksite.com/other/ftp.html |publisher=Slacksite.com}}</ref> (This sense of "mode" is different from that of the MODE command in the FTP protocol.) * In active mode, the client starts listening for incoming data connections from the server on port M. It sends the FTP command PORT M to inform the server on which port it is listening. The server then initiates a data channel to the client from its port 20, the FTP server data port. * In situations where the client is behind a [[Firewall (computing)|firewall]] and unable to accept incoming TCP connections, ''passive mode'' may be used. In this mode, the client uses the control connection to send a PASV command to the server and then receives a server IP address and server port number from the server,<ref name="slack"/> which the client then uses to open a data connection from an arbitrary client port to the server IP address and server port number received.<ref name="postel">{{IETF RFC|959}} (Standard) File Transfer Protocol (FTP). Postel, J. & Reynolds, J. (October 1985).</ref> Both modes were updated in September 1998 to support [[IPv6]]. Further changes were introduced to the passive mode at that time, updating it to ''extended passive mode''.<ref>{{IETF RFC|2428}} (Proposed Standard) Extensions for IPv6, NAT, and Extended Passive Mode. Allman, M. & Metz, C. & Ostermann, S. (September 1998).</ref> The server responds over the control connection with [[List of FTP server return codes|three-digit status codes]] in ASCII with an optional text message. For example, "200" (or "200 OK") means that the last command was successful. The numbers represent the code for the response and the optional text represents a human-readable explanation or request (e.g. <Need account for storing file>).<ref name="for" /> An ongoing transfer of file data over the data connection can be aborted using an interrupt message sent over the control connection. FTP needs two ports (one for sending and one for receiving) because it was originally designed to operate on top of [[Network Control Protocol (ARPANET)|Network Control Protocol]] (NCP), which was a [[Simplex communication|simplex protocol]] that utilized two [[List of TCP and UDP port numbers|port addresses]], establishing two connections, for two-way communications. An odd and an even port were reserved for each [[application layer]] application or protocol. The standardization of TCP and UDP reduced the need for the use of two simplex ports for each application down to one duplex port,<ref name="stevens1994v1">{{cite book | last = Stevens | first = W. Richard | title = TCP/IP Illustrated Volume I | location = Reading, Massachusetts, USA | publisher= Addison-Wesley Publishing Company | year = 1994 | isbn = 0-201-63346-9 | volume = 1 }}</ref>{{Rp|15}} but the FTP protocol was never altered to only use one port, and continued using two for backwards compatibility.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)