< Home

Example for Configuring the FTP Server

Networking Requirements

As shown in Figure 1, routes between the PC and the device functioning as an FTP server are reachable. 10.136.23.5 is the management Ethernet interface's IP address of the FTP server. To upgrade the device, upload the system software from the PC to the device, and backup the configuration file to the PC.

Figure 1 Networking diagram for managing files when the device functions as an FTP server

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure the FTP function and FTP user information including user name, password, user level, service type, and authorized directory on the FTP server.
  2. Save the vrpcfg.zip file on the FTP server.
  3. Connect to the FTP server from the PC.
  4. Upload devicesoft.cc to and download vrpcfg.zip from the FTP server.

Procedure

  1. Configure the FTP function and FTP user information on the FTP server.

    <HUAWEI> system-view
    [HUAWEI] sysname FTP_Server
    [FTP_Server] ftp server enable
    [FTP_Server] aaa
    [FTP_Server-aaa] local-user admin1234 password irreversible-cipher Helloworld@6789
    [FTP_Server-aaa] local-user admin1234 privilege level 15
    [FTP_Server-aaa] local-user admin1234 service-type ftp
    [FTP_Server-aaa] local-user admin1234 ftp-directory flash:/
    [FTP_Server-aaa] quit
    [FTP_Server] quit

  2. Save the vrpcfg.zip file on the FTP server.

    <FTP_Server> save

  3. Connect to the FTP server from the PC as user admin1234 whose password is Helloworld@6789 and transfer files in binary mode.

    Assume that the PC runs the Windows XP operating system.

    C:\Documents and Settings\Administrator> ftp 10.136.23.5Connected to 10.136.23.5220 FTP service ready.User (10.136.23.5:(none)): admin1234331 Password required for admin1234.Password:230 User logged in.ftp> binary200 Type set to I.ftp>

  4. Upload the system software to the device and back up the configuration file of the device to the PC.

    # Upload the system software to the device.

    ftp> put devicesoft.cc
    200 Port command okay.
    150 Opening BINARY mode data connection for devicesoft.cc
    226 Transfer complete.
    ftp: 23876556 bytes sent in 25.35Seconds 560.79Kbytes/sec.

    # Back up the configuration file.

    ftp> get vrpcfg.zip
    200 Port command okay.
    150 Opening BINARY mode data connection for vrpcfg.zip.
    226 Transfer complete.
    ftp: 1257 bytes received in 0.03Seconds 40.55Kbytes/sec.

    The devicesoft.cc file to be uploaded and the vrpcfg.zip file to be downloaded are stored in the local directory on the FTP client. Before uploading and downloading files, obtain the local directory on the client. The default FTP user's local directory on the Windows XP operating system is C:\Documents and Settings\Administrator.

  5. Verify the configuration.

    # Run the dir command on the FTP server to check the system software configuration file is uploaded to the device.

    <FTP_Server> dir
    Directory of flash:/
    
      Idx  Attr     Size(Byte)  Date        Time       FileName
        0  -rw-             14  Mar 13 2012 14:13:38   back_time_a     1  drw-              -  Mar 11 2012 00:58:54   logfile     2  -rw-              4  Nov 17 2011 09:33:58   snmpnotilog.txt     3  -rw-         11,238  Mar 12 2012 21:15:56   private-data.txt     4  -rw-          1,257  Mar 12 2012 21:15:54   vrpcfg.zip     5  -rw-             14  Mar 13 2012 14:13:38   back_time_b     6  -rw-     23,876,556  Mar 13 2012 14:24:24   devicesoft.cc     7  drw-              -  Oct 31 2011 10:20:28   sysdrv     8  drw-              -  Feb 21 2012 17:16:36   compatible     9  drw-              -  Feb 09 2012 14:20:10   selftest    10  -rw-         19,174  Feb 20 2012 18:55:32   backup.cfg    11  -rw-         23,496  Dec 15 2011 20:59:36   20111215.zip    12  -rw-            588  Nov 04 2011 13:54:04   servercert.der    13  -rw-            320  Nov 04 2011 13:54:26   serverkey.der    14  drw-              -  Nov 04 2011 13:58:36   security ... 65,233 KB total (7,289 KB free)

    # Access the FTP user's local directory on the PC and check the vrpcfg.zip file.

Configuration File

FTP_Server configuration file

#
sysname FTP_Server
# FTP server enable
#
aaa
 local-user admin1234 password irreversible-cipher $1a$P2m&M5d"'JHR7b~SrcHF\Z\,2R"t&6V|zOLh9y$>M\bjG$D>%@Ug/<3I$+=Y$
 local-user admin1234 privilege level 15
 local-user admin1234 ftp-directory flash:/
 local-user admin1234 service-type ftp
#
return

Related Content

Videos

Remotely Transfer Files Using FTP.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >