시스코 ios-xe 업그레이드 (스택 구성에서)

시스코 스위치 ios-xe 업그레이드

스위치: 시스코 C9200L-48-TX
OS: ios-xe 17.03.05
작업 내용: ios-xe 17.03.05 버전을 17.09.04a 버전으로 업그레이드

현재 스위치는 4대가 스택으로 구성되어 있다.

BoxCorea-1F#show switch
Switch/Stack Mac Address : f8e9.4f81.a780 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State 
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f81.a780     15     V03     Ready                               
 2       Standby  3c8b.7f82.3000     14     V03     Ready                               
 3       Member   3c8b.7f85.2880     13     V03     Ready                               
 4       Member   f8e9.4f52.ec00     12     V03     Ready

참고사항: 스택 구성된 스위치나, 단독 구성된 스위치나 업그레이드 방법은 동일하다.

1. OS 파일을 스위치에 복사.

업그레이드할 ios-xe 파일을 스위치에 업로드해 놓는다.
tftp, scp 로 업로드하거나, usb 메모리를 이용하여 복사해도 된다.

아래는 172.16.124.211 서버에서 scp로 파일을 복사하는 경우

BoxCorea-1F#copy scp://snowfox@172.16.124.211:22//home/snowfox/ios-xe/cat9k_lite_iosxe.17.09.04a.SPA.bin bootflash:cat9k_lite_iosxe.17.09.04a.SPA.bin
Destination filename [cat9k_lite_iosxe.17.09.04a.SPA.bin]? 
Password: 
 scp: debug1: fd 3 clearing O_NONBLOCK
 Sending file modes: C0664 470682931 cat9k_lite_iosxe.17.09.04a.SPA.bin
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! scp: debug1: fd 1 clearing O_NONBLOCK
!!!!!!
470682931 bytes copied in 825.320 secs (570304 bytes/sec)

2. Boot 모드 변경
Bundle 모드에서 Install 모드로 변경한다.

변경전 boot 모드 확인.

BoxCorea-1F#sh boot
---------------------------
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
Boot Mode = DEVICE
iPXE Timeout = 0

부팅 변수 설정

BoxCorea-1F#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
BoxCorea-1F(config)#boot system flash:packages.conf
BoxCorea-1F(config)#no boot manual 
BoxCorea-1F(config)#end

부팅 변수 확인

BoxCorea-1F#show boot
---------------------------
Switch 1
---------------------------
Current Boot Variables:
BOOT variable = flash:packages.conf;

Boot Variables on next reload:
BOOT variable = flash:packages.conf;
Manual Boot = no
Enable Break = no
Boot Mode = DEVICE
iPXE Timeout = 0

설정을 저장한다.

BoxCorea-1F#wr
Building configuration...
[OK]

3. 이미지 설치.

BoxCorea-1F#install add file flash:cat9k_lite_iosxe.17.09.04a.SPA.bin activate commit
install_add_activate_commit: START Fri Jul 19 09:28:27 KST 2024
Jul 19 09:28:28.057 %INSTALL-5-INSTALL_START_INFO: R0/0: install_engine: Started install one-shot flash:cat9k_lite_iosxe.17.09.04a.SPA.bin
install_add_activate_commit: Adding PACKAGE
install_add_activate_commit: Checking whether new add is allowed ....

--- Starting initial file syncing ---
[1]: Copying flash:cat9k_lite_iosxe.17.09.04a.SPA.bin from switch 1 to switch 2 3 4
[2 3 4]: Finished copying to switch 2 switch 3 switch 4  
Info: Finished copying flash:cat9k_lite_iosxe.17.09.04a.SPA.bin to the selected switch(es)
Finished initial file syncing

--- Starting Add ---
Performing Add on all members
  [1] Add package(s) on switch 1
  [1] Finished Add on switch 1
  [2] Add package(s) on switch 2
  [2] Finished Add on switch 2
  [3] Add package(s) on switch 3
  [3] Finished Add on switch 3
  [4] Add package(s) on switch 4
  [4] Finished Add on switch 4
Checking status of Add on [1 2 3 4]
Add: Passed on [1 2 3 4]
Finished Add

Image added. Version: 17.09.04a.0.6
install_add_activate_commit: Activating PACKAGE

gzip: initramfs.cpio.gz: decompression OK, trailing garbage ignored
Following packages shall be activated:
/flash/cat9k_lite-webui.17.09.04a.SPA.pkg
/flash/cat9k_lite-srdriver.17.09.04a.SPA.pkg
/flash/cat9k_lite-rpboot.17.09.04a.SPA.pkg
/flash/cat9k_lite-rpbase.17.09.04a.SPA.pkg

This operation may require a reload of the system. Do you want to proceed? [y/n]y
--- Starting Activate ---
Performing Activate on all members
  [1] Activate package(s) on switch 1
    --- Starting list of software package changes ---
    Old files list:
      Removed cat9k_lite-rpbase.17.03.05.SPA.pkg
      Removed cat9k_lite-rpboot.17.03.05.SPA.pkg
      Removed cat9k_lite-srdriver.17.03.05.SPA.pkg
      Removed cat9k_lite-webui.17.03.05.SPA.pkg
    New files list:
      Added cat9k_lite-rpbase.17.09.04a.SPA.pkg
      Added cat9k_lite-rpboot.17.09.04a.SPA.pkg
      Added cat9k_lite-srdriver.17.09.04a.SPA.pkg
      Added cat9k_lite-webui.17.09.04a.SPA.pkg
    Finished list of software package changes
  [1] Finished Activate on switch 1
  [2] Activate package(s) on switch 2
    --- Starting list of software package changes ---
    Old files list:
      Removed cat9k_lite-rpbase.17.03.05.SPA.pkg
      Removed cat9k_lite-rpboot.17.03.05.SPA.pkg
      Removed cat9k_lite-srdriver.17.03.05.SPA.pkg
      Removed cat9k_lite-webui.17.03.05.SPA.pkg
    New files list:
      Added cat9k_lite-rpbase.17.09.04a.SPA.pkg
      Added cat9k_lite-rpboot.17.09.04a.SPA.pkg
      Added cat9k_lite-srdriver.17.09.04a.SPA.pkg
      Added cat9k_lite-webui.17.09.04a.SPA.pkg
    Finished list of software package changes
  [2] Finished Activate on switch 2
  [3] Activate package(s) on switch 3
    --- Starting list of software package changes ---
    Old files list:
      Removed cat9k_lite-rpbase.17.03.05.SPA.pkg
      Removed cat9k_lite-rpboot.17.03.05.SPA.pkg
      Removed cat9k_lite-srdriver.17.03.05.SPA.pkg
      Removed cat9k_lite-webui.17.03.05.SPA.pkg
    New files list:
      Added cat9k_lite-rpbase.17.09.04a.SPA.pkg
      Added cat9k_lite-rpboot.17.09.04a.SPA.pkg
      Added cat9k_lite-srdriver.17.09.04a.SPA.pkg
      Added cat9k_lite-webui.17.09.04a.SPA.pkg
    Finished list of software package changes
  [3] Finished Activate on switch 3
  [4] Activate package(s) on switch 4
    --- Starting list of software package changes ---
    Old files list:
      Removed cat9k_lite-rpbase.17.03.05.SPA.pkg
      Removed cat9k_lite-rpboot.17.03.05.SPA.pkg
      Removed cat9k_lite-srdriver.17.03.05.SPA.pkg
      Removed cat9k_lite-webui.17.03.05.SPA.pkg
    New files list:
      Added cat9k_lite-rpbase.17.09.04a.SPA.pkg
      Added cat9k_lite-rpboot.17.09.04a.SPA.pkg
      Added cat9k_lite-srdriver.17.09.04a.SPA.pkg
      Added cat9k_lite-webui.17.09.04a.SPA.pkg
    Finished list of software package changes
  [4] Finished Activate on switch 4
Checking status of Activate on [1 2 3 4]
Activate: Passed on [1 2 3 4]
Finished Activate

--- Starting Commit ---
Performing Commit on all members
  [1] Commit package(s) on switch 1
  [1] Finished Commit on switch 1
  [2] Commit package(s) on switch 2
  [2] Finished Commit on switch 2
  [3] Commit package(s) on switch 3
  [3] Finished Commit on switch 3
  [4] Commit package(s) on switch 4
  [4] Finished Commit on switch 4
Checking status of Commit on [1 2 3 4]
Commit: Passed on [1 2 3 4]
Finished Commit

Send model notification for install_add_activate_commit before reload
Install will reload the system now!
SUCCESS: install_add_activate_commit  Fri Jul 19 09:47:38 KST 2024
Jul 19 09:47:39.187 %INSTALL-5-INSTALL_COMPLETED_INFO: R0/0: install_engine: Completed install one-shot PACKAGE flash:cat9k_lite_iosxe.17.09.04a.SPA.bin
BoxCorea-1F#
Socket error Event: 32 Error: 10053.
Connection closing...Socket close.

4. 재부팅 완료후 버전 확인

BoxCorea-1F#show version
Cisco IOS XE Software, Version 17.09.04a
Cisco IOS Software [Cupertino], Catalyst L3 Switch Software (CAT9K_LITE_IOSXE), Version 17.9.4a, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2023 by Cisco Systems, Inc.
Compiled Fri 20-Oct-23 10:33 by mcpre
...

5. 불필요한 파일 삭제

BoxCorea-1F#install remove inactive
install_remove: START Fri Jul 19 10:00:26 KST 2024
install_remove: Removing IMG
Cleaning up unnecessary package files
No path specified, will use booted path /flash/packages.conf

Cleaning /flash
  Scanning boot directory for packages ... done.
  Preparing packages list to delete ...
    [R0]: /flash/packages.conf File is in use, will not delete.
    [R1]: /flash/packages.conf File is in use, will not delete.
    [R2]: /flash/packages.conf File is in use, will not delete.
    [R3]: /flash/packages.conf File is in use, will not delete.
    [R0]: /flash/cat9k_lite-rpbase.17.09.04a.SPA.pkg File is in use, will not delete.
    [R1]: /flash/cat9k_lite-rpbase.17.09.04a.SPA.pkg File is in use, will not delete.
    [R2]: /flash/cat9k_lite-rpbase.17.09.04a.SPA.pkg File is in use, will not delete.
    [R3]: /flash/cat9k_lite-rpbase.17.09.04a.SPA.pkg File is in use, will not delete.
    [R0]: /flash/cat9k_lite-rpboot.17.09.04a.SPA.pkg File is in use, will not delete.
    [R1]: /flash/cat9k_lite-rpboot.17.09.04a.SPA.pkg File is in use, will not delete.
    [R2]: /flash/cat9k_lite-rpboot.17.09.04a.SPA.pkg File is in use, will not delete.
    [R3]: /flash/cat9k_lite-rpboot.17.09.04a.SPA.pkg File is in use, will not delete.
    [R0]: /flash/cat9k_lite-srdriver.17.09.04a.SPA.pkg File is in use, will not delete.
    [R1]: /flash/cat9k_lite-srdriver.17.09.04a.SPA.pkg File is in use, will not delete.
    [R2]: /flash/cat9k_lite-srdriver.17.09.04a.SPA.pkg File is in use, will not delete.
    [R3]: /flash/cat9k_lite-srdriver.17.09.04a.SPA.pkg File is in use, will not delete.
    [R0]: /flash/cat9k_lite-webui.17.09.04a.SPA.pkg File is in use, will not delete.
    [R1]: /flash/cat9k_lite-webui.17.09.04a.SPA.pkg File is in use, will not delete.
    [R2]: /flash/cat9k_lite-webui.17.09.04a.SPA.pkg File is in use, will not delete.
    [R3]: /flash/cat9k_lite-webui.17.09.04a.SPA.pkg File is in use, will not delete.
    [R0]: /flash/cat9k_lite_iosxe.17.09.04a.SPA.conf File is in use, will not delete.
    [R1]: /flash/cat9k_lite_iosxe.17.09.04a.SPA.conf File is in use, will not delete.
    [R2]: /flash/cat9k_lite_iosxe.17.09.04a.SPA.conf File is in use, will not delete.
    [R3]: /flash/cat9k_lite_iosxe.17.09.04a.SPA.conf File is in use, will not delete.

The following files will be deleted:
    [R0]: /flash/cat9k_lite-rpbase.17.03.05.SPA.pkg
    [R1]: /flash/cat9k_lite-rpbase.17.03.05.SPA.pkg
    [R2]: /flash/cat9k_lite-rpbase.17.03.05.SPA.pkg
    [R3]: /flash/cat9k_lite-rpbase.17.03.05.SPA.pkg
    [R0]: /flash/cat9k_lite-rpboot.17.03.05.SPA.pkg
    [R1]: /flash/cat9k_lite-rpboot.17.03.05.SPA.pkg
    [R2]: /flash/cat9k_lite-rpboot.17.03.05.SPA.pkg
    [R3]: /flash/cat9k_lite-rpboot.17.03.05.SPA.pkg
    [R0]: /flash/cat9k_lite-srdriver.17.03.05.SPA.pkg
    [R1]: /flash/cat9k_lite-srdriver.17.03.05.SPA.pkg
    [R2]: /flash/cat9k_lite-srdriver.17.03.05.SPA.pkg
    [R3]: /flash/cat9k_lite-srdriver.17.03.05.SPA.pkg
    [R0]: /flash/cat9k_lite-webui.17.03.05.SPA.pkg
    [R1]: /flash/cat9k_lite-webui.17.03.05.SPA.pkg
    [R2]: /flash/cat9k_lite-webui.17.03.05.SPA.pkg
    [R3]: /flash/cat9k_lite-webui.17.03.05.SPA.pkg
    [R0]: /flash/cat9k_lite_iosxe.17.09.04a.SPA.bin
    [R1]: /flash/cat9k_lite_iosxe.17.09.04a.SPA.bin
    [R2]: /flash/cat9k_lite_iosxe.17.09.04a.SPA.bin
    [R3]: /flash/cat9k_lite_iosxe.17.09.04a.SPA.bin

Do you want to remove the above files? [y/n]y

Deleting file /flash/cat9k_lite-rpbase.17.03.05.SPA.pkg ... done.
Deleting file /flash/cat9k_lite-rpboot.17.03.05.SPA.pkg ... done.
Deleting file /flash/cat9k_lite-srdriver.17.03.05.SPA.pkg ... done.
Deleting file /flash/cat9k_lite-webui.17.03.05.SPA.pkg ... done.
Deleting file /flash/cat9k_lite_iosxe.17.09.04a.SPA.bin ... done.
SUCCESS: Files deleted.

--- Starting Post_Remove_Cleanup ---
Performing REMOVE_POSTCHECK on all members
Finished Post_Remove_Cleanup
SUCCESS: install_remove Fri Jul 19 10:01:14 KST 2024
BoxCorea-1F#

6. 업그레이드중 입력 없어 설치 중단된 경우

아래 부분에서 입력을 하지않고 시간이 지나서 ssh 접속이 끊김.

This operation may require a reload of the system. Do you want to proceed? [y/n]install_add_activate_commit: No User Response, Request Timeout

FAILED: install_add_activate_commit /flash/cat9k_lite-webui.17.09.04a.SPA.pkg /flash/cat9k_lite-srdriver.17.09.04a.SPA.pkg /flash/cat9k_lite-rpboot.17.09.04a.SPA.pkg /flash/cat9k_lite-rpbase.17.09.04a.SPA.pkg: Cannot proceed activate because of user input
Jul 19 10:40:39.191 %INSTALL-3-OPERATION_ERROR_MESSAGE: R0/0: install_engine: Failed to install_add_activate_commit package flash:cat9k_lite_iosxe.17.09.04a.SPA.bin, Error: install_add_activate_commit /flash/cat9k_lite-webui.17.09.04a.SPA.pkg /flash/cat9k_lite-srdriver.17.09.04a.SPA.pkg /flash/cat9k_lite-rpboot.17.09.04a.SPA.pkg /flash/cat9k_lite-rpbase.17.09.04a.SPA.pkg: Cannot proceed activate because of user input
BoxCorea-2F#Connection closing...Socket close.

설치 내용 확인해 보면, 새 이미지가 inactive 상태임.

BoxCorea-2F#show install summary
[ Switch 1 ] Installed Package(s) Information:
State (St): I - Inactive, U - Activated & Uncommitted,
            C - Activated & Committed, D - Deactivated & Uncommitted
--------------------------------------------------------------------------------
Type  St   Filename/Version
--------------------------------------------------------------------------------
IMG   C    17.03.05.0.6600
IMG   I    17.09.04a.0.6

--------------------------------------------------------------------------------
Auto abort timer: inactive
--------------------------------------------------------------------------------

inactive 상태의 이미지를 삭제한다.

BoxCorea-2F#install remove inactive
install_remove: START Fri Jul 19 11:09:44 KST 2024
Jul 19 11:09:45.316 %INSTALL-5-INSTALL_START_INFO: R0/0: install_engine: Started install remove
Cleaning up unnecessary package files
No path specified, will use booted path flash:packages.conf
Cleaning flash:
  Scanning boot directory for packages ... done.
  Preparing packages list to delete ... 
    cat9k_lite-rpbase.17.03.05.SPA.pkg
      File is in use, will not delete.
    cat9k_lite-rpboot.17.03.05.SPA.pkg
      File is in use, will not delete.
    cat9k_lite-srdriver.17.03.05.SPA.pkg
      File is in use, will not delete.
    cat9k_lite-webui.17.03.05.SPA.pkg
      File is in use, will not delete.
    packages.conf
      File is in use, will not delete.
  done.
  
The following files will be deleted:
[switch 1]:
/flash/cat9k_lite-rpbase.17.09.04a.SPA.pkg
/flash/cat9k_lite-rpboot.17.09.04a.SPA.pkg
/flash/cat9k_lite-srdriver.17.09.04a.SPA.pkg
/flash/cat9k_lite-webui.17.09.04a.SPA.pkg
/flash/cat9k_lite_iosxe.17.09.04a.SPA.bin
/flash/cat9k_lite_iosxe.17.09.04a.SPA.conf

Do you want to remove the above files? [y/n]y

[switch 1]:
Deleting file flash:cat9k_lite-rpbase.17.09.04a.SPA.pkg ... done.
Deleting file flash:cat9k_lite-rpboot.17.09.04a.SPA.pkg ... done.
Deleting file flash:cat9k_lite-srdriver.17.09.04a.SPA.pkg ... done.
Deleting file flash:cat9k_lite-webui.17.09.04a.SPA.pkg ... done.
Deleting file flash:cat9k_lite_iosxe.17.09.04a.SPA.bin ... done.
Deleting file flash:cat9k_lite_iosxe.17.09.04a.SPA.conf ... done.
SUCCESS: Files deleted.
--- Starting Post_Remove_Cleanup ---
Performing Post_Remove_Cleanup on all members
  [1] Post_Remove_Cleanup package(s) on switch 1
  [1] Finished Post_Remove_Cleanup on switch 1
Checking status of Post_Remove_Cleanup on [1]
Post_Remove_Cleanup: Passed on [1]
Finished Post_Remove_Cleanup

SUCCESS: install_remove  Fri Jul 19 11:11:55 KST 2024
Jul 19 11:11:56.975 %INSTALL-5-INSTALL_COMPLETED_INFO: R0/0: install_engine: Completed install remove

이제, 업그레이드 과정을 처음부터 다시 진행하면 된다.

* 참고문서:
https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9200/software/release/17-11/release_notes/ol-17-11-9200/upgrading_the_switch_software.html?bookSearch=true#topic-t-rn-upgrading-install-mode-9200.xml

답글 남기기

Your email address will not be published.