FTP server configuration example

Network requirements

Figure 23: Network diagram

Configuration procedure

  1. Configure IP addresses as shown in Figure 23. 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 account abc, set the password to 123456, the user role to network-admin, the working directory to the root directory of the Flash, and the service type to FTP. (To set the working directory to the Flash root directory of the subordinate member, replace flash:/ in the authorization-attribute command with slot2#flash:/.)

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

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

    # Assign the user role network-admin to the user. Set the working directory to the root directory of the flash memory.

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

    # Assign the service type FTP to the user.

    [Sysname-luser-manage-abc] service-type ftp
    [Sysname-luser-manage-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 the 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 the 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 file temp.bin from the PC to the Flash root directory of the master.

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

    # Exit FTP.

    ftp> bye