Two FTP transmission modes

Source: Internet
Author: User
Tags ftp file ftp file transfer
FTP has two transmission modes: Active Mode and passive mode. I have never understood this before. Now I have found the following materials,
I reorganized the following:

Two types of connections are required for a complete FTP file transfer. One is a file transfer command called a control connection, and the other is a real file transfer called a data connection.

1) control connection

When the client wants to establish an upload/download data transmission with the FTP server, it first initiates a connection establishment request to the TCP port 21 of the server. The FTP Server accepts requests from the client, after the connection is established, the connection is called an FTP control connection.

2) Data Connection

After the FTP control connection is established, you can start transferring files. The file transfer connection is called an FTP data connection. FTP data connection is the process of FTP data transmission. It has two transmission modes.
The active connection process is that the client sends a connection request to the FTP port of the server (21 by default). The server accepts the connection and establishes a command link. When data needs to be transmitted, the client uses the PORT command on the command link to tell the server: "I opened port XXXX and you came to connect to me ". The server sends a connection request from Port 20 to port XXXX of the client and establishes a data link to transmit data.

PASV (passive) connection process: the client sends a connection request to the FTP port of the server (21 by default). The server accepts the connection and establishes a command link. When data needs to be transmitted, the server uses the PASV command on the command link to tell the client: "I opened port XXXX, and you came to connect to me ". Therefore, the client sends a connection request to port XXXX of the server and establishes a data link to transmit data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.