Huawei Switch PNP Button Reset: Models and Stack Notes - 夜莺博客

Huawei Switch PNP Button Reset: Models and Stack Notes

Not every Huawei switch can be factory-reset with a button, and even on the models that can, the PNP button behaves differently than most engineers assume. Pressing and holding it for more than six seconds restores default settings and restarts the device — but the official S300/S500/S2700/S5700/S6700 V200R022C00 configuration guide limits that behavior to a specific model list and adds stack caveats that can bite you. This article collects the official details in one place.

How the PNP Button Reset Works

Press and hold the PNP button for more than 6 seconds: the device restores the default settings and restarts automatically. According to Huawei, this operation:

  • Enables login through the console port (useful if remote management was part of the problem).
  • Clears service configuration and data files — the same effect as the reset factory-configuration command.
  • Does not delete the protected directory or the protected/$_default.cfg file.
  • Sets $_default.cfg as the next-startup configuration file if it exists; otherwise the next-startup file is empty.

Which Models Support It

The button reset is only supported on these families per the V200R022C00 guide: S2720-EI, S2730S-S, S5720-LI, S5720S-LI, S5720I-SI, S5731-S/H, S5731S-S/H, S5732-H, S5735-L/L1/L-I/S/S-L/S-L1/S-M/S24T4X-I, S5735S-L/S-L1/S-M/S, S5736-S, S300, S500, S6720S-S, S6730-H/S, S6730S-H/S. If your model is not on the list, the PNP button will not perform a factory reset — fall back to the CLI methods described in our Huawei factory reset guide.

Disabling or Re-enabling the Button

In environments where an accidental 6-second press would be disastrous, turn the button function off — and remember the recovery path if a reset ever fails:


[HUAWEI] pnp-button disable
! restore the function if a reset fails
[HUAWEI] undo pnp-button disable

If the device cannot be restored by holding the button even when enabled, Huawei directs you to run undo pnp-button disable to re-enable it before retrying.

Stack Behavior: Remove the Cables First

Two stack-related rules from the official guide matter in production:

  • If the stack uses dedicated stack cables, remove the cables from one end first — otherwise the stack simply rebuilds after the restart and you still have the old configuration problem.
  • By default, holding the PNP button on any member of a stack resets that device and restarts it. To clear the service configurations and data files of the whole stack, configure the reset-system behavior first with pnp-button mode reset-system.

These details are easy to miss and expensive to learn live. For the full factory-restore workflow including the BootROM path for password-locked devices, our three-methods article and the BootROM recovery guide complete the picture.

What "Factory Default" Actually Changes

The phrase "restore the default settings" hides several distinct operations. When the PNP button resets a supported Huawei switch, three things happen in a fixed order: the running service configuration and the *.cfg/*.zip data files are cleared, the device restarts, and the next-startup configuration file is re-pointed. Understanding each piece is what tells you whether you need a follow-up step — and on a stack, whether one member or the whole stack was affected.

  • Service configuration and data files are cleared. This is the same effect as the reset factory-configuration CLI command, and it is broader than reset saved-configuration, which only marks the saved file for deletion at next boot.
  • The protected directory survives. The protected/ directory and protected/$_default.cfg are deliberately preserved. That file is the vendor-shipped default profile used as the factory baseline; without it there would be nothing to boot into.
  • The next-startup file changes. If protected/$_default.cfg exists, it becomes the next-startup configuration, so the switch boots into a clean, known state. If it does not exist, the next-startup file is empty and the device comes up unconfigured.
  • Console login is enabled. Remote management credentials are wiped along with everything else, so the console port becomes the only door — which is often the reason people press the button in the first place.

Because the reset also clears the management IP and any AAA configuration, plan the recovery before you press anything: stage a console cable and a terminal session, and know the DHCP or default management address the switch will fall back to. A switch that is unreachable after a reset is a truck roll, not a support case.

PNP Button vs CLI vs reset saved-configuration

Huawei offers three different "reset" paths and they are not interchangeable. Choosing the wrong one either does too little or takes the device off the network:

Method                    Trigger             Clears                       Keeps
------------------------  ------------------  ---------------------------  --------------------
PNP button (6 s)          physical button     service config + data files  protected/$_default.cfg
reset factory-configuration  CLI              service config + data files  protected/$_default.cfg
reset saved-configuration CLI                 saved startup config only    running config, licence

The practical reading: use the PNP button when you have physical access and no working login. Use reset factory-configuration when you still have a CLI session and want the identical outcome without a truck roll. Use reset saved-configuration for the narrow case where you want the device to boot clean once while the running configuration stays intact for the current session. Our saved-configuration vs factory-configuration comparison walks through the difference in detail.

<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

Note that reset factory-configuration prompts for confirmation, reboots the device, and — on a stack — resets every member, not just the one you are logged into. That is usually what an engineer wants when decommissioning, and the opposite of what they want when troubleshooting a single misbehaving member.

Model Support: Reading the List Correctly

The button reset is not a platform-wide Huawei feature. Per the V200R022C00 configuration guide it is supported on a specific list of families, and if your model is not on that list the button simply does not perform a factory reset — pressing it does nothing useful, which is easy to mistake for a hardware fault.

Supported families include S2720-EI, S2730S-S, S5720-LI, S5720S-LI, S5720I-SI, S5731-S/H, S5731S-S/H, S5732-H, the S5735-S/S-L/S-M/S24T4X-I variants, S5736-S, the S300 and S500 series, S6720S-S, S6730-H/S and S6730S-H/S. Older access platforms such as the S5700-LI and S5700-SI generation are not on this list and must be reset from the CLI or BootROM instead — see our Huawei factory reset guide and the BootROM password-recovery walkthrough for those paths.

Two reading tips. First, the suffix carries the meaning: an S5735-L and an S5735-S are different platforms, and support is declared per suffix, not per series. Second, support is tied to a software version as well as hardware — a switch that gained the feature in V200R019 will not have it on an older V100R006 image. Check display version before trusting any table, including this one.

Disabling the Button (and Getting It Back)

On an access switch in a wiring closet, a six-second accidental press is a genuine risk — a cleaner leaning on the front panel, or a contractor "tidying cables". Huawei provides a single command to remove the hazard:

[HUAWEI] pnp-button disable
! confirm the function state
[HUAWEI] display pnp-button status
! re-enable if a reset is ever needed but fails
[HUAWEI] undo pnp-button disable

Disabling the button is the right default for switches in public or shared spaces, and it should be part of the standard hardening template along with a console password and SSH-only management. The trade-off is honest: with the button disabled, a device that has lost its credentials needs the BootROM path, which requires physical access and a reboot. Document both, and keep the console cable where the on-call engineer can find it.

If a reset appears to do nothing even though the button is enabled, Huawei's guidance is to run undo pnp-button disable first — a previously disabled function is the most common reason a "hold the button" attempt silently fails.

Stack Behaviour: Remove the Cables First

Stacking turns a simple button press into a topology question, and the official guide calls out two rules that are expensive to learn live:

  • With dedicated stack cables, disconnect one end first. If the stack ports stay connected, the members simply rebuild the stack after the restart and — depending on which configuration the master serves — you can end up back where you started, with the offending configuration still in place and a fresh outage to show for it.
  • By default the button acts locally. Holding PNP on one member resets that member and restarts it; the rest of the stack keeps running. To clear the service configuration and data files across the entire stack, configure the behaviour first with pnp-button mode reset-system.
[HUAWEI] pnp-button mode reset-system
! now a long press on any member clears the whole stack's service config
[HUAWEI] display stack configuration
<HUAWEI> display stack peers

A partial reset inside a live stack deserves care. The reset member boots unconfigured, its stack priority and member ID revert to default, and when it rejoins it may not be the same member the topology expected — which is how a routine "reset one switch" turns into a multi-master or split-stack event. If the stack uses MAD (multi-active detection) that is a further reason to plan the change window: see Huawei stack split and MAD configuration. For the wider picture of stack provisioning, iStack stacking configuration covers member IDs and priorities, and startup file and configuration management explains how the next-startup file is chosen at boot.

The clean sequence for a full stack reset is therefore: back up the configuration from the master, disconnect the stack cables from one end, reset each member (or use pnp-button mode reset-system), then reconnect and re-provision from the highest-priority member so member IDs are assigned deterministically.

Verifying the Reset Did What You Expect

After the device comes back, confirm the outcome rather than assuming it:

<HUAWEI> display current-configuration
<HUAWEI> display saved-configuration
<HUAWEI> display startup
<HUAWEI> display version
<HUAWEI> display device

display startup is the one people forget: it shows the next-startup, backup and current configuration file names, which is how you prove the device is pointed at $_default.cfg (clean) rather than the old saved file. display version confirms the software image survived — a factory reset does not downgrade VRP, but it does clear the patch state on some platforms, so re-check any patch or licence you depend on. Finally, if the switch will be redeployed, set the hostname, management IP, NTP and a local administrator before reconnecting it to the production VLAN, not after.

Frequently Asked Questions

Does the PNP button reset delete the licence? No. Factory reset clears service configuration and data files and re-points the next-startup file; licensed features are held separately and survive the operation. Data-plane configuration that depended on the licence, however, is gone.

Why did the switch come back with an empty configuration instead of the default profile? Because protected/$_default.cfg was not present on the device. The reset only uses that file as the next-startup configuration if it exists; otherwise the next-startup file is empty.

Can I use the PNP button to reset a member of a ring stack? You can, but the member must be isolated from the stack first, or it will simply rejoin and relearn. Disconnect the stack ports from one end before the press.

Is the button reset the same as the one-key reset on the web UI? Both clear service configuration, but the button works with no login and no network, while the web and CLI paths require an authenticated session. For a locked-out device the button — or BootROM — is the only route.

How long should I hold it? More than six seconds. Longer is not better; the action triggers on the threshold, and holding through the reboot only risks an unintended second press when the device powers back up.

原文链接:https://support.huawei.com/enterprise/en/doc/EDOC1100277060/2d74840b/restoring-the-switch-to-factory-default