Understanding stacking election

Electing a Commander

In cases where the Commander of the stack is not identified as described in this section, the stack undergoes a Commander Election process. This occurs when the entire stack is rebooted simultaneously, such as during a building power failure recovery or when the stack becomes split and the Commander is isolated in the Inactive fragment, requiring the Active fragment to elect a new Commander.

All the switches go through discovery and election at the same time. The election timer is set for 60 seconds and if no new switches are discovered during that timeout period, the switches in the stack enter the election process.

During the election process, for each group of switches with the same STACK-ID (they should all be the same), these steps occur:

  1. The switches with the highest Stack Revision are discovered.

  2. The switch with the highest configured priority is selected as the Commander.

  3. If there are switches with the same “highest” priority, the switch that was the previous Commander is selected.

  4. If no switches were previous commanders, the switch that was the previous Standby is selected.

  5. If none of the above conditions apply, the switch with the lowest MAC Address is selected as the Commander.

Electing a Standby

The Standby switch is selected by the Commander following the same rules used to elect the Commander. Like the Commander, the Standby switch is not changed unless a failure occurs (for example, the Standby switch fails, or the Commander fails and the Standby becomes the Commander).


[NOTE: ]

NOTE: Since the Commander will update the revision software and set the stack IDs of all the switches, this information will be the same for all Standby switch contenders.


The criteria used by the Commander to select the Standby are in this priority order:

  1. A switch with the same system revision software as the Commander is available. This speeds up the initial boot since the stack will not have to wait for the standby to be updated. (If this were not the case, then the selected Standby would need to be reloaded with the new system and rebooted, causing selection of a new Standby. This process would continue until either the original Standby was rebooted or a Standby was chosen that already had the correct system revision).

  2. For all switches with the Commander's revision software, the switch with the highest priority that is not the current Commander becomes the Standby switch.


    [NOTE: ]

    NOTE: It is possible for the Standby to have a higher priority than the Commander, if the priority of the Standby was increased after the Commander becomes the Commander. (The Commander is not changed unless it fails or is on the Inactive fragment side of a stack that becomes split).


  3. If there are two or more switches whose priority is equally high, then the Commander will look at the topology of the stack and pick a switch that is the most hops away from the Commander. This will increase the probability that the Commander and Standby switch will be in different stack fragments should a failure occur.

  4. If the priorities and hop counts of the contenders are the same, then the switch with the lowest MAC address is selected as the Standby switch.