Huawei S5700 Factory Reset Guide: CLI, BootROM and Recovery - 夜莺博客

Huawei S5700 Factory Reset Guide: CLI, BootROM and Recovery

Factory resetting a Huawei switch is a task every engineer eventually faces - re-deploying refurbished units, clearing unstable configurations, or recovering from a forgotten password - and the VRP reset process differs enough from Cisco IOS to cause real damage when rushed. This guide covers the three Huawei reset paths (CLI commands, BootROM recovery, physical button), the reboot pitfalls that silently undo a reset, and the security steps you must take before reconnecting the switch.

Method 1: CLI Reset (When You Still Have Access)

If console, Telnet or SSH access remains, the CLI is the safest path. First back up the configuration for rollback and audit:

<HUAWEI> display current-configuration

Then choose the reset command for your platform and version:

# Option A - full factory reset (also clears data files, then reboots automatically)
<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

# Option B - clear only the saved configuration
<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

Critical pitfall: when reboot asks "Save the current configuration? [Y/N]", answer N. Answering Y writes the running config back to flash:/vrpcfg.zip and undoes the entire reset.

Method 2: BootROM Password Recovery

When you cannot log in because the password is lost, use the BootROM menu:

  1. Reboot the switch and press Ctrl+B when prompted to enter the BootROM menu.
  2. Enter the BootROM password if one was set.
  3. Select Clear password for console user (选项因版本而异).
  4. Reboot, log in without a password, and configure a new one immediately.

This only clears the console user password - the configuration stays intact, so it is a recovery path rather than a factory reset.

Method 3: Physical Reset Button

Models with a PNP button (many S5700/S6700 and CloudEngine units) support a login-free reset: press and hold the PNP button for more than 6 seconds and the device restores factory settings and restarts. This is the fastest option for locked-out or remote-hands scenarios, but it erases everything with no confirmation prompt.

After the Reset: Rebuild and Harden

A factory-fresh switch loads default credentials (commonly admin/admin@huawei.com or admin@huawei.com) and no security policies - a serious exposure if the device stays connected. Before returning it to service:

<HUAWEI> system-view
[HUAWEI] super password cipher <new-password>
[HUAWEI] aaa
[HUAWEI-aaa] local-user admin password irreversible-cipher <new-password>
[HUAWEI-aaa] quit
[HUAWEI] stelnet server enable
[HUAWEI] acl 3000
[HUAWEI-acl-adv-3000] rule 5 deny ip source 10.0.0.0 0.0.0.255
[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

Also check the firmware with display version - some reset paths revert the OS to the shipped version, so upgrade to the latest patch before deploying.

Related Reading on This Site

See 华为交换机恢复出厂设置命令大全(中文) and Huawei S5700 factory reset: three official methods.

原文链接:https://www.hi-network.com/huawei-s5735-factory-reset-guide.html