LIM 223 Module 8: Introduction to FTP LEARNING OBJECTIVES FOR MODULE 1 At the end of this module you should be able to: - Explain the function provided by the FTP protocol - Use a typical FTP application to transfer a file to a remote directory ! Reading from the text book. For this module you should read chapter 7 of Shelly, Cashman, and Kosteba, pages 201-211. ? Discuss three methods to upload a Web site. Which is the most suitable for your situation? INTRODUCTION The file transfer protocol (FTP) is one of the oldest communication protocols the Internet community has been dealing with. It has been designed to allow platform independent data exchange over a network. Regardless, if you are using Windows, Mac or Unix, FTP allows you to transfer your movies, photos and audio files from one computer to another exactly the same way you can copy them from one folder to another. Do you want to share the photographs of your kids with their grandma? Are you about to publish your very first web page on the Internet? Do you need to backup your files or would you like to download software from the Web? FTP is the way to go when dealing with all of the above. Specifically, FTP is a commonly used protocol for exchanging files over any network that supports the TCP/IP protocol (such as the Internet or an intranet). There are two
computers involved in an FTP transfer: a server and a client. The FTP server, running FTP server software, listens on the network for connection requests from other computers. The client computer, running FTP client software, initiates a connection to the server (or more correctly, the person using the client computer starts the connection by using the FTP software on the client computer). Once connected to the server, the client can do a number of file manipulation operations such as uploading files to the server, download files from the server, rename or delete files on the server and so on. Any software company or individual programmer is able to create FTP server or client software because the protocol is an open standard. Almost every computer platform supports the FTP protocol. This allows any computer connected to a TCP/IP based network to manipulate files on another computer on that network regardless of which operating systems are involved (if the computers permit FTP access). There are many existing FTP client and server programs, and many of these are free. What is an FTP Site? An FTP site is like a large filing cabinet. With a traditional filing cabinet, the person who does the filing has the option to label and organize the files how ever they see fit. They also decide which files to keep locked and which remain public. It is the same with an FTP site. The virtual 'key' to get into an FTP site is the UserID and Password. If the creator of the FTP site is willing to give everyone access to the files, the UserID is 'anonymous' and the Password is your e-mail address (e.g. [email protected]). If the FTP site is not public, there will be a unique UserID and Password for each person who is granted access. When connecting to an FTP site that allows anonymous logins, you're frequently not prompted for a name and password. Hence, when downloading from the Internet, you most likely are using an anonymous FTP login and you don't even know it. What this means is that if you are working for an organisation that has asked you to create a Web site, you must have a directory on a remote server that is directly connected to the Internet. It could be a university that is a node on the Internet, or it could be an ISP – it does not specifically matter. You will need to know 1. The very specific address of the directory that you will connect with and that will store all your HTML files; 2. The user id and the password that will allow you to connect to that remote director To make an FTP connection you can use a standard Web browser (Internet Explorer, Netscape, etc.) or a dedicated FTP software program, referred to as an FTP 'Client'. When using a Web browser for an FTP connection, FTP uploads are difficult, or sometimes impossible, and downloads are not protected (not recommended for uploading or downloading large files unless supported by your organisation). When connecting with an FTP Client, uploads and downloads should be simple, and you have added security and additional features. For one, you're able to resume a download that did not successfully finish, which is a very nice feature for people using dial-up
connections who frequently loose their Internet connection. What is an FTP Client? An FTP Client is software that is designed to transfer files back-and-forth between two computers over the Internet. It needs to be installed on your computer and can only be used with a live connection to the Internet. The classic FTP Client look is a two-pane design. The pane on the left displays the files on your computer and the pane on the right displays the files on the remote computer. File transfers are as easy as dragging-and-dropping files from one pane to the other or by highlighting a file and clicking one of the direction arrows located between the panes. Additional features of the FTP client include: multiple file transfer; the auto re-get or resuming feature; a queuing utility; the scheduling feature; an FTP find utility; a synchronize utility; and for the advanced user, a scripting utility. To use an FTP Client, first you need to download and install an FTP Client. Usually you will download an .exe file from a remote site. By clicking on the .exe file it should unpack and install automatically, just like other software you add you a computer (but note that most organisations will not allow you to install software on their network). A well-known FTP program is WS_FTP, which can be downloaded from ipswitch: http://www.ipswitch.com/. After installation, if you click the ‘connect’ button, you will see this screen. In WS-FTP you need to set up the application with your data. Much the same will be necessary with any FTP software.
Profile Name: Type in a name you can remember later. I usually use my name and the name of the web server I want to connect to. In this case, I would be connecting to my ISP, which is named Lcc. Host Name/Address: This is a very important field. Normally your web host will tell you the address you need to use to connect to their server using ftp. Most often the address is ftp.servername.com or ftp.servername.net. If you are unsure, contact your web host to get the proper ftp address. Host Type: This can almost always be left on Auto Detect. This will let the program figure it out on the fly, and configure itself accordingly. If this does not work, you will need to find out from your web host what Host Type they are using. User ID: This is going to be your user name you were given from the web host to use on their system. In most cases, it is the same user name you use to log into their other services. Password: This is the password you were given from the web host to log into their services. You should have received this with your user name. The box will only show the star symbols and not your password itself when you type it in. Account: This is almost always left blank. I have never had to use it. If you do need it, you will need to contact your host for the information. Comment: You can add your own comments and decriptions here if you wish. It is not a required field. Anonymous You will only need to check this box if you are connecting to a host that allows anonymous ftp. In most cases, you will leave this box unchecked. It is usually used if you connect to a site that allows you access to download files only. Save Pwd Check this box if you want the program to save your password, so you do not need to retype it each time you connect. If you feel safer, uncheck the box so anyone using the program would have to type the correct password to connect to the server. If you are not yet connected to the Internet, do so now. You should now see a screen like this one.
In the right pane you might already be connected to the remote directory you wish to use, or perhaps you need to find it and click on it. If the right hand pane is as you want it, then look in the left hand pane. Find the file you want to transfer. It may need some navigation through directories to find it – but this is your data, so you should know where to look! All you should have to do is click on the file you wish to send then click on the arrow pointing to the right in the centre of the screen, and the file should now transfer. You should be able to download files from remote directories by clicking on a file on the right hand pane then clicking the left facing arrow in the centre of the screen. Some technical notes FTP runs exclusively over TCP. The FTP server always listens on port 21 for incoming connections from FTP clients. A connection to this port from the FTP Client forms the control stream on which commands are passed to the FTP server from the FTP client and on occasion from the FTP server to the FTP client. For the actual file transfer to take place, a different connection is required which is called the data stream. Depending on the transfer mode, the process of setting up the data stream is different. In active mode, the FTP client opens a random port (> 1023), sends the FTP server the random port number on which it is listening over the control stream and waits for a
connection from the FTP server. When the FTP server initiates the data connection to the FTP client it binds the source port to port 20 on the FTP server. In passive mode, the FTP Server opens a random port (> 1023), sends the FTP client the port on which it is listening over the control stream and waits for a connection from the FTP client. In this case the FTP client binds the source port of the connection to a random port greater than 1023. While data is being transferred via the data stream, the control stream sits idle. This can cause problems with large data transfers through firewalls which time out sessions after lengthy periods of idleness. While the file may well be successfully transferred, the control session can be disconnected by the firewall, causing an error to be generated. When FTP is used in a UNIX environment, there is an often-ignored but valuable command, \"reget\" (meaning \"get again\") that will cause an interrupted \"get\" command to be continued, hopefully to completion, after a communications interruption. The principle is obvious - the receiving station has a record of what it got, so it can spool through the file at the sending station and re-start at the right place for a seamless splice. The converse would be \"reput\" but is not available. Again, the principle is obvious: The sending station does not know how much of the file was actually received, so it would not know where to start.
WORKSHOP DISCUSSION QUESTIONS Throughout this week's lessons you will be asked a number of questions. We hope you have thought about these, discussed them with classmates and teachers. Now we present a number of review questions based on the notes and on the materials you have been reading. These will help you review this week's work, and may be discussed in class or may appear in a test. 1. Discuss three methods to upload a Web site. Which is the most suitable for your situation? Practical exercises 1. [This is an exercise I have used successfully. To make it work the students need to be given an RTF file, perhaps with an image in it, and a large TIFF file. They must convert the files, then send them to a remote directory by FTP.] This exercise is worth * marks out of ** in . It is due in on ****. Attached to this assignment you should find two files to download. One will be a text document in RTF, the other will be an image file in TIFF. Your task is to convert the files into new formats, compress them into ZIP format and post the resulting zipped file to your FTP directory. So the stages are: 1. Convert the RTF file into PDF. 2. Convert the TIFF file into JPEG 3. Compress both the new files into a single ZIP file Then send the zipped file to your FTP directory using the instuctions you have been given. REFERENCES www.eventhelix.com/RealtimeMantra/Networking/FTP.pdf
Search
Read the Text Version
- 1 - 7
Pages: