<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

通常由于我们对IOS的误操作,导致了无法启动。这里讲讲cisco几种恢复的方法。

前期准备工作:

1. Cisco TFTP server 软件,把要灌的IOS拷到该软件的目录中运行TFTPServer.exe

2. Tftp ip地址是可以ping

3. 将计算机串口和路由器CONSLE口相连

4. ios 必须要加后缀 .bin

 

tftpdnld 方式 恢复Router 2600 IOS

1) 将计算机串口和路由器CONSLE口相连

一定将计算机网口与路由器第一个以太口f0/0相连.

2) 启动TFTP服务器,并将要下载的版本放于指定目录下面。

3) 冷启动路由器,在开机的前60秒之内,按住“Ctrl+Break”键。

4) 这时系统会进入灾难恢复模式,其提示符为“Rommon&gt;”

5) Rommon1>IP_ADDRESS=192.168.1.2 // 设置f0/0口的IP地址为192.168.1.2

6) Rommon2>IP_SUBNET_MASK=255.255.255.0 // 设置子网掩码为255.255.255.0

7) Rommon3>DEFAULT_GATEWAY=192.168.1.254 // 缺省网关随便设置

8) Rommon4>TFTP_SERVER=192.168.1.1 // 设置TFTP服务器的IP地址192.168.1.254

9) Rommon5>TFTP_FILE=c2600-ik8o3s-mz.122-11.T.bin // TFTP服务器上备份IOS的文件名

10) Rommon6> tftpdnld    // 准备复制IOS映像  (必须小写)

注意:前面的几条命令必须使用大写,而最后的tftpdnld则要用小写。//此时保证TFTP是打开的

Do you wish to continue? y/n: [n]: y

Receiving c2600-ik8o3s-mz.122-11.T.bin from 192.168.1.1

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Rommon8>reset 

又回到了熟悉的IOS模式下输。当文件传输完后,将自动回到命令甚至连以前配置的信息都不会丢失。

查看下配置寄存器的值,如果不正确(如:Configuration register is 0x3922

我们需要修改为0x2102

Router(config)#config-register 0x2102

Router# reload

-------------------- 分割线------------------

xmodem 方式恢复(即串口) Router 2600/3600 IOS

1) PC终端连接路由器发console口,打开没有IOS的路由器,路由器会进入监控模式(rommon)

2) 为了提高数据传输速度,首先更改路由器的传输速率,

rommon模式,输入: rommon 1&gt;confreg (回车) 根据提示,只选择修改传输速率级别为7(115200),其它参数为系统默认;

过程:

rommon 1>confreg

do you wish to change the configuration? y/n [n]: y

disable "diagnostic mode"? y/n [n]: n

enable "use net in IP bcas

disable "load rom after netboot fails"? y/n [n]: n

enable "use all zero broadcast"? y/n [n]: n

disable "break/abort has effect"? y/n [n]: n

enable "ignore system config info"? y/n [n]: n

change console baud rate? y/n [n]: y

enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400

4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [7]: 7

change the boot characteristics? y/n [n]: n

do you wish to change the configuration? y/n [n]: n

rommon 2>reset // 重启

本人不建议修改速率

继续输入:

rommon 2>xmodem -r ( 回车)

会提示如下警告:

WARNING: All existing data in bootflash will be lost!

Invoke this application only for disaster recovery.

Do you wish to continue? y/n [n]: y ( 系统提示是否确认该操作,选Y继续)

Ready to receive file ... §§ ( 出现§字符,路由器等待接收数据)

4) 传送IOS文件 :

PC终端的界面,点击"传送"菜单>"传送文件" :在弹出的对话框选择IOS文件与传输协议(Xmodem)

点击发送按钮,开始传送IOS文件;

整个传输过程为30分钟-1小时30分左右,视具体情况而言;

5) 当上一步骤IOS文件传送完毕,系统会自动加载IOS文件到RAM运行,提示如下:

Download Complete! program load complete, entry point: 0x80008000, size: 0xf<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />7258c Self decompressing the p_w_picpath : #################################################

################################################################################ ################################################################################

#################################################### [OK]

回车直到出现熟悉的提示语句 Press RETURN to get started!

这时,千万不要重启,因为IOS还没有灌入flash中(可以用show flash查看),只在RAM

我们需要用前面讲过的正常的上传IOS方法,使用100M速率再传一次IOS

Copy tftp flash

6) 查看路由器信息:

R2620# show flash \\ 这是flash中就会有操作系统了

R2620# show version \\ 最后一行的寄存器值也不是正常的0X2102

7) 恢复路由器正常设置

R2620(config)#line console 0

R2620(config-line)#speed 9600 \\ 修改console口传输速率

断开终端连接,以正常速率(9600)连接路由器,查看信息:

R2620(config-line)#exit

R2620(config)# config-register 0x2102 \\ 修改配置寄存器的值为正常值

R2620#reload

System configuration has been modified. Save? [yes/no]: y

Building configuration...

[OK]

Proceed with reload? [confirm]

R2620# show version \\ 最后一行的寄存器正常了,为0X2102

 -------------------- 分割线------------------

 

xmodem 方式恢复Switch 2950

1. 拔下交换机电源,用手按住交换机“Mode” 按钮,插上电源,等待交换机进入控制台模式。其提示符为“switch: ”

2. 如果没有IOS文件,会直接进入控制台模式 switch:

switch: flash_init           // 初始化flash文件系统

switch: dir flash:            // 查看flash  中的内容

 

3. 执行命令copy xmodem: flash:filename

其中,filename是硬盘中的IOS的文件名

→此时交换机会出现CCCCCC...........字符,表示正在试图通过xmodem协议连接

 

→在应用程序超级终端中,选择菜单传输--->发送文件协议选择: xmode

在还没有超时之前在超级终端上—传送—发送文件—浏览到要发送到交换机上的IOS文件,并更改对话框内的“协议”项为“xmodem

switch: Boot   // 重启进入switch>模式

 

4. 然后show version, show flash以核实操作系统。

5. 恢复配置文件

   Copy tftp run

 

指定启动的ios

2950(config)#boot system flash:c2950-i6q4l2-mz.121-13.EA1.bin

 

指定启动的config

2950(config)#boot config flash:config.txt