Last Updated on August 1, 2021 by Admin 2
Consider the following output of the show spanning-tree command for the SW1 switch:
You need to change the spanning-tree configuration such that the following is true:
SW1 is the root bridge for VLAN0001
SW1 is not the root bridge for VLAN0101
Fa0/2 port of SW1 should be in the forwarding state for VLAN0202 trafficWhich of the following commands should be executed on SW1 to achieve the desired results? (Choose all that apply.)
- spanning-tree vlan 1 priority 23189 in global configuration mode
- spanning-tree vlan 1 priority 32768 in global configuration mode
- spanning-tree vlan 101 priority 32768 in global configuration mode
- spanning-tree vlan 202 cost 2 in interface configuration mode of Fa0/2
- spanning-tree vlan 202 cost 252 in interface configuration mode of Fa0/2
The following commands should be executed to achieve the desired results:
spanning-tree vlan 1 priority 23189 in global configuration mode spanning-tree vlan 101 priority 32768 in global configuration mode spanning-tree vlan 202 cost 2 in interface configuration mode on Fa0/2
The spanning-tree vlan 1 priority 23189 command changes the bridge priority of SW1 to 23189 for the native VLAN (VLAN0001). According to the show spanning-tree output in the scenario, the root bridge for VLAN0001 has a priority of 23195. Therefore, if SW1 has to become the root bridge for VLAN0001, then SW1 should have the least bridge priority for that VLAN. Setting the bridge priority of SW1 to 23189, which is less than 23195, serves the purpose.
The spanning-tree vlan 101 priority 32768 command changes the bridge priority of SW1 to 32768 for VLAN0101. The maximum priority that can be assigned to a switch is 32768, which implies that the switch cannot be a root bridge for the VLAN provided its MAC address is higher than the other switches. This will ensure that SW1 will NOT be the root bridge for VLAN 101
The spanning-tree vlan 202 cost 2 command sets the port cost to 2 for VLAN0202. The port cost is used by STP to determine a loop-free path. The port with the least cost is selected and placed in Forwarding state. Therefore, as a result of this command, the Fa0/2 port will be in the Forwarding state to pass the VLAN0202 traffic, rather than Fa0/1.
Executing the spanning-tree vlan 1 priority 32768 command in the global configuration mode does not achieve the desired results. This command sets the bridge priority of SW1 to the highest possible value for VLAN0001. As 32768 is greater than 23190, the new bridge priority of SW1 does not affect the root bridge for VLAN0001 and SW1 remains a non-root bridge.
The spanning-tree vlan 202 cost 252 command in the interface configuration mode of Fa0/2 does not achieve the desired results. This command changes the port cost of Fa0/2 for VLAN0202 to 252, which is the maximum cost value. STP selects the port with the least cost as the best loop-free path. Therefore, setting the cost to 252 for Fa0/2 will not put Fa0/2 in the Forwarding state.
Objective:
Layer 2 Technologies
Sub-Objective:
Configure and verify spanning tree