Friday, March 6, 2020

Cisco 3850 Stack Swtich IOS Upgrade

Here's a good link in performing an IOS upgrade on a stack of Cisco 3850 switches. You just need to copy the new .bin file on the Active (Master) switch and the software install process (a macro command) will replicate and extract a copy to the Member switch in the stack.

3850#show switch
Switch/Stack Mac Address : c025.5c85.1234 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   c025.5c85.1234     10     V02     Ready              
 2       Standby  c025.5c85.5678     1      V02     Ready              


3850#software install file flash:cat3k_caa-universalk9.SPA.03.06.07.E.152-2.E7.bin ?
  auto-rollback      Auto-rollback time
  force              Proceed with installation without performing peer package compatibility checks
  new                Create a new package provisioning file. After installation, only packages contained in the installed bundle will
                     be part of the committed package set
  on-reboot          Suppress reload prompt and do not reload after installation
  provisioning-file  Provisioning file to use for installation
  switch             Switch(es) where install operation is performed. Default is all switches
  verbose            Verbose output
  <cr>

3850#software install file flash:cat3k_caa-universalk9.SPA.03.06.07.E.152-2.E7.bin switch ?
  Valid switch ids: 1,2

  Multiple switch ids may be specified using a
  comma separated list or  '-' separated range

  For example:
    1,3,4     specifies switch ids 1, 3 and 4
    1-3       specifies switch ids 1, 2 and 3

  WORD  Switch id(s)

3850#software install file flash:cat3k_caa-universalk9.SPA.03.06.07.E.152-2.E7.bin switch 1-2
Preparing install operation ...
[1]: Copying software from active switch 1 to switch 2
[1]: Finished copying software to switch 2
[1 2]: Starting install operation    // [1 2] MEANS SWITCH 1 AND 2
[1 2]: Expanding bundle flash:cat3k_caa-universalk9.SPA.03.06.07.E.152-2.E7.bin
[1 2]: Copying package files
[1 2]: Package files copied
[1 2]: Finished expanding bundle flash:cat3k_caa-universalk9.SPA.03.06.07.E.152-2.E7.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
[1]: Old files list:
    Removed cat3k_caa-base.SPA.03.06.04.E.pkg
    Removed cat3k_caa-drivers.SPA.03.06.04.E.pkg
    Removed cat3k_caa-infra.SPA.03.06.04.E.pkg
    Removed cat3k_caa-iosd-universalk9.SPA.152-2.E4.pkg
    Removed cat3k_caa-platform.SPA.03.06.04.E.pkg
    Removed cat3k_caa-wcm.SPA.10.2.140.0.pkg
[2]: Old files list:
    Removed cat3k_caa-base.SPA.03.06.04.E.pkg
    Removed cat3k_caa-drivers.SPA.03.06.04.E.pkg
    Removed cat3k_caa-infra.SPA.03.06.04.E.pkg
    Removed cat3k_caa-iosd-universalk9.SPA.152-2.E4.pkg
    Removed cat3k_caa-platform.SPA.03.06.04.E.pkg
    Removed cat3k_caa-wcm.SPA.10.2.140.0.pkg
[1]: New files list:
    Added cat3k_caa-base.SPA.03.06.07E.pkg
    Added cat3k_caa-drivers.SPA.03.06.07E.pkg
    Added cat3k_caa-infra.SPA.03.06.07E.pkg
    Added cat3k_caa-iosd-universalk9.SPA.152-2.E7.pkg
    Added cat3k_caa-platform.SPA.03.06.07E.pkg
    Added cat3k_caa-wcm.SPA.10.2.170.0.pkg
[2]: New files list:
    Added cat3k_caa-base.SPA.03.06.07E.pkg
    Added cat3k_caa-drivers.SPA.03.06.07E.pkg
    Added cat3k_caa-infra.SPA.03.06.07E.pkg
    Added cat3k_caa-iosd-universalk9.SPA.152-2.E7.pkg
    Added cat3k_caa-platform.SPA.03.06.07E.pkg
    Added cat3k_caa-wcm.SPA.10.2.170.0.pkg

[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

 <OUTPUT TRUNCATED>

3850#show verson | inc INSTALL
*    1 32    WS-C3850-24T       03.06.07E         cat3k_caa-universalk9 INSTALL
     2 32    WS-C3850-24T       03.06.07E         cat3k_caa-universalk9 INSTALL

3850#show switch
Switch/Stack Mac Address : 580a.2006.1234 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   580a.2006.1234     10     V03     Ready              
 2       Standby  580a.201b.5678     1      V03     Ready

3850#software clean
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.06.07E.pkg
       cat3k_caa-drivers.SPA.03.06.07E.pkg
       cat3k_caa-infra.SPA.03.06.07E.pkg
       cat3k_caa-iosd-universalk9.SPA.152-2.E7.pkg
       cat3k_caa-platform.SPA.03.06.07E.pkg
       cat3k_caa-wcm.SPA.10.2.170.0.pkg
       packages.conf
[2]: Preparing packages list to delete ...
     In use files, will not delete:
       cat3k_caa-base.SPA.03.06.07E.pkg
       cat3k_caa-drivers.SPA.03.06.07E.pkg
       cat3k_caa-infra.SPA.03.06.07E.pkg
       cat3k_caa-iosd-universalk9.SPA.152-2.E7.pkg
       cat3k_caa-platform.SPA.03.06.07E.pkg
       cat3k_caa-wcm.SPA.10.2.170.0.pkg
       packages.conf
[1]: Files that will be deleted:
    cat3k_caa-base.SPA.03.06.04.E.pkg
    cat3k_caa-drivers.SPA.03.06.04.E.pkg
    cat3k_caa-infra.SPA.03.06.04.E.pkg
    cat3k_caa-iosd-universalk9.SPA.152-2.E4.pkg
    cat3k_caa-platform.SPA.03.06.04.E.pkg
    cat3k_caa-universalk9.SPA.03.06.07.E.152-2.E7.bin
    cat3k_caa-wcm.SPA.10.2.140.0.pkg
    packages.conf.00-
[2]: Files that will be deleted:
    cat3k_caa-base.SPA.03.06.04.E.pkg
    cat3k_caa-drivers.SPA.03.06.04.E.pkg
    cat3k_caa-infra.SPA.03.06.04.E.pkg
    cat3k_caa-iosd-universalk9.SPA.152-2.E4.pkg
    cat3k_caa-platform.SPA.03.06.04.E.pkg
    cat3k_caa-universalk9.SPA.03.06.07.E.152-2.E7.bin
    cat3k_caa-wcm.SPA.10.2.140.0.pkg
    packages.conf.00-

[1 2]: Do you want to proceed with the deletion? [yes/no]: yes
[1 2]: Clean up completed


You might encounter a Member switch that wouldn't join the stack after the upgrade process. The show switch will display a V-Mismatch state on a Member switch. Just issue a reload slot <SWITCH NUMBER> to reboot the specific Member switch again.

3850#show switch
Switch/Stack Mac Address : 580a.2006.1111 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   580a.2006.1111     1      V03     Ready              
 2       Member   580a.201b.2222     1      0       V-Mismatch         

3850#terminal monitor    // MONITOR THE MEMBER SWITCH STATE
3850#reload slot 2
Stack is in Half ring setup; Reloading a switch might cause stack split
Proceed with reload? [confirm]     // JUST HIT ENTER

3850#show switch
Switch/Stack Mac Address : 580a.2006.1111 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   580a.2006.1111     1      V03     Ready              
 2       Member   0000.0000.0000     0      0       Removed

000156: Feb 14 04:30:46.687 UTC: %STACKMGR-1-STACK_LINK_CHANGE: 1 stack-mgr:  Stack port 1 on switch 1 is up
000157: Feb 14 04:30:50.630 UTC: %STACKMGR-6-SWITCH_ADDED: 1 stack-mgr:  Switch 2 has been added to the stack.
000158: Feb 14 04:31:01.271 UTC: %STACKMGR-6-SWITCH_READY: 1 stack-mgr:  Switch 2 is ready.

3850#show switch
Switch/Stack Mac Address : 580a.2006.1111 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   580a.2006.1111     1      V03     Ready              
 2       Member   580a.201b.2222     1      0       Initializing   

000159: Feb 14 04:31:01.276 UTC: Starting SWITCH-ADD sequence, switch 2
000160: Feb 14 04:31:03.367 UTC: %NGWC_USB_CONSOLE-6-CONFIG_ENABLE: Switch 2: Console media-type changed to default

3850#show switch
Switch/Stack Mac Address : 580a.2006.1111 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   580a.2006.1111     1      V03     Ready              
 2       Member   580a.201b.2222    1      V03     Syncing 

000165: Feb 14 04:31:23.510 UTC: SWITCH-ADD sequence complete, switch 2

3850#show switch
Switch/Stack Mac Address : 580a.2006.2980 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   580a.2006.2980     1      V03     Ready              
 2       Member   580a.201b.9480     1      V03     Ready 


It's also best practice to hard code the switch priority (default is 1) in order to avoid this kind of issue. I've set switch 1 with a priority of 10 (higher is better) in order to always be the Active (Master) switch in the stack.

3850#switch ?
  <1-9>  Switch Number

3850#switch 1 ?
  priority  Set the priority of the specified switch
  renumber  Renumber the specified switch number
  stack     Stack port enable or disable

3850#switch 1 priority ?
  <1-15>  Switch Priority

3850#switch 1 priority 10
WARNING: Changing the switchpriority may result in a configuration change for that switch. Do you want to continue?[y/n]y

3850#show switch
Switch/Stack Mac Address : 580a.2006.1111 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   580a.2006.1111     10     V03     Ready              
 2       Standby  580a.201b.2222     1      V03     Ready

No comments:

Post a Comment