设备启动时按下“Ctrl+C”或“Ctrl+Break”进入Rommon模式(rommon 1 >)
rommon 1 > confreg 0x2142 #修改路由器寄存器的值使设备启动不加载启动配置文件
rommon 2 > reset #重启设备
#copy startup-config running-config #导入启动配置文件到运行配置文件
rommon 2 > reset #重启设备
#copy startup-config running-config #导入启动配置文件到运行配置文件
此时可以直接重新配置各种所需的新密码,修改后还需进行以下操作
(config)#config-register 0x2102 #修改寄存器的值使设备启动加载启动配置文件
#write #保存当前运行配置到启动配置文件并重启设备
#write #保存当前运行配置到启动配置文件并重启设备