Total net | File Transfer Protocol

FTP

  Overview: File Transfer Protocol file transfer protocol, file transfer only provide some basic services, is using TCP reliable transport services, the main function is to reduce or eliminate incompatibilities treated under different operating system files. FTP uses the client-server model, an FTP server process can service multiple client processes. FTP server process consists of two parts, a main process, responsible for receiving a new request; another plurality of slave process, responsible for processing a single request.
    How it works: the client process to the server process when issuing a request to establish a connection, look for well-known port -21 to connect to the server process, but also tell the server to process their other port number to establish a data transfer connection. Then, the server process with their well-known port transfer port number -20 and process data provided by the customer to establish a data connection. That is, when the file transfer between the FTP client and server to establish two concurrent TCP connections "control connection" and "data connection." Because FTP uses two different port numbers, the data connected to the control connection does not panic.
  

TFTP

  Overview: Trivial File Transfer Protocol Trivial File Transfer Protocol, using a client - server mode, use UDP datagram, only supports file transfer without support interaction. TFTP UDP can be used to advantage is that the environment (when you need to download programs or files simultaneously to many machines, many UDP support, and more peer to peer communication, while TCP supports only one communication) and TFTP codes account for less memory ( It can be used for smaller computer or special purpose equipment).

  Works: TFTP client process sends a request message read or write request packet to the TFTP server process, its well-known port number is 69. TFTP server process to select a new port and TFTP client processes to communicate. If the file length is exactly an integer multiple of 512 bytes, then the file transfer is complete, the data packets must be transmitted last only a header containing no data, because the data packets transmitted per predetermined TFTP up to 512 bytes the last transmitted packets less than 512 bytes. If the document length is not an integer multiple of 512 bytes, the last transmission packet data bytes field 512 less than a certain, just as the end of file marker.

Guess you like

Origin www.cnblogs.com/jj81/p/11517010.html