This section describes how to restore default settings, restart a device, and transfer files.
4.1 Using the Default Button to Restore Factory Settings
When a fault, such as a device login failure, occurs due to incorrect configurations, hold down the Default button to enable the device to restart using the factory settings.
Method to restore factory settings: After the device is started, hold down the Default button for more than 3s. The device then uses the factory settings for a restart.
NOTICE: After the factory settings are restored, the original configuration file still exists. Therefore, save your configurations before you hold down the Default button. You can run the startup saved-configuration command to change the startup configuration file; otherwise, the device uses the factory settings for the next startup.
During your operations, do not power off the device.
4.2 Using the Configuration File to Restore Device Configurations
After a device is powered on, it initializes configurations by reading configuration information from the specified startup configuration file. If no configuration file is available in the storage directory, the device uses factory settings for initialization. You must restart the device to make the recovered device configurations take effect.
Restore the configuration file through the FTP/TFTP server.
For details, see Using FTP/TFTP to Transfer Files and download the default configuration file to the device.
Run the startup saved-configuration command to specify the default configuration file for the next startup and restore default system configurations.
<Huawei> startup saved-configuration vrpcfg.cfg <Huawei> reboot fast
NOTE: You can also run the reset factory-configuration command to restart the device and restore the factory settings.
4.3 Restarting a Device
You can rectify a network fault by restarting a device. This section describes how to restart a device.
You can restart a device using any of the methods in the following table.
| Method | Description |
|---|---|
| Cold restart | To perform a cold restart, you need to power off and then power on the device again. Cold restart has limitations and is used by onsite maintenance personnel. Current configurations will not be saved during a cold restart. Therefore, save configurations before performing a cold restart. |
| Hot restart (device restart using command lines): you can run the reboot command in the user view to restart the device. | Hot restart is performed using command lines, which is used by maintenance personnel who remotely manage the device. During a hot restart, the system asks whether to save the configuration, which effectively prevents configuration loss. |
4.4 Upgrading the Device
The upgrade of a device is closely related to the released software versions. The corresponding upgrade guide is released with each new version and you can upgrade the device according to the guide. To obtain the upgrade guides, visit http://support.huawei.com/enterprise, and search the upgrade guide based on the product name and version.
4.5 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.
- PC functioning as an FTP server: You must install the FTP server software on your PC.
- PC functioning as a TFTP server: You must install the TFTP server software on your PC. TFTP is easy to configure but this method has low security and transmission speed.
- Device functioning as an FTP server: You can perform configurations on the device without installing any software. When there are a large number of devices on a network, the first two methods are recommended.
PC Functioning as an FTP Server
Run the FTP server software on the FTP server and configure the FTP service. For details, see relevant help documentation.
Connect the device and the FTP server. (The IP addresses are used as an example.)
- Connect the FTP server to GE0/0/0 of the device using a network cable.
- Configure an IP address 192.168.0.1/24 for GE0/0/0.
- Configure an IP address 192.168.0.2/24 for the FTP server. (Configure an IP address for the network adapter of the PC. The configuration details are omitted.)
<Huawei> system-view [Huawei] interface gigabitethernet 0/0/0 [Huawei-GigabitEthernet0/0/0] ip address 192.168.0.1 24 [Huawei-GigabitEthernet0/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-GigabitEthernet0/0/0] return
NOTE: - 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.
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. [Huawei-ftp]
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.
[Huawei-ftp] put vrpcfg.zip 200 Port command okay. 150 Opening ASCII mode data connection for vrpcfg.zip. 226 Transfer complete. FTP: 8174 byte(s) sent in 0.099 second(s) 82.56Kbyte(s)/sec. [Huawei-ftp] binary 200 Type set to I. [Huawei-ftp] get devicesoft.cc 200 Port command okay. 150 Opening ASCII mode data connection for devicesoft.cc. 226 Transfer complete. FTP: 141952 byte(s) received in 6.796 second(s) 20.88Kbyte(s)/sec. [Huawei-ftp]
PC Functioning as a TFTP Server
Run the TFTP server software on the TFTP server (PC) and configure the TFTP service. For details, see relevant help documentation.
Connect the TFTP server and the device and configure IP addresses for them. For details, see PC Functioning as an FTP Server.
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. Downloading the file from the remote TFTP server. Please wait...\ TFTP: Downloading the file successfully. 8174 bytes received in 1 second. <Huawei> tftp 192.168.0.2 put vrpcfg.zip vrpcfg2.zip Info: Transfer file in binary mode. Uploading the file to the remote TFTP server. Please wait...| TFTP: Uploading the file successfully. 8174 bytes send in 1 second. <Huawei>
Device Functioning as an FTP Server
Connect the PC and the device and configure IP addresses for them. For details, see PC Functioning as an FTP Server.
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 privilege level 15 [Huawei-aaa] quit [Huawei] quit
Log in to the device by running the ftp command on the PC. Run the get command to download files from the device to the PC or run the put command to upload files 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: receive 5203 bytes in 0.01 seconds 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: send 5203 bytes in 0.01 seconds 346.00Kbytes/sec.
NOTE: 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.


