List The Features and The Corresponding Methods That Need To Be Implemented

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Group ID : 7

What is FTP?

File Transfer Protocol is used to exchange files from one host to another connected over the internet.

With the help of FTP Server we will Upload or Download files.

FTP is client-server based Protocol.

1. List the features and the corresponding methods that need to be implemented.

Features of FTP:

1. Data representation

FTP can transfer one of the following file types;

i) ASCII File
ii) EBCDIC file
iii) Image File

2. Data structures

i) File Structure(default)
ii) Record Structure
iii) Page Structure

3. Transmission modes

FTP can transfer a file by using one of the following three modes:

i) Stream mode
ii) Block mode
iii)Compressed mode

4. Error control

Since TCP is used for data transfer no additional error recovery mechanism is required.
Group ID : 7

5. Access control

File access protection is done using login procedure with login name and password.

FTP Methods

1. Transfer Files :

GET -> Get file from Remote to Local Host(server to client)

PUT -> Send file from Local to Remote Host(client to server)

SEND -> Send Single File

2. Connect to Remote Host:

Open -> It is used to open address

User -> This Command send the user Identification to the server.

Pass -> It is used to send the user password to the server.

Site -> It is used to pass remote host information to site parameter.

3. Terminate Session :

QUIT -> Disconnect from remote host and terminate FTP session.

CLOSE -> Disconnect FTP, but does not terminate user.

FTP.ChangeCurrentDirectory( directoryName ) - Changes the current directory name on


the FTP server.

FTP.Connect( ) - Connects to the FTP server.

FTP.CreateDirectory( directoryName ) - Creates a directory on the FTP server.


Group ID : 7

FTP.DeleteFile( fileName ) - Deletes a file from the FTP server.

FTP.Disconnect( ) - Disconnects from the FTP server.

FTP.GetErrorCode( ) - Returns a code representing the most recent error.

FTP.PutData( remoteFileName,localData [,transferType,ailIfRemoteFileExists] )


– Store data to the FTP server from a local machine.

FTP.RetrieveData( remoteFileName [, transferType] )- Retrieves data from the FTP


server 

2. Work out the message structures (request and response) format with justifications where
necessary. Include error handling as well.

FTP operation

Two TCP connections are used for file transfer.

On one connection control signals (commands and responses) are exchanged and the other connection
is used for actual data transfer. These two connections are called control connection and data
connection respectively.
Group ID : 7

Control Connection

The Control connection has following features:

1. For sending control information like user identification, password, command to change the Remote
directory, commands to Retrieve and store files etc.

2. It Uses TCP port No. 21.

3. This control connection active throughout FTP session.

Data Connection

The Data connection has following features:

1. For Sending the Actual file, FTP makes use of data connection.

2. It Uses TCP Port No. 20.

3. The data connection is opened and then closed for each file transferred. It opens each time
commands that involve transferring files are used, and it closes when the file is transferred.

Message Structures

PUT(Upload) – Request

Client-IPAddr : Describe IP address of client.

MyFTP-User : Describe user name which is mentioned in MyFTP.

MyFTP-type : Describe MyFTP type.

Transfer-path : Describe path of file to be transferred.

File-name : Describe file name with sent by MyFTP client.

File-size : Describe File Size which is sent by client.

Time and Date : Describe the Time and Date on which file is sent by client.
Group ID : 7

PUT(Upload) – Response

Message : After Successful transmission of file it describe the Message. Also in message any special character can
not be used .

Success : It will return only true or false.

Status Code : Describe the status code of transmission of file.


For Example : 220 – Service ready for new user.
213 – File Status
214 – Help message.
331 – User name okay, need password.
332 – Need account for login.

GET(Download) – Request

Client-IPAddr : Describe IP address of client.

MyFTP-User : Describe user name which is mentioned in MyFTP.

MyFTP-type : Describe MyFTP type.

Download-path : Describe path of file to be download.

Request-ID : Describe Request ID of FTP

GET(Download) – Response

Message : After Successful transmission of file it describe the Message. Also in message any special character can
not be used .

Success : It will return only true or false.

Status Code : Describe the status code of transmission of file.


For Example : 220 – Service ready for new user.
213 – File Status
214 – Help message.
331 – User name okay, need password.
332 – Need account for login.

File-name : Describe file name which is received.

File-size : Describe File Size which is received to client.

File-type : Describe the type of file to be received.


Group ID : 7

3. Discuss any feature of the implementation that may help improve the performance of the
application.

Need a high speed internet connection.

Changing the file system used to format your drive from FAT32 to NTFS.

The speed has little to do with the network protocol used. It is mainly dependent on how efficient it is
implemented and the available bandwidth, network reliability and latency. (Data compression can
dramatically increase the transfer speed, if the data can be compressed).

When transferring large files over a low-latency Internet connection, FTP can easily use all your available
network bandwidth with a single connection. If your network has high latency, you can use  multiple FTP
connections.

Using UDP is unlikely to increase the speed except in a few special circumstances. Remember the speed
is ultimately limited by your available network bandwidth. Almost any file transferring protocols can
fully utilize your available network bandwidth. In the FTP case, if one connection cannot fully utilize the
bandwidth, you just need to use multiple FTP connections.

For improve performance use TCP because TCP is reliable protocol and the receiver always sends either
positive or negative acknowledgement about the data packet to sender, so that the sender always has
bright clue about whether the data packet is reached the destination or it needs to resend it.

TCP also provides error-checking and recovery mechanism.

You might also like