What is FTP and how does it work?
Many of us have used FTP before and have a basic understanding that it is a system used to send files over the internet, but beyond that simple explanation, just what exactly is it and how does it work?
An explanation of FTP
FTP stands for file transfer protocol. It is essentially a standardised network protocol designed to allow two computers to send files to each other. Due to its stable and robust nature it is particularly well suited to sending large files. One of the most common uses for FTP is managing the files on a website.
The idea behind network protocols is that computers need a formalised, consistent and orderly system for initiating and managing contact with each other. They are basically the rules upon which computer to computer communication is built. FTP falls within the TCP/IP protocol suite which is the basis for most internet traffic.
For an FTP connection to be established two computers sharing some kind of network connection are required. One computer must be running an FTP server while the other must be running an FTP client.
Contact is established by the FTP client which connects to the server and requests access, usually supplying some kind of login details e.g. a username and password. To find the server the client generally needs an FTP address which is similar to a website's URL.
When the login has been verified an FTP session has begun, this connection stays open until either the client or server closes it, or until it times out.
Once the session is open the FTP client can be used to send a variety of commands to the server. Normally these commands involve listing files/folders, moving files/folders, deleting files/folders or uploading or downloading files/folder.
FTP is an unusual protocol in that it uses two ports instead of one. The first port is used to facilitate administration by carrying only commands and responses; this port effectively deals with the actual protocol. The second port is reserved for actually transferring the files. It's this characteristic which gives FTP its stability, by separating the protocol commands from the file transfers each post is dealing with a clearer simpler stream of data.
FTP was first created in 1971, even before TCP/IP, and the revised version from 1985 is still in use today. There are other protocols for transferring files such as SSH file transfer protocol (a more secure protocol), HTTP (the protocol the World Wide Web was built on) and bittorrent (used for peer to peer file sharing). However, when it comes to transferring large files FTP is considered to be the standard.