Example for Accessing Files on Other Devices Using FTP

38 0 0 0


After a switch is configured as an FTP client, it can log in to the FTP server for transferring files and managing files and directories on the FTP server. The configuration for accessing other devices using FTP is simple, and FTP supports file transfer and file directory management. FTP provides the authorization and authentication functions for managing files. However, data is transferred in plaintext, which brings security risks.

FTP is applicable to file transfer when high network security is not required, and is often used for downloading the system software from the FTP server and backing up the configuration file.

Configuration Notes

  • Before accessing files on the FTP server, ensure that routes are reachable between the switch and FTP server.
  • FTP is an insecure protocol. Using SFTP V2, Secure Copy Protocol (SCP), or FTPS is recommended.
  • This example applies to all versions of all S series switches.

imgDownload?uuid=d7db000336254965bdc1157 NOTE:

The following uses the command lines and outputs of the S5720EI running V200R008C00 as an example.

Networking Requirements

As shown in Figure 3-24, the remote server at IP address functions as the FTP server. The switch at IP address functions as the FTP client and has reachable routes to the FTP server.

The switch needs to be upgraded. You need to download the system software from the FTP server to the switch and back up the current configuration file of the switch to the FTP server.

Figure 3-24  Networking diagram for accessing files on another device using FTP 

Configuration Roadmap

The configuration roadmap is as follows:

  1. Run the FTP software on the FTP server and configure an FTP user.
  2. Establish an FTP connection between the switch and the FTP server.
  3. Upload and download files on the switch using FTP commands.


  1. Run the FTP software on the FTP server and configure an FTP user. For the detailed operations, see the help document of the third-party FTP software.
  2. Establish an FTP connection between the switch and the FTP server.

    <HUAWEI> ftp Trying ... Press CTRL+K to abort Connected to 220 FTP service ready. User( 331 Password required for admin. Enter password: 230 User logged in.                    

  3. Upload and download files on the switch using FTP commands.

    [ftp] binary   //Set the file transfer mode to binary. The default mode is ASCII. [ftp] get devicesoft.cc   //Download the system software on the FTP server to the switch. [ftp] put vrpcfg.zip   //Upload the backup configuration file on the switch to the FTP server. [ftp] quit 

    The ASCII mode is used to transfer text files, and the binary mode is used to transfer programs including the system software (with the file name extension of .cc, .bin, or .pat), images, voices, videos, compressed packages, and database files.

  4. Verify the configuration.

    # Run the dir command on the switch to check whether the system software is downloaded to the switch.

    <HUAWEI> 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-          7,717  Mar 12 2012 21:15:54   vrpcfg.zip     5  -rw-             14  Mar 13 2012 14:13:38   back_time_b     6  -rw-    106,616,955  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-         43,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 ... 509,256 KB total (52,752 KB free)                                    
    # Check whether the file vrpcfg.zip is stored in the working directory on the FTP server.

Configuration Files


See more please click 


  • x
  • convention:


You need to log in to reply to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!

Login and enjoy all the member benefits

Fast reply Scroll to top