A switched network has three Cisco switches (SW1, SW2, SW3) connected in a triangle. All links are Gigabit Ethernet. SW1 has a MAC address of 0001.0001.0001, SW2 has 0002.0002.0002, and SW3 has 0003.0003.0003. All switches have default STP priorities. If SW1 fails, which switch immediately becomes the new root bridge for VLAN 1, assuming no other configuration changes?
The Spanning Tree Protocol, or STP, is a network protocol that prevents switching loops in Ethernet networks by creating a loop-free logical topology from a physical topology that might contain loops. It achieves this by electing a single root bridge for each VLAN and then blocking redundant paths. The election of the root bridge is based on a unique identifier called the Bridge ID. The Bridge ID comprises two parts: the bridge priority and the switch's MAC address. A lower Bridge ID is always preferred in the election process. If the priorities are the same, the switch with the numerically lowest MAC address becomes the root bridge. The term 'immediately' in the context of STP refers to the switch that becomes the root bridge after the protocol converges following a topology change.
For Cisco switches, the default STP priority is 32768. However, for Per-VLAN Spanning Tree (PVST) or Rapid PVST, which is common in Cisco environments and implied by specifying VLAN 1, the system ID extension is used. This means the actual bridge priority for a specific VLAN is the configured priority plus the VLAN ID. Therefore, for VLAN 1, the default priority for all switches will be 32768 + 1, equaling 32769.
Initially, before any failure, we determine the root bridge by comparing the Bridge IDs of SW1, SW2, and SW3 for VLAN 1:
SW1's Bridge ID for VLAN 1 is 32769:0001.0001.0001.
SW2's Bridge ID for VLAN 1 is 32769:0002.0002.0002.
SW3's Bridge ID for VLAN 1 is 32769:0003.0003.0003.
Since all switches have the same default priority of 32769, the switch with the lowest MAC address will become the root bridge. Comparing their MAC addresses, 0001.0001.0001 (SW1) is numerically the lowest. Thus, SW1 is the initial root bridge for VLAN 1.
When SW1 fails, it is no longer active in the network or able to participate in the STP election. The remaining active switches, SW2 and SW3, will then contend for the root bridge role. Their Bridge IDs for VLAN 1 remain:
SW2's Bridge ID: 32769:0002.0002.0002.
SW3's Bridge ID: 32769:0003.0003.0003.
Again, both switches have the same priority of 32769. Comparing their MAC addresses, 0002.0002.0002 (SW2) is numerically lower than 0003.0003.0003 (SW3). Therefore, SW2 immediately becomes the new root bridge for VLAN 1 once the STP convergence process completes after SW1's failure.