FTP file transfer protocol, used for file transfer on the Internet, based on C/S architecture
FTPConnection mode
FTP adopts dual TCP connection
- The control connection uses TCP's port 21 (transmits FTP control commands and execution information, and remains open throughout the FTP session)
- The data connection uses TCP's port 20 (transfer data - upload, download, etc. of data. The data connection will be terminated after the data transmission is completed; the data connection will be established again the next time the data is transferred)
FTPFile transfer mode
ASCIImodel:Basic transmission mode, suitable for transferring ASCII text files (such as HTML, etc.)
Binary stream mode:Basic transfer mode, treating every byte in a file as a binary integer without symbols, suitable for most file transfers (such as images, sounds, executables, etc.)
Extended transmission mode:Need to support extended mode (suitable for transferring 8-bit and other non-standard binary data)
FTPTwo data transmission modes (active and passive are about how the server establishes data connection)
PORTActive mode(The server initiates the establishment of the data channel)
PASVPassive mode(The server passively receives the data channel establishment request sent by the client)