用TFTP通过CLI(Command Line Interface)升级Cisco Catalyst 2900.XL/3500.XL 交换机IOS 升级前需要留意事项: 1, 留意switch上的DRAM (Dynamic Random access Memory) 及 Flash 的大小。每个IOS都对DRAM及Flash有一定要求,在升级之前必须要确定DRAM及Flash的大小。 确定DRAM的大小可以通过命令show version,如 有 8 MB DRAM 的 2900XL switch: Switch#show version Cisco Internetwork Operating System Software IOS (TM) C2900XL Software (C2900XL.C3H2S.M), Version 12.0(5)XU, RELEASE SOFTWARE) Copyright (c) 1986.2000 by cisco Systems, Inc. Compiled Mon 03.APR.00 16:37 by swati Image text.base: 0x00003000, database: 0x00301398 ROM: Bootstrap program is C2900XL boot loader 2900XL_84.3 uptime is 27 minutes System returned to ROM by reload System image file is "flash:c2900XL.c3h2s.mz.120_5.XU.bin" cisco WS.C2924M.XL (PowerPC403GA) processor (revision 0x11) with 8192K/1024K bytes of memory. Processor board ID 0x10, with hardware revision 0x03 Last reset from warm.reset ...(output suppressed) 信息显示在交换机上有 8192K DRAM 即 8 MB DRAM 确定FLASH的大小可以通过命令dir flash 如: switch:dir flash: (This command is only run if you are at the switch: prompt and want to determine how big the flash Directory of flash:/ 2 .r.. 2535 config.text 4 .rwx 1644160 c2900XL.c3h2s.mz.120_5.XU.bin 5 .r.. 960 vlan.dat 6 .r.. 19 env_vars 1963008 bytes available (1649664 bytes used)
5, 检查重命名后的文件。 Switch# dir flash: Directory of flash: 3 ...x 80971 new_image.bin 4 d..x 14144 html 7 .rwx 84 env_vars 5 ...x 111 info 258 ...x 111 info.ver 230 .rwx 1470 config.text 3612672 bytes total (1229312 bytes free) 6, 进入全局模式: switch# config terminal Enter configuration commands, one per line. End with CNTL/Z. switch(config)# 7, Disable web 服务 switch(config)# no ip http server 8, 更改boot 机引导文件 Switch(config)# boot system flash:new_image 9, 返回 privileged EXEC mode: switch(config)# end 10, 删除HTML文件: switch# delete flash:html/* 11, 假如从11.2(8)SA5 或更早的版本升级, 还要删除SNMP目录及下面的文件 switch# delete flash:html/Snmp/* 注重 'S'在 'SNMP'里是大写。 12, 假如从11.2(8)SA5 或更早的版本升级,要在删除后建立SNMP目录 switch# mkdir flash:html/Snmp 13, 使用tar命令进行升级 Switch#tar /x tftp://server_ip_address//path/filename.tar flash: Loading /path/filename.tar from server_ip_address (via VLAN1):!) extracting info (111 bytes) extracting filename.bin (1557286 bytes)!!!!!!!!!!!!!!!!!!!! html/ (directory) extracting html/Detective.html.gz (1139 bytes)! extracting html/ieGraph.html.gz (553 bytes) extracting html/DrawGraph.html.gz (787 bytes)! . . .(output Suppressed) [OK . 2723840 bytes] (This message means that the TFTP process has passed sUCcessfully and both .bin and html files have been extracted successfully) 14, 进入全局设置模式 switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. 15, 重新启动web服务 switch(config)# IP http server 16, 返回 privileged EXEC 模式: switch(config)# end 17, Reload 交换机 switch# reload System configuration has been modified. Save? [yes/no]:y Proceed with reload? [confirm] 升级完毕