File Transfer Protocol (FTP) is a protocol that is part of the TCP/IP suite. It is the standard for transferring large amounts of data from server to server and from servers to clients. There is a very good chance that you have downloaded files from FTP sites many times, though it may have seemed you were only downloading from a website. FTP allows you to transfer files over a variety of hosts with different operating systems and file systems. There are so many FTP servers on the Internet, some are private with secure logon names, other ones are public with anonymous logins.
This paper will give a very brief outline of how the FTP Protocol functions and give the basic commands used during an FTP session. Keep in mind that these commands are generally automatic and are executed by either an FTP Client application, or done via your web browser. Though these methods are generally quicker than manually connecting to an FTP, it doesn't mean we should ignore the background behind how the technology works.
The FTP Protocol uses two connections to transfer a file. Each of these connections is quite a bit different, but work in conjunction with each other. The first connection is the Control Connection, which as the name implies controls the connection in regards to initiating the data streams and executing the commands. The second type of connection is the Data Connection, this connection is the actual connection that passes the files back and forth between the client and server.
Control Connection:
The control connection starts in a normal client / server manner. The client does an active open connection to port 21 of the FTP server to establish the control connection. The server is listening on port 21 for any active queries. Please keep in mind that though the primary FTP port is designated as porn 21, many servers, especially private ones are running on non-standard ports. The control connection as I mentioned early is the connection that allows you to pass commands between the client and server. Commands that must be sent are ones like LIST, STOR, and RETR. Once you enter a command on the control connection, you initiate the data connection.
Data Connection:
The data connection is spawned each time a file is moved between the client and server. The Control connection initiates the transfer with the PORT command, this tells the server to open an active connection to the clients passive port. The port command is typically the IP address followed by a 16 bit port number. The PORT command is issued in the following fashion:
PORT 24,82,116,92,4,150
That command should spawn a response of: 200 PORT Command Successful
After the PORT command has been initiated and is successful the next command in the data connection will be issued from the control connection. As I mentioned before this is typically a LIST, RERT or STOR. I will outline the basic FTP commands below for reference.
FTP Commands (Basic):
ABOR - Abort command and any data transfers
LIST - List the directory contents
PASS password - Used during authentication of login
USER username - Used during authentication of login
QUIT - Logoff / Quit session
RETR filename - Retrieve file from server STOR filename - Send a file to the server
SYST - Show System information
TYPE - Set the type of data, for instance ASCII
PORT - n1,n2,n3,n4,n5,n6 ( 1-4 = ip address, 5-6 port data)
HELP - Will give you additional available commands and more information
Reply Codes:
Reply codes are simply confirmations of things happening. One example of a reply code was went we got "200 PORT Command Successful" there are a handful of other reply codes, though generally the main ones are as follows.
125: Data Connection Open Start Transfer
200: Command OK
221: Goodbye / Terminate Connection
252: Write Error
331: Username OK, Enter Password
425: Can't Open Data Connection
500: Syntax Error on Command
501: Syntax Error on Arguments
Client Applications:
There are many different clients for FTP, and really it's up to personal taste in the end. A couple of the major ones are CuteFTP and FlashFXP. Personally I use FlashFXP when I'm in the Windows Environment. Just go to a freeware website or search on the search engines for a FTP Client and try a few out!
Summary of FTP:
The File Transfer Protocol is a wonderful and useful standard that has helped move data around the world safely and reliably for years. Everyone uses it from uploading their website to their web server, backing up their data to an off-site location, sharing their pictures with friends, or disseminating large data files for scientific research!
For even more information on the FTP, check out RFC 959.
Ken Dennis
http://KenDennis-RSS.homeip.net/
|
|
|
|
|
|
|
|
|
|
|


If you have a computer for home use or for... Read More
Perhaps not yet, but the handwriting might be on the... Read More
Tip #1 -- Rebates: A rebate is not always a... Read More
Google, in their march to stay ahead of the pack... Read More
Music lovers have been carrying around radios and other bulky... Read More
Your Bible At Your FingertipsIt is fairly easy to find... Read More
Has This Ever Happened To You? OK.. it's Friday night,... Read More
With renting methods such as online DVD rental and pay-per-view,... Read More
Getting started with video editing is very simple you only... Read More
I have a love-hate relationship with my computer.In fact, often... Read More
Computer related terminology could sometimes be daunting to newcomers. These... Read More
Cameras: still known for taking pictures but assumed as digital... Read More
In this era of Internet, most people are frequent users... Read More
The year is 1981. IBM has just released the Personal... Read More
Step 1:Open WinRAR and browse to the folder with your... Read More
In the years of the dot com boom and bust,... Read More
I do a holiday letter every year and send them... Read More
Below you will find some useful information and comments about... Read More
This is the third in a series of articles highlighting... Read More
CCNAs and CCNA candidates hear it all the time: â??Get... Read More
Here are some tips on how to use screensavers:First of... Read More
Selecting a TV isn't as easy as it used to... Read More
How can you compare mp3 players to be sure you're... Read More
First things first, what is Firefox? Well, it's a browser.... Read More
Feeling overwhelmed in selecting a new TV? With all the... Read More
Computer is an electronic machine work on the instructions of... Read More
I met an entrepreneur who hole heartedly disagree with an... Read More
Maintaining your computer is extremely important ? especially if you... Read More
The following practice, if done regularly, may help you to... Read More
1. Empty the Temp directory regularly. To do this, make... Read More
We have just entered the time of year that most... Read More
Sometimes your PC will start acting strange for no apparent... Read More
Up until the recent past, those who wanted to take... Read More


We all enjoy our favorite screensavers but in the same... Read More
I am going to assume that you are running windows... Read More
I got my eyes set on a iPod mini, as... Read More
Computers are available in different shapes, sizes and weights, due... Read More
How familiar does the following sound? Your computer was working... Read More
Yes, it's true. You may have inadvertently invited a spy... Read More
In the 1950's and 1960's Polaroid's instant cameras were all... Read More
MP3 players are Hot! Playing music has come a long... Read More
There have been some questions on anti-skip protection on mp3... Read More
Many computer users are worried about their computer's performance. After... Read More
Projectors have come a long way in the past few... Read More
When studying for your Cisco CCNA, CCNP, or CCIE exam,... Read More
Up until the recent past, those who wanted to take... Read More
Getting started with video editing is very simple you only... Read More
CCNAs and CCNA candidates hear it all the time: â??Get... Read More
The first step is: Start > My DocumentsSo you have... Read More
Your Bible At Your FingertipsIt is fairly easy to find... Read More
Occupational Therapy Made EasierMedical downloads for the pda have improved... Read More
Having two operating systems is not as difficult as many... Read More
If you're like me, you occasionally find the ubiquitous mouse... Read More
By using your computer today you can find a lot... Read More
I do a holiday letter every year and send them... Read More
How long do you think DVDs have around? 20 years?... Read More
Time is money. And when you constantly have to divide... Read More
Do you know how many fonts are currently installed on... Read More
Google, in their march to stay ahead of the pack... Read More
How can you compare mp3 players to be sure you're... Read More
Computer is an electronic machine work on the instructions of... Read More
iPod users start to get the picture and it's turning... Read More
Are you stymied by the vast offerings in cheap mp3... Read More
1. Before sitting down for coding, you must have formal... Read More
Stop Getting LostOne of the greatest uses for a pocket... Read More
The Internet is an awesome tool, but be careful and... Read More
Personal Technology |