Wednesday, April 18, 2018

Configlet: Cisco 3850 Switch Stacking

In this configlet I'll show the few steps needed for a bare minimum switch stack.

A switch stack is when multiple switch are connected via a backplane (stackwise cables) and act as one larger switch. They share a common config and all the interfaces of all the switches are configured via a single running-config.

One of the switches has to be a "master". In this example I'm forcing one switch to be a master by making it's priority the highest value. There is an order that Cisco switches will try, to determine who should be the master, if you don't set any value's manually:

  1. The switch that is currently the active switch.
  2. The switch with the highest stack member priority value.
  3. The switch with the shortest start-up time.
  4. The switch with the lowest MAC address.
From Cisco's website:


Some resources from Cisco's website:

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3850/hardware/installation/guide/b_c3850_hig/b_c3850_hig_chapter_010.html#concept_BACF415ABB244A479BB6C803B181560F

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3850/software/release/3se/ha_stack_manager/configuration_guide/b_hastck_3se_3850_cg/b_hastck_3se_3850_cg_chapter_010.html#concept_6E38EA556E8A4A198FD7BBDC159F4B07


Before you begin:


  • In this scenario I have 2 switches. 
  • The switch I intend to be the master is powered on and running. It currently has an operational running-config.
  • The switch I intend to be the non-master is powered off.
  • I do NOT care about the configs on the non-master switch.

Check the current priority of the intended master:


Switch01#show switch

Switch/Stack Mac Address : 0000.aaaa.aaaa - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0000.aaaa.aaaa     1      V06     Ready


You can see from the above output the priority value is 1 (the lowest). I want this switch to become the master everytime so I will change it to the maximum value of 15 (the highest).


Change the priority on the intended master:


NOTE: These commands are from Privileged-Exec NOT Global Config. You cannot see these configurations in the running-config.

Switch01#switch ?
  <1-9>  Switch Number

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

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

Switch01#switch 1 priority 15 ?
  <cr>

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



Verify the priority has changed for intended master:

Switch01#sho switch
Switch/Stack Mac Address : 0000.aaaa.aaaa - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0000.aaaa.aaaa     15     V06     Ready



Connect the StackWise cables and power up the second switch. You'll see some console messages similar to what is below.


Nov 11 01:14:07.116: %STACKMGR-1-STACK_LINK_CHANGE: 1 stack-mgr:  Stack port 2 on switch 1 is up
Nov 11 01:14:26.152: %STACKMGR-6-SWITCH_ADDED: 1 stack-mgr:  Switch 2 has been added to the stack.
Nov 11 01:14:37.742: %STACKMGR-6-SWITCH_READY: 1 stack-mgr:  Switch 2 is ready.
Nov 11 01:14:37.748: Starting SWITCH-ADD sequence, switch 2
Nov 11 01:14:39.047: %NGWC_USB_CONSOLE-6-CONFIG_ENABLE: Switch 2: Console media-type changed to default
Nov 11 01:14:42.836: %NGWC_PLATFORM_FEP-6-FRU_PS_OIR: Switch 2: FRU power supply A inserted
Nov 11 01:14:42.837: %NGWC_PLATFORM_FEP-6-FRU_PS_OIR: Switch 2: FRU power supply B inserted
Nov 11 01:15:01.239: SWITCH-ADD sequence complete, switch 2

Nov 11 01:15:03.832: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet2/1/1, changed state to down
Nov 11 01:15:03.832: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet2/1/2, changed state to down
Nov 11 01:15:03.832: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet2/1/3, changed state to down
Nov 11 01:15:03.832: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet2/1/4, changed state to down
Nov 11 01:15:03.833: %LINEPROTO-5-UPDOWN: Line protoc
Switch01#ol on Interface TenGigabitEthernet2/1/1, changed state to down
Nov 11 01:15:03.833: %LINEPROTO-5-UPDOWN: Line protocol on Interface TenGigabitEthernet2/1/2, changed state to down
Nov 11 01:15:03.833: %LINEPROTO-5-UPDOWN: Line protocol on Interface TenGigabitEthernet2/1/3, changed state to down
Nov 11 01:15:03.833: %LINEPROTO-5-UPDOWN: Line protocol on Interface TenGigabitEthernet2/1/4, changed state to down
Nov 11 01:15:04.769: %PLATFORM_PM-6-FRULINK_INSERTED: 4x1G uplink module inserted in the switch 2 slot 1


The above syslog messages and 'convergence' takes a few minutes. After all the line protocol messages are finished you can from the master switch verify they are stacked.

Verify the Switch Stack:

Switch01#sho switch
Switch/Stack Mac Address : 0000.aaaa.aaaa - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0000.aaaa.aaaa     15     V06     Ready
 2       Member   0000.bbbb.bbbb     1      V07     Ready



Switch01#sho switch neighbors
  Switch #    Port 1       Port 2
  --------    ------       ------
      1        None           2
      2         1            None


Switch01#sho switch detail
Switch/Stack Mac Address : 0000.aaaa.aaaa - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
------------------------------------------------------------
*1       Active   0000.aaaa.aaaa     15     V06     Ready
 2       Member   0000.bbbb.bbbb     1      V07     Ready



         Stack Port Status             Neighbors
Switch#  Port 1     Port 2           Port 1   Port 2
--------------------------------------------------------
  1       DOWN         OK             None       2
  2         OK       DOWN               1      None

Switch01#


No comments:

Post a Comment