In the figure, bridge IDs of SWA, SWB, SWC, and SWD have been marked. After the stp root secondary command is run on SWD, which switch will be selected as the root bridge?
To determine which switch will be selected as the root bridge after running the stp root secondary command on SWD, we need to analyze the Spanning Tree Protocol (STP) election process, as defined in IEEE 802.1D and aligned with HCIA Datacom documentation. Let’s break it down step by step:
Understanding STP and Root Bridge Election:
STP is used to prevent loops in Ethernet networks by electing a root bridge and creating a loop-free topology. The root bridge is the central point of the spanning tree, and all other switches calculate the shortest path to it based on path cost.
The root bridge is selected based on the Bridge ID (BID), which consists of two components:
Bridge Priority: A 16-bit value (default is 32768 for most switches, but it can be configured). Lower priority values are preferred.
MAC Address: If bridge priorities are equal, the switch with the lowest MAC address (the last part of the Bridge ID) becomes the root bridge.
The Bridge ID is typically written as Priority:MAC-Address. For example, a Bridge ID of 4096:0001-0203-04AA indicates a priority of 4096 and a MAC address of 0001-0203-04AA.
Analyzing the Given Bridge IDs:From the diagram, the Bridge IDs of the switches are:
SWA: Bridge ID = 4096:0001-0203-04AA (Priority = 4096, MAC = 0001-0203-04AA)
SWB: Bridge ID = 32768:0001-0203-04BB (Priority = 32768, MAC = 0001-0203-04BB)
SWC: Bridge ID = 32768:0001-0203-04CC (Priority = 32768, MAC = 0001-0203-04CC)
SWD: Bridge ID = 32768:0001-0203-04DD (Priority = 32768, MAC = 0001-0203-04DD)
Initially, the switch with the lowest Bridge ID (lowest priority, or lowest MAC if priorities are tied) is elected as the root bridge.
Comparing the priorities:
SWA has a priority of 4096, which is lower than the default priority of 32768 for SWB, SWC, and SWD.
Therefore, SWA is currently the root bridge because it has the lowest priority (4096) compared to the others (32768).
If priorities are equal, the MAC address is used as a tiebreaker, but here, SWA’s lower priority makes it the root bridge without needing to compare MAC addresses.
Effect of the stp root secondary Command on SWD:
The stp root secondary command (commonly used in Huawei switches, as per HCIA Datacom) is a configuration command that sets a switch as the secondary root bridge. This means the switch’s priority is automatically adjusted to a value lower than the default (32768) but higher than the primary root bridge’s priority, ensuring it becomes the root bridge if the primary root fails.
Specifically, in Huawei switches, running stp root secondary on SWD typically sets its priority to 28672 (which is lower than 32768 but higher than 4096, ensuring it does not override SWA unless SWA fails).
However, the question asks which switch will be selected as the root bridge after running this command on SWD, implying we need to determine the current root bridge and whether this command changes it immediately.
Importantly, the stp root secondary command does not immediately make SWD the root bridge if a switch with a lower priority (like SWA with 4096) already exists in the network. It only prepares SWD to become the root if the current root (SWA) fails or is removed.
Therefore, running stp root secondary on SWD adjusts its priority to 28672, but SWA remains the root bridge because its priority (4096) is still lower than SWD’s new priority (28672).
Determining the Root Bridge After the Command:
After running stp root secondary on SWD, its Bridge ID becomes 28672:0001-0203-04DD (Priority = 28672, MAC = 0001-0203-04DD).
We compare the Bridge IDs of all switches:
SWA: 4096:0001-0203-04AA (Priority = 4096)
SWB: 32768:0001-0203-04BB (Priority = 32768)
SWC: 32768:0001-0203-04CC (Priority = 32768)
SWD: 28672:0001-0203-04DD (Priority = 28672)
The switch with the lowest priority (and lowest MAC address if priorities are tied) is the root bridge.
SWA’s priority (4096) is the lowest, followed by SWD’s new priority (28672), and then SWB and SWC (32768).
Therefore, SWA remains the root bridge because its priority (4096) is lower than SWD’s new priority (28672) and all others.
Conclusion:
Initially, SWA is the root bridge due to its lowest priority (4096).
Running stp root secondary on SWD changes its priority to 28672, making it the secondary root (backup root) if SWA fails, but it does not immediately make SWD the root bridge.
Thus, SWA continues to be the root bridge after the command is run on SWD.
Answer: B (SWA)
References from HCIA Datacom Documents:
HCIA Datacom V3.0, Chapter 6: Spanning Tree Protocol – Root Bridge Election and Configuration Commands
IEEE 802.1D Standard – Bridge ID and Root Bridge Selection Process
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit