首页/网络/网络设备配置速查/恢复出厂配置(reset saved-configuration)
设备开局与基础配置61 条

恢复出厂配置(reset saved-configuration)

设备复用、报废、实验环境重置的标准动作:清空启动配置 + 重启;思科二层交换机还要额外删除 vlan.dat,VLAN 数据库不在 startup-config 里。

网络设备配置速查网络更新于 2026-10-12
场景设备回收复用、实验重置、报废前清理
适用全部设备
命令族reset saved-configuration / erase startup-config / reset saved-configuration

华为 VRP

华为 VRP
<SW-CORE-01> reset saved-configuration
Warning: The action will delete the saved configuration in the device.
Are you sure to continue? (y/n)[n]: y
<SW-CORE-01> reboot

思科 IOS

思科 IOS
SW-CORE-01# erase startup-config
Erasing the nvram filesystem will remove all configuration files!
SW-CORE-01# delete vlan.dat
SW-CORE-01# reload

H3C Comware

H3C Comware
<SW-CORE-01> reset saved-configuration
Are you sure to reset the saved configuration? (y/n)[n]: y
<SW-CORE-01> reboot
三厂命令同为 reset saved-configuration(华为/H3C)与 erase startup-config(思科);思科若漏删 vlan.dat,重启后 VLAN 定义仍在,等于没恢复干净。

易错点

  • 操作不可逆:执行前务必先备份配置与 vlan.dat,并双人核对设备名避免误清在网设备
  • 华为 reset 后若直接在 reboot 时选择保存,会把当前运行配置又写回去,白清一次

数据来源与参考

  • 华为产品文档:恢复出厂配置
  • Cisco IOS 恢复出厂(erase startup-config)
  • H3C Comware 7 配置文件恢复

相关工具

​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌