Está en la página 1de 18

FILE TRANSFER PROTOCOL

ANKIK PATEL
PMM 416 1st sem. MBA (PHARM.)

FILE TRANSFER PROTOCOL


File Transfer Protocol is the standard mechanism provided by TCP (TRANSMISSION CONTROL PROTOCOL) /IP NETWORK like Internet for copying a file from one host to another. FTP is built on a client- server architecture .It uses separate control and data connections between the client & the server FTP uses the services of TCP. It needs two TCP connections.The well-known PORT 21 is used for the control connection & the well-known PORT 20 for the data connection.

A client program enables the user to interact with a server in order to access information and services on the server computer. Files that can be transferred are stored on computers called FTP servers. To access these files, an FTP client program is used. This is an interface that allows the user to locate the file(s) to be transferred and initiate the transfer process.

MODES OF TRANSFER
There are two modes of transfer in FTP: ascii and binary. ASCII is used only for files saved in ASCII format (this includes Postcript files) Binary is used for files that are formatted & saved using a wordprocessing software like . .. WordPerfect (.txt), spreadsheets (.xls), images (.jpg, .gif), and many executable programs (.exe) and videos (.avi). QVT(QUERY/VIEW TRANSFORMATION) Net has automatic transfer mode.

BASIC FTP COMMANDS


FTP - initiate ftp session open <host> - connect to an ftp server binary - specify files to up/download; are more than flat text (up files, images, programs, etc.) get <filename> - download a file from the server put <filename> - upload a file to the server close - close connection to the server quit/exit - end the ftp session user - re-enter login name pwd - display present working directory on server lpwd - display the local present working directory (on connecting machine) cd - change directory dir or ls - directory listing of files/directories on Server lcd - change directory on Local Machine lcd~ - home shortcut mget *.* - multiple file downloads mput *.* - multiple file uploads cdup - to move backwards to the previous directory

TO USE QVTNET FTP


Click on QVTNet Click on FTP on Toolbar Your login name (bird or dizzy) Your password ftp>lcd c:\filename (this is the file you want to download into) ftp> binary ftp>hash (you want it on) just type hash at the prompt if its off ftp>dir c* - (yes, use an asterix) ftp>get <filename> The file is now in your local directory

WAYS TO CONNECT TO OTHER FTP SERVERS


At your ftp> prompt simply type in their address. e.g. : ftp>ftp.cdrom.com In Netscape, type the ftp address in the top box. e.g. : ftp://ftp.cdrom.com Login as anonymous, but be sure to give your complete e-mail address as the password. Once you are at their ftp> prompt type dir. This will bring up their list of files for you to select from. When you have chosen a file, at the ftp> prompt type - cd pub (or whatever) then type dir again. Choose the particular file you want to download. Set transfer mode to binary. Make sure hash is on. ftp> get (filename) This will engage the transfer to your computer.

EXAMPLE 1

1. After the control connection to port 21 is created, the FTP server sends the 220 (service ready) response on the control connection. 2. The client sends the USER command. 3. The server responds with 331 (user name is OK, passwordrequired 4. The client sends the PASS command. 5. The server responds with 230 (user login is OK) 6. The client issues a passive open on an ephemeral port for the data connection & sends the PORT command (over the control connection) to give this port number to the server. 7. The server does not open the connection at this time, but It prepares itself for issuing an active open on the data

connection between port 20 (server side) and the ephemeral port received from the client. It sends response 150 (data connection will open shortly). 8. The client sends the LIST message. 9. Now the server responds with 125 and opens the data connection.
10. The server then sends the list of the files or directories (as a file) on the data connection. When the whole list (file) is sent, the server responds with 226 (closing data connection) over the control connection. 11. The client now has two choices. It can use the QUIT command to request the closing of the control connection or it can send another command to start another activity (and eventually open another data connection). In our example, the client sends a QUIT command.

TO VIEW YOUR FILE


Open Netscape Click on File then Open file in browser Click on Pop-up menu at the bottom to list All files Make sure you are in the C:\ directory & have chosen the Temp file. Find your filename,double click on it and it will appear on your screen !

CREATE DIRECTORY ON YOUR LOCAL MACHINE FROM wsFTP (FTP CLIENT)


Double click on wsFTP icon Make sure the top box contains dizzy address (found in pop-up menu) Enter your name and password (dizzy account) Skip Account box Skip Remote Host box Local PC : type : c:\ftp This will make a directory file named ftp in your c: drive. NOTE: You cannot login as anonymous to dizzy.

SET QVTNET TO USE DIRECTORY


YOU WILL ONLY HAVE TO DO THIS ONCE ! Open QVTNET Click on Setup from the top menu bar Click on FTP In box labeled Default Directory type: C:\FTP Click OK

HOW TO DOWNLOAD ATTACHED FILES IN YOUR E-MAIL (PINE-BIRD ACCOUNT)


Open your e-mail files in your bird account on Pine Open the e-mail file that contains the attachment. Hit V - view attached. The first line (text) is the same as it looks in your e-mail (ignore it) Use the down arrow to choose the next file. (text, image, etc.) Hit V - view It wont display it here..but it will tell you the file type & size. His S - save Hit Return You will see it has saved as: usr/users/atchison/Image.jpeg (for example) Hit E - exit index Hit Q - to quit Pine You will be left at this prompt: bird.library.arizona.edu> At this prompt type ls, to list the directory Verify that your attached filename is there. Write down the filename EXACTLY as it appears in this file. Exit out of bird.

TO LOCATE YOUR DIRECTORY FILE IN FILE MANAGER


Open File Manager Find c:\ftp Double Click to Open the file There are your downloaded files listed in your directory