The File Transfer Protocol (FTP) contains a set of rules for
transferring any type of file over the Internet between FTP servers and FTP clients.
Figure 1. How FTP Works
Figure 1 illustrates how FTP works between the server and client.
Both computers must be running TCP/IP over a network. The user makes FTP requests
through a user interface (UI) which could be any FTP client software. The UI talks
to the User Protocol Interpreter (UPI) that talks to the Server Protocol Interpreter
(SPI) through a default channel or port 21. PI initiates control and passes FTP
commands through the connection. As you can see by the diagram, the PIs not only
talk to each other but also with the data transfer process (DTP) of each respective
side. The DTP, in turn, is like a data pump. It receives a transfer request from
PI and either sends or receives the data and passes it to the file system or storage
device (hard drive). Port 20 is usually used to transfer data.
FTP Server
An FTP server is the most common type of information server
and the most widely used method of Internet data storage and transport. FTP servers
that hold large amounts of documents and files are considered archives. While
most people access the Internet via Web browser, any file the user tries to download
from the Web more than likely involves accessing an FTP server to get the desired
file. A file sent from an FTP client to an FTP server is "uploaded"
while a client "downloads" a file from an FTP server. To make an FTP
server, you need a computer with FTP server software, TCP/IP connectivity and
an Internet connection.
Server Access
An FTP server can be accessed one of two ways: authenticated
or anonymous users.
User FTP requires people to have an account on the server. They
must enter a user ID and password to access the files. While logged in, all the
files and information in the FTP directory structure are available to users, but
they do not have the ability to execute arbitrary commands. This means that even
though the user can access the files, they do not control the server remotely.
A potential security problem with user FTP is that the password is sent as clear
text. This means that people with programs called "sniffers" can detect
and capture the user's ID and password.
Anonymous FTP allows anyone on the Internet to access the server
and download files. This type of server is desired when the host is not worried
about security or wants users to have free access to the files available. Usually
a user ID or password is not required, but if it is the site provides the information
for users.
Transfer Speed Issues
You will notice that some FTP sites are faster or slower than
others and that at times the transfer will have variable transfer rates. There
are several reasons for these variations, mainly external to the server. For the
most part, transfer rates are affected by:
The amount of bandwidth available between the server and the client site. A
transfer can only be as fast as the available bandwidth.
The number of users logged on to the server and transferring files. The more
users logged on and accessing files, the less bandwidth available for your transfer.
The amount of traffic on the Internet at the time of transfer. Even if you
are the only one accessing a site, if the Internet is busy or slow, your transfer
will also be slowed down.
How the data is routed across the Internet. Since packets are routed individually,
they may not be sent across the same route. Remember, packets are routed through
the fastest way the router can find at the time it receives the packet. This means
that one packet could be routed to you in two hops while the next one may be routed
three hops.
Supported Platforms
While FTP started out on a UNIX platform, it has been adapted
to run on other operating systems. Today, most FTP servers are run on UNIX, Novell
or Microsoft NT servers. While these operating systems include their own FTP servers,
various independent FTP server packages are also available.
Basic FTP Commands
The following are basic terms used in command line FTP. Most
people won't need to worry about using these commands thanks to the built in FTP
in Netscape Navigator and Microsoft Internet Explorer. In general, the commands
are the same as used in UNIX or DOS directory navigation.