252 CHAPTER 8: STP OPERATION
You can use the following commands to specify the current switch as the primary
or secondary root of the spanning tree.
Perform the following configuration in system view.
After a switch is configured as primary root switch or secondary root switch, you
cannot modify the bridge priority of the switch.
You can configure the current switch as the primary or secondary root switch of
the STI (specified by the instance instance-id parameter). If the instance-id takes
0, the current switch is specified as the primary or secondary root switch of the
CIST.
The root types of a switch in different STIs are independent of one another. A
switch can be a primary or secondary root of any STI. However, a switch cannot
serve as both the primary and secondary roots of one STI.
If the primary root is down or powered off, unless you configure a new primary
root, the secondary root will take its place. If there are two or more configured
secondary root switches, MSTP selects the one with the smallest MAC address to
take the place of the failed primary root.
When configuring the primary and secondary switches, you can also configure the
network diameter and hello time of the specified switching network. For detailed
information, refer to the configuration tasks
“Configuring the Switching Network
Diameter” and “Configuring the Time Parameters of a Switch”.
You can configure the current switch as the root of several STIs, however, it is not
necessary to specify two or more roots for an STI. In other words, please do not
specify the root for an STI on two or more switches.
You can configure more than one secondary root for a spanning tree by specifying
the secondary STI root on two or more switches.
Generally, you are recommended to designate one primary root and more than
one secondary root for a spanning tree.
By default, a switch is neither the primary root or the secondary root of the
spanning tree.
Configuring the MSTP
Operating Mode
MSTP and RSTP are compatible and can recognize each other’s packets. However,
STP cannot recognize MSTP packets. To implement the compatibility, MSTP
provides two operation modes, STP-compatible mode and MSTP mode. In
STP-compatible mode, the switch sends STP packets by every port and serves as a
Table 4 Specify the Switch as Primary or Secondary Root Switch
Operation Command
Specify current switch as the primary root
switch of the specified spanning tree.
stp instance instance-id root primary [
bridge-diameter bridgenum [ hello-time
centi-senconds ] ]
Specify current switch as the secondary root
switch of the specified spanning tree.
stp instance instance-id root secondary [
bridge-diameter bridgenum [ hello-time
centi-senconds ] ]
Specify current switch not to be the primary or
secondary root.
undo stp instance instance-id root