1、通过以太口升级

如果因为误操作将FLASH中的IOS删除了,那么ROUTER将进入ROM中存储的基本IOS模式,在这种模式下,原IOS中的大部分命令都无法使用。此时,可以通过TFTP服务器向ROUTER传输IOS,使系统得已恢复。其具体的过程如下:

在一台机器上安装TFTP服务器软件,将IOS文件放置在TFTP服务器的默认根目录下,打开TFTP服务器,用控制线将这台机器与ROUTER连接起来,另外用交叉网线连接机器的网卡和ROUTER的以太口。(也可以用普通的网线将ROUTER和交换机相连再连接机器)做好以上工作后,打开机器的超级终端工具,连接上ROUTER,此时窗口中出现的命令行提示符为:

ROMMON 1 >(其中“1”代表命令行的行数)。在提示符后输入命令:

===================================================================
ROMMON 1 >IP_ADDRESS = ROUTER的IP地址(要和TFTP服务 器在同一网段内)
ROMMON 2 >IP_SUBNET_MASK = ROUTER的子网掩码
ROMMON 3 >DEFAUT_GATEWAY = 默认网关地址(可以没有,也可以是TFTP服务器)
ROMMON 4 >TFTP_SERVER = TFTP 服务器IP地址
ROMMON 5 >TFTP_FILE = IOS文件名(只给出文件名,不需要路径)
ROMMON 6 >tftpdnld
===================================================================

注意:前面的几条命令必须使用大写,而最后的tftpdnld则要用小写。

在tftpdnld命令执行后,只要根据提示选择,就可完成文件的传输。当文件传输完后,将自动回到命令行下,输入reset重启ROUTER,重启后就又回到了熟悉的IOS模式下甚至连以

前配置的信息都不会丢失。

 

 

 

2、通过Xmodem升级

先打开超级终端,进入rommon模式(Ctrl+Break组合键),键入confreg,如下:

===================================================================
rommon 1 > confreg
Configuration Summary
enabled are:
load rom after netboot fails
console baud: 9600
boot: p_w_picpath specified by the boot system commands
or default to: cisco2-C2600
do you wish to change the conf iguration? y/n [n]: y (选择 yes)
enable "diagnostic mode"? y/n [n]: n (选择 no)
enable "use net in IP bcast address"? y/n [n]: n (选择 no)
disable "load rom after netboot fails"? y/n [n]: n (选择 no)
enable "use all zero broadcast"? y/n [n]: n (选择 no)
enable "break/abort has effect"? y/n [n]: n (选择 no)
enable "ignore system config info"? y/n [n]: n (选择 no)
change console baud rate? y/n [n]: y (选择 yes)
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400,
4 = 19200, 5 = 38400, 6 =  57600, 7 = 115200  [0]: 7 (选择7,用最大的115200速率的xmodem传输)
change the boot characteristics? y/n [n]: n (选择 no)
Configuration Summary
enabled are:
load rom after netboot fails
console baud: 115200
boot: p_w_picpath specified by the boot system commands
or default to: cisco2-C2600
do you wish to change the configuration? y/n [n]: n (选择 no)
You must reset or power cycle for new config to take effect
rommon 2 > reset
===================================================================

注意:在此时键入reset之前,开始定义串口速度(设备管理器->端口属性->串口速度调为115200),然后再修改超级终端里设置速率为115200,记住,一定这么做!否则出现乱码

!然后关闭这个超级终端,重新建立一个超级终端连接,(期间系统重新启动)启动后,出现rommon 1 >提示符,然后输入:

======================================================
rommon 1 > xmodem -r
Do not start the sending program yet...
Invoke this application only for di saster recovery.
Do you wish to continue? y/n [n]: y (选择 yes)
Ready to receive file ...
======================================================

此时,在超级终端的菜单上的传送->发送文件->选择IOS镜像文件所在地以及选择使用“xmodem”协议,点击“发送”即可。等待10-20分钟左右就把3-6M的IOS灌进去了!(修改回计算机串口与超级终端、路由器confreg下的xmodem等9600的传输速率)

注意:实际操作的时候,我发现这个命令总是改不成功,后来发现在line con 0下面有了一个speed 115200,所以即使改register成功,启动以后ROUTER又执行speed 115200,还

是不行,所以如果有这个问题,记得把这个语句no掉即可。

===================================================================

Router>enable
Router#reload
Proceed with reload? [confirm]
00:01:04: %SYS-5-RELOAD: Reload requested
System Bootstrap, Version 11.3(2)XA4, RE LEASE SOFTWARE (fc1) 
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
PC = 0xfff0a530, Vector = 0x500, SP = 0x680127b0 
C2600 platform with 24576 Kbytes of  main memory
PC = 0xfff0a530, Vector = 0x500, SP = 0x80004684
monitor: command "boot" aborted due to user interrupt
rommon 1 > confreg
Configuration Summary
enabled are:
load rom after netboot fails
console baud: 115200
boot: p_w_picpath specified by the boot&n bsp;system commands
or default to: cisco2-C2600
do you wish to change the conf iguration? y/n [n]: y (选择 yes)
enable "diagnostic mode"? y/n [n]: n (选择 no)
enable "use net in IP bcast ad dress"? y/n [n]: n (选择 no)
disable "load rom after netboot fails"? y/n [n]: n (选择 no)
enable "use all zero broadcast"? y/n [n]: n (选择 no)
enable "break/abort has effect"? y/n [n]: n (选择 no)
enable "ignore system config info"? y/n [n]: n (选择 no)
change console baud rate? y/n [n]: y (选择 yes)
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400,
4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [7]: 0 (选择0改回用标准速率速率9600的xmodem传输)
change the boot characteristics? y/n [n]: n (选择 no)
Configuration Summary
enabled are:
load rom after netboot fails
console baud: 9600
boot: p_w_picpath specified by the boot system commands
or default to: cisco2-C2600
do you wish to change the configuration? y/n [n]: n (选择 no)
You must reset or power cycle for new config to take effect
rommon 2 > reset
===================================================================