In those cases in which the Commander of the stack is not identified, 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 of the switches go through discovery and election at the same time. There is an election timer that is set for 60 seconds, and if there are no new switches discovered during that timeout period, the switches in the stack enter the election phase.
During the election process, for each group of switches that has the same STACK-ID (they should all be the same), these steps occur:
-
The switches with the highest Stack Revision are discovered.
-
The switch with the highest configured priority is selected as the Commander.
-
If there are switches with the same “highest” priority, the switch that was the previous Commander is selected.
-
If no switches were previous commanders, the switch that was the previous Standby is selected.
-
If none of the above conditions apply, the switch with the lowest MAC Address is selected as the Commander.
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: 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 is in this priority order:
-
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, resulting in the 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).
-
For all switches with the Commander's revision software, the switch with the highest priority that is not the current Commander will become the Standby switch.
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).
-
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.
-
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.