Factory resetting a Huawei switch is one of those tasks every network engineer eventually faces—whether you're locked out due to a forgotten password, re-deploying refurbished units, troubleshooting unstable configurations, or preparing devices for a new branch rollout.
Huawei switches run on VRP (Versatile Routing Platform), and their reset process differs significantly from Cisco IOS or HPE Comware. A mistyped command or a wrong selection during reboot may result in overwritten files, stack instability, or extended downtime.
This guide provides a complete, field-tested walkthrough of all Huawei reset methods, including CLI reset, BootROM password recovery, and physical button options (for specific models). It applies to Huawei S-Series (such as S5700, S6700) and CloudEngine switches used in enterprise networks.
Important warning: A factory reset will erase all configuration data — VLANs, ACLs, interfaces, IP addresses, users, passwords, AAA settings, stack configs, and more. Proceed carefully.

If you still have console, Telnet, or SSH access, using the CLI is the safest and cleanest method.
Before wiping, always display and copy the running configuration for rollback or audit purposes.
Command:
display current-configuration
Copy the output to a text file or configuration repository.
Huawei supports two main reset commands, depending on platform and software version.
Option A — Standard factory reset: reset factory-configuration
Option B — Clear stored configuration: reset saved-configuration
In both cases, the switch will ask for confirmation. Enter Y.
On some versions you may need: reset saved-configuration all
This clears any additional related configuration files.
To apply the reset:
reboot
Critical note: When asked “Save the current configuration? [Y/N]” always enter N. If you answer Y, you will overwrite the startup config and undo the reset.
Once rebooted, the switch loads with factory defaults and no user-defined configuration.
If you cannot log in due to a forgotten or lost password, you must access the BootROM menu.
Connect to the switch using a console cable (9600 baud).
Power-cycle the switch.
When the screen displays “Press Ctrl+B to enter Boot Menu,” repeatedly press Ctrl+B.
If prompted, enter the BootROM password (common defaults include Admin@huawei.com or huawei, depending on model and version).
Inside the BootROM menu, select: Clear password for console user (This is typically menu option 7 on many S-Series models.)
Confirm with Y, then return to the main boot menu. Reboot using the menu’s default boot option.
Once the switch boots: if prompted to set a new password, you may choose No.
Run:
reset saved-configuration
Confirm deletion with Yes.
Run:
reboot
When prompted to save configuration, choose No.
After reboot, the device returns to factory state.
Enterprise Huawei switches rarely include a dedicated hardware reset button like consumer routers. However, on certain models:
PNP Button: Some models include a PNP button used for Zero-Touch deployment. Pressing and holding it for more than 6 seconds may restore factory defaults.
Mode/Reset Buttons: On some older S-Series units, long-pressing a MODE or RESET button may trigger a soft or hard reset, but this behavior varies widely by hardware revision and VRP version.
Recommendation: Use BootROM instead of relying on physical buttons. It is predictable, documented, and consistent across Huawei switches.
All custom configurations are removed. The device boots as a clean Layer 2 switch with no VLAN interfaces or IP addresses configured.
Resetting a stack member erases its stack settings. If this is not intended, disconnect stacking cables before performing a reset. Resetting the stack master may cause a temporary stack split.
During reboot, all connected PoE devices (phones, APs, cameras) will lose power. Plan resets during a maintenance window.
After factory reset, Huawei switches typically revert to: Username: admin or blank; Password: admin@huawei.com, Admin@huawei.com, or blank. The system may require setting a new console password upon first login.
Common reasons the reset process fails:
Damaged or corrupted flash memory
Grey-market or improperly refurbished units
BootROM password unknown
Failed software image or missing system files
If the switch is stuck in a boot loop or cannot load the startup configuration, replacement may be necessary.
For organizations facing tight deployment deadlines or sourcing challenges, hi-network.com keeps inventory of both legacy and current Huawei S-Series and CloudEngine models—tested, verified, and ready for immediate shipment.
If you have CLI access, use: reset factory-configuration or reset saved-configuration then reboot and choose not to save. If locked out, enter BootROM (Ctrl+B), clear the console password, boot normally, and perform reset commands.
For Huawei switches: Preferred: CLI reset using reset factory-configuration. If locked out: BootROM → clear password → reset saved-configuration. Physical reset buttons only work on certain models and are not reliable for full factory wipe.
Common defaults include: admin; admin@huawei.com; Admin@huawei.com. Some models boot with no password and require you to create one at first login.
Use the BootROM menu: Reboot the switch, press Ctrl+B, enter BootROM password if required, select “Clear password for console user,” and reboot. After reboot, log in without a password and configure a new one.
In some scenarios, you often need to restore the factory settings of a switch. For example, to delete a large number of useless configurations or move a switch from a network to another network, you can restore the factory settings of the switch and reconfigure the switch.
The following example describes how to restore the factory settings of S5700 series switches running V200R019C10. The operations to be performed may vary depending on the device model and version. For details, see the corresponding product documentation.
This document is written based on device information obtained under lab conditions. If your device is running on the live network, ensure that you understand the potential impact of all commands.
When restoring factory settings, you are advised to log in to the switch through the console port. For details, see Example for Configuring Switch Login Through a Console Port. If you log in to the switch through Telnet or STelnet, your connection with the switch will be lost after the switch is restored to factory settings. In this case, to restore the connection with the switch, you can log in to the switch only through the console port.
If you log in to the switch through the console port, the password for logging in to the switch through the console port is restored to the initial password after the switch is restored to factory settings. To obtain the initial user name and password for logging in to the switch through the console port, see S Series Switches Default Usernames and Passwords.
Once the factory settings are restored, the current configurations are deleted. To prevent unexpected situations after factory settings are restored, you are advised to back up the configuration file before restoring factory settings. This operation ensures that the device can be returned to the previous state at any time. There are two similar methods for backing up the current configurations of the switch. The first method is relatively simple.
Copy configurations on the screen to a local text file.
Run the display current-configuration command in the CLI and copy all the command output to a .txt file on a maintenance terminal. The current configurations are then saved to the hard disk of the maintenance terminal.
If the configuration of a specific command is too long, the configuration may be displayed in multiple lines on the terminal screen, depending on the terminal software. When copying a multi-line configuration from the screen to a .txt file, ensure that the configuration occupies only one line in the .txt file. Otherwise, configuration restoration fails when the .txt file is used. To conveniently copy all displayed information, you are advised to run the screen-length 0 temporary command in the user view to disable the multi-screen display function of the current terminal screen. Then, if more than one screen of information exists, the system does not pause automatically.
Back up the configuration file through File Transfer Protocol (FTP), Trivial File Transfer Protocol (TFTP), File Transfer Protocol over Secure Sockets Layer (FTPS), Secure File Transfer Protocol (SFTP), or Secure Copy Protocol (SCP).Configuration file backup through FTP or TFTP is simple but introduces security risks. In scenarios with high security requirements, FTPS, SFTP, and SCP are recommended for configuration file backup. The following example describes the configuration file backup process using SFTP. For details about other configuration file backup methods, see File Management.
<HUAWEI> save //Save the current configurations to the default storage directory. The current configuration will be written to the device. Are you sure to continue?[Y/N]y Now saving the current configuration to the slot 0............. Save the configuration successfully. <HUAWEI> system-view [HUAWEI] ssh client first-time enable //Enable authentication upon the first login of the SSH client. [HUAWEI] sftp 10.1.1.1 //Enable the SFTP client to connect to the SSH server through password authentication. Assume that the IP address of the SFTP server is 10.1.1.1/24. Please input the username:client001 Trying 10.1.1.1 ... Press CTRL+K to abort Connected to 10.1.1.1 ... Enter password: sftp-client>put vrpcfg.zip //Upload the local configuration file to the remote SFTP server. Remote file: /vrpcfg.zip ---> Local file: vrpcfg.zip | Info: Downloading file successfully ended. SFTP: 2872 byte(s) received in 0.119 second(s) 23.56Kbyte(s)/sec.| Info: Downloading file successfully ended. SFTP: 2872 byte(s) received in 0.119 second(s) 23.56Kbyte(s)/sec.
This document provides three methods for restoring factory settings: press and hold the PNP button to restore factory settings, restore factory settings with one click, and clear the configuration file to restore factory settings.
The differences between the three methods are as follows:
Whether factory settings are restored by using commands or pressing a specific button
Pressing and holding the PNP button to restore factory settings does not require a login to the switch and is easy to operate.
What will be cleared after factory settings are restored
When you press and hold the PNP button or restore factory settings with one click, all directories and files except the system software package, patch file, plug-in, and license file for the next startup as well as factory settings are deleted.
If you clear the configuration file to restore factory settings, only the current configurations and configuration file of the switch are cleared.
For ease of understanding, the following describes the factory settings, configuration file, and current configurations.
El artículo | descripción | How to View |
|---|---|---|
Factory settings | Factory settings are basic configurations provided for a new device. This type of configurations enables a device to start and operate correctly when there is no configuration file, or when the configuration file is lost or damaged. | Check the configurations in the $_default.cfg file in the protected directory. |
Configuration file | When a device is powered on, it reads the configuration file from the default storage directory to initialize the system. Therefore, the configurations in the configuration file are called initial configurations. |
|
Current configurations | The configurations that are in effect during device operation are current configurations. To use modified configurations as the next startup configurations, run the save command to save them to the default storage medium. | Run the display current-configuration command to check the current configurations of the device. |
For a device that has the PNP button, you can press and hold the PNP button for more than 6 seconds to restore the device to factory settings and restart the device. The following figure shows the PNP button.
Figure 1-1 PNP button
Run the reset factory-configuration command in the user view.
<HUAWEI> reset factory-configuration Warning: The command will delete all the configurations and files (except the startup, patch, module, and license files) from the device. Continue? [Y/N]:y //If you enter y, all configuration and data files on the device are cleared. Warning: The system will reboot after configurations and files are deleted. Continue? [Y/N]:y //If you enter y, the device automatically restarts.
Run the reset saved-configuration command in the user view.
<HUAWEI> reset saved-configuration Warning: The action will delete the saved configuration in the device. The configuration will be erased to reconfigure. Continue? [Y/N]:y //If you enter y, the saved configurations on the device are cleared. Warning: Now clearing the configuration in the device. Info: Succeeded in clearing the configuration in the device.
Run the reboot command in the user view to restart the device.
<HUAWEI> reboot Info: The system is now comparing the configuration, please wait................. Warning: The configuration has been modified, and it will be saved to the next startup saved-configuration file flash:/vrpcfg.zip. Continue? [Y/N]:n //If you enter n, the configuration file is not saved. Info: If want to reboot with saving diagnostic information, input 'N' and then execute 'reboot save diagnostic-information'. System will reboot! Continue?[Y/N]:y //If you enter y, the device restarts.
After the switch is restored to factory settings, you can log in to the switch through the console port to perform basic configurations.
#Configure an IP address for the Ethernet management port of the switch. The following assumes that the IP address of the Ethernet management port is 10.1.1.2/24.
<HUAWEI> system-view [HUAWEI] interface MEth 0/0/1 [HUAWEI-MEth0/0/1] ip address 10.1.1.2 24 [HUAWEI-MEth0/0/1] quit
If a switch does not have an Ethernet management port, configure a management IP address for a VLANIF interface. For details, see Configuring an IP Address for a Management Interface on the S5700.
#Configure a default route on the switch. The following assumes that the gateway address of the switch is 10.10.10.10.
[HUAWEI] ip route-static 0.0.0.0 0 10.10.10.10
#Configure CLI-based device login. The following uses STelnet as an example to describe how to log in to the CLI. For details about other login modes, see CLI Login Configuration.
[HUAWEI] user-interface vty 0 4 [HUAWEI-ui-vty0-4] authentication-mode aaa //Set the authentication mode on VTY interfaces to AAA authentication. [HUAWEI-ui-vty0-4] protocol inbound ssh //Set the protocol supported on VTY interfaces. [HUAWEI-ui-vty0-4] user privilege level 15 //Set the privilege level of VTY interfaces to 15. [HUAWEI-ui-vty0-4] quit [HUAWEI] stelnet server enable //Enable the STelnet server function. [HUAWEI] ssh user client002 //Create an SSH user. [HUAWEI] ssh user client002 service-type stelnet //Configure a service type for the SSH user. [HUAWEI] ssh user client002 authentication-type password //Configure password authentication for the SSH user. [HUAWEI] aaa [HUAWEI-aaa] local-user client002 password irreversible-cipher Abcd@1234 //Create a local user with the same name as the SSH user and set the login password. [HUAWEI-aaa] local-user client002 privilege level 15 //Set the privilege level for the local user. [HUAWEI-aaa] local-user client002 service-type ssh //Set the service type of the local user. [HUAWEI-aaa] quit [HUAWEI] ecc local-key-pair create //Generate a local ECC host key pair.
#To restore the original configuration file, restore it through FTP, TFTP, FTPS, SFTP, or SCP. For details, see Restoring the Configuration File.
Etiquetas calientes:
Huawei Switches
Preguntas frecuentes