Command
Spanning-Tree Vlan Cost
Use
This command modifies the interface cost used in calculating the root port for spanning-tree on a switch for a specified vlan range. Lower is better.
Syntax
Switch(config-if)#spanning-tree vlan <vlan range> cost <cost>
Example
In the below example we will configure SW2 to use Fa0/24 as the VLAN 10’s root port.
SW2(config)#do show spanning vlan 10 VLAN0010 Bridge ID Priority 16394 (priority 16384 sys-id-ext 10) Interface Role Sts Cost Prio.Nbr Type |
Next, we configure Fa0/24 for VLAN 10 to have a cost of 1.
SW2(config)#int fa0/24 |
After we change Fa0/24 to have a lower cost, it becomes the root port on SW2.
SW2(config-if)#do show spanning vlan 10 VLAN0010 Bridge ID Priority 16394 (priority 16384 sys-id-ext 10) Interface Role Sts Cost Prio.Nbr Type |