Chat with us, powered by LiveChat
File Transfer Protocol | FTP | Part 1

File Transfer Protocol | FTP | Part 1

File Transfer Protocol (FTP)

FTP stands for File Transfer Protocol and is a very quick and versatile way to transfer files (also known as files), one of the most used on the Internet. It can refer both to the Protocol relating to the program that implements this protocol (FTP Server, in this case, typically appears in small letters, influenced by the transfer program files from Unix).

The transfer of data in computer networks usually involves file transfer and access to remote file systems (with the same interface used for local files). FTP (RFC 959) is based on TCP, but is prior to the TCP / IP, and later adapted for TCP / IP. It is the standard TCP / IP to transfer files, it is a generic protocol-independent hardware and operating system and download files for free agency, taking into account access restrictions and the same properties.

Protocol Overview

The protocol is specified in RFC 959, and is summarized next.

A client makes a TCP connection to server port 21. This connection, called a control connection remains open throughout the session while a second connection, called the data connection is established on port 20 on some server and client port (set in the dialogue between the two) as required for file transfer. The control connection is used for session management (controls, identification, passwords) [2] between client and server using a protocol similar to Telnet. For example, “RETR filename” would transfer the specified file from a server to a client. Due to this structure, two doors, FTP is considered out-of-band, unlike in-band protocols such as HTTP.

The server responds at port control with three-digit status code with an ASCII text message option. For example, “200” or “200 OK” means that the last command was successful. The numbers represent the code number and the text is optional or required parameters explanations. A file transfer in progress on a data connection can be aborted using a STOP message sent over the control connection. FTP can be run in active or passive, which which determine how the data connection is established. In active mode, the client sends the server’s IP address and port number on which it will hear and then the server initiates the TCP connection.

In situations where the client is behind a firewall and unable to accept entries for TCP connections, the passive mode can be used. The client sends a PASV command to the server and receives an IP address and port number as an answer, which the client uses them to open the data connection to the server. Both forms were updated in September 1998 to add support for IPv6 and made some changes in passive mode, making it the extended passive mode.

During data transfer over the network, four representations of data can be used:

  • ASCII mode: used for text. Data is converted, if necessary, the representation of characters for the sender host 8-bit ASCII before transmission, and (again, if necessary) for the representation of characters from the host recipient. As a result, this method is inappropriate for files containing numeric data in binary, floating point or binary coded decimal form.
  • Image mode (usually called the Binary mode): the sending machine sends each file byte by byte and as such, the receiver stores the byte stream as it receives them. (The image mode support has been recommended for all implementations of FTP).
  • EBCDIC mode: used for plain text between hosts using the EBCDIC character set.
  • Local mode: allows two computers with identical configurations to submit data in a proprietary format without needing to convert them to ASCII.

For text files, control of different format options and record structure are provided. These features are designed to form containing the formatting Telnet or ASA.

Data transfers can be made in any of three modes:

  • Flow mode: data is sent as a stream, releasing FTP processing to do something. Instead, all processing is left for the TCP. No indicator is required to file, unless the data is divided into registers.
  • Shutdown mode: FTP breaks the data into several blocks (block header, byte count and data field) and then passes it to TCP.
  • Depressed Mood: data is compressed using a simple algorithm.

As for the file transfer:

File transfer is between a computer called “client” (one who calls the connection for data transfer) and a server (the one that receives the transfer request). The user, through a specific software, you can select which files to send or receive from the server. For there is a connection to the server if the server requires the user enters a user name (or username) and password (password) as well as the correct name of the server or its IP address. If the data were reported correctly, the connection can be established using two communication channels, called ports (ports). Such gates are links where you can exchange data. In the case of FTP communication, we use two doors. A control (port 21) and one for file transfer (port 20).



Leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.