22.hcna-hntd--ftp principle and Configuration

Source: Internet
Author: User
Tags remote ftp server ftp client ftp transfer

FTP is the protocol used to transfer files. The use of FTP to achieve remote file transfer, but also to ensure the reliability and efficiency of data transmission.

Learning Goals:
1. Learn how FTP works
2. Master the basic configuration of FTP

Application of FTP


Deploy an FTP server in your corporate network and configure your network devices as FTP clients, you can use FTP to back up or update the VRP files and configuration files. You can also configure the network device as an FTP server and save the log files of the device to a host for easy viewing.

The process of FTP transferring files


When using FTP for file transfer, two TCP connections are used. The first connection is the control connection between the FTP client and the FTP server. The FTP server opens port 21st and waits for the FTP client to send a connection request. The FTP client randomly opens the port and sends a request to the server to establish a connection. Control connections are used to transfer control commands between the server and the client.
The second connection is a data connection between the FTP client and the FTP server. The server uses TCP port 20th to establish a data connection with the client. Typically, the server actively establishes or interrupts the data connection.

FTP transfer Mode


FTP transmits data in two modes of transmission: ASCII mode and binary mode.
ASCII mode is used to transfer text. The character of the sender is transferred to the ASCII format before it is sent, and the receiving end is then converted to a character. Binary mode is commonly used to send picture files and program files. The sending side sends these files without converting the format to be transmitted.

FTP Configuration


FTP functionality is available in both the ARG3 series routers and the X7 series switches.
Perform FTP server enable FTP functionality.
Execute the SET default Ftp-directory command to set the FTP user's working directory.


When configuring an FTP server, you can use AAA to configure the login account and access rights for each user individually.
The AAA command is used to enter the AAA view.
Local-user user-name {access-limit max-number | ftp-directory directory | idle-timeout minutes [seconds] | password ci Pher password [opt] | Privilege Level | The state {active | block}} command is used to create a local user and to configure the parameters of the local user.
USER-NAME Specifies the user name.
Local-user Huawei Service-type FTP command to configure the local user's access type
to FTP.
ftp-directory Specifies the directory that the FTP user can access. If you do not configure FTP users to access
Directory, the FTP user cannot log on to the device.
ACCESS-LIMIT Specifies the maximum number of connections that can be established by the user name.
IDLE-TIMEOUT Specifies the idle time-out period for the user.
Privilege level Specifies the priority of the user.


The FTP command is used not to establish a control connection to the remote FTP server and to enter the FTP client view.
The binary command is used to set the file transfer mode to binary mode when the device acts as an FTP client
, also known as the binary mode. By default, the file transfer mode is ASCII mode.
The GET command is used to download files from a remote FTP server and save them locally.

Summarize
    1. Which ports does the FTP service use by default on the server?
    2. User feedback does not have permission to access the directory on the FTP server, how should be resolved?
      For:
    3. The FTP server needs to open TCP port 21st to establish a control connection, Port 20th to establish a data connection.
    4. If the user does not have access to any working directory, you need to define a default FTP directory. Execute the SET default Ftp-directory command to set up the defaults directory.

22.hcna-hntd--ftp principles and configuration

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.