简介
本文档介绍Cisco Catalyst 3850系列交换机的升级过程,并在软件或引导失败时提供灾难恢复技术。
先决条件
要求
Cisco 建议您了解以下主题:
TFTP
FTP
体验Cisco IOS® XE软件升级
使用的组件
本文档中的信息基于运行Cisco IOS® XE版本03.03.00及更高版本的Cisco Catalyst 3850系列交换机。文档中提供的示例基于堆叠解决方案,但是您可以对独立交换机使用相同的命令。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
安装模式与捆绑包模式
Cisco Catalyst 3850系列交换机有两种操作模式:安装模式和捆绑包模式。
这两种模式之间有一些细微的差别。有关详情,请参阅配置指南。
思科建议在操作时使用安装模式,因为此模式可以提供更完善的功能,引导时所需的资源也更少。本文档仅提供两种模式的概括介绍,以供参考。
安装模式
这是交换机的默认模式。安装模式使用名为 packages.conf 的软件包调配文件来引导交换机。此外,闪存中还有许多.pkg文件。
思科建议您不要更改这些文件,除非是在思科技术支持中心 (TAC) 工程师的指导下进行。
捆绑包模式
如果您对使用传统单片IOS®映像来启动交换机感到满意,则很可能会熟悉BUNDLE模式。
捆绑包模式消耗的内存比安装模式要多,因为升级时会从捆绑包中解压软件包,并复制到 RAM 中。
模式验证
要执行模式验证,请输入 show version 命令:
3850-stack# Cisco IOS Software, IOS-XE Software, Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 03.03.00SE RELEASE SOFTWARE (fc1) Switch Ports Model SW Version SW Image ------------------ ---------- ---------- ---- 1 32 WS-C3850-24P 03.03.00SE cat3k_caa-universalk9 * 2 56 WS-C3850-48T 03.03.00SE cat3k_caa-universalk9
升级
要开始升级过程,请从思科网站下载IOS® XE.bin文件,并将其放在活动交换机的闪存中。本文档不提供将该文件复制到交换机的操作步骤。
在将 .bin 文件复制到单个交换机时,安装进程会自动将该文件复制到同一堆叠中的其他交换机。复制好文件后,输入如下命令:
3850-stack#
升级过程开始后,交换机将.bin文件推送到堆叠成员对等体。
Preparing install operation ... [2]: Copying software from active switch 1 to switch 2
当所有成员均收到 .bin 文件后,该文件会自动解压到闪存。
[1 2]: Starting install operation [1 2]: Expanding bundle flash: cat3k_caa-universalk9.SPA.03.03.01.SE.150-1.EZ1.bin [1 2]: Copying package files [1 2]: Package files copied [1 2]: Finished expanding bundle flash: cat3k_caa-universalk9.SPA.03.03.01.SE.150-1.EZ1.bin [1 2]: Verifying and copying expanded package files to flash: [1 2]: Verified and copied expanded package files to flash: [1 2]: Starting compatibility checks [1 2]: Finished compatibility checks [1 2]: Starting application pre-installation processing [1 2]: Finished application pre-installation processing
接下来,交换机会列出一份文件列表,其中包括已标记为需要移除并添加到 packages.conf 指针文件中的文件。
[1]: Old files list: Removed cat3k_caa-base.SPA.03.03.00SE.pkg Removed cat3k_caa-drivers.SPA.03.03.00SE.pkg Removed cat3k_caa-infra.SPA.03.03.00SE.pkg Removed cat3k_caa-iosd-universalk9.SPA.150-1.EZ.pkg Removed cat3k_caa-platform.SPA.03.03.00SE.pkg Removed cat3k_caa-wcm.SPA.10.1.100.0.pkg [2]: Old files list: Removed cat3k_caa-base.SPA.03.03.00SE.pkg Removed cat3k_caa-drivers.SPA.03.03.00SE.pkg Removed cat3k_caa-infra.SPA.03.03.00SE.pkg Removed cat3k_caa-iosd-universalk9.SPA.150-1.EZ.pkg Removed cat3k_caa-platform.SPA.03.03.00SE.pkg Removed cat3k_caa-wcm.SPA.10.1.100.0.pkg [1]: New files list: Added cat3k_caa-base.SPA.03.03.01SE.pkg Added cat3k_caa-drivers.SPA.03.03.01SE.pkg Added cat3k_caa-infra.SPA.03.03.01SE.pkg Added cat3k_caa-iosd-universalk9.SPA.150-1.EZ1.pkg Added cat3k_caa-platform.SPA.03.03.01SE.pkg Added cat3k_caa-wcm.SPA.10.1.110.0.pkg [2]: New files list: Added cat3k_caa-base.SPA.03.03.01SE.pkg Added cat3k_caa-drivers.SPA.03.03.01SE.pkg Added cat3k_caa-infra.SPA.03.03.01SE.pkg Added cat3k_caa-iosd-universalk9.SPA.150-1.EZ1.pkg Added cat3k_caa-platform.SPA.03.03.01SE.pkg Added cat3k_caa-wcm.SPA.10.1.110.0.pkg
最后,交换机将更新并提交 packges.conf 文件。
[1 2]: Creating pending provisioning file [1 2]: Finished installing software. New software will load on reboot. [1 2]: Committing provisioning file [1 2]: Do you want to proceed with reload? [yes/no]: yes
重新加载交换机,确认升级流程是否正确完成。
3850-stack# 1 32 WS-C3850-24P 03.03.01SE cat3k_caa-universalk9 INSTALL * 2 56 WS-C3850-48T 03.03.01SE cat3k_caa-universalk9 INSTALL
清除闪存
升级完成后,旧版本的残留文件会保留在闪存中。要清除剩余文件,请输入software clean命令,而不是手动删除文件。这将清除交换机不再需要的文件。
下面两节提供了执行 software clean 命令前后闪存显示内容的示例。
清除闪存前的状态
3850-stack# -#- --length-- ---------date/time----------- -----------------------path----------------------- 2 2097152 Feb 16 2014 11:38:46.0 +00:00 nvram_config 4 257016048 Jan 28 2014 17:22:12.0 +00:00 cat3k_caa-universalk9.SPA.03.03.00.SE.150-1.EZ.bin 5 4096 Jan 28 2014 17:25:50.0 +00:00 mnt 6 4096 Jan 28 2014 17:25:50.0 +00:00 mnt/images 7 4096 Jan 28 2014 17:25:52.0 +00:00 mnt/images/ap.bak 8 40 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap1g2.md5 9 11591680 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap1g2 10 40 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap3g1.md5 11 10444800 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap3g1 12 40 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap3g2.md5 13 13568000 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap3g2 14 40 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/c1140.md5 15 10291200 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/c1140 16 11 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/version.info 17 1214 Jan 28 2014 17:25:10.0 +00:00 packages.conf.00- 18 79112096 Jan 28 2014 17:25:06.0 +00:00 cat3k_caa-base.SPA.03.03.00SE.pkg 19 6474428 Jan 28 2014 17:25:06.0 +00:00 cat3k_caa-drivers.SPA.03.03.00SE.pkg 20 34501468 Jan 28 2014 17:25:06.0 +00:00 cat3k_caa-infra.SPA.03.03.00SE.pkg 21 1248 Feb 16 2014 11:27:51.0 +00:00 packages.conf 22 34763952 Jan 28 2014 17:25:06.0 +00:00 cat3k_caa-iosd-universalk9.SPA.150-1.EZ.pkg 23 796 Feb 19 2014 11:43:13.0 +00:00 vlan.dat 24 24992476 Jan 28 2014 17:25:06.0 +00:00 cat3k_caa-platform.SPA.03.03.00SE.pkg 25 77167308 Jan 28 2014 17:25:06.0 +00:00 cat3k_caa-wcm.SPA.10.1.100.0.pkg 26 1224 Jan 28 2014 16:39:58.0 +00:00 packages.conf.01- 27 6571 Dec 20 2013 08:56:32.0 +00:00 BLANK_CONFIG.cfg 28 257193048 Feb 16 2014 11:19:44.0 +00:00 cat3k_caa-universalk9.SPA.03.03.01.SE.150-1.EZ1.bin 30 79113792 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-base.SPA.03.03.01SE.pkg 31 74409080 Jan 28 2014 16:39:54.0 +00:00 cat3k_caa-base.SPA.03.02.01.SE.pkg 32 2775728 Jan 28 2014 16:39:54.0 +00:00 cat3k_caa-drivers.SPA.03.02.01.SE.pkg 33 6476476 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-drivers.SPA.03.03.01SE.pkg 34 32478052 Jan 28 2014 16:39:54.0 +00:00 cat3k_caa-infra.SPA.03.02.01.SE.pkg 35 30389028 Jan 28 2014 16:39:54.0 +00:00 cat3k_caa-iosd-universalk9.SPA.150-1.EX1.pkg 36 18313952 Jan 28 2014 16:39:54.0 +00:00 cat3k_caa-platform.SPA.03.02.01.SE.pkg 37 63402700 Jan 28 2014 16:39:54.0 +00:00 cat3k_caa-wcm.SPA.10.0.101.0.pkg 38 34503664 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-infra.SPA.03.03.01SE.pkg 39 34788684 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-iosd-universalk9.SPA.150-1.EZ1.pkg 40 25009040 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-platform.SPA.03.03.01SE.pkg 41 77296448 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-wcm.SPA.10.1.110.0.pkg
清除闪存后的状态
3850-stack# Preparing clean operation ... [1 2]: Cleaning up unnecessary package files [1 2]: No path specified, will use booted path flash:packages.conf [1 2]: Cleaning flash: [1]: Preparing packages list to delete ... In use files, will not delete: cat3k_caa-base.SPA.03.03.01SE.pkg cat3k_caa-drivers.SPA.03.03.01SE.pkg cat3k_caa-infra.SPA.03.03.01SE.pkg cat3k_caa-iosd-universalk9.SPA.150-1.EZ1.pkg cat3k_caa-platform.SPA.03.03.01SE.pkg cat3k_caa-wcm.SPA.10.1.110.0.pkg packages.conf [2]: Preparing packages list to delete ... In use files, will not delete: cat3k_caa-base.SPA.03.03.01SE.pkg cat3k_caa-drivers.SPA.03.03.01SE.pkg cat3k_caa-infra.SPA.03.03.01SE.pkg cat3k_caa-iosd-universalk9.SPA.150-1.EZ1.pkg cat3k_caa-platform.SPA.03.03.01SE.pkg cat3k_caa-wcm.SPA.10.1.110.0.pkg packages.conf [1]: Files that will be deleted: cat3k_caa-base.SPA.03.02.01.SE.pkg cat3k_caa-base.SPA.03.03.00SE.pkg cat3k_caa-drivers.SPA.03.02.01.SE.pkg cat3k_caa-drivers.SPA.03.03.00SE.pkg cat3k_caa-infra.SPA.03.02.01.SE.pkg cat3k_caa-infra.SPA.03.03.00SE.pkg cat3k_caa-iosd-universalk9.SPA.150-1.EX1.pkg cat3k_caa-iosd-universalk9.SPA.150-1.EZ.pkg cat3k_caa-platform.SPA.03.02.01.SE.pkg cat3k_caa-platform.SPA.03.03.00SE.pkg cat3k_caa-universalk9.SPA.03.03.00.SE.150-1.EZ.bin cat3k_caa-universalk9.SPA.03.03.01.SE.150-1.EZ1.bin cat3k_caa-wcm.SPA.10.0.101.0.pkg cat3k_caa-wcm.SPA.10.1.100.0.pkg packages.conf.00- packages.conf.01- [2]: Files that will be deleted: cat3k_caa-base.SPA.03.02.01.SE.pkg cat3k_caa-base.SPA.03.03.00SE.pkg cat3k_caa-drivers.SPA.03.02.01.SE.pkg cat3k_caa-drivers.SPA.03.03.00SE.pkg cat3k_caa-infra.SPA.03.02.01.SE.pkg cat3k_caa-infra.SPA.03.03.00SE.pkg cat3k_caa-iosd-universalk9.SPA.150-1.EX1.pkg cat3k_caa-iosd-universalk9.SPA.150-1.EZ.pkg cat3k_caa-platform.SPA.03.02.01.SE.pkg cat3k_caa-platform.SPA.03.03.00SE.pkg cat3k_caa-universalk9.SPA.03.03.00.SE.150-1.EZ.bin cat3k_caa-universalk9.SPA.03.03.01.SE.150-1.EZ1.bin cat3k_caa-wcm.SPA.10.0.101.0.pkg cat3k_caa-wcm.SPA.10.1.100.0.pkg packages.conf.00- packages.conf.01- [1 2]: Do you want to proceed with the deletion? [yes/no]: [1 2]: Clean up completed
下面显示的是执行闪存清除后,show flash 命令的输出内容:
3850-stack# -#- --length-- ---------date/time----------- -------------------path-------------------- 2 2097152 Feb 16 2014 11:38:46.0 +00:00 nvram_config 4 4096 Jan 28 2014 17:25:50.0 +00:00 mnt 5 4096 Jan 28 2014 17:25:50.0 +00:00 mnt/images 6 4096 Jan 28 2014 17:25:52.0 +00:00 mnt/images/ap.bak 7 40 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap1g2.md5 8 11591680 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap1g2 9 40 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap3g1.md5 10 10444800 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap3g1 11 40 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap3g2.md5 12 13568000 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/ap3g2 13 40 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/c1140.md5 14 10291200 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/c1140 15 11 Oct 03 2013 05:02:21.0 +00:00 mnt/images/ap.bak/version.info 16 1248 Feb 16 2014 11:27:51.0 +00:00 packages.conf 17 796 Feb 19 2014 11:43:13.0 +00:00 vlan.dat 18 6571 Dec 20 2013 08:56:32.0 +00:00 BLANK_CONFIG.cfg 20 79113792 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-base.SPA.03.03.01SE.pkg 21 6476476 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-drivers.SPA.03.03.01SE.pkg 22 34503664 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-infra.SPA.03.03.01SE.pkg 23 34788684 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-iosd-universalk9.SPA.150-1.EZ1.pkg 24 25009040 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-platform.SPA.03.03.01SE.pkg 25 77296448 Feb 16 2014 11:27:46.0 +00:00 cat3k_caa-wcm.SPA.10.1.110.0.pkg
Catalyst 3850 系列交换机的自动升级功能
将新交换机引入Catalyst 3850系列交换机当前堆叠的一种情况是购买新交换机以增加堆叠中可用端口的数量。
要成功将新交换机添加到堆叠,您必须确保新交换机与现有堆叠运行的软件版本完全相同。在IOS® XE版本3.3.1之前,确保版本匹配的唯一方法是在引入堆栈之前将新交换机暂存。
Catalyst 3850系列交换机包含一项名为Auto-Upgrade的功能。此功能的目标是确保新添加的交换机由堆叠成员自动调配,并配置正确的IOS® XE版本。
要使用自动升级功能,请将 software auto-upgrade enable 命令添加到现有堆叠的配置中。这样一来,任何新添加的堆叠成员都将能实现自动升级。
配置
交换机堆叠并启动后,会显示版本不匹配,并且新成员未完全加入堆叠。
要在交换机尝试加入时观察系统日志,请注意Auto-Advise功能会警告新添加的交换机运行不同的软件版本和模式。
%STACKMGR-1-STACK_LINK_CHANGE: STANDBY: 1 stack-mgr: Stack port 2 on switch 1 is up (3850-Stack-1) %STACKMGR-1-STACK_LINK_CHANGE: 2 stack-mgr: Stack port 1 on switch 2 is up %STACKMGR-6-SWITCH_ADDED: 2 stack-mgr: Switch 3 has been added to the stack. %STACKMGR-6-SWITCH_ADDED: STANDBY:1 stack-mgr: Switch 3 has been added to the stack. (3850-Stack-1) %INSTALLER-6-AUTO_ADVISE_SW_INITIATED: 2 installer: Auto advise initiated for switch 3 %INSTALLER-6-AUTO_ADVISE_SW: 2 installer: Switch 3 running bundled software has been added %INSTALLER-6-AUTO_ADVISE_SW: 2 installer: to the stack that is running installed software. %INSTALLER-6-AUTO_ADVISE_SW: 2 installer: The 'software auto-upgrade' command can be used to %INSTALLER-6-AUTO_ADVISE_SW: 2 installer: convert switch 3 to the installed running mode by %INSTALLER-6-AUTO_ADVISE_SW: 2 installer: installing its running software.
新加入的成员完全启动后,会检测到不匹配:
Switch/Stack Mac Address : 0c27.24cf.ab80 - Local Mac Address Mac persistency wait time: Indefinite H/W Current Switch# Role Mac Address Priority Version State ------------------------------------------------------------ *1 Active 0c27.24cf.ab80 14 B0 Ready 2 Standby f41f.c238.a800 13 B0 Ready 3 Member b4e9.b0d3.6600 12 0 V-Mismatch
启用自动升级功能
在全局配置模式下,输入 software auto-upgrade enable 命令。这样一来,所有新加入该堆叠的交换机都将启用自动升级功能。
3850-Stack(config) 3850-Stack(config)
仅重新加载新添加的交换机;而无需重新加载整个堆叠。在上面的示例中,新添加的交换机是 switch 3,所以您需要输入 reload slot 3 命令。
3850-Stack# Proceed with reload? %STACKMGR-1-RELOAD_REQUEST: 1 stack-mgr: Received reload request for switch 3, reason Reload Slot Command %STACKMGR-1-STACK_LINK_CHANGE: 1 stack-mgr: Stack port 2 on switch 1 is down %STACKMGR-6-SWITCH_REMOVED: 1 stack-mgr: Switch 3 has been removed from the stack. %STACKMGR-1-STACK_LINK_CHANGE: STANDBY: 2 stack-mgr: Stack port 1 on switch 2 is down (3850-Stack-2) Starting SWITCH-DELETE sequence, switch 3 SWITCH-DELETE sequence complete, switch 3 %STACKMGR-6-SWITCH_REMOVED: STANDBY:2 stack-mgr: Switch 3 has been removed from the stack. (3850-Stack-2) Starting SWITCH-DELETE sequence, switch 3 (3850-Stack-2) SWITCH-DELETE sequence complete, switch 3 (3850-Stack-2)
交换机在后台立即重新加载。然后,您会看到如下消息:
%STACKMGR-1-STACK_LINK_CHANGE: 1 stack-mgr: Stack port 2 on switch 1 is up 3850-Stack# %STACKMGR-1-STACK_LINK_CHANGE: STANDBY:2 stack-mgr: Stack port 1 on switch 2 is up (3850-Stack-2) 3850-Stack# %STACKMGR-6-SWITCH_ADDED: 1 stack-mgr: Switch 3 has been added to the stack. %STACKMGR-6-SWITCH_ADDED: STANDBY:2 stack-mgr: Switch 3 has been added to the stack. (3850-Stack-2)
将从BUNDLE模式转换为INSTALL模式,然后重新加载:
%INSTALLER-6-AUTO_UPGRADE_SW_INITIATED: 1 installer: Auto upgrade initiated for switch 3 %INSTALLER-6-AUTO_UPGRADE_SW: 1 installer: Converting switch 3 to installed mode by %INSTALLER-6-AUTO_UPGRADE_SW: 1 installer: installing its running software %INSTALLER-6-AUTO_UPGRADE_SW: 1 installer: Setting the boot var on switch 3 %INSTALLER-6-AUTO_UPGRADE_SW: 1 installer: Finished installing the running software on switch 3 %INSTALLER-6-AUTO_UPGRADE_SW: 1 installer: Reloading switch 3 to boot in installed mode %STACKMGR-1-RELOAD_REQUEST: 1 stack-mgr: Received reload request for switch 3, reason Auto upgrade %STACKMGR-1-STACK_LINK_CHANGE: 1 stack-mgr: Stack port 2 on switch 1 is down %STACKMGR-6-SWITCH_REMOVED: 1 stack-mgr: Switch 3 has been r 3850-Stack#emoved from the stack. %STACKMGR-1-STACK_LINK_CHANGE: STANDBY:2 stack-mgr: Stack port 1 on switch 2 is down (3850-Stack-2) Starting SWITCH-DELETE sequence, switch 3 SWITCH-DELETE sequence complete, switch 3 %STACKMGR-6-SWITCH_REMOVED: STANDBY:2 stack-mgr: Switch 3 has been removed from the stack. (3850-Stack-2) 3850-Stack# Starting SWITCH-DELETE sequence, switch 3 (3850-Stack-2) SWITCH-DELETE sequence complete, switch 3 (3850-Stack-2)
完成重新引导后,升级将继续进行:
%INSTALLER-6-AUTO_UPGRADE_SW_INITIATED: 1 installer: Auto upgrade initiated for switch 3 %INSTALLER-6-AUTO_UPGRADE_SW: 1 installer: Searching stack for software to upgrade switch 3 %INSTALLER-6-AUTO_UPGRADE_SW: 1 installer: Found donor switch 1 to auto upgrade switch 3 %INSTALLER-6-AUTO_UPGRADE_SW: 1 installer: Upgrading switch 3 with software from switch 1 %INSTALLER-6-AUTO_UPGRADE_SW: 1 installer: Finished installing software on switch 3 %INSTALLER-6-AUTO_UPGRADE_SW: 1 installer: Reloading switch 3 to complete the auto upgrade %STACKMGR-1-RELOAD_REQUEST: 1 stack-mgr: Received reload request for switch 3, reason Auto upgrade %STACKMGR-1-STACK_LINK_CHANGE: 1 stack-mgr: Stack port 2 on switch 1 is down %STACKMGR-6-SWITCH_REMOVED: 1 stack-mgr: Switch 3 has been removed from the stack. %STACKMGR-1-STACK_LINK_CHANGE: STANDBY:2 stack-mgr: Stack port 3850-Stack#t 1 on switch 2 is down (3850-Stack-2) Starting SWITCH-DELETE sequence, switch 3 SWITCH-DELETE sequence complete, switch 3 %STACKMGR-6-SWITCH_REMOVED: STANDBY:2 stack-mgr: Switch 3 has been removed from the stack. (3850-Stack-2)
交换机会再次自动执行重新引导。一旦交换机启动,它就会以正确的IOSXE版本和软件模式成功加入堆栈。
%STACKMGR-6-SWITCH_ADDED: 1 stack-mgr: Switch 3 has been added to the stack. %STACKMGR-6-SWITCH_ADDED: STANDBY:2 stack-mgr: Switch 3 has been added to the stack. (3850-Stack-2) %STACKMGR-6-SWITCH_READY: STANDBY:2 stack-mgr: Switch 3 is ready. (3850-Stack-2) %STACKMGR-6-SWITCH_READY: 1 stack-mgr: Switch 3 is ready. Starting SWITCH-ADD sequence, switch 3 %NGWC_USB_CONSOLE-6-CONFIG_ENABLE: Switch 3: Console media-type changed to default Starting SWITCH-ADD sequence, switch 3 (3850-Stack-2) SWITCH-ADD sequence complete, switch 3 (3850-Stack-2) SWITCH-ADD sequence complete, switch 3
验证
您可以使用 show switch 和 show version 命令来验证升级流程是否成功完成:
3850-Stack# Switch/Stack Mac Address : 0c27.24cf.ab80 - Local Mac Address Mac persistency wait time: Indefinite H/W Current Switch# Role Mac Address Priority Version State ------------------------------------------------------------ *1 Active 0c27.24cf.ab80 14 B0 Ready 2 Standby f41f.c238.a800 13 B0 Ready 3 Member b4e9.b0d3.6600 12 B0 Ready 3850-Stack# Switch Ports Model SW Version SW Image Mode ------ ----- ----- ---------- ---------- ---- * 1 56 WS-C3850-48P 03.03.01SE cat3k_caa-universalk9 INSTALL 2 56 WS-C3850-48P 03.03.01SE cat3k_caa-universalk9 INSTALL 3 56 WS-C3850-48P 03.03.01SE cat3k_caa-universalk9 INSTALL
3850 系列交换机引导失败恢复流程
本节介绍3850系列交换机启动失败的可能恢复方法,如启动映像损坏、packages.conf文件损坏或文件丢失。
标准恢复方法
本节介绍用于对引导失败的 3850 系列交换机进行恢复的两种标准方法。
USB 恢复
3850 系列交换机的前部有一个用于访问控制台的 USB 端口。此 USB 端口也可用于对闪存驱动器进行映像备份和恢复。
如果卡在交换机上:提示文件损坏或.conf文件,引导至USB驱动器上存储的文件,或将映像从USB复制到内部闪存。要从引导失败状态下恢复,请执行以下步骤:
确认闪存驱动器已被识别,而且其中包含 .bin 文件:
switch: Directory of usbflash0:/ 74 -rw- 223734376 cat3k_caa-universalk9.SPA.03.03.00.SE.150-1.EZ.bin
将引导文件切换至 USB 映像:
switch: boot usbflash0:cat3k_caa-universalk9.SPA.03.03.00.SE.150-1.EZ.bin
损坏文件恢复
在闪存中不再存在packages.conf调用文件的情况下。虽然您可以使用 switch:提示符文件手动执行映像引导,但是,重新加载后,它再次调用packages.conf文件,并且无法启动。
如果发生这种情况,Cisco建议备份当前packages.conf文件,并重命名或删除它。此过程是必需的,如果.conf文件已存在,则下一步将失败。
提取.bin文件后,将创建新的packages.conf文件。要从 packages.conf 文件损坏的状况下恢复,请执行以下步骤:
引导完成后(在捆绑包模式下),确认闪存中的文件:
Switch# Directory of flash:/ 15500 -rwx 1243 Aug 1 2013 07:04:02 +00:00 packages.conf
复制或重命名现有 packages.conf 文件:
Switch# Destination filename [packages.conf.bad]? Copy in progress...C 1243 bytes copied in 0.140 secs (8879 bytes/sec) Switch# Directory of flash:/ 15500 -rwx 1243 Aug 1 2013 07:04:02 +00:00 packages.conf 15502 -rw- 1243 Aug 1 2013 11:53:51 +00:00 packages.conf.bad Switch# Delete filename [packages.conf]? Delete flash:/packages.conf? [confirm]
解压捆绑包,以创建新的 packages.conf 文件:
Switch# Preparing expand operation ... [1]: Expanding the running bundle [1]: Copying package files [1]: Package files copied [1]: Finished expanding the running bundle
检查引导信息:
Switch# --------------------------- Switch 1 --------------------------- Current Boot Variables: BOOT variable does not exist Boot Variables on next reload: BOOT variable = flash:packages.conf; Manual Boot = no Enable Break = no
重新加载交换机:
Switch# Reload command is being issued on Active unit, this will reload the whole stack Proceed with reload? [confirm]
紧急恢复
如果以前的恢复方法失败,3850系列交换机将使用陷阱门方法来恢复系统。终端必须连接到运行TFTP服务器的交换机的管理端口。然后,您需要从 CCO 下载有效的映像文件,并将其保存到 TFTP 服务器的根目录下。
您有可能会卡在 switch: 提示符处,提示。但是,如果您处于引导环路中,请使用交换机前面的Mode按钮来中断循环:按住该按钮大约 10 秒,交换机即会跳出循环,并停在 switch: 提示符处。提示。
要进行紧急恢复,请执行以下步骤:
设置交换机 IP 地址:
switch: set IP_ADDR 192.0.2.123/255.255.255.0
设置默认网关:
switch: set DEFAULT_ROUTER 192.0.2.1
对连接至 TFTP 服务器的终端执行 Ping 命令,以测试连接情况:
switch: ping 192.0.2.1 with 32 bytes of data ... Host 192.0.2.1 is alive.
确认交换机文件系统中存在紧急恢复文件:
switch: Directory of sda9:/ 2 drwx 1024 . 2 drwx 1024 .. 11 -rwx 18958824 cat3k_caa-recovery.bin 36903936 bytes available (20866048 bytes used)
运行紧急安装功能:
switch: The bootflash will be erased during install operation, continue (y/n)?Y Starting emergency recovery (tftp://192.0.2.1/cat3k_caa-universalk9. SPA.03.02.02.SE.150-1.EX2.bin)... Reading full image into memory......................done Nova Bundle Image -------------------------------------- Kernel Address : 0x6042f5d8 Kernel Size : 0x317ccc/3243212 Initramfs Address : 0x607472a4 Initramfs Size : 0xdc6546/14443846 Compression Format: .mzip Bootable image at @ ram:0x6042f5d8 Bootable image segment 0 address range [0x81100000, 0x81b80000] is in range [0x80180000, 0x90000000]. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ File "sda9:cat3k_caa-recovery.bin" uncompressed and installed, entry point: 0x811060f0 Loading Linux kernel with entry point 0x811060f0 ... Bootloader: Done loading app on core_mask: 0xf ### Launching Linux Kernel (flags = 0x5) Initiating Emergency Installation of bundle tftp://192.0.2.1/ cat3k_caa-universalk9.SPA.03.03.00.SE.150-1.EZ.bin Downloading bundle tftp://192.0.2.1/ cat3k_caa-universalk9. SPA.03.03.00.SE.150-1.EZ.bin... Validating bundle tftp://192.0.2.1/ cat3k_caa-universalk9. SPA.03.03.00.SE.150-1.EZ.bin... Installing bundle tftp://192.0.2.1/ cat3k_caa-universalk9. SPA.03.03.00.SE.150-1.EZ.bin... Verifying bundle tftp://192.0.2.1/ cat3k_caa-universalk9. SPA.03.03.00.SE.150-1.EZ.bin... Package cat3k_caa-base.SPA.03.03.00.SE.pkg is Digitally Signed Package cat3k_caa-drivers.SPA.03.03.00.SE.pkg is Digitally Signed Package cat3k_caa-infra.SPA.03.03.00.SE.pkg is Digitally Signed Package cat3k_caa-iosd-universalk9.SPA.150-1.EX2.pkg is Digitally Signed Package cat3k_caa-platform.SPA.03.03.00.SE.pkg is Digitally Signed Package cat3k_caa-wcm.SPA.10.0.111.0.pkg is Digitally Signed Preparing flash... Syncing device... Emergency Install successful... Rebooting Restarting system.