能够通过控制台恢复路由器的密码
实验要求:
1. 中断路由器启动 ctrl+break键
2. 更改配置寄存器的值为0x2142
3. 重启路由器
4. 查看保存的配置文件中enable密码
5. 重设enable密码为你的姓名全拼
6. 保存配置
7. 更改配置寄存器的值为0x2102
试验拓扑: 实验过程
关闭路由器,启动是
Self decompressing the image : 启动路由器时按ctrl+Break键
##########################
monitor: command "boot" aborted due to user interrupt
rommon 1 > confreg 0x2142 配置配置寄存器的值为0x2142
rommon 2 > reset 重启路由器
Continue with configuration dialog? [yes/no]: n 不再加载startup-config
Router#show startup-config 查看以前的密码
注意关键一步是把startup-config配置文件copy到running-config,这样改过密码过再拷贝回去,就没有丢失其它配置:
Router#copy startup-config running-config 将以前的配置加载到内存
Router#config t 进入全局配置模式
Router(config)#enable password hanligang 将密码设置自己的名字
Router(config)#
Router#copy running-config startup-config 将更改完密码的配置保存
Destination filename [startup-config]?
Building configuration...
[OK]
Router#Router#show version 查看配置寄存器的值
Configuration register is 0x2142
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#con
Router(config)#config-register 0x2102 更改配置寄存器的值