No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Troubleshooting Guide

CloudEngine 16800, 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Transferring Files Using FTP/TFTP

Transferring Files Using FTP/TFTP

During system maintenance such as software upgrade and configuration file backup, files must be transferred between a PC and the device. FTP/TFTP is used to transfer files.

The FTP protocol and TFTP protocol will bring risk to network security. The SFTP V2 or SCP mode is recommended.

When transferring files using FTP/TFTP, the roles of PC and device vary in different methods:

PC Functioning as an FTP Server

Figure 8-1 Networking diagram
  1. Run the FTP server software on the FTP server and configure the FTP service. For details, see relevant help documentation.

  2. Connect the device and the FTP server. (The IP addresses are used as an example.)

    1. Connect the FTP server to MEth0/0/0 of the device using a network cable.
    2. Configure an IP address 192.168.0.1/24 for MEth0/0/0.
    3. Configure an IP address 192.168.0.2/24 for the FTP server.
    <HUAWEI> system-view
    [~HUAWEI] interface meth 0/0/0
    [~HUAWEI-MEth0/0/0] ip address 192.168.0.1 24
    [*HUAWEI-MEth0/0/0] commit
    [~HUAWEI-MEth0/0/0] ping 192.168.0.2
      PING 192.168.0.2: 56 data bytes, press CTRL_C to break
        Reply from 192.168.0.2: bytes=56 Sequence=1 ttl=128 time=4 ms
        Reply from 192.168.0.2: bytes=56 Sequence=2 ttl=128 time=3 ms
        Reply from 192.168.0.2: bytes=56 Sequence=3 ttl=128 time=18 ms
        Reply from 192.168.0.2: bytes=56 Sequence=4 ttl=128 time=3 ms
        Reply from 192.168.0.2: bytes=56 Sequence=5 ttl=128 time=3 ms
    
      --- 192.168.0.2 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 3/6/18 ms
    
    [~HUAWEI-MEth0/0/0] return
    • In this example, the FTP server and the device are directly connected. If they are not directly connected, you must ensure that they have reachable routes to each other.
    • After the configuration is complete, run the ping command to test the connectivity between the FTP server and device.
  3. Log in to the FTP server using FTP.

    <HUAWEI> ftp 192.168.0.2
    Trying 192.168.0.2 ...
    Press  CTRL + K to abort
    Connected to 192.168.0.2.
    220 FTP Server ready.
    User(192.168.0.2:(none)):ftpuser
    331 Password required for ftpuser.
    Enter password:     
    230 User logged in.
    
    [ftp]
  4. Run the put command to upload files to the FTP server or run the get command to download files from the FTP server to the device.

    [ftp] put vrpcfg.zip
    200 Port command okay.
    150 Opening ASCII mode data connection for /vrpcfg.zip.
    /     100% [***********] 
    226 Transfer complete.
    FTP: 1098 byte(s) sent in 0.131 second(s) 8.38Kbyte(s)/sec.
    [ftp] binary
    200 Type set to I.
    [ftp] get devicesoft.cc
    200 Port command okay.
    150 Opening BINARY mode data connection for /devicesoft.cc.
    \    6482944 bytes transferred 
    226 Transfer complete.
    FTP: 6482944 byte(s) received in 54.500 second(s) 1117.40Kbyte(s)/sec.
    [ftp]

PC Functioning as a TFTP Server

Figure 8-2 Networking diagram
  1. Run the TFTP server software on the TFTP server (PC) and configure the TFTP service. For details, see relevant help documentation.

  2. Connect the TFTP server and the device and configure IP addresses for them. For details, see PC Functioning as an FTP Server.

  3. Run the tftp put command to upload files to the TFTP server or run the tftp get command to download files from the TFTP server to the device.

    <HUAWEI> tftp 192.168.0.2 get vrpcfg.zip vrpcfg1.zip
    Info: Transfer file in binary mode. 
    Please wait for a while...  
    /    8174 bytes transferred     
    Info: Downloaded the file successfully.
    <HUAWEI> tftp 192.168.0.2 put vrpcfg.zip vrpcfg2.zip
    Info: Transfer file in binary mode.   
    Please wait for a while...     
    /     100% [***********]    
    Info: Uploaded the file successfully.
    <HUAWEI>

Device Functioning as an FTP Server

Figure 8-3 Networking diagram
  1. Connect the PC and the device and configure IP addresses for them. For details, see PC Functioning as an FTP Server.

  2. Enable FTP on the device, and create a user name, password, and FTP path.

    You must set the user level to level 3 or above to establish an FTP connection.

    <HUAWEI> system-view
    [~HUAWEI] ftp server enable
    [*HUAWEI] aaa
    [*HUAWEI-aaa] local-user huawei password irreversible-cipher Huawei@123
    [*HUAWEI-aaa] local-user huawei service-type ftp
    [*HUAWEI-aaa] local-user huawei ftp-directory flash:
    [*HUAWEI-aaa] local-user huawei level 15
    [*HUAWEI-aaa] commit
    [~HUAWEI-aaa] quit
    [~HUAWEI] quit
    
  3. Log in to the device by running the ftp command on the FTP server. Run the get command to download files to the FTP server or run the put command to upload files from the FTP server to the device.

    For example, on an FTP server with the Windows operating system, choose Start > Run, enter cmd, and click OK.

    C:\Documents and Settings\Administrator> ftp 192.168.0.1
    Connected to 192.168.0.1.
    220 FTP service ready.
    User (192.168.0.1:(none)): huawei
    331 Password required for huawei.
    Password:
    230 User logged in.
    ftp> get vrpcfg.zip
    200 Port command okay.
    150 Opening ASCII mode data connection for vrpcfg.zip.
    226 Transfer complete.
    ftp: 5203 bytes received in 0.01Seconds 346.87Kbytes/sec.
    ftp> lcd
    Local directory now C:\Documents and Settings\Administrator.
    ftp> put vrpcfg.zip
    200 Port command okay.
    150 Opening ASCII mode data connection for vrpcfg.zip.
    226 Transfer complete.
    ftp: 5203 bytes sent in 0.01Seconds 346.00Kbytes/sec.
    

    If you use the user name Administrator to log in to the PC, the output differs from the above.

    You can run the lcd command to view the path where backup configuration files are saved.

    The commands vary with the operating system. For details, see relevant help documentation of each operating system.

Translation
Download
Updated: 2020-01-07

Document ID: EDOC1000060766

Views: 608655

Downloads: 2951

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next