Cisco系列路由器密码恢复研究与实践( 二 )


801#configure terminal
801(config)line console 0
801(configline)#login
801(configline)#passWord xxxxxxxxx
801(configline)#
801(configline)#write memory (copy runningconfig startupconfig)
4Cisco2500系列路由器(以2509为例)具体操作方法
(1)在启动的60 s内按下中断键Ctrl Break,假如Break被屏蔽了可以使用循环开机的方法 , 使设备进入rom monitor状态 。
(2)在rom monitor中输入o命令:
>o
configuration register=0X2102 at last boot
……
记下当前的Configuration register值 , 这里是0x2102 , 通常为0x2102或0x102 。假如用命令不能获得有关提示 , 可以查看类似的路由器来获得配置寄存器的值或用0x2102试试 。
(3)输入“>o/r 0x0142” , 更新Configuration register值 , 使路由器启动时跳过配置文件直接启动 , 以便原来的密码不起作用 , 具体操作如下:
>o/r 0x0142
(4)重新启动路由器:
>I
rommon 2>reset
(5)在“Setup”模式 , 对所有问题回答“No”
(6)进入特权模式:
router>enable
(7)下载NVRAM
Router>configure memory
(8)恢复原始配置寄存器值并激活所有端口:
2509#configure terminal
2509(config)#configregister 0X2102
2509(config)#interface xx
2509(config)#no shutdown
(9)查询并记录丢失的口令:
2509#show configuration (show startupconfig)
(10)修改口令:
2509#configure terminal
2509(config)line console 0
2509(configline)#login
2509(configline)#password xxxxxxx
2509(configline)#
2509(configline)#write memory (copyrunningconfigstartupconfig)
5Cisco2600系列路由器(以2611为例)具体操作方法
(1)将路由器的口和计算机串口相连 , 启动计算机超级终端 , 开启路由器电源 , 在开机60s内按使路由器进入状态 , 提示符:rommon1>
(2)在Rommon中输入:conf reg 0x42,如下所示:
Rommon 1>conf reg 0x42
(3)输入reset , 命令如下:
Rommon 2>reset
(4)当提示是否进入对话配置时回答“no”(如误输入“yes”,马上按Ctrl c退出 , 出现“press return to get started!”按回车 , 进入rom模式router> 。
(5)键入enable命令进入exec状态 , 键入router#show config查看原路由器配置和未加密码口令 , 建议马上做一文本备份文件 , 以免误操作将原路由器配置丢失 。
(6)下载NVRAM , 将NVRAM模式中的参数表装入内存:
Router# configuration memory
(7)更改完毕一定要写入NVRAM中 , 否则路由器原配置会丢失以及改写口令无效:
Router# write memory
(8)将第3步查到的登记码还原 , 一般为0x2102(即从闪存正常启动 , 并屏蔽中断) , 并激活所有端口(系统会将所有端口自动shutdown):
Router#configregister 0x2102
Router?(config)#interface xx
Router(configif)#no shutdown
Router(configif)#ctrl-z
(9)重新启动路由器:Router# reload 。
63600系列路由器(以3640为例)具体操作方法
3640的密码恢复和26系列基本相似 , 都是进入监控模式 , 运行conf reg命令 , 启动时忽略配置文件 , 进行直接启动 。此方法同样适用于4500、7500、12000系列路由器 。
7Cisco系列路由器进入rom状态的几种方法
对于Cisco的各种路由器进入rom状态的方法不尽相同 , 但一般通过如下3种方法可以进入rom状态 , 在使用过程中可以分别试用 。
(1)假如Break未被屏蔽 , 可以在开机60 s内按Ctrl Break键中断启动过程 , 进入rom状态 。
(2)假如Break键已经屏蔽 , 可以通过循环开机的方法进入rom状态 , 方法是:路由器开机后 , 将电源关闭 , 间隔5 s后重新开机 , 一般会进入rom状态 。此方法适用于7500、12000等路由器 。

推荐阅读