cisco路由器密码恢复

来源:互联网 发布:淘宝twizzlers扭扭糖 编辑:程序博客网 时间:2024/04/30 16:22

.原理

启动寄存器(NVRAM)的数值是修改路由器的模式的一个关键,尽量不要修改!
0x2101:
flash可以读写.
0x2102:
正常模式启动.
0x2141:
flash进行合并,如果flash条子是2,则利用此模式可以合二为一.
0x2142:
不读取NVRAM的基本配置模式,用于密码的恢复.

只要启动时将NVRAM的数值修改成0x2142就不会读取密码了,进入系统后修改密码,然后再将NVRAM的数值改回0x2012,保存后重启就可以进入正常的IOS


R#show version                                    "version中可以查看到路由器NVRAM的数值"
......

Configuration register is 0x2102                   "默认的数值为0x2102"

 

.步骤:1.关闭路由器电源

         2.启动路由器,按键盘上的Ctrl+Break(中断)键进入rommon模式(最小IOS模式)

rommon 1 > ?
boot                boot up an external process
confreg             configuration register utility
dir                 list files in file system
help                monitor builtin command help
reset               system reset
set                 display the monitor variables
tftpdnld            tftp image download
unset               unset a monitor variable
rommon 2 >

         3.修改配置寄存器的数值为0x2142

rommon 2 > confreg 0x2142
rommon 3 >

         4.修改完成后重启路由器

rommon 4 > reset

         5.重启后进入正常IOS模式

         --- System Configuration Dialog ---
Continue with configuration dialog? [yes/no]: n
Press RETURN to get started!

R>en
R#
         6.copy startup-config running-config        "
start的配置copyrun中才能修改原来配置的密码,否则就是修改不读取密码的0x2142IOS配置了"

         7.进入全局模式修改密码
R#configure t
Enter configuration commands, one per line.  End with CNTL/Z.
R(config)#enable password 123
R(config)#

         8.修改密码后将NVRAM的数值改回原来的0x2102      

R#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R(config)#config-register 0x2102                  "
不修改的话永远都是读取0x2142IOS的配置了,而不是正常的0x2102的配置"

         9.保存配置

R#write或者copy run start

         10.重新启动路由器

reload                                            "进入到正常的0x2102IOS模式下"

0 0
原创粉丝点击