Introduction

This blog post describes how to upgrade Cisco Catalyst C9300 Series Switch using Install mode. The example shows the upgrade procedure for a C9300-48P switch upgrading from 16.6.3 to 16.12.4.

Please note that devices running IOS-XE starting from 16.9.x requires smart licensing.

The image can be downloaded from here: https://software.cisco.com/download/home/286313994/type/282046477/release/Gibraltar-16.12.4

Documentation: https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/16-12/release_notes/ol-16-12-9300.html#id_79676


Step - 1 clean up

Ensure that you have at least 1GB of space in flash to expand the new image. Clean up old installation files in case of insufficient space.

switch#install remove inactive

install_remove: START Mon Nov 16 18:05:42 UTC 2020
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-cc_srdriver.16.06.03.SPA.pkg
      File is in use, will not delete.
    cat9k-espbase.16.06.03.SPA.pkg
      File is in use, will not delete.
    cat9k-guestshell.16.06.03.SPA.pkg
      File is in use, will not delete.
      
***TRUNCATED***

Do you want to remove the above files? [y/n]y
[switch 1]:
Deleting file flash:cat9k-cc_srdriver.16.06.02.SPA.pkg ... done.
Deleting file flash:cat9k-espbase.16.06.02.SPA.pkg ... done.
Deleting file flash:cat9k-guestshell.16.06.02.SPA.pkg ... done.
Deleting file flash:packages.conf.00- ... 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  Mon Nov 16 18:07:48 UTC 2020

Step - 2 Copy the new image to the switch

switch#copy ftp: flash:

Address or name of remote host []? 10.10.10.10
Source filename []? cat9k_iosxe.16.12.04.SPA.bin
Destination filename [cat9k_iosxe.16.12.04.SPA.bin]? 
Accessing ftp://10.10.10.10/cat9k_iosxe.16.12.04.SPA.bin...
Loading cat9k_iosxe.16.12.04.SPA.bin !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 805827585/4096 bytes]

805827585 bytes copied in 1536.598 secs (524423 bytes/sec)
switch#
switch#
switch#
switch#
switch#dir
Directory of flash:/

270338  -rwx          2097152  Nov 16 2020 18:04:20 +00:00  nvram_config
270339  -rw-        805827585  Nov 16 2020 18:34:17 +00:00  cat9k_iosxe.16.12.04.SPA.bin
270361  -rw-             7511   May 2 2018 06:59:50 +01:00  packages.conf
311297  drwx             4096  Nov 16 2020 18:07:48 +00:00  .installer
270350  -rw-              333   Nov 3 2020 20:12:55 +00:00  bootloader_evt_handle.log
319489  drwx             4096   Dec 4 2017 09:04:28 +00:00  core
327681  drwx             4096   Dec 4 2017 08:56:00 +00:00  .prst_sync

Step - 3 Check the boot variables

Use show boot system command to verify that the boot variable is set to flash:packages.conf

switch#show boot system 
---------------------------
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

If not, set the boot variable using the below command.

switch(config)# boot system flash:packages.conf

Step - 4 Start the upgrade

switch#install add file flash:cat9k_iosxe.16.12.04.SPA.bin activate commit

install_add_activate_commit: START Tue Nov 17 18:49:05 UTC 2020
install_add_activate_commit: Adding PACKAGE

--- Starting initial file syncing ---
Info: Finished copying flash:cat9k_iosxe.16.12.04.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
Checking status of Add on [1]
Add: Passed on [1]
Finished Add

install_add_activate_commit: Activating PACKAGE
Following packages shall be activated:
/flash/cat9k-wlc.16.12.04.SPA.pkg
/flash/cat9k-webui.16.12.04.SPA.pkg
/flash/cat9k-srdriver.16.12.04.SPA.pkg
/flash/cat9k-sipspa.16.12.04.SPA.pkg
/flash/cat9k-sipbase.16.12.04.SPA.pkg
/flash/cat9k-rpboot.16.12.04.SPA.pkg
/flash/cat9k-rpbase.16.12.04.SPA.pkg
/flash/cat9k-guestshell.16.12.04.SPA.pkg
/flash/cat9k-espbase.16.12.04.SPA.pkg
/flash/cat9k-cc_srdriver.16.12.04.SPA.pkg

This operation requires 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-cc_srdriver.16.06.03.SPA.pkg
      Removed cat9k-espbase.16.06.03.SPA.pkg
      Removed cat9k-guestshell.16.06.03.SPA.pkg
      Removed cat9k-rpbase.16.06.03.SPA.pkg
      Removed cat9k-rpboot.16.06.03.SPA.pkg
      Removed cat9k-sipbase.16.06.03.SPA.pkg
      Removed cat9k-sipspa.16.06.03.SPA.pkg
      Removed cat9k-srdriver.16.06.03.SPA.pkg
      Removed cat9k-webui.16.06.03.SPA.pkg
      Removed cat9k-wlc.16.06.03.SPA.pkg
    New files list:
      Added cat9k-cc_srdriver.16.12.04.SPA.pkg
      Added cat9k-espbase.16.12.04.SPA.pkg
      Added cat9k-guestshell.16.12.04.SPA.pkg
      Added cat9k-rpbase.16.12.04.SPA.pkg
      Added cat9k-rpboot.16.12.04.SPA.pkg
      Added cat9k-sipbase.16.12.04.SPA.pkg
      Added cat9k-sipspa.16.12.04.SPA.pkg
      Added cat9k-srdriver.16.12.04.SPA.pkg
      Added cat9k-webui.16.12.04.SPA.pkg
      Added cat9k-wlc.16.12.04.SPA.pkg
    Finished list of software package changes
  [1] Finished Activate on switch 1
Checking status of Activate on [1]
Activate: Passed on [1]
Finished Activate

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

Install will reload the system now!
SUCCESS: install_add_activate_commit  Tue Nov 17 18:53:12 UTC 2020        

Verification

switch#show version 
Cisco IOS XE Software, Version 16.12.04
Cisco IOS Software [Gibraltar], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 16.12.4, RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2020 by Cisco Systems, Inc.
Compiled Thu 09-Jul-20 21:49 by mcpre


Cisco IOS-XE software, Copyright (c) 2005-2020 by cisco Systems, Inc.
All rights reserved.  Certain components of Cisco IOS-XE software are
licensed under the GNU General Public License ("GPL") Version 2.0.  The
software code licensed under GPL Version 2.0 is free software that comes
with ABSOLUTELY NO WARRANTY.  You can redistribute and/or modify such
GPL code under the terms of GPL Version 2.0.  For more details, see the
documentation or "License Notice" file accompanying the IOS-XE software,
or the applicable URL provided on the flyer accompanying the IOS-XE
software.


ROM: IOS-XE ROMMON
BOOTLDR: System Bootstrap, Version 16.12.2r, RELEASE SOFTWARE (P)

switch uptime is 1 minute
Uptime for this control processor is 2 minutes
System returned to ROM by PowerOn at 16:50:16 UTC Wed Feb 7 2018
System image file is "flash:packages.conf"
Last reload reason: PowerOn



This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

Smart Licensing

Devices running IOS-XE starting from 16.9.x requires smart licensing.

If you check your license pre-upgrade, you should see something like this:

switch#show license right-to-use 
Slot#       License Name          Type    Count  Period left
------------------------------------------------------------
    1  network-advantage     Permanent      N/A     Lifetime
    1      dna-advantage  Subscription      N/A CSSM Managed
------------------------------------------------------------
License Level on Reboot: network-advantage+dna-advantage Subscription

Post-upgrade the license status should look like this. (If you are not already using smart licensing)

switch#show license usage 
License Authorization: 
  Status: AUTHORIZED on Nov 20 12:03:59 2020 UTC

C9300 48P Network Advantage (C9300-48 Network Advantage):
  Description: C9300 48P Network Advantage
  Count: 1
  Version: 1.0
  Status: OUT OF COMPLIANCE
  Export status: NOT RESTRICTED

C9300 48P DNA Advantage (C9300-48 DNA Advantage):
  Description: C9300 48P DNA Advantage
  Count: 1
  Version: 1.0
  Status: OUT OF COMPLIANCE
  Export status: NOT RESTRICTED

Let's configure smart licensing

Generate the registration token in the Cisco Smart Software Manager portal and register your device with the token.

software.cisco.com >> Smart Software Licensing

switch#(config)ip http client source-interface vlan 10
 
switch#license smart register idtoken ***token goes here**

Once you registered, the license should show up in the license portal. You can also verify it on the switch.

switch#show license usage 

License Authorization: 
  Status: AUTHORIZED on Nov 20 13:14:13 2020 UTC

C9300 48P Network Advantage (C9300-48 Network Advantage):
  Description: C9300 48P Network Advantage
  Count: 1
  Version: 1.0
  Status: AUTHORIZED
  Export status: NOT RESTRICTED

C9300 48P DNA Advantage (C9300-48 DNA Advantage):
  Description: C9300 48P DNA Advantage
  Count: 1
  Version: 1.0
  Status: AUTHORIZED
  Export status: NOT RESTRICTED

Thanks for reading.

As always, your feedback and comments are more than welcome.