Configuration Condition
None
Configure the Priority of a Bridge
The bridge priority and MAC address form the bridge ID. A smaller ID indicates a higher priority. The bridge with the highest priority is elected as the root bridge. One device may have different bridge priority in different spanning tree instances.
Table 9-4 Configuring the Priority of a Bridge
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Configure the priority of a bridge.
|
spanning-tree mst instance instance-id priority priority-value
|
Mandatory.
By default, the priority of the bridge in all spanning tree instances is 32768.
|
In the vist/rapid-vist mode, configure the priority of the bridge
|
spanning-tree vlan vlan-id priority priority-value
|
Mandatory
By default, the bridge priority of the device in all spanning tree instances is 32768.
|
-
The step of bridge priorities is 4096, that is, the valid values include: 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440.
Configure Hello Time
After the network topology becomes stable, the root bridge sends BPDU packets at the interval of Hello Time to inform other bridges of its role as the root bridge so that the other bridges can recognize its role. The designated bridge maintains the existing spanning tree topology according to the BPDU packet, and it forwards the BPDU packet to other devices. If the designated bridge does not receive BPDU packets at a period of time as long is three times Hello Time, it regards the link as faulty. In this way, the spanning tree re-calculates the network topology to obtain a new active path, ensuring the network connectivity.
Table 9-5 Configuring Hello Time
Step
|
Command
|
Description
|
Enter the global configuration mode. |
configure terminal |
- |
Configure Hello Time.
|
spanning-tree mst hello-time seconds
|
Mandatory.
By default, Hello Time is 2 seconds.
|
In vist/rapid-vist, configure Hello Time
|
spanning-tree vlan vlan-id hello-time seconds
|
Mandatory
By default, the Hello Time is 2s.
|
-
Forward Delay, Hello Time, and Max Age must meet the following requirement; otherwise, frequent network flapping may be cause.
- 2 × (Forward_Delay – 1.0seconds) ≥ Max_Age
- Max_Age ≥ 2 × (Hello_Time + 1.0seconds)
Configure Forward Delay
In STP, when the root port or designated port migrates from the Discarding status to the Forwarding status, the topology change cannot be learned by the entire network immediately. To prevent temporary loops, the port migrates to the Learning status in the first Forward Delay, and then waits another Forward Delay to migrate to the Forwarding status.
Table 9-6 Configuring Forward Delay
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Configure Forward Delay.
|
spanning-tree mst forward-time seconds
|
Mandatory.
By default, Forward Delay is 15 seconds.
|
In the vist/rapid-vist mode, configure Forward Delay
|
spanning-tree vlan vlan-id forward-time seconds
|
Mandatory
By default, Forward Delay is 15 seconds.
|
Configure Max Age
Max Age refers to the life cycle of BPDU configuration messages while they are broadcast in a network. When a configuration message is transmitted crossing regions, after it passes through an MST region, one is added to Message Age in the configuration message. If the device receives a configuration message and finds that the value of Message Age in the configuration message plus 1 is equal to the value of Max Age, the device discards the configuration message, and the configuration message is no longer used in spanning tree calculation.
Table 9-7 Configuring Max Age
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Configure Max Age.
|
spanning-tree mst max-age seconds
|
Mandatory.
By default, Max Age is 20 seconds.
|
In vist/rapid-vist mode, configure Max Age
|
spanning-tree vlan vlan-id max-age seconds
|
Mandatory
By default, Max Age is 20 seconds.
|
Configure the Maximum Number of Hops in an MST Region
You can limit the size of an MST region by configuring the maximum number of hops in the MST region. A larger number of hops in an MST region mean a larger MST region. In one MST region, starting from the region root, once the configuration message is forwarded by a device, the number of hops is decreased by one. If the number of hops of a configuration message is 0, the device discards the configuration message.
Therefore, the device which is beyond the maximum number of hops cannot participate in spanning tree calculation in the region.
Table 9-8 Configuring the Maximum Number of Hops in an MST Region
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Configure the maximum number of hops in an MST region.
|
spanning-tree mst max-hops max-hops-value
|
Mandatory.
By default, the maximum number of hops in an MST region is 20.
|