File Transfer Protocol (FTP) is used between a server and a client to transmit files. It improves file sharing, and provides an efficient and reliable data transmission mode between the user and remote computer. The FTP protocol usually uses TCP port 20 and 21 for transmission. Port 20 transmits data in active mode, and port 21 transmits control messages.
Similar to most Internet services, FTP uses the client/server communication mechanism. To connect to an FTP server, usually you are required to have the authorized account of the FTP server. On the Internet, a large number of FTP servers are anonymous FTP servers, which aim at provide file copying services to the public. For this type of FTP server, users need not register with the server or obtain authorization from the FTP servers.
FTP supports two types of file transmission modes:
- ASCII transmission mode, in which text files are transmitted.
- Binary transmission mode, in which program files are transmitted.
If the device acts as an FTP client, only the binary transmission mode is supported. If the device acts as an FTP server, both transmission modes are supported.
FTP supports two working modes:
- Active mode: An FTP client first sets up a connection with an FTP server through the TCP21 port and sends commands through this channel. If the FTP client wants to receive data, it sends the PORT command through this channel. The PORT command contains through which port the client receives data. Then the FTP server connects its TCP20 port to the specified port of the FTP client to transmit data. The FTP server must set up a new connection with the FTP client to transmit data.
- Passive mode: The method of setting up the control channel in passive mode is similar to that in active mode. However, after the connection is set up, the PASV command instead of the PORT command is sent. After the FTP server receives the PASV command, it opens a high end port (with the port number larger than 1024) and inform the client to transmit data through this port. The FTP client connects to the port of the FTP server, and then the FTP server transmits data through this port.
Many Intranet clients cannot log in to the FTP server in active mode, because the server fails to set up a new connection with an Intranet client.
When the device acts as an FTP client, it sets up a data connection in active mode.
FTPS is one enhanced FTP protocol of using the standard FTP protocol and commands, adding the SSL security function for the FTP protocol and data channel. FTPS is also called FTP-SSL and FTP-over-SSL. SSL is one protocol of encrypting and decrypting the data in the security connection between the client and the server with the SSL function. On the device, only the FTP client supports the function.
Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol which is based on the User Datagram Protocol (UDP). It transmits data through UDP port 69. The protocol is designed for transmission of small files; therefore, it does not have as many functions as the FTP protocol. It does not support list of directories or authentication. The device only implements the functions of the TFTP client.
SFTP (Secure File Transfer Protocol /Secure FTP) is the new function in SSH 2.0. SFTP is based on the SSH connection so that the remote user can log into the device safely for managing the file, transmitting the file and other operations, providing higher security guarantee for the data transmission. SFTP provides one safe method for transmitting the file. SFTP is the sun function of SSH, realizing the safe transmission of the file. SFTP encrypts the transmitted authentication information and transmitted data, so using SFTP is safe. If the requirement for the network security is higher, you can use SFTP to replace FTP, but the SFTP file transmission adopts the encryption/decryption technology, so the transmission efficiency is lower than the FTP file transmission.