本内容从两种方法向大家介绍cisco IOS平台堆叠设备进行升级的配置和操作过程
一. 使用.bin镜像升级Cisco IOS
1. 准备软件版本
在思科官方网站(官网传送门)下载你需要的系统版本文件。
2. 将版本文件上传到设备(有两种方式上传到设备)
1)用FTP/TFTP上传
3750stack#copy tftp: flash:Address or name of remote host [x.x.x.x]?
Source filename [c3750e-universalk9-mz.152-4.E10.bin]? c3750e-universalk9-mz.152-4.E10.bin
Destination filename [c3750e-universalk9-mz.152-4.E10.bin]?
Accessing tftp://x.x.x.x/c3750e-universalk9-mz.152-4.E10.bin...
Loading c3750e-universalk9-mz.152-4.E10.bin from x.x.x.x (via Vlan1)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!--- Output is truncated.
[OK - 8172194 bytes]
8172194 bytes copied in 203.718 secs (40115 bytes/sec)
………………………………………………………………………………………………………………………..
3750stack#copy tftp: flash1:
Address or name of remote host [x.x.x.x]?
Source filename [c3750e-universalk9-mz.152-4.E10.bin]? c3750e-universalk9-mz.152-4.E10.bin
Destination filename [c3750e-universalk9-mz.152-4.E10.bin]?
Accessing tftp://x.x.x.x/c3750e-universalk9-mz.152-4.E10.bin...
Loading c3750e-universalk9-mz.152-4.E10.bin from x.x.x.x (via Vlan1)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!--- Output is truncated.
[OK - 8172194 bytes]
8172194 bytes copied in 203.718 secs (40115 bytes/sec)
2)用设备USB接口上传
3750stack#copy usbflash0:c3750e-universalk9-mz.152-4.E10.bin flash:
3750stack#copy usbflash0:c3750e-universalk9-mz.152-4.E10.bin flash1:
3. 检查当前堆叠设备的启动路径:
3750stack#show boot
BOOT path-list: flash:c3750e-universalk9-mz.150-2.SE10a.bin
Config file: flash:/config.text
Private Config file: flash:/private-config.text
-------------------
Switch 2
-------------------
BOOT path-list: flash:c3750e-universalk9-mz.150-2.SE10a.bin
Config file: flash:/config.text
Private Config file: flash:/private-config.text
4. 验证堆栈成员的新映像是否在flash中,发出dir flash:命令和dir flash 1:命令
3750stack#dir flash:
Directory of flash:/
3 -rwx 4050902 Mar 01 2023 00:03:32 c3750-ipbasek9-mz.150-2.SE10a.bin
4 -rwx 4273 Mar 05 2023 19:22:44 config.text
84 -rwx 5 Mar 05 2023 19:22:44 private-config.text
15998976 bytes total (3491328 bytes free)
3750stack#dir flash1:
Directory of flash1:/
2 -rwx 4050902 Mar 01 2023 00:35:58 c3750-ipbasek9-mz.150-2.SE10a.bin
4 -rwx 4273 Mar 05 2023 19:22:44 config.text
5 -rwx 5 Mar 05 2023 19:22:44 private-config.text
15998976 bytes total (3491328 bytes free)
5. 使用boot system命令设置用新的镜像启动设备:
3750stack(config)#no boot system
3750stack(config)#boot system switch all flash:c3750e-universalk9-mz.152-4.E10.bin
3750stack(config)#exit
3750stack#write
6. 验证引导变量:
3750stack#show boot
BOOT path-list: flash:c3750e-universalk9-mz.152-4.E10.bin
Config file: flash:/config.text
Private Config file: flash:/private-config.text
-------------------
Switch 2
-------------------
BOOT path-list: flash:c3750e-universalk9-mz.152-4.E10.bin
Config file: flash:/config.text
Private Config file: flash:/private-config.text
7. 重启设备
3750stack#reload
Proceed with reload? [confirm]
8. 检查版本是否升级成功:
3750stack#show version
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 28 WS-C3750G-24PS 15.2.4E10 C3750-ADVIPSERVICESK
2 52 WS-C3750G-48TS 15.2.4E10 C3750-ADVIPSERVICESK
.............................................................................................................................................
二. 使用.tar镜像升级Cisco IOS(如果需要通过web管理设备需要使用.tar镜像)
1. 准备软件版本
在思科官方网站(官网传送门)下载你需要的系统版本文件。
2. 使用archive download-sw命令升级版本并在设备上保留旧镜像
3750stack#archive download-sw /leave-old-sw tftp://x.x.x.x/c3750-ipbasek9-tar.150-2.SE10a.tar
......
All software images installed.
!--- Installation of the image and supporting files is now complete
!--- in the flash of all switches in the stack. In this example, installation
!--- is complete in both switches.
3. 镜像拷贝完成后,可以重新启动了。为了验证交换机的当前状态是否为Ready,请执行show switch detail命令。
3750#show switch detail
Switch# Role Mac Address Priority State
--------------------------------------------------------
1 Slave aaaa.bbbb.cccc.dddd 9 Ready
*2 primary aaaa.0000.bbbb.cccc 15 Ready
4. 验证堆栈成员的新映像是否在flash中,发出dir flash:命令和dir flash 1:命令
3750stack#dir flash:
Directory of flash:/
3 -rwx 4050902 Mar 01 2023 00:03:32 c3750-ipbasek9-mz.150-2.SE10a.bin
4 -rwx 4273 Mar 05 2023 19:22:44 config.text
6 drwx 192 Mar 05 202319:40:16 c3750-ipbasek9-mz.150-2.SE
84 -rwx 5 Mar 05 2023 19:22:44 private-config.text
15998976 bytes total (3491328 bytes free)
3750stack#dir flash1:
Directory of flash1:/
2 -rwx 4050902 Mar 01 2023 00:35:58 c3750-ipbasek9-mz.150-2.SE10a.bin
4 -rwx 4273 Mar 05 2023 19:22:44 config.text
5 -rwx 5 Mar 05 2023 19:22:44 private-config.text
7 drwx 192 Mar 05 2023 19:37:40 c3750-ipbasek9-mz.150-2.SE
15998976 bytes total (3491328 bytes free)
5. 验证引导变量:
3750stack#show boot
BOOT path-list: flash:c3750-ipbasek9-mz.150-2.SE/c3750e-universalk9-mz.152-4.E10.bin
Config file: flash:/config.text
Private Config file: flash:/private-config.text
-------------------
Switch 2
-------------------
BOOT path-list: flash:c3750-ipbasek9-mz.150-2.SE/c3750e-universalk9-mz.152-4.E10.bin
Config file: flash:/config.text
Private Config file: flash:/private-config.text
6. 重启设备
3750stack#reload
Proceed with reload? [confirm]
7. 检查版本是否升级成功:
3750stack#show version
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 28 WS-C3750G-24PS 15.2.4E10 C3750-ADVIPSERVICESK
2 52 WS-C3750G-48TS 15.2.4E10 C3750-ADVIPSERVICESK