Cisco 9500 StackWise Virtual Configuration

Overview

Cisco StackWise Virtual allows two physical switches to operate as a single logical virtual switch. When using StackWise Virtual, you are not limited by a 3 Metre stack cable anymore. You can place the switches far apart and connect them together with the usual fibres and transceivers.

Prerequisites

  • Both switches must be directly connected to each other.
  • Same hardware model and version
  • Both switches must be running at the same license level.
  • All the ports used for configuring a StackWise Virtual Link (SVL) must share the same speed.
  • Requires Network Advantage license
  • Ensure that VLAN 4094 is not used anywhere on the network. All inter-chassis system control communication between stack members is carried over the reserved VLAN 4094.

When you bond two switches together and form a single logical unit, special signalling and control information must be exchanged between the two switches in a timely manner. To facilitate this, dedicated links are used to transfer both data and StackWise Virtual control traffic between the peer switches. This link is referred to as the StackWise Virtual link. The StackWise Virtual link, formed as an EtherChannel interface, can have one to eight physical member ports.

In the event that all of your StackWise Virtual Links are down, both switches will assume the role of 'active' which can introduce unintended results. To avoid this, the switches use an alternative path that detects whether the peer switch is up and make decisions based on that.

Traditional StackWise vs StackWise Virtual

The main difference between traditional staking and StackWise Virtual is that with the former you have to use dedicated stacking ports and cables. If I remember correctly, the maximum length you can get is 3 metres, therefore you won't be able to place the switches far apart. With StackWise Virtual, you are free to use any of the uplink ports (10G, 40G or even 100G) to connect the switches together.

StackWise Virtual Configuration

The configuration is pretty straightforward. Let's start by configuring the first switch. The configuration is based on the following diagram.

Switch-1

stackwise-virtual
 domain 10

interface TwentyFiveGigE1/0/24
 stackwise-virtual dual-active-detection
 description STACKWISE VIRTUAL DUAL ACTIVE DETECTION
!
interface HundredGigE1/0/25
 stackwise-virtual link 1
 description STACKWISE VIRTUAL LINK 1
!
interface HundredGigE1/0/26
 stackwise-virtual link 1
 description STACKWISE VIRTUAL LINK 2
!

I've also included the terminal output below as you get quite a lot of messages for each StackWise command.

SW-01(config)#stackwise-virtual 
Please reload the switch for Stackwise Virtual configuration to take effect
Upon reboot, the config will be part of running config but not part of start up config.
SW-01(config-stackwise-virtual)#domain 10

SW-01(config)#interface Hu1/0/25
SW-01(config-if)#description STACKWISE VIRTUAL LINK 1
SW-01(config-if)#stackwise-virtual link 1
WARNING: SVL configuration will be ignored  on lower (1G) speed.
WARNING: All the extraneous configurations will be removed for HundredGigE1/0/25 on reboot
INFO: Upon reboot, the config will be part of running config but not part of start up config.

SW-01(config)#interface Hu1/0/26
SW-01(config-if)#description STACKWISE VIRTUAL LINK 2
SW-01(config-if)#stackwise-virtual link 1
WARNING: SVL configuration will be ignored  on lower (1G) speed.
WARNING: All the extraneous configurations will be removed for HundredGigE1/0/26 on reboot
INFO: Upon reboot, the config will be part of running config but not part of start up config.

SW-01(config)#interface Twe1/0/24

SW-01(config-if)#description STACKWISE VIRTUAL DUAL ACTIVE DETECTION
SW-01(config-if)#stackwise-virtual dual-active-detection
WARNING: All the extraneous configurations will be removed for TwentyFiveGigE1/0/24 on reboot.
INFO: Upon reboot, the config will be part of running config but not part of start up config.

SW-01#copy run startup-config
Destination filename [startup-config]? 
Building configuration...
[OK]

SW-01#reload

Switch-2

Switch-02 configurations are exactly the same as the first one except you need to renumber the switch.

SW-02#switch renumber 2
stackwise-virtual
 domain 10
!
interface HundredGigE1/0/25
 stackwise-virtual link 1
 description STACKWISE VIRTUAL LINK 1
!
interface HundredGigE1/0/26
 stackwise-virtual link 1
 description STACKWISE VIRTUAL LINK 2
!
interface TwentyFiveGigE1/0/24
 stackwise-virtual dual-active-detection
 description STACKWISE VIRTUAL DUAL ACTIVE DETECTION

And the terminal output is shown below.

SW-02#switch renumber 2
WARNING: Changing the switch number may result in a configuration change for that switch.  The interface configuration associated with the old switch number will remain as a provisioned configuration. New Switch Number will be effective after next reboot. Do you want to continue?[y/n]? [yes]:

SW-02(config)#stackwise-virtual 
Please reload the switch for Stackwise Virtual configuration to take effect
Upon reboot, the config will be part of running config but not part of start up config.

SW-02(config-stackwise-virtual)#domain 10

SW-02(config)#interface Hu1/0/25
SW-02(config-if)#description STACKWISE VIRTUAL LINK 1
SW-02(config-if)#stackwise-virtual link 1
WARNING: SVL configuration will be ignored  on lower (1G) speed.
WARNING: All the extraneous configurations will be removed for HundredGigE1/0/25 on reboot
INFO: Upon reboot, the config will be part of running config but not part of start up config.

SW-02(config-if)#interface Hu1/0/26
SW-02(config-if)#description STACKWISE VIRTUAL LINK 2
SW-02(config-if)#stackwise-virtual link 1
WARNING: SVL configuration will be ignored  on lower (1G) speed.
WARNING: All the extraneous configurations will be removed for HundredGigE1/0/26 on reboot
INFO: Upon reboot, the config will be part of running config but not part of start up config.
SW-02(config-if)#

SW-02(config-if)#interface Twe1/0/24
SW-02(config-if)#description STACKWISE VIRTUAL DUAL ACTIVE DETECTION
SW-02(config-if)#stackwise-virtual dual-active-detection
WARNING: All the extraneous configurations will be removed for TwentyFiveGigE1/0/24 on reboot.
INFO: Upon reboot, the config will be part of running config but not part of start up config.

SW-02(config-if)#end

SW-02#copy run startup-config
Destination filename [startup-config]? 
Building configuration...
[OK]

SW-02#reload

Verification

There are a few commands you can use to verify the status of the StackWise Virtual. Once you rebooted both switches and issue show switch command, you may notice the second switch may be in HA Sync mode which is normal.

switch#show switch 
Switch/Stack Mac Address : 4488.16b5.b7a0 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State 
-------------------------------------------------------------------------------------
*1       Active   4488.16b5.b7a0     1      V02     Ready                               
 2       Standby  4488.16bb.3220     1      V02     HA sync in progress

Once everything is settled down, you can run the following commands to see if everything is working as intended.

switch#show switch 
Switch/Stack Mac Address : 4688.13b5.b7a0 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State 
-------------------------------------------------------------------------------------
*1       Active   4688.13b5.b7a0     1      V02     Ready                               
 2       Standby  4688.13bb.3220     1      V02     Ready
switch#show stackwise-virtual neighbors 
Stackwise Virtual Link(SVL) Neighbors Information:
--------------------------------------------------
Switch  SVL     Local Port                         Remote Port
------  ---     ----------                         -----------
1       1       HundredGigE1/0/25                  HundredGigE2/0/25                
                HundredGigE1/0/26                  HundredGigE2/0/26                
2       1       HundredGigE2/0/25                  HundredGigE1/0/25                
                HundredGigE2/0/26                  HundredGigE1/0/26
switch#show stackwise-virtual link 
Stackwise Virtual Link(SVL) Information:
----------------------------------------
Flags:
------
Link Status
-----------
U-Up D-Down
Protocol Status
---------------
S-Suspended P-Pending E-Error T-Timeout R-Ready
-----------------------------------------------
Switch  SVL     Ports                           Link-Status     Protocol-Status
------  ---     -----                           -----------     ---------------
1       1       HundredGigE1/0/25               U               R              
                HundredGigE1/0/26               U               R              
2       1       HundredGigE2/0/25               U               R              
                HundredGigE2/0/26               U               R              

LON-VPR-SWP-001#show stackwise-virtual du   
LON-VPR-SWP-001#show stackwise-virtual dual-active-detection 
In dual-active recovery mode: No
Recovery Reload: Enabled

Dual-Active-Detection Configuration:
-------------------------------------
Switch  Dad port                        Status
------  ------------                    ---------
1       TwentyFiveGigE1/0/24            up     
2       TwentyFiveGigE2/0/24            up

References

https://www.cisco.com/c/en/us/products/collateral/switches/catalyst-9000/nb-06-cat-9k-stack-wp-cte-en.html