Complete Computer Knowledge Portal

Tuesday, March 26, 2013

File Transfer Protocol(FTP)

File Transfer Protocol(FTP) is Networking Protocol that is used to transfer files from one host to another host based on TCP/IP Network.It Completely works on client server model and make use of separate data and control lines between server and client.User Requires username and password to connect or it may connect anonymously if  server is configured to do so.FTP is not able to encrypt its traffic; all transmissions are in clear text, and usernames, passwords, commands and data can be easily read by anyone able to perform packet capture.
This Protocol is totally transaction oriented.A transaction is defined to be an entity of information communicated between cooperating processes.Transaction has three fields:
1)72 bit Descriptor Field
2)Variable Length Data Field(Including Zero)
3)Variable length Filler Field
Hence,Transaction Length=(72 + data + filler) bits.

<Code> :This field has three 8 bit bytes. The first byte is interpreted as transaction type, the second byte as data type and the third byte as extension of data type.
<Filler Count>:
It is a binary count of bits used as “filler” at the end of a transaction. As the length of the filler count field is 8-bits, the number of bits of filler shall not exceed 255 bits.
<NUL> :
The NUL bytes are inserted primarily as fillers in the descriptor field and allow the count information to appear at convenient word boundaries for different word length machines.
<data Count>:
It is a binary count of the number of data (i.e., information) bits in the data field, not including filler bits. The number of data bits is limited to (2^24-1), as there are 24 bits in the data count field.
Transaction TypesIt may of the following Four Basic Types:
1)Request
2)Response
3)Transfer
4)Terminate

Requests: Requests are always sent by using host. In absence of a device name or complete path name, default options should be provided for all types of requests.Following are some request commands.
i)_Identify_
ii)_Retrieve_
iii)_Store_
iv)_Append_
v)_Rename_
vi)_Delete_
vii)_Lookup_ etc.

Response: Responses are always sent by serving host. The rr response indicates that serving host is ready to receive the file indicated in the preceding request. The rs response indicates that the next transaction from serving host will be the transfer of file indicated in the preceding request.
Transfer: Transfers may be sent by either host. Transfer transactions indicate the transfer of file indicated by a request. Files can be transferred either as complete_file transactions or as part_of_file transactions followed by last_part transactions. The file may also have a heading transaction in the beginning.
Terminate:The successful terminate is always sent by serving host. It indicates to using host that serving host has been successful in serving the request and has gone to an initial state. Using host will then inform user that his request is successfully served, and go to an initial state.
The unsuccessful terminate may be sent by either host. It indicates that sender of the terminate is unable to (or does not not wish to) go through with the request. Both hosts will then go to their initial states. The using host will inform the user that his request was aborted. If any reasons for the unsuccessful terminate (either as text or as error return status codes) are received, these shall be communicated to the user.

No comments:

Post a Comment