Often forget this thing. So summarize this thing and feel the agreement.
- FTP connection mode
- Control connection: Standard port, for sending FTP command information
- Data connection: Standard port, for uploading and downloading data
- Type of data connection establishment:
- Active mode: the server initiates a connection from Port 20 actively to the client
- Passive mode: The server is passively waiting for a client to initiate a connection at a port within a specified range
- FTP transfer Mode
- Text mode: ASCII mode, transferring data in a text sequence
- Binary mode: Binary mode, transferring data in binary sequence
Summarize:
a
Two stages: Control connection TCP ( Client initiated, three handshake process)
? Data connection TCP(optional)
Two
FTP establish the connection process :
1, Control Connection :--- establish a control connection first : Clinet take the initiative to Server three-time handshake .
2, Data Connection :
data plane:
Active mode:FTP Server actively uses its own Port as the source side to connect the FTP client. --------- applicable firewall
Passive mode:FTP server tells the client I opened the port, you can even me. --------- Firewall Not applicable
Note : Active mode and passive mode are discussed in the second phase . .
Note : Firewall Environment Applicable FTP Active mode. ?
There are two ways to establish a data connection:
Active mode: Data connection : Server Active to sport20 to connect Client . the client said, I opened the 1049, you come to connect me.
Active mode resolves firewall issues.
Passive mode: I take my 1089 to connect A I take my 1090 to connect B .
xftp The default is to connect in passive mode. In general, we use passive mode. However, if you encounter a firewall, you need to use active mode.
[Service]ftp active mode and passive mode