交换机重置¶
[思科] 交换机重置
1. 交换机重置密码¶
- 断电后后长按mode键上电
- 在rommon模式下,执行如下指令,含义为下次启动不加载配置,boot启动设备。
- 在命令提示符中进入特权模式(#模式),将存档配置恢复至运行配置。进入配置模式重置密码,配置下次启动加载配置,然后保存重启。
Switch> enable
Switch# copy startup running
Switch# config t
Switch(config)# enable password CHANGE_ME_TO_A_UNIQUE_PASSWORD
Switch(config)# username cisco privilege 15 password CHANGE_ME_TO_ANOTHER_UNIQUE_PASSWORD
Switch(config)# no system ignore startupconfig switch all
Switch(config)# end
Switch# write
Switch# reload
2. 将设备恢复到出厂设置¶
- 断电后后长按mode键上电
- 在rommon模式下,执行如下指令,含义为下次启动不加载配置。
switch: flash_init
switch: SWITCH_IGNORE_STARTUP_CFG=1
switch: boot
Would you like to enter the initial configuration dialog? [yes/no]: no
Switch> enable
Switch# config t
Switch(config)# no system ignore startupconfig switch all
Switch(config)# system disable password recovery switch all
Switch(config)# config-register 0x102
Switch(config)# end
Switch# write