3、对路由器进行IOS升级;
Router#copy tftp flash
Address or name of remote host []? 172.18.6.75
(TFTP服务器地址)
Source filename []?c3640-i-mz.123-5a.bin
(需升级的新IOS映象文件名)
Destination filename [c3640-i-mz.123-5a.bin]?
Do you want to over write? [confirm]
Accessing tftp://172.18.6.75/ c3640-i-mz.123-5a.bin...
Loading c3640-i-mz.123-5a.bin from 172.18.6.75 (via Serial0/0:0): !!!!!
Erase flash: before copying? [confirm]
(flash memory存储空间不够,系统提示删除flash中的内容)
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Erase of flash: complete
Loading c3640-i-mz.123-5a.bin from 172.18.6.75 (via Ethernet0/0):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 16183804 bytes]
Verifying checksum... OK (0xA0C0)
16183804 bytes copied in 721.852 secs (22446 bytes/sec)
Router#
升级完成后,采用命令查看当前flash memory中的ISO文件。路由器中的ISO文件已经替换成c3640-i-mz.123-5a.bin。
重新引导路由器,应用新的ISO。
Router#reload
4、注意事项
采用以上方法升级时,通常需要考虑flash Memory的大小,如果flash memory无法存放两个IOS文件,则系统会提示删除flash中的文件,然后再上传最新的ISO文件,在操作过程中,路由器切记不可断电。
如果flash memory存放了两个IOS文件,则在完成IOS上传后,采用在全局配置模式下采用命令:
Router(config)#boot system flash:c3640-i-mz.123-5a.bin
指定用于引导的IOS文件名称。
IOS升级方法二-通过xmodem进行升级
采用xmodem协议进行IOS升级的方式,下载时不需要以太口电缆,只需超级终端即可。采用控制线缆连接路由器的console口与PC机的COM,使用超级终端软件访问路由器,这时不需要对PC和路由器配置任何地址。缺点是花费时间太多,速度太慢。一般是在方法一的升级过程中, 由于不小心使用了命令erase flash或升级过程中断电或其他操作导致路由器升级失败后,才采用此方式。
1、开关Cisco路由器的电源,在30秒内按下Ctrl+break键,中断路由器的正常启动,路由器进入rom监视模式,即 rommon 1>;
2、输入Xmodem命令
rommon 1 > xmodem –r c3640-i-mz.123-5a.bin
(c3640-i-mz.123-5a.bin为新的IOS映像文件)
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
Ready to receive file c3640-i-mz.123-5a.bin ...
(此时在超级终端的操作菜单中选择传送/发送文件 ,再选择Xmodem 协议并指明IOS映像文件所在的路径。)
按发送即开始上传IOS,此时可监控到数据传输的状态。
Erasing flash at 0x607c0000
program flash location 0x605b0000
Download Complete!
传完以后,对整个系统初始化 。
Router>
采用这种方法时,由于使用console口来传送,速率为9600bps,需要时间较长。因此可修改console口速率利用xmodem命令实现快速升级IOS。
rommon 1 > confreg 回车
Configuration Summary enabled are:
load rom after netboot fails
console baud: 9600
do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]: n
enable "use net in IP bcast address"? y/n [n]: n
disable "load rom after netboot fails"? y/n [n]: n
enable "use all zero broadcast"? y/n [n]: n
enable "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 [0]: 7 (采用11520 速率进行传输)
change the boot characteristics? y/n [n]: n
Configuration Summary
enabled are:
console baud: 115200
boot: image specified by the boot system commands or default to: cisco3640
do you wish to change the configuration? y/n [n]: n
You must reset or power cycle for new config to take effect
rommon 2 > reset
注意:系统reset后,修改超级终端里com口的通讯速率为115200,重新启动路由器,出现 rommon 1> 提示符 即可通过xmodem命令下载IOS文件。 待升级完成后,修改回计算机串口与超级终端的波特率、路由器confreg下的xmodem等传输速率为9600bps
责任编辑:小草