本產品的文件集力求使用無偏見用語。針對本文件集的目的,無偏見係定義為未根據年齡、身心障礙、性別、種族身分、民族身分、性別傾向、社會經濟地位及交織性表示歧視的用語。由於本產品軟體使用者介面中硬式編碼的語言、根據 RFP 文件使用的語言,或引用第三方產品的語言,因此本文件中可能會出現例外狀況。深入瞭解思科如何使用包容性用語。
思科已使用電腦和人工技術翻譯本文件,讓全世界的使用者能夠以自己的語言理解支援內容。請注意,即使是最佳機器翻譯,也不如專業譯者翻譯的內容準確。Cisco Systems, Inc. 對這些翻譯的準確度概不負責,並建議一律查看原始英文文件(提供連結)。
本文件說明 Catalyst 9000 (Cat9K) 交換器的升級方法。
本文件沒有特定需求。
本文件中的資訊是以下列軟體和硬體版本為依據.
附註:請參閱適當的組態設定指南來瞭解使用的命令,以便在其他思科平台上啟用這些功能。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
本文件涵蓋使用 Bundle 或 Install 模式之 Catalyst 9K 類型交換器的新舊升級程序。
套件模式是 Cisco IOS® 傳統執行方式的新穎說法。您可以啟動.bin 檔案,其中包含執行Cisco IOS所需的全部內容。依照傳統Cisco IOS,您有一條指向您要載入的.bin檔案並在開機時載入的開機陳述式。
Switch#show boot BOOT variable = bootflash:cat9k_iosxe.16.11.01.SPA.bin; Configuration Register is 0x102 MANUAL_BOOT variable = no BAUD variable = 9600 ENABLE_BREAK variable does not exist BOOTMODE variable does not exist IPXE_TIMEOUT variable does not exist CONFIG_FILE variable =
必須使用boot system命令設定此boot語句。下次重新載入時,交換機將引導至16.12.01而不是16.11.01。
Switch#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#no boot system Switch(config)#boot system bootflash:cat9k_iosxe.16.12.01.SPA.bin <--- Switch(config)#end Switch#wr Switch# Switch#show run | include boot system boot system bootflash:cat9k_iosxe.16.12.01.SPA.bin Switch# Switch#show boot BOOT variable = bootflash:cat9k_iosxe.16.12.01.SPA.bin; <--- Configuration Register is 0x102 MANUAL_BOOT variable = no BAUD variable = 9600 ENABLE_BREAK variable does not exist BOOTMODE variable does not exist IPXE_TIMEOUT variable does not exist CONFIG_FILE variable =
Install 模式是建議使用的較新執行模式。此模式會將 .bin 檔案拆分成較小的 .pkg 檔案,這些檔案必須彼此獨立載入至記憶體,可讓您更快啟動且更有效地利用記憶體。您從 software.cisco.com 下載的 .bin 檔案中具有您需要的所有 .pkg 檔案。
附註:請將 .bin 檔案想像成 .zip 檔案。 您可以解壓縮該檔案來取得 .pkg 檔案。另外,還有一個用來指出需要哪些 .pkg 檔案的組態檔。以下是以 Install 模式啟動時所使用的程序。
附註:此操作會自動完成,您不必直接編輯此檔案。不過,在重新載入之前,您可以檢查 .conf 檔案指向的套件檔案,以確保其指向正確的項目。
Switch#more packages.conf #! /usr/binos/bin/packages_conf.sh <...snip...> # This is for CAT9k boot rp 0 0 rp_boot cat9k-rpboot.16.11.01.SPA.pkg iso rp 0 0 rp_base cat9k-rpbase.16.11.01.SPA.pkg iso rp 0 0 rp_daemons cat9k-rpbase.16.11.01.SPA.pkg iso rp 0 0 rp_iosd cat9k-rpbase.16.11.01.SPA.pkg iso rp 0 0 rp_security cat9k-rpbase.16.11.01.SPA.pkg iso rp 0 0 rp_wlc cat9k-wlc.16.11.01.SPA.pkg iso rp 0 0 rp_webui cat9k-webui.16.11.01.SPA.pkg iso rp 0 0 srdriver cat9k-srdriver.16.11.01.SPA.pkg iso rp 0 0 guestshell cat9k-guestshell.16.11.01.SPA.pkg boot rp 1 0 rp_boot cat9k-rpboot.16.11.01.SPA.pkg iso rp 1 0 rp_base cat9k-rpbase.16.11.01.SPA.pkg iso rp 1 0 rp_daemons cat9k-rpbase.16.11.01.SPA.pkg iso rp 1 0 rp_iosd cat9k-rpbase.16.11.01.SPA.pkg iso rp 1 0 rp_security cat9k-rpbase.16.11.01.SPA.pkg iso rp 1 0 rp_wlc cat9k-wlc.16.11.01.SPA.pkg iso rp 1 0 rp_webui cat9k-webui.16.11.01.SPA.pkg iso rp 1 0 srdriver cat9k-srdriver.16.11.01.SPA.pkg iso rp 1 0 guestshell cat9k-guestshell.16.11.01.SPA.pkg <...snip...> # # -start- superpackage .pkginfo # # pkginfo: Name: rp_super # pkginfo: BuildTime: 2019-03-28_09.46 # pkginfo: ReleaseDate: Thu-28-Mar-19-01:19 # pkginfo: .BuildArch: x86_64 # pkginfo: BootArchitecture: i686 # pkginfo: .BootArch: i686 # pkginfo: RouteProcessor: cat9k # pkginfo: Platform: CAT9K # pkginfo: User: mcpre # pkginfo: PackageName: universalk9 # pkginfo: Build: 16.11.01 # pkginfo: .SupportedBoards: cat9k # pkginfo: .InstallModel: # pkginfo: .PackageRole: rp_super # pkginfo: .RestartRole: rp_super # pkginfo: .UnifiedPlatformList: passport,nyquist,starfleet # pkginfo: CardTypes: # pkginfo: .CardTypes: # pkginfo: .BuildPath: /scratch/mcpre/release/BLD-V16_11_01_FC3/binos/linkfarm/stage-cat9k/hard/rp_super_universalk9.x86_64 # pkginfo: .Version: 16.11.1.0.312.1553791584..Gibraltar # pkginfo: .InstallVersion: 1.0.0 # pkginfo: .InstallCapCommitSupport: yes # # -end- superpackage .pkginfo #
當您以 Install 模式執行升級時,此程序一律相同。但是每個平台的命令可以不同:
在大多數情況下,您可以透過單一命令來執行步驟 2 至 4。 這可讓我們復原至先前的版本。
如果您的作用中Supervisor在安裝模式下執行,則最好使用自動升級。無論在待命項目(bundle/install 等)上載入哪些映像,這都能讓作用中 SUP 升級待命中 SUP。 但是,您必須將待命項目啟動至一些有效的映像才能啟動程序。
附註:自動升級不會從 ROMMON 復原 SUP。
啟用此命令,以便交換器在偵測到不符情形時自動升級待命中 SUP
software auto-upgrade enable
或手動運行升級
install autoupgrade
附註:只要作用中機箱處於 Install 模式,自動升級就可以在 Stackwise Virtual 設定中運作。
接下來,本節討論如何使用 指令。"install"
所有 9000 系列均支援此類命令。但是,這是 9600、9400 及 9200 的唯一選項。
如上所述,升級程序包含 4 個部分。然而,步驟 2 至 4 的命令不是很好理解,因此以下說明每個命令的作用:
限制
在 Install 模式下,您的啟動陳述式必須始終為 packages.conf。在升級過程中,如果您嘗試將啟動陳述式變更為其他 .conf 檔案,可能會導致升級失敗。如果您已執行 指令,必須啟動新增的套件或將其清除才能重新開始。ADD
請勿將啟動陳述式變更為非作用中套件。
摘要
如果您要移至 Install 模式,必須先將啟動陳述式變更為 packages.conf(若尚未變更),然後新增 .bin 檔案。這表示您必須將新的 .bin 檔案從 TFTP 或 USB 複製到開機快閃記憶體。如果您因空間不足而無法將檔案複製到交換器,請參閱本文件的 Cleanup 一節,以清除不需要的檔案。
這些命令可完成升級,您無需執行任何其他步驟。不過,如果您不想以單一步驟完成升級,也可以將其拆成各自獨立的步驟。
configure terminal no boot system boot system bootflash:packages.conf end write install add file bootflash:activate commit
Install Add
Switch#show install summary [ R0 R1 ] Installed Package(s) Information: State (St): I - Inactive, U - Activated & Uncommitted, C - Activated & Committed, D - Deactivated & Uncommitted -------------------------------------------------------------------------------- Type St Filename/Version -------------------------------------------------------------------------------- IMG C 16.11.1.0.312 -------------------------------------------------------------------------------- Auto abort timer: inactive --------------------------------------------------------------------------------
若要開始使用,您必須將新版本新增至要使用的版本清單中.
install add file bootflash:cat9k_iosxe.16.12.01.SPA.bin
新增後,您就可以在快閃記憶體中看到 .pkg 檔案,其會將 16.12.01 列為非作用中版本.
Switch#dir | include .pkg
359097 -rw- 11359240 Sep 13 2019 16:10:08 +00:00 cat9k-cc_srdriver.16.11.01.SPA.pkg
359098 -rw- 84354052 Sep 13 2019 16:10:08 +00:00 cat9k-espbase.16.11.01.SPA.pkg
359099 -rw- 1676292 Sep 13 2019 16:10:08 +00:00 cat9k-guestshell.16.11.01.SPA.pkg
359100 -rw- 466576384 Sep 13 2019 16:10:08 +00:00 cat9k-rpbase.16.11.01.SPA.pkg
359106 -rw- 38552418 Sep 13 2019 16:10:30 +00:00 cat9k-rpboot.16.11.01.SPA.pkg
359101 -rw- 29877252 Sep 13 2019 16:10:08 +00:00 cat9k-sipbase.16.11.01.SPA.pkg
359102 -rw- 57259008 Sep 13 2019 16:10:08 +00:00 cat9k-sipspa.16.11.01.SPA.pkg
359103 -rw- 19936260 Sep 13 2019 16:10:08 +00:00 cat9k-srdriver.16.11.01.SPA.pkg
359104 -rw- 12321792 Sep 13 2019 16:10:08 +00:00 cat9k-webui.16.11.01.SPA.pkg
359105 -rw- 9216 Sep 13 2019 16:10:08 +00:00 cat9k-wlc.16.11.01.SPA.pkg
456963 -rw- 14222344 Sep 13 2019 17:05:35 +00:00 cat9k-cc_srdriver.16.12.01.SPA.pkg
456964 -rw- 88892420 Sep 13 2019 17:05:35 +00:00 cat9k-espbase.16.12.01.SPA.pkg
473282 -rw- 1684484 Sep 13 2019 17:05:35 +00:00 cat9k-guestshell.16.12.01.SPA.pkg
473283 -rw- 535475200 Sep 13 2019 17:05:35 +00:00 cat9k-rpbase.16.12.01.SPA.pkg
473289 -rw- 43111714 Sep 13 2019 17:06:00 +00:00 cat9k-rpboot.16.12.01.SPA.pkg
473284 -rw- 31425540 Sep 13 2019 17:05:35 +00:00 cat9k-sipbase.16.12.01.SPA.pkg
473285 -rw- 60183552 Sep 13 2019 17:05:35 +00:00 cat9k-sipspa.16.12.01.SPA.pkg
473286 -rw- 22676484 Sep 13 2019 17:05:35 +00:00 cat9k-srdriver.16.12.01.SPA.pkg
473287 -rw- 12854272 Sep 13 2019 17:05:35 +00:00 cat9k-webui.16.12.01.SPA.pkg
473288 -rw- 9216 Sep 13 2019 17:05:35 +00:00 cat9k-wlc.16.12.01.SPA.pkg
Switch#show install summary [ R0 R1 ] Installed Package(s) Information: State (St): I - Inactive, U - Activated & Uncommitted, C - Activated & Committed, D - Deactivated & Uncommitted -------------------------------------------------------------------------------- Type St Filename/Version -------------------------------------------------------------------------------- IMG I 16.12.1.0.544 <-- Installed but still Inactive (I) IMG C 16.11.1.0.312 -------------------------------------------------------------------------------- Auto abort timer: inactive -------------------------------------------------------------------------------- Switch#show install inactive [ R0 R1 ] Inactive Package(s) Information: State (St): I - Inactive, U - Activated & Uncommitted, C - Activated & Committed, D - Deactivated & Uncommitted -------------------------------------------------------------------------------- Type St Filename/Version -------------------------------------------------------------------------------- IMG I 16.12.1.0.544 <-- Installed but still Inactive (I)
Install Activate
下一個步驟是啟動新版本。
install activate
在裝置重新載入之前,此步驟會要求您確認是否要重新載入 .
This operation may require a reload of the system. Do you want to proceed? [y/n]
Switch#show install sum [ R0 R1 ] Installed Package(s) Information: State (St): I - Inactive, U - Activated & Uncommitted, C - Activated & Committed, D - Deactivated & Uncommitted -------------------------------------------------------------------------------- Type St Filename/Version -------------------------------------------------------------------------------- IMG U 16.12.1.0.544 -------------------------------------------------------------------------------- Auto abort timer: active on install_activate, time before rollback - 01:52:08 <--- when this hits zero, the device reloads back to original version. -------------------------------------------------------------------------------- Switch#show install uncommitted [ R0 R1 ] Uncommitted Package(s) Information: State (St): I - Inactive, U - Activated & Uncommitted, C - Activated & Committed, D - Deactivated & Uncommitted -------------------------------------------------------------------------------- Type St Filename/Version -------------------------------------------------------------------------------- IMG U 16.12.1.0.544
Install Commit
若要停止復原計時器並完成升級程序,您必須認可新版本.
install commit
這是升級程序的最後一個步驟,您的新版本現在會顯示為作用中的已認可版本 .
Switch#show install summary [ R0 R1 ] Installed Package(s) Information: State (St): I - Inactive, U - Activated & Uncommitted, C - Activated & Committed, D - Deactivated & Uncommitted -------------------------------------------------------------------------------- Type St Filename/Version -------------------------------------------------------------------------------- IMG C 16.12.1.0.544 <--- Now Active and Committed -------------------------------------------------------------------------------- Auto abort timer: inactive --------------------------------------------------------------------------------
Install Abort
在執行 指令之後且尚未確認之前,如果您認為新版本有問題,可以中止升級程序。activate
此動作會使裝置再次重新載入回到先前的版本。
install abort
Prompt Level
可以在安裝命令結束時將prompt-level設定為none,它不會因任何問題詢問您yes/no(通常在升級的commit命令結束時,它詢問您是否要重新載入)。 如果您將 設為 ,則交換器會在準備好時立即重新載入。prompt-level
none
install add file bootflash:cat9k_iosxe.16.12.01.SPA.bin activate commit prompt-level none
自動升級計時器
如果升級花費的時間過長,交換器將會假設發生問題,然後繼續運作並中止升級。預設計時器為 120 分鐘,但您可以視需要手動停止計時器。
install auto-abort-timer stop
您可以在執行啟動步驟時設定復原計時器.
Switch#install activate auto-abort-timer ? <30-1200> Number of minutes the abort-timer is set for
本節說明使用指向 .bin 檔案(相較於 .pkg 檔案)的啟動陳述式升級軟體的傳統方法。
警告:如果您要將交換器升級至 Bundle 模式,請確定您已將 .bin 複製到堆疊中的「每個」交換器!
載入 Cisco IOS 檔案後,您只要變更啟動陳述式並重新載入即可。
configure terminal no boot system boot system bootflash:end write reload
注意:此方法僅適用於9300和9500交換器
本節將說明request platform命令的使用方式,9500和9300上支援此功能。
install commands
拓展
此命令會接受您指定的任何 .bin 檔案並擷取 .pkg 檔案.
request platform software package expand switch all file flash:cat9k_iosxe.16.09.02.SPA.bin
附註:如果交換器使用 bundle 模式。請先執行 expand 命令,再將您的啟動陳述式變更為 packages.conf 並重新載入,以進入 Install 模式.
安裝
如果您已進入 Install 模式,請使用此命令移至其他版本:
request platform software package install switch all file flash:test auto-copy new
清除
下一個命令的作用與install remove inactive的作用相同:
request platform software package clean
StackWise Virtual 與雙 SUP 設定非常類似。如果您執行一般升級,則兩個機箱會同時重新啟動 .
configure terminal no boot system boot sys bootflash:packages.conf end write install add file bootflash:activate commit
附註:若要執行 ISSU,相對於單一機箱的雙 SUP 設定,在 StackWise Virtual 中您還必須考量另一個因素。
復原安裝模式
完成升級後,您可以視需要復原為先前的版本。 事實上,如果檔案仍在快閃記憶體上,您可以復原為多個版本.
Switch#show install rollback ID Label Description ----------------------------------------------- 2 No Label No Description 1 No Label No Description Switch#show install rollback id 1 Rollback id - 1 (Created on Fri Sep 13 13:14:40 2019) Label: No Label Description: No Description Reload required: NO State (St): I - Inactive, U - Activated & Uncommitted, C - Activated & Committed, D - Deactivated & Uncommitted -------------------------------------------------------------------------------- Type St Filename/Version -------------------------------------------------------------------------------- IMG C 16.11.1.0.312
前面的輸出顯示我有兩個復原點。第一個復原指向復原為 16.11.01(如果您要放置說明或日期,請標記復原點)。
Switch#install label 1 ? description Add a description to specified install point label-name Add a label name to specified install point Switch#install label 1 label-name 16_11_01 install_add_label: START Fri Sep 13 16:43:48 UTC 2019 --- Starting install_add_label --- Performing install_add_label on Active/Standby [R0] install_add_label package(s) on R0 [R0] Finished install_add_label on R0 [R1] install_add_label package(s) on R1 [R1] Finished install_add_label on R1 Checking status of install_add_label on [R0 R1] install_add_label: Passed on [R0 R1] Finished install_add_label SUCCESS: install_add_label Fri Sep 13 16:43:57 UTC 2019 Switch#show install rollback ID Label Description ----------------------------------------------- 2 No Label No Description 1 16_11_01 No Description
如果您現在要執行復原,只要執行 指令即可:rollback
install rollback to id 1
撰寫本文件時尚未提供支援。預計在 17.2.1 上提供支援 .
上述執行升級的方法與升級單一 SUP 或同時升級兩個 SUP 有關。但是,使用雙sup時,您可以執行ISSU(服務中軟體升級),它允許一次升級一個sup,這樣幾乎不會出現中斷。
附註:有關9300 xFSU的詳細資訊,請參閱本檔案瞭解Catalyst 9300系列交換器上的延伸快速軟體升級
注意:執行這裡提到的命令後,程序就會自動啟動和重新載入 SUP。在您準備好讓 SUP 開始重新啟動之前,請勿執行指令。與一般升級程序不同,此方法不會在重新載入前要求您進行確認。
install add file bootflash:cat9k_iosxe.16.11.01.SPA.bin activate issu commit
install add file flash:cat9k_iosxe.16.10.01.SPA.bin activate reloadfast commit
完成升級後,您可以選擇移除所有非作用中檔案,藉此清理所有不需要的檔案。 此選項會查看目前已載入的 .pkg 檔案,並移除所有其他項目。在刪除之前,您可以檢視其打算刪除的所有檔案。
install remove inactive
附註:此選項會移除所有 .bin 檔案,因此如果您要在執行升級前進行清理,請務必先這樣做,再複製新的 .bin 檔案。
如果您收到V-mismatch,則表示交換器上執行的軟體與作用中軟體不同。如果處於 Install 模式,您可以選擇透過自動升級來解決此問題。 如果處於 Bundle 模式,要解決此問題就有點棘手。
Switch#show switch Switch/Stack Mac Address : f8b7.e206.4900 - Local Mac Address Mac persistency wait time: Indefinite H/W Current Switch# Role Mac Address Priority Version State ------------------------------------------------------------------------------------- 1 Member 701f.5300.fa00 15 V01 V-Mismatch <---Indicates a version mismatch *2 Active f8b7.e206.4900 14 V01 Ready
選項 1
選項 2
注意:在嘗試此操作之前,請確保您具有對交換機的控制檯訪問許可權,以確保能夠恢復交換機。
選項2的步驟
V-Mismatch
Switch#dir ? /all List all files /recursive List files recursively all-filesystems List files on all filesystems cns: Directory or file name crashinfo-1: Directory or file name crashinfo-2: Directory or file name crashinfo: Directory or file name flash-1: Directory or file name <----Flash for switch #1 flash-2: Directory or file name <----Flash for switch #2 flash: Directory or file name
當您進入 ROMMON 後,請使用此指令
switch: boot flash:cat9k_iosxe.16.12.01.SPA.bin <-- Image you copied that Active is running
選項 3
如果您因不具有效的映象而卡在 ROMMON 中,可以選擇透過 USB 或 TFTP 將檔案複製到交換器.
選項 1
使用以下命令從USB盤直接啟動:
boot usbflash0:cat9k_iosxe.16.12.01.SPA.bin
選項 2
從TFTP伺服器複製有點棘手。您必須將筆記型電腦設定為 TFTP 伺服器,並將乙太網路纜線連接至裝置的管理連接埠,或是必須將裝置的管理連接埠連接至已上線運作之裝置的網路連接埠。接著,您就可以將含有映像的裝置設定為 TFTP 伺服器:
tftp-server flash:cat9k_iosxe.16.12.01.SPA.bin
最好使用 Cisco IOS 做為 TFTP 伺服器,如此一來,您就不必擔心 Windows 防火牆或電腦帳戶權限問題。設定好 TFTP 伺服器後,您必須在 ROMMON 中進行以下設定:
DEFAULT_GATEWAY=172.27.74.1
IP_ADDRESS=172.27.74.111
IP_SUBNET_MASK=255.255.255.0
TFTP_SERVER=172.19.64.31
透過 TFTP 伺服器的 Ping 測試您的組態:
ping 172.19.64.31
建立連線後,請直接啟動至 TFTP 的檔案:
boot tftp://172.19.64.31/cat9k_iosxe.16.12.01.SPA.bin
附註:有關rommon恢復的詳細資訊,請訪問以下連結:recover_from_corrupt_or_missing_file_image_or_in_rommon_mode。
驗證堆疊中的所有成員裝置上是否都看到.bin檔案。
步驟 1:
檢查使用show file systems的堆疊上使用的命名慣例:
Switch#show file systems File Systems: Size(b) Free(b) Type Flags Prefixes - - opaque rw system: - - opaque rw tmpsys: * 11250098176 6275858432 disk rw bootflash: flash: <- Name of Active Switch 11250171904 4123000832 disk rw bootflash-2: <- Name of Standby Switch 1651314688 1344073728 disk rw crashinfo: 1651507200 1180696576 disk rw crashinfo-2: 236092686336 224026628096 disk rw disk0: 8166649856 8053047296 disk ro webui: - - opaque rw null: - - opaque ro tar: - - network rw tftp: 33554432 33494025 nvram rw nvram: - - network rw rcp: - - network rw http: - - network rw ftp: - - network rw scp: - - network rw sftp: - - network rw https: - - opaque ro cns: 33554432 33507337 nvram rw stby-nvram: - - nvram rw stby-rcsf: 11250098176 4122718208 disk rw stby-bootflash: 1651314688 1180504064 disk rw stby-crashinfo: - - opaque rw revrcsf:
附註:如果遇到檔案空間不足的錯誤,show file systems將指示大小和可用空間。
步驟 2:
單獨檢查.bin檔案的每個目錄:
Switch#dir bootflash: | i .bin 81126 -rw- 1265422219 Jun 19 2023 03:04:30 +00:00 cat9k_iosxe.17.11.01.SPA.bin <- The Active has 17.11.01.SPA.bin 194733 -rw- 1027574083 Jun 13 2023 01:33:41 +00:00 cat9k_iosxe.17.06.05.SPA.bin Switch#dir bootflash-2: | i .bin 210971 -rw- 1027574083 Jun 29 2023 22:19:23 +00:00 cat9k_iosxe.17.06.05.SPA.bin <- The Standby does not have 17.11.01.SPA.bin
附註:在安裝模式下,裝置在提交install add命令之前,應僅將.bin檔案置於活動狀態。如果發現問題,請繼續執行步驟3。
步驟 3:
如果需要手動干預,有2個選項可將.bin檔案從作用中複製到成員/備用。
選項 1
將.bin檔案直接複製到成員/待機:
Switch#copy bootflash:cat9k_iosxe.17.11.01.SPA.bin bootflash-2:
選項 2
將.bin複製到USB(如果無法直接複製)
Switch#copy bootflash:cat9k_iosxe.17.11.01.SPA.bin usbflash0:
注意:必須對USB進行FAT32格式化,並使用show file systems檢驗交換機是否讀取該USB。
將其複製到USB後,將其插入待機/成員:
Switch#copy usbflash0:cat9k_iosxe.17.11.01.SPA.bin bootflash-2:
步驟 4:
驗證.bin檔案是否位於所有裝置上:
Switch#dir flash: | i .bin 81126 -rw- 1265422219 Jun 19 2023 03:04:30 +00:00 cat9k_iosxe.17.11.01.SPA.bin <- The Active has 17.11.01.SPA.bin 194733 -rw- 1027574083 Jun 13 2023 01:33:41 +00:00 cat9k_iosxe.17.06.05.SPA.bin Switch#dir bootflash-2: | i .bin 210971 -rw- 1027574083 Jun 29 2023 22:19:23 +00:00 cat9k_iosxe.17.06.05.SPA.bin 210974 -rw- 1265422219 Jun 20 2023 03:32:23 +00:00 cat9k_iosxe.17.11.01.SPA.bin <- The Standby now has 17.11.01.SPA.bin
如果您在嘗試運行名為Super package的完整install add file flash:name activate commit時收到錯誤輸出,則這意味著該軟體包已經填充到非活動狀態,並且正在等待啟用和提交。
Switch#install add file flash:cat9k_iosxe.17.11.01.SPA.bin activate commit install_add_activate_commit: START Wed Jul 26 12:36:58 UTC 2023 *Jul 26 12:36:58.491: %INSTALL-5-INSTALL_START_INFO: R0/0: install_engine: Started install one-shot bootflash:cat9k_iosxe.17.11.01.SPA.bininstall_add_activate_commit: Adding PACKAGE install_add_activate_commit: Checking whether new add is allowed .... FAILED: install_add_activate_commit : Super package already added. Add operation not allowed. 'install remove inactive' can be used to discard added packages
您可以通過發出show install summary命令來驗證此狀態
Switch#show install summary [ R0 ] Installed Package(s) Information: State (St): I - Inactive, U - Activated & Uncommitted, C - Activated & Committed, D - Deactivated & Uncommitted -------------------------------------------------------------------------------- Type St Filename/Version -------------------------------------------------------------------------------- IMG C 17.06.05.0.5797 IMG I 17.11.01.0.1324 <- Here it is seen as Inactive -------------------------------------------------------------------------------- Auto abort timer: inactive --------------------------------------------------------------------------------
有兩種方法可以解決此問題
選項 1
執行install remove inactive命令以清除新增的軟體包
Switch#install remove inactive install_remove: START Wed Jul 26 13:42:14 UTC 2023 Cleaning up unnecessary package files No path specified, will use booted path bootflash:packages.conf Cleaning bootflash: Scanning boot directory for packages ... done. Preparing packages list to delete ... cat9k-cc_srdriver.16.09.03.SPA.pkg File is in use, will not delete. cat9k-espbase.16.09.03.SPA.pkg File is in use, will not delete.
<...snip...> The following files will be deleted: [R0]: /bootflash/cat9k-cc_srdriver.17.06.05.SPA.pkg /bootflash/cat9k-cc_srdriver.17.11.01.SPA.pkg /bootflash/cat9k-espbase.17.06.05.SPA.pkg /bootflash/cat9k-espbase.17.11.01.SPA.pkg
<...snip...> Do you want to remove the above files? [y/n]y [R0]: Deleting file bootflash:cat9k-cc_srdriver.17.06.05.SPA.pkg ... done. Deleting file bootflash:cat9k-cc_srdriver.17.11.01.SPA.pkg ... done. Deleting file bootflash:cat9k-espbase.17.06.05.SPA.pkg ... done. Deleting file bootflash:cat9k-espbase.17.11.01.SPA.pkg ... done.
<...snip...> SUCCESS: Files deleted. --- Starting Post_Remove_Cleanup --- Performing Post_Remove_Cleanup on Active/Standby [R0] Post_Remove_Cleanup package(s) on R0 [R0] Finished Post_Remove_Cleanup on R0 Checking status of Post_Remove_Cleanup on [R0] Post_Remove_Cleanup: Passed on [R0] Finished Post_Remove_Cleanup
選項 2
如果install remove inactive未解決問題,請清除安裝狀態
注意:這要求重新載入裝置
Switch(config)#service internal <- Service internal is required to be turned on for clear install state to work Switch(config)#exit Switch#clear install state clear_install_state: START Wed Jul 26 12:25:09 UTC 2023 This command will remove all the provisioned SMUs, and rollback points. Use this command with caution. A reload is required for this process. Press y to continue [y/n]y --- Starting clear_install_state --- Performing clear_install_state on Active/Standby [1] clear_install_state package(s) on R0 [1] Finished clear_install_state on R0 Checking status of clear_install_state on [R0] clear_install_state: Passed on [R0] Finished clear_install_state Send model notification for before reload Install will reload the system now!
驗證選項1和選項2都可以通過show install summary命令進行驗證,以確保非活動映像不再存在。
Switch#show install summary [ R0 ] Installed Package(s) Information: State (St): I - Inactive, U - Activated & Uncommitted, C - Activated & Committed, D - Deactivated & Uncommitted -------------------------------------------------------------------------------- Type St Filename/Version -------------------------------------------------------------------------------- IMG C 17.06.05.0.5797 <- 17.11.01 is no longer seen -------------------------------------------------------------------------------- Auto abort timer: inactive --------------------------------------------------------------------------------
繼續運行完整安裝add file flash:name activate commit,沒有問題
本節介紹執行升級時發現的問題以及設定的引導變數錯誤。
Switch#show boot BOOT variable = bootflash:packages.conf; MANUAL_BOOT variable = no
交換器重新開機/重新載入時,系統會顯示錯誤
Preparing to autoboot. [Press Ctrl-C to interrupt] 0 boot: attempting to boot from [bootflash:packages.conf] ERROR: failed to boot from bootflash:packages.conf (Not Found) Please wait while the system restarts. Initializing Hardware......
switch:set
BAUD=9600 BOOT=bootflash:packages.conf; BOOTLDR=packages.conf BSI=0
<snip>
有兩個選項可以引導至所需的IOS
附註:如果需要,您還可以啟動到先前的ios bin檔案
選項 1
使用新ios版本設定新boot語句
switch:BOOT=cat9k_iosxe.17.09.03.SPA.bin
驗證BOOT語句是否已更新
switch:set BAUD=9600 BOOT=bootflash:cat9k_iosxe.17.09.03.SPA.bin <-Boot statement successfully updated BOOTLDR=packages.conf BSI=0
<snip>
選項 2
立即啟動而不更改變數,直到交換機載入到ios中
switch:boot bootflash:cat9k_iosxe.17.09.03.SPA.bin
附註:如果不確定快閃記憶體上存在哪個.bin檔案,請發出dir flash:檢視檔案清單
install add file flash:name activate commit命令已運行,但引導變數已設定為.bin檔案而不是packages.conf
Switch#show boot Current Boot Variables: BOOT variable = flash:cat9k_iosxe_npe.17.03.03.SPA.bin; Boot Variables on next reload: BOOT variable = flash:cat9k_iosxe_npe.17.03.03.SPA.bin; Manual Boot = no Enable Break = yes Boot Mode = DEVICE iPXE Timeout = 0 Switch#install add file flash:cat9k_iosxe.17.09.03.SPA.bin activate commit install_add_activate_commit: START Tue Sep 12 15:01:12 UTC 2023 install_add_activate_commit: Adding PACKAGE install_add_activate_commit: Checking whether new add is allowed .... This operation requires a reload of the system. Do you want to proceed? Please confirm you have changed boot config to flash:packages.conf [y/n]y --- Starting initial file syncing --- Info: Finished copying flash:cat9k_iosxe.17.09.03.SPA.bin to the selected switch(es) Finished initial file syncing
<snip>
重新載入後,交換器載入到17.3.3.SPA.bin中,而不是包含有17.9.3的packages.conf中,可以看到輸出。
Initializing Hardware...... System Bootstrap, Version 17.9.2r, RELEASE SOFTWARE (P) Compiled Wed 11/23/2022 12:30:48.96 by rel Current ROMMON image : Primary Last reset cause : CpuReset C9500-12Q platform with 16777216 Kbytes of main memory Preparing to autoboot. [Press Ctrl-C to interrupt] 0 boot: attempting to boot from [flash:cat9k_iosxe_npe.17.03.03.SPA.bin] boot: reading file cat9k_iosxe_npe.17.03.03.SPA.bin
交換器開機後,確認packages.conf已正確更新為17.9.3。
Switch#more flash:packages.conf
boot rp 0 0 rp_boot cat9k-rpboot.17.09.03.SPA.pkg boot rp 1 0 rp_boot cat9k-rpboot.17.09.03.SPA.pkg iso rp 0 0 rp_base cat9k-rpbase.17.09.03.SPA.pkg iso rp 1 0 rp_base cat9k-rpbase.17.09.03.SPA.pkg <-All .pkg set to 17.9.3 correctly iso rp 0 0 rp_daemons cat9k-rpbase.17.09.03.SPA.pkg iso rp 1 0 rp_daemons cat9k-rpbase.17.09.03.SPA.pkg iso rp 0 0 rp_iosd cat9k-rpbase.17.09.03.SPA.pkg iso rp 1 0 rp_iosd cat9k-rpbase.17.09.03.SPA.pkg iso rp 0 0 rp_security cat9k-rpbase.17.09.03.SPA.pkg iso rp 1 0 rp_security cat9k-rpbase.17.09.03.SPA.pkg
iso rp 0 0 rp_wlc cat9k-wlc.17.09.03.SPA.pkg iso rp 1 0 rp_wlc cat9k-wlc.17.09.03.SPA.pkg iso rp 0 0 rp_webui cat9k-webui.17.09.03.SPA.pkg iso rp 1 0 rp_webui cat9k-webui.17.09.03.SPA.pkg
<snip>
將開機變數變更為flash:packages.conf
Switch(config)#no boot system Switch(config)#boot system flash:packages.conf Switch(config)#do wr <- Configuration must be saved for boot variable to be updated properly before reloading Switch#show boot Current Boot Variables: BOOT variable = flash:packages.conf; Boot Variables on next reload: BOOT variable = flash:packages.conf; Manual Boot = no Enable Break = yes Boot Mode = DEVICE iPXE Timeout = 0
重新載入交換器,使其進入安裝模式,並放在正確的ios映像17.9.3上
Switch#reload
Initializing Hardware...... System Bootstrap, Version 17.9.2r, RELEASE SOFTWARE (P) Compiled Wed 11/23/2022 12:30:48.96 by rel Current ROMMON image : Primary Last reset cause : CpuReset C9500-12Q platform with 16777216 Kbytes of main memory Preparing to autoboot. [Press Ctrl-C to interrupt] 0 boot: attempting to boot from [flash:packages.conf] <-Boot variable correctly loading from packages.conf instead of .bin file boot: reading file packages.conf <snip>
在裝載交換器後驗證版本
Switch#show version
Cisco IOS XE Software, Version 17.09.03 Cisco IOS Software [Cupertino], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 17.9.3, RELEASE SOFTWARE (fc6)
Catalyst 3850、Catalyst 9000 系列交換器上的服務中軟體升級 (ISSU)
思科錯誤 ID CSCvr29736 — 文檔錯誤:9600 無法執行 reloadfast
思科錯誤 ID CSCvr29864 -增強:9300 在 install 命令中新增 reloadfast
思科錯誤 ID CSCvr29886 -增強:可在 V-Mismatch 中變更交換器的啟動陳述式
思科錯誤 ID CSCvr30159 -增強:在您執行 install add 命令時,新增手動啟動檢查
思科錯誤 ID CSCvr30189 -增強:新增可復原「install add」的選項,且無須刪除 .bin 檔案
修訂 | 發佈日期 | 意見 |
---|---|---|
4.0 |
21-Jun-2023
|
警告新增了「如果要將交換器升級為套件組合模式,請確保已將.bin複製到堆疊中的每台交換器!」 |
3.0 |
16-Jun-2023
|
新增了ISSU部分的「瞭解Catalyst 9300系列交換機上的擴展快速軟體升級」連結 |
2.0 |
20-Jul-2022
|
初始版本 |
1.0 |
05-Nov-2020
|
初始版本 |