。产生这样感觉的原因是初学者往往对Cisco路由器的另一种运行模式ROM Monitor模式缺乏认识造成的。
路由器的ROM中除固化了一种功能有限的IOS之外,还有一种非IOS的简单操作系统,同IOS一样,也可以被加载,加载之后进入的模式被称为ROM Monitor模式。ROM Mintor模式通常被用于对设备进行低级调试和口令恢复。在网络设备的一般性调试中很少用到ROMMonitor模式。这是许多人对它不熟悉的主要原因。
以PC机的超级终端访问路由器,在路由器加电后的60s内按下Break键 (或Ctrl+Break键)就能进入到ROM Monitor模式下,口令恢复的操作便可以进行了。
监测清单2-5记录了对Cisco2500系列路由器口令恢复操作的全过程,其中与口令恢复操作无关的内容己被删节。
监测清单2-5 Cisco 2500系列路由器的口令恢复操作
第1段: ROM Monitor
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
Copyright (c) 1986-1995 by cisco Systems
2500 processor with 16384 Kbytes of main memory
(按下Break键, 进入ROM Monitor模式)
Abort at Ox1OEA81C (PC)
>?
$ Toggle cache state
B [filename] [TFTP Server IP address I TFTP Server Name]
Load and execute system image from ROM or from TFTP server
C [address] Continue execution [optional address]
D/S M LV Deposit value V of size S into location L with modifier M
E/S M L Examine location L with size S with modifier M
G [address] Begin execution
H Help for commands
I Initialize
K Stack trace
L [filename] [TFTP Server IP address ! TFTP Server Name]
Load system image from ROM or from TFTP server, but do not
begin execution
O Show configuration register option settings
P Set the break point
S Single step next instruction
T function Test device (? for help)
Deposit and Examine sizes may be B (byte), L (long) or S (short).
Modifiers may be R (register) or S (byte swap).
Register names are: DO-D7, AO-A6, SS, US, SR, and PC
>0
Configuration register=0xFFFF2102atlast boot
Bit# Configuration register option settings:
15 Diagnostic mode disabled
14 IP broadcasts do not have network numbers
13 Boot default ROM software if network boot fails
12-11 Console speed is 9600 baud
10 IP broadcasts with ones
08 Break disabled
07 OEM disabled
06 Ignore configuration disabled
03-OOBoot file is cisco2-2500 (or 'boot system' command)
>o/r 0x2142
>i
第2段:路由器正常启动
(以下为路由器的正常启动过程)
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
Copyright (c) 1986-1995 by cisco Systems
...(路由器启动报告,省略)
---System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: n
Press RETURN to get started!
Router>en
Router#sh version
Cisco Internetwork Operating Syste