# Stack Function

## 1. Function Overview

The stack function connects multiple network switches and operates them as a single virtual network switch.
The features of the stack are shown below.

1. Realizing the redundancy with high usage efficiency
   There are two methods for configuring networks without a single point of failure (SPOF). Either configure networks with VRRPs and STPs or using stacks and link aggregation.
   By using the stack, unlike VRRP, there is no standby network switch, so you can increase the usage efficiency of the network switch while ensuring redundancy.

2. Easy port expansion
   You can easily increase the number of available ports by adding network switches.

   - Stack overview

The stack function is disabled in default factory settings.

## 2. Definition of Terms Used

Member switch
A network switch that makes up the stack.
Each switch is identified by a stack ID.

Stack ID
An ID that identifies the member switches that make up the stack.
The stack ID can be set from 1 to the maximum number of stacks that can be configured (currently 2).

Main switch
The main switch is selected from among member switches for managing other member switches.
Given default settings, the switch with stack ID 1 operates as the main switch.

Virtual switch
A single logical switch consisting of multiple member switches using the stack function.

Stack port
QSFP28 slot used to connect the network switches that make up the stack.

Stack link
A connection between member switches that make up a stack.

## 3. Function Details

### 3.1. Stack configuration

The configurations that can be stacked for each model are shown below.
Only configurations with two units of the same model are supported.
However, considering that stacks should reduce the impact of failures, make sure stacks are always configured with two stack links.

- SWX2320-30MC stack configuration

- SWX2322P-30MC stack configuration

- SWX3220-30MC stack configuration

- SWX3220-30TCs stack configuration

### 3.2. Connection between member switches

When the stack function is enabled, the following QSFP28 slots are switched to stack ports for connecting between members.

- SWX2320-30MC : Ports 29 and 30

- SWX2322P-30MC : Ports 29 and 30

- SWX3220-30MC : Ports 29 and 30

- SWX3220-30TCs : Ports 29 and 30

Unlike normal communication ports, stack ports are used only for communication between member switches.
Connections between member switches are only possible using the QSFP28 module (YAOC-100G-1M) provided by Yamaha.
Stack ports are connected to the lower and higher number ports on member switches.

### 3.3. Main switch selection and MAC address assignment

The rules for main switch selection and MAC address assignment are indicated below.
Note that the MAC address used in the stack configuration is applied according to the following rules in order to eliminate the impact on communication.

1. In the default stack configuration, the MAC address of the main switch (switch with ID 1) is used as the MAC address of the virtual switch.

2. If a member switch other than the main switch is disconnected (due to an error) during stack configuration, then the virtual switch will continue to use the specified MAC address.

3. If the main switch is disconnected (due to an error) during stack configuration, the virtual switch will continue to use the specified MAC address.
   In other words, the MAC address of the network switch that is not included in the stack configuration is used.

4. Even if a network switch other than the failed switch (a network switch with a different MAC address) is installed as a member switch, the virtual switch will continue to use the specified MAC address.
   If you want to reconfigure the stack with the current configuration status, restart the virtual switch at the same time to perform reconstruction.
   (The stack with ID 1 becomes the main switch and the virtual switch uses the MAC address of the main switch.)

- Main switch selection and MAC address assignment

  No | Stack configuration | Main switch selection rule
  --- | --- | ---
  1 | Initial composition |  | The stack with ID 1 specified is selected as the main switch. In that case, the MAC address of stack ID 1 is used as the virtual switch MAC address.
  2 | Fault occurrence |  | If an error occurs in the main switch, the member switch with the smallest stack ID number is selected as the main switch. In that case, the virtual switch retains the MAC address of stack ID 1.
  3 | Abnormal state recovery |  | If a network switch with a failure is reinstalled in the stack, the switch currently selected as the main switch will continue to function as the main switch. In that case, the virtual switch MAC address remains the MAC address of stack ID 1 where the failure occurred.

### 3.4. Operations on virtual switches

Operations on virtual switches in a stack configuration are basically controlled from the main switch.
The specifications related to operation are shown below.

1. Logging in to a virtual switch always logs into the main switch. *
   If necessary, the *remote-login command can be used to log into another member switch.

   - Prompt when logging into the main switch

         Yamaha>

   - Prompt when logging into a member switch

         Yamaha-2> (1)

     1 | The stack ID number is indicated after the host name.

2. The configuration (running-config, startup-config) for the virtual switch is always synchronized between member switches.
   When finished configuring settings, be sure to save the running-config settings using the write command.
   Note, however, that the write command can only be executed from the main switch.

3. When operating a virtual switch, the information stored in the L2/L3 network switch (e.g. FDB learning information, ARP cache, etc.) is automatically synchronized.
   There is no need for the user to be aware of this.

4. To view the virtual switch log, log in and then execute the show logging command.
   In that state, the log shown is for the main switch. To view the log for a member switch, use the remote-login command to log into the applicable member switch and view the corresponding log.

### 3.5. Network switch status when stacking

The member switch manages the status in the stack configuration as follows.
That status can be viewed using the show stack command.

1. Setting

   - A state in which one or more stack port links are up, and the settings necessary for stacking between member switches are performed.
     Specifically, the configuration is automatically ascertained between member switches.

2. Active

   - A state in which automatic recognition of the configuration between member switches is completed, various settings are synchronized, and virtualization is performed by multiple member switches.
     Virtualization is performed by two or more switches.

3. Inactive

   - A state in which a failure has occurred and the virtual switch has been removed.
     All communication ports, including stack ports, are forcibly shut down and communication is disabled. (Closed state)

4. Standalone

   - The stack function is enabled, but since negotiation cannot be performed with the member switch, it is operating on one unit.
     Transition to this state occurs when there is no opposing switch temporarily, such as during initial installation.
     In this state, the stack ID must be enabled, so it is operated with the specified ID setting.

5. Standalone(separated)

   - Same status as Standalone status indicated above.
     However, it remembers that a stack was once configured and retains main switch selection information that can be used when reconfiguring the stack.

6. Disable

   - The stack function is disabled.
     In this state, the stack is operated with the ID number forcibly set to 1 (even if the stack ID was set to a value other than 1).

### 3.6. Detection and measures for abnormal conditions

When a member switch in the stack configuration detects an error, it tries to resolve it autonomously within the virtual switch so that the network service is not affected.
This switch monitors the following abnormal conditions.

- Abnormality detection on the local node

  1. Does not meet stack configuration conditions (stack ID error, firmware version error)

  2. Stack link error (down detection)

  3. Fan stopped

  4. Voltage value error

  5. Current value error

- Connection node error detection

  1. Heartbeat frame reception timeout

Heartbeat is a function to check whether member switches are operating normally.
If the heartbeat frame is not received for a certain period (currently 4 seconds), it is determined that an error has occurred in the member switch.

The operation when an error is detected is shown below.

Detected node | Detected content | Operation after detection | State after detection | Remarks
--- | --- | --- | --- | ---
Main switch | Setting error | Abnormal stack ID or firmware version | As a virtual switch, it is determined that processing cannot be continued, and the network port and stack link are forcibly taken down and disconnected from the stack configuration. | Inactive |
Stack link down | One of the two links down | The status as the main switch is maintained, but two-way communication is achieved with one switch. | Active |
Both links down | The status as the main switch is maintained. | Standalone(separated) | Possible double-main status
HW error | Fan stopped, voltage/current value error | In this state, it is determined that the network switch cannot continue to be treated as the main switch, so the network ports and stack links are forcibly disabled to disconnect the switch from the stack configuration. | Inactive |
Heartbeat error | Notifications from member switches stopped | Continues to be operated as the main switch. | Standalone(separated) or Active | If there is only one remaining configuration, Standalone (separated)
Non-main member switch | Setting error | Abnormal stack ID or firmware version | As a virtual switch, it is determined that processing cannot be continued, and the network port and stack link are forcibly taken down and disconnected from the stack configuration. | Inactive |
Stack link down | One of the two links down | The status as the member switch is maintained, but two-way communication is achieved with one switch. | Active |
Both links down | Upgraded to a main switch to continue service. | Standalone(separated) | Possible double-main status
HW error | Fan stopped, voltage/current value error | In this state, it is determined that the network switch cannot continue to be treated as a member switch, so the network ports and stack links are forcibly disabled to disconnect the switch from the stack configuration. | Inactive |
Heartbeat error | Notifications from the main switch stopped | Upgraded to a main switch to continue service. | Standalone(separated) or Active | If there is only one remaining configuration, Standalone (separated)

## 4. Related Commands

Related commands are indicated below.
For details, refer to the Command Reference.

Operations | Operating commands
--- | ---
Setting stack functions | stack
Changing the stack ID number | stack renumber
Setting the IP address range used for stack ports | stack subnet
Show stack information | show stack

## 5. Stack Initial Settings

The initial setting flow for stack configuration is shown below.

1. Preparation of necessary equipment

2. Member switch settings

3. Connecting member switches

### 5.1. Preparation of necessary equipment

Prepare the equipment necessary to configure the stack.

- Member switch
  Prepare the member switches for stack configuration.
  For the stackable configurations, refer to Stack configuration.

- Stack port connection cable
  Determine and prepare the interfaces to connect the member switches.
  For more details, refer to Connection between member switches.

- External memory (SD card)
  It is recommended to use external memory to save backup data such as configs and logs during stack operation.
  By using external memory, you can use it to recover the config if a failure occurs.

### 5.2. Member switch settings

Set the member switches that constitute the stack.
Consider the following before you begin configuration.

1. Determining stack IDs to be assigned to member switches
   Stack IDs to be assigned to member switches must be statically determined.
   During initial settings, stack ID: 1 will be the main switch.

2. Determining the save destination for the startup config
   Determine the save destination for the startup config during stack configuration.
   Select the config ID in the flash ROM as the save destination and indicate in the description that the ID is for saving stack information.

After reviewing, configure member switches individually according to the following procedure.

1. Starting the member switches
   Start the member switches individually and access them from the serial console.

2. Checking and updating the firmware version
   Use the show environment command to check the current firmware version.

       Yamaha> show environment
       [Device]
         Model              : SWX3220-30MC
         BootROM version    : 1.00
         Firmware version   : Rev.4.03.XX (Fri Jan  1 00:00:00 2025) (1)
         Board version      : 00
       ...

   1 | Check the firmware version Use the RTpro site to check the most recent version released. If the public firmware version of the relevant switch is newer than the firmware that is running, update it. It is recommended that the firmware version in member switches be updated to the latest version with fixes for known issues. Given default settings, firmware updating using an SD card is enabled. Refer to Firmware update for how to update using an SD card.

3. Setting the save destination for the startup config
   Use the startup-config select command to select the configuration used for stack operations.
   At this time, it is recommended to set the description to use for the config during stack operation.

       Yamaha> enable
       Yamaha# startup-config description 1 Stack (1)
       Yamaha# startup-config select 1 (2)
       reboot system? (y/n): y (3)

   1 | Set the description “Stack” to startup-config #1
   2 | Select startup-config #1
   3 | Restart the system

4. Setting the stack ID
   Check the network switch status with show stack to confirm that the stack function is disabled.
   Also check the stack ID. The default stack ID setting is 1.

       Yamaha> enable
       Yamaha#
       Yamaha# show stack
       Stack: Disable

       Configured ID        : 1
       Subnet on stack port : 192.168.250.0
       Virtual MAC-Address  : ac44.f200.0000

       ID  Model          Status      Role     Serial       MAC-Address
       ------------------------------------------------------------------------

       Interface    Status
       ------------------------------------------------------------------------

       Yamaha#

   If necessary, change the stack ID number using the stack renumber command.

       Yamaha(config)# stack 1 renumber 2 (1)
       Yamaha(config)# do show stack
       Stack: Disable

       Configured ID        : 2
       Subnet on stack port : 192.168.250.0
       Virtual MAC-Address  : ac44.f200.0000

       ID  Model          Status      Role     Serial       MAC-Address
       ------------------------------------------------------------------------

       Interface    Status
       ------------------------------------------------------------------------

       Yamaha#

   1 | Change the stack ID number from #1 to #2

5. Enabling the stack function
   Enable the stack function using the stack enable command.
   After entering the command, reboot the device.
   Default-config is applied after rebooting is finished.

       Yamaha(config)#stack enable (1)
       reset configuration and reboot system? (y/n): y (2)

   1 | Enable the stack function
   2 | Restart the system

   After rebooting, check the network switch status with show stack to confirm that the stack function is enabled.
   Also check the save destination of the startup config.

       Yamaha> enable
       Yamaha#
       Yamaha# show stack
       Stack: Enable (1)

       Configured ID        : 1
       Running ID           : 1
       Status               : Standalone
       Subnet on stack port : 192.168.250.0
       Virtual MAC-Address  : ac44.f200.0000

       ID  Model          Status      Role     Serial       MAC-Address
       ------------------------------------------------------------------------
       1   SWX3220-30MC   Standalone  Main     Z0000000XX   ac44.f200.0000
       ... (Standalone units operated as a single unit are operated as the main unit)

       Interface    Status
       ------------------------------------------------------------------------
       port1.29     down
       port1.30     down

       Yamaha>show environment
       ...
       [Configuration]
         Startup firmware           : exec1
         Startup Configuration file : config1 (2)
                      selected file : config1
         Boot auto-apply            : Enable
         Serial Baudrate            : 9600
       ...

   1 | The stack function is enabled
   2 | Confirm that the specified startup config is correctly applied.

### 5.3. Connecting member switches

Connect stack-enabled network switches using QSFP28 modules.
For connection instructions refer to Connection between member switches.
The member switches can be connected with either the power turned on or off.

After connecting the member switches, check the system status using the show stack command.

    Yamaha# show stack
    Stack: Enable

    Configured ID        : 1
    Running ID           : 1
    Status               : Active
    Subnet on stack port : 192.168.250.0
    Virtual MAC-Address  : ac44.f200.0000

    ID  Model          Status      Role     Serial       MAC-Address
    ------------------------------------------------------------------------
    1   SWX3220-30MC   Active      Main     Z0000000XX   ac44.f200.0000
    ... (The switch with stack ID 1 operates as the main switch)
    2   SWX3220-30MC   Active      Member   Z0000000XX   ac44.f200.0000
    ... (The switch with stack ID 2 operates as the member switch)

    Interface    Status
    ------------------------------------------------------------------------
    port1.29     up
    port1.30     up
    port2.29     up
    port2.30     up

Use the backup system command to back up the initial setting status of the member switch to the SD card.
By saving the following firmware files in the indicated folder on the SD card, both settings and firmware can be backed up during backup execution.

- SWX2320-30MC: [Folder]/swx2320-30mc/firmware, [Firmware file]swx2320-30mc.bin

- SWX2322P-30MC: [Folder]/swx2322p-30mc/firmware, [Firmware file]swx2322p-30mc.bin

- SWX3220-30MC: [Folder]/swx3220-30mc/firmware, [Firmware file]swx3220-30mc.bin

- SWX3220-30TCs: [Folder]/swx3220-30tcs/firmware, [Firmware file]swx3220-30tcs.bin

      Yamaha> enable
      Yamaha# backup system (1)
      Succeeded to backup system files and firmware file.
      Yamaha# remote-login 2 (2)

      Entering character mode
      Escape character is '^]'.

      SWX3220-30MC Rev.4.03.XX (Fri Jan  1 00:00:00 2025)
        Copyright (c) 2018-2025 Yamaha Corporation. All Rights Reserved.

      Yamaha-2> enable
      Yamaha-2# backup system (3)
      Succeeded to backup system files and firmware file.

  1 | Copy all main switch settings to the SD card
  2 | Remote login to the member switch (stack ID: 2)
  3 | Copy all member switch settings to the SD card (stack ID: 2)

This completes the initial stack settings.
Install the virtual switch in the network to be used and perform the settings required for operation.
After completing the settings required for operation, backup should be performed in case of an abnormality, just as with the initial settings.

## 6. Exchanging Member Switches

The following describes how to replace a member switch after a fault occurs in a configuration with two SWX3220-30MC switches.
The following shows each case of using and not using an SD card.

### 6.1. Exchange procedure using an SD card

Member switches are exchanged by backup/restore using an SD card.

- Replacement procedure

  1. In normal operation
     After completing the setting to the member switches, back up the system information to the SD card in consideration of failure.
     To back up system information, execute the backup system command.
     Before backing up the system information, also backup the firmware by saving the swx3220-30mc.bin file (firmware file) in the /swx3220-30mc/firmware folder in the SD card.

  2. Fault occurrence
     Stack ID: Assume that an error occurs in the member switch with stack ID 2.

  3. Fault recovery
     Prepare the member switches to be exchanged and connect the SD card that contains the backup of the failed switches.
     Apply the firmware and system information by executing the restore system command.
     After they are applied, turn off the power, connect to the network switch currently functioning as the main switch, and turn on the power to restore the stack configuration.

### 6.2. Exchange procedure without using an SD card

Exchange the member switches without using an SD card.

1. At the start of operation
   After installation of the member switches is completed, store the same revision firmware as the firmware written in the member switches on a PC, etc.
   Record the serial number, config ID being used, and stack ID of each member switch.

       Yamaha> show environment
       [Device]
         Model              : SWX3220-30MC
         BootROM version    : 1.00
         Firmware version   : Rev.4.03.XX (Fri Jan  1 00:00:00 2025)
         Board version      : 00
         Serial             : Z0000000XX (1)
         Device ID          : 0000000-0000000-0000000-00000
         MAC-Address        : ac44.f200.0000
         CPLD version       : 05/12/12
         PHY version        : 10.15.5.0
         PSU version        : 14/1.0.0/-

       [Status]
         CPU                : 1%(5sec)  1%(1min)  1%(5min)
         Memory             : 8% used
         Fan status         : Normal
             speed          : FAN1:6214rpm  FAN2:6150rpm  FAN3:6129rpm
         Temperature status : Normal
                     value  : 29 degree C
         Power slot 1       : Powered (FAN:3500rpm)
         Power slot 2       : None (FAN:0rpm)

       [Configuration]
         Startup firmware           : exec1
         Startup Configuration file : config1 (2)
                      selected file : config1
         Boot auto-apply            : Enable
         Serial Baudrate            : 9600

       [Time]
         Boot time                  : 2025/01/23 17:41:34 +09:00
         Current time               : 2025/01/29 16:25:57 +09:00
         Elapsed time from boot     : 5days 22:44:41

       Yamaha> show stack
       Stack: Enable

       Configured ID        : 1 (3)
       Running ID           : 1
       Status               : Active
       Subnet on stack port : 192.168.250.0
       Virtual MAC-Address  : ac44.f200.0000

       ID  Model          Status      Role     Serial       MAC-Address
       ------------------------------------------------------------------------
       1   SWX3220-30MC   Active      Main     Z0000000XX   ac44.f200.0000
       2   SWX3220-30MC   Active      Member   Z0000000XX   ac44.f200.0000

       Interface    Status
       ------------------------------------------------------------------------
       port1.29     up
       port1.30     up
       port2.29     up
       port2.30     up

   1 | Serial number
   2 | Config ID
   3 | Stack ID

2. Fault occurrence
   Stack ID: Assume that an error occurs in the member switch with stack ID 2.

3. Fault recovery
   Prepare the member switches to be exchanged and write the saved firmware.
   Start the member switches and change the config ID used at startup.

   - If the config ID used at the start of operation was 0, there is no need to change the config ID.

         Yamaha> enable
         Yamaha# startup-config select 1
         reboot system? (y/n): y

     After rebooting, enable the stack function.
     For the stack ID to be set, refer to the member switch serial number and stack ID recorded at the start of operation.

         Yamaha> enable
         Yamaha# configure terminal
         Yamaha(config)# stack 1 renumber 2 (1)
         Yamaha(config)# stack enable (2)
         reset configuration and reboot system? (y/n): y

     1 | Set stack ID 2
     2 | Enable the stack function After enabling the stack function, turn off the power, connect to the network switch functioning as the main switch, and turn on the power to restore the stack configuration.

## 7. Firmware Update

The following two methods are provided for updating the firmware during stack configuration.

1. Method to update member switches during configuration simultaneously (parallel update)

2. Method to update without stopping network services (sequential update)

Parallel update is an effective method if you have enough time to allow a service outage.
However, *during stack configuration, it is recommended that updates be performed sequentially without a service outage. *
Note that firmware updates during stack configuration are supported only for the following.

- Update based on using a TFTP client or web GUI to send the firmware update

- Update using an SD card

If the firmware is updated while the SD card is inserted, SD card boot may be performed when restarting.
The SD card boot can be disabled with the boot prioritize sd command.

    Yamaha> enable
    Yamaha# boot prioritize sd disable (1)
    reboot system? (y/n): y

1 | Disable SD card boot

For more information, refer to Firmware Update.

### 7.1. Firmware parallel update

Firmware parallel update updates the firmware of the member switches in the stack configuration at the same time.
The service will be stopped because the entire virtual switch is restarted for the update.
Note the following points when performing parallel update.

- Confirm that the firmware update method is set to normal (firmware-update reload-method command).

- Confirm that the firmware update application time is set to the specified time (firmware-update reload-time command).

An overview of parallel update is shown below.

- Parallel update process flow

### 7.2. Firmware sequential update

Firmware serial update updates the firmware of the member switches in the stack configuration sequentially.
This update does not involve any service outage because the entire virtual switch does not need to be rebooted for the update. (* Refer to section 6 in Points of Caution.)
When performing a sequential update, note the following points.

- Confirm that the firmware update method is set to sequential (firmware-update reload-method command).

- Confirm that the firmware update application time is set to the specified time (firmware-update reload-time command).

An overview of sequential update is shown below.

- Sequential update process flow

## 8. Points of Caution

1. When the stack function is enabled, the following functions cannot be used.

   - RMON

   - IPv6

   - VRRP

   - MLD snooping

   - PTP

2. When the stack function is enabled, it can be used as a function, but some restrictions occur.

   - Mirroring function

     - Mirroring between member switches is not possible.

   - Flow control

     - Pause frame cannot be transmitted.

   - Back pressure function

     - When communicating via the stack port, jam signals are not transmitted.

   - SFP optical reception level monitoring

     - The optical reception level of the stack port is not monitored.

   - Link aggregation

     - The maximum number of logical interfaces is reduced by one.

   - Command line input

     - The users who can transition to global configuration mode are limited.
       When the console side is in global configuration mode and the telnet side transitions to global configuration mode, the console side automatically transitions to privileged EXEC mode.
       Console, telnet, ssh, remote login, and GUI settings are exclusively controlled.

     - It is not possible to log in from the main switch and other member switch consoles at the same time.

   - DHCP client

     - If the stack function is enabled and the Auto IP function is used on the stack port, the DHCP client cannot be used.

   - startup-config select command

     - Do not use the startup-config select command while the stack is configured. It may become impossible to configure correctly.
       To switch the config using the startup-config select command, remove the QSFP28 module and cancel the stack configuration before executing.

3. When the stack function is enabled, make sure that the stack configuration is configured before setting functions with commands or the GUI.
   If the stack is not configured correctly, the settings may not be reflected correctly.
   The write command and copy running-config startup-config command can be executed only on the main switch (in an active state).
   They cannot be executed on a member switch or an incorrectly configured stack.

4. When the stack function is enabled, the stack control packets use transmission queues #7 and #6, so do not assign other packets to transmission queues #7 and #6.
   When QoS is enabled, transmission queues #7 and #6 are assigned by default in the CoS-transmission queue ID conversion table, so change the assignment.

5. When the stack function is enabled, the initial setting for the transmission queue specification for frames transmitted from the network switch unit is transmission queue #6.
   Do not change the transmission queue specification setting for frames transmitted from the network switch unit from the initial setting.

6. If there is a difference between the settings (startup-config) in the main switch and in a member switch during stack configuration, the member switch settings are changed and the switch is rebooted.

7. If there is a difference between the stack port IP address range settings for the main switch and a member switch during stack configuration, communication between stacks cannot be performed properly.

## 9. Related Documentation

- Firmware Update

Search result
No more search results.
There are no topics that match your search query.