Spanning-Tree Operations
Spanning-Tree Protocol (STP) allows a switch to perform its third function loop avoidance. Its
job is to find all links in the network and shut down any redundant ones, thereby preventing
network loops from occurring.
Let’s look at changing the priority to force a switch to become the root of your STP network.
Use the following command in Table 5.7 to change the bridge priority on a Catalyst
switch:
TABLE 5 . 7 Command and Meaning
Command Meaning
spanning-tree Configures Spanning-Tree Protocol options
shows the options for the spanning-tree command.
You need to set the priority per-vlan, as shown here:
Switch B(config)#spanning-tree vlan 1 priority ?
<0-61440> bridge priority in increments of 4096
Switch B(config)#spanning-tree vlan 1 priority 4096
You can set the priority to any value from 0 through 61440. Setting it to zero (0) means the
switch will always be the root, and the highest setting means it never will. The bridge priority
is set in increments of 4096. If you want to set a switch to be the root bridge for every VLAN
in your network, then you have to change the priority for each VLAN.
Check out the following output—now that I’ve changed the priority of Switch B for VLAN
1 to the lowest possible priority, I’ve successfully forced this switch to become the root:
SwitchB#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 0012.7f52.0280
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
Address 0012.7f52.0280
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15
[output cut]