Huawei S5700 Factory Reset Commands: CLI, BootROM and PNP - 夜莺博客

Huawei S5700 Factory Reset Commands: CLI, BootROM and PNP

Sooner or later every Huawei switch administrator needs a full factory reset - when a switch is redeployed to a new role, when the enable or console password is lost, or when a corrupted configuration causes unpredictable behavior. The S5700 series offers several reset paths, and choosing the right one depends on whether you still have CLI access. This guide covers the CLI reset commands, the BootROM recovery procedure for locked-out switches, and the hardware button method available on PNP-capable models.

Before You Reset: Back Up the Configuration

A factory reset permanently erases VLANs, ACLs, interface settings, users, passwords and AAA configuration. Export the current configuration first with SFTP, then verify it:

<HUAWEI> save
<HUAWEI> system-view
[HUAWEI] sftp 10.1.1.1
sftp-client> put vrpcfg.zip
sftp-client> quit

Method 1: One-Command Factory Reset (reset factory-configuration)

On S5700 software versions that support it (V200R022C10 and later on the S5700/S6700 family), the cleanest method is the dedicated factory reset command. The switch clears the configuration and restarts itself:

<HUAWEI> reset factory-configuration
Warning: The action will delete the configuration file and reboot the device.
Continue? [Y/N]: y

You can preview what the factory configuration contains with display factory-configuration before committing to the reset.

Method 2: Clear the Saved Configuration and Reboot

On versions without the dedicated command, delete the startup configuration file and reboot without saving. This is the classic VRP procedure:

<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

<HUAWEI> reboot
Info: The system is now comparing the configuration, please wait.
System will reboot. Continue? [Y/N]: y
Save the configuration? [Y/N]: n

Answering "n" to the final save prompt is essential - answering "y" would write the current configuration back and undo the reset.

Method 3: BootROM Recovery When You Are Locked Out

If you cannot log in because the console password is lost, restart the switch and interrupt the boot process with Ctrl+B to enter the BootROM/BootLoad menu. From there you can clear the console password (commonly menu option 7 on many S-Series models), confirm with Y, and let the switch boot normally:

Ctrl+B   # press during startup to enter BootROM
# BootROM menu: select "Clear password for console user"
# Confirm deletion, then choose the normal boot option

After the switch boots, log in through the console and run the CLI reset commands from Method 1 or 2.

Method 4: PNP Button (Physical Reset)

Some S5700 models have a PNP button on the front panel. If all passwords - console, STelnet/Telnet and BootROM - are lost, press and hold the PNP button for more than 6 seconds. The switch restores factory settings and restarts. Models without a PNP button normally require returning the device to Huawei for repair when every password is lost.

After the Reset: Basic Reconfiguration

Once the switch comes back up, reconfigure the management basics. Depending on the model, management is on the MEth interface or on a VLANIF:

<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
[HUAWEI] ip route-static 0.0.0.0 0 10.10.10.10

Then rebuild your VLAN, port and service configuration from the backup you took before resetting.

Related reading: 华为交换机 PNP 键与 reset saved-configuration 区别(中文) and Huawei S5700 factory reset and password recovery via BootROM.

Original article: 华为:如何将配置恢复到出厂配置 | Huawei S5735/S5700 Factory Reset Guide