FTP server configuration example

Network requirements

Figure 19: Network diagram

Configuration procedure

  1. Configure IP addresses as shown in Figure 19. Make sure the IRF fabric and the PC can reach each other. (Details not shown.)

  2. Configure the FTP server:

    # Examine the storage space on the member devices. If the free space is insufficient, use the delete/unreserved file-url command to delete unused files. (Details not shown.)

    # Create a local user with username abc and password 123456.

    <Sysname> system-view
    [Sysname] local-user abc class manage
    [Sysname-luser-manage-abc] password simple 123456
    

    # Assign the network-admin user role to the user. Set the working directory to the root directory of the flash memory on the master. (To set the working directory to the root directory of the flash memory on the subordinate member, you must include the slot number in the directory path.)

    [Sysname-luser-manage-abc] authorization-attribute user-role network-admin work-directory flash:/
    

    # Assign the service type FTP to the user.

    [Sysname-luser-abc] service-type ftp
    [Sysname-luser-abc] quit
    

    # Enable the FTP server.

    [Sysname] ftp server enable
    [Sysname] quit
    
  3. Perform FTP operations from the FTP client:

    # Log in to the FTP server at 1.1.1.1 using username abc and password 123456.

    c:\> ftp 1.1.1.1
    Connected to 1.1.1.1.
    220 FTP service ready.
    User(1.1.1.1:(none)):abc
    331 Password required for abc.
    Password:
    230 User logged in.
    

    # Use the ASCII mode to download configuration file config.cfg from the FTP server to the PC for backup.

    ftp> ascii
    200 TYPE is now ASCII
    ftp> get config.cfg back-config.cfg
    

    # Use the binary mode to upload the temp.bin file from the PC to the root directory of the flash memory on the master.

    ftp> binary
    200 TYPE is now 8-bit binary
    ftp> put temp.bin
    

    # Exit FTP.

    ftp> bye