1、Cisco3750 更换( 升级)IOS背景:两台 Cisco WS-C3750G-24TS 一主一备,生产环境中运行中故障 vlan 之间不通,网口灯不亮,罢工了。配置删除后重新导入备份配置无法工作,故需要更换 IOS 测试软件或硬件故障。准备工作:网线、思科交换机 console 线、tftp 工具(3CDaemon)、r-SecureCRT操作步骤:一、笔记本设置固定 IP:192.168.10.100,交换机 VLAN 地址为:192.168.10.1,将笔记本连与交换机相连,ping 测试笔记本与交换机间通信是否正常(关掉笔记本防火墙和杀毒软件)。FountainCenter#pin
2、g 192.168.10.100Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.10.100, timeout is 2 seconds:.!Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms二、查看版本信息FountainCenter#show versionCisco IOS Software, C3750 Software (C3750-IPBASE-M), Version 12.2(35)SE5, RELEA
3、SE SOFTWARE (fc1)Copyright (c) 1986-2007 by Cisco Systems, Inc.Compiled Thu 19-Jul-07 19:15 by nachenImage text-base: 0x00003000, data-base: 0x01080000ROM: Bootstrap program is C3750 boot loaderBOOTLDR: C3750 Boot Loader (C3750-HBOOT-M) Version 12.2(25r)SEE3, RELEASE SOFTWARE (fc1)FountainCenter upt
4、ime is 1 minuteSystem returned to ROM by power-onSystem image file is “flash:c3750-ipbase-mz.122-35.SE5/c3750-ipbase-mz.122-35.SE5.bin“cisco WS-C3750G-24TS (PowerPC405) processor (revision R0) with 118784K/12280K bytes of memory.Processor board ID FDO1311X2BELast reset from power-on3 Virtual Etherne
5、t interfaces28 Gigabit Ethernet interfacesThe password-recovery mechanism is enabled.512K bytes of flash-simulated non-volatile configuration memory.Base ethernet MAC Address : 00:24:F9:BC:29:00Motherboard assembly number : 73-7058-15Power supply part number : 341-0045-02Motherboard serial number :
6、FDO13110F9QPower supply serial number : LIT13090BSRModel revision number : R0Motherboard revision number : A0Model number : WS-C3750G-24TS-SSystem serial number : FDO1311X2BETop Assembly Part Number : 800-21894-08Top Assembly Revision Number : B0Version ID : V08CLEI Code Number : COMUH10ARAHardware
7、Board Revision Number : 0x09Switch Ports Model SW Version SW Image - - - - - * 1 28 WS-C3750G-24TS 12.2(35)SE5 C3750-IPBASE-M Configuration register is 0xF三、查看 Flash 信息:FountainCenter#show flashDirectory of flash:/2 -rwx 736 Jun 8 2009 13:52:41 +08:00 vlan.dat.renamed4 -rwx 3860 Mar 1 1993 08:13:12
8、+08:00 config.text.renamed5 -rwx 5 Mar 1 1993 08:13:12 +08:00 private-config.text.renamed6 drwx 192 Mar 1 1993 08:06:34 +08:00 c3750-ipbase-mz.122-35.SE5510 -rwx 6578 Mar 4 1993 06:09:21 +08:00 config.text511 -rwx 676 Mar 1 1993 08:04:06 +08:00 vlan.dat512 -rwx 5 Mar 4 1993 06:09:21 +08:00 private-c
9、onfig.text15998976 bytes total (6357504 bytes free)四、查看系统目录下文件信息:FountainCenter#cd c3750-ipbase-mz.122-35.SE5FountainCenter#dirDirectory of flash:/c3750-ipbase-mz.122-35.SE5/7 -rwx 7175078 Mar 1 1993 08:05:36 +08:00 c3750-ipbase-mz.122-35.SE5.bin8 drwx 4224 Mar 1 1993 08:05:58 +08:00 html509 -rwx 59
10、8 Mar 1 1993 08:06:34 +08:00 info15998976 bytes total (6357504 bytes free)FountainCenter#pwdflash:/c3750-ipbase-mz.122-35.SE5/五、查看启动信息:FountainCenter#show bootBOOT path-list : flash:c3750-ipbase-mz.122-35.SE5/c3750-ipbase-mz.122-35.SE5.binConfig file : flash:/config.textPrivate Config file : flash:/
11、private-config.textEnable Break : noManual Boot : noHELPER path-list :Auto upgrade : yesAuto upgrade path :六、备份设备 IOS(防止升级失败):FountainCenter#copy flash: tftp:Source filename /c3750-ipbase-mz.122-35.SE5/? c3750-ipbase-mz.122-35.SE5.binAddress or name of remote host ? 192.168.10.100Destination filenam
12、e c3750-ipbase-mz.122-35.SE5.bin?!7175078 bytes copied in 16.693 secs (429826 bytes/sec)FountainCenter#七、再次核对 Flash 信息:FountainCenter#show flashDirectory of flash:/2 -rwx 736 Jun 8 2009 13:52:41 +08:00 vlan.dat.renamed4 -rwx 3860 Mar 1 1993 08:13:12 +08:00 config.text.renamed5 -rwx 5 Mar 1 1993 08:1
13、3:12 +08:00 private-config.text.renamed6 drwx 192 Mar 1 1993 08:06:34 +08:00 c3750-ipbase-mz.122-35.SE5510 -rwx 6578 Mar 4 1993 06:09:21 +08:00 config.text511 -rwx 676 Mar 1 1993 08:04:06 +08:00 vlan.dat512 -rwx 5 Mar 4 1993 06:09:21 +08:00 private-config.text15998976 bytes total (6357504 bytes free
14、)FountainCenter#cd c3750-ipbase-mz.122-35.SE5FountainCenter#dirDirectory of flash:/c3750-ipbase-mz.122-35.SE5/7 -rwx 7175078 Mar 1 1993 08:05:36 +08:00 c3750-ipbase-mz.122-35.SE5.bin8 drwx 4224 Mar 1 1993 08:05:58 +08:00 html509 -rwx 598 Mar 1 1993 08:06:34 +08:00 info15998976 bytes total (6357504 b
15、ytes free)八、删除设备以前的 IOS(3750 存储为 32M,剩余空间小于新 IOS 大小):FountainCenter#delete flash:c3750-ipbase-mz.122-35.SE5.binDelete filename /c3750-ipbase-mz.122-35.SE5/c3750-ipbase-mz.122-35.SE5.bin?Delete flash:/c3750-ipbase-mz.122-35.SE5/c3750-ipbase-mz.122-35.SE5.bin? confirmFountainCenter#FountainCenter#九、上传
16、新的 IOS 到交换机:FountainCenter#copy tftp: flash:Address or name of remote host ? 192.168.10.100Source filename ? c3750-ipbasek9-mz.122-55.SE9.binDestination filename c3750-ipbasek9-mz.122-55.SE9.bin?Accessing tftp:/192.168.10.100/c3750-ipbasek9-mz.122-55.SE9.bin.Loading c3750-ipbasek9-mz.122-55.SE9.bin
17、from 192.168.10.100 (via Vlan2):!OK - 12106358 bytes12106358 bytes copied in 170.365 secs (71061 bytes/sec)十、更新新 IOS 后,查看启动信息:FountainCenter#FountainCenter#FountainCenter#show bootBOOT path-list : flash:c3750-ipbase-mz.122-35.SE5/c3750-ipbase-mz.122-35.SE5.binConfig file : flash:/config.textPrivate
18、Config file : flash:/private-config.textEnable Break : noManual Boot : noHELPER path-list :Auto upgrade : yesAuto upgrade path :十一、更改启动顺序,设置为新 IOS:FountainCenter#config tEnter configuration commands, one per line. End with CNTL/Z.FountainCenter(config)#boot system flash:c3750-ipbasek9-mz.122-55.SE9.
19、binFountainCenter(config)#exitFountainCenter#wrBuilding configuration.OK十二、查看启动信息是否为新 IOS:FountainCenter#show bootBOOT path-list : flash:c3750-ipbasek9-mz.122-55.SE9.binConfig file : flash:/config.textPrivate Config file : flash:/private-config.textEnable Break : noManual Boot : noHELPER path-list :
20、Auto upgrade : yesAuto upgrade path :FountainCenter#十三、查看 Flash 信息是否完全:FountainCentershow flashDirectory of flash:/2 -rwx 736 Jun 8 2009 13:52:41 +08:00 vlan.dat.renamed3 -rwx 12106358 Mar 1 1993 08:26:13 +08:00 c3750-ipbasek9-mz.122-55.SE9.bin4 -rwx 3860 Mar 1 1993 08:13:12 +08:00 config.text.renam
21、ed5 -rwx 5 Mar 1 1993 08:13:12 +08:00 private-config.text.renamed6 drwx 128 Mar 1 1993 08:10:53 +08:00 c3750-ipbase-mz.122-35.SE5510 -rwx 6578 Mar 4 1993 06:09:21 +08:00 config.text511 -rwx 676 Mar 1 1993 08:04:06 +08:00 vlan.dat512 -rwx 5 Mar 4 1993 06:09:21 +08:00 private-config.text7 -rwx 1048 Ma
22、r 1 1993 08:01:57 +08:00 multiple-fs15998976 bytes total (1424384 bytes free)十四、删除原系统文件夹(delete 无法删除空目录):FountainCenterenPassword:FountainCenter#FountainCenter#FountainCenter#delete flash:c3750-ipbase-mz.122-35.SE5Delete filename c3750-ipbase-mz.122-35.SE5?Delete flash:c3750-ipbase-mz.122-35.SE5? co
23、nfirm%Error deleting flash:c3750-ipbase-mz.122-35.SE5 (Is a directory)FountainCenter#delete /recursive /force flash:/c3750-ipbase-mz.122-35.SE5(/recursive 删除指定文件夹下的所有文件和子文件夹 /force 删除而不给出提示)十五、确认原系统文件夹是否被删除:FountainCenter#show flashDirectory of flash:/2 -rwx 736 Jun 8 2009 13:52:41 +08:00 vlan.dat.r
24、enamed3 -rwx 12106358 Mar 1 1993 08:26:13 +08:00 c3750-ipbasek9-mz.122-55.SE9.bin4 -rwx 3860 Mar 1 1993 08:13:12 +08:00 config.text.renamed5 -rwx 5 Mar 1 1993 08:13:12 +08:00 private-config.text.renamed510 -rwx 6578 Mar 4 1993 06:09:21 +08:00 config.text511 -rwx 676 Mar 1 1993 08:04:06 +08:00 vlan.dat512 -rwx 5 Mar 4 1993 06:09:21 +08:00 private-config.text7 -rwx 1048 Mar 1 1993 08:01:57 +08:00 multiple-fs15998976 bytes total (3875328 bytes free)十六、保存配置并重启交换机:FountainCenter#writeBuilding configuration.OKFountainCenter#FountainCenter#reloadProceed with reload? confirmFountainCenter#