Configuring the root bridge or a secondary root bridge
You can have MSTP determine the root bridge of a spanning tree through MSTP calculation, or you can
specify the current device as the root bridge or as a secondary root bridge using the commands that the
system provides.
Note the following rules:
•
A device has independent roles in different MSTIs. It can act as the root bridge or a secondary root
bridge of one MSTI and the root bridge or a secondary root bridge of another MSTI. However, one
device cannot be the root bridge and a secondary root bridge in the same MSTI at the same time.
•
There is only one root bridge in effect in a spanning tree instance. If two or more devices have been
designated as root bridges of the same spanning tree instance, MSTP selects the device with the
lowest MAC address as the root bridge.
•
When the root bridge of an instance fails or is shut down, the secondary root bridge (if you have
specified one) can take over the role of the primary root bridge. However, if you specify a new
primary root bridge for the instance then, the one you specify, not the secondary root bridge will
become the root bridge. If you have specified multiple secondary root bridges for an instance,
when the root bridge fails, MSTP will select the secondary root bridge with the lowest MAC address
as the new root bridge.
Configuring the current device as the root bridge of a specific spanning tree
Follow these steps to configure the current device as the root bridge of a specific spanning tree:
To do...
Use the command...
Remarks
Enter system view
system-view
—
Configure the current device as the
root bridge of a specific spanning
tree
stp
[
instance
instance-id
]
root
primary
Required
By default, a device does not
function as the root bridge of any
spanning tree.
Configuring the current device as a secondary root bridge of a specific spanning tree
Follow these steps to configure the current device as a secondary root bridge of a specific spanning tree:
To do...
Use the command...
Remarks
Enter system view
system-view
—
Configure the current device as a
secondary root bridge of a specific
spanning tree
stp
[
instance
instance-id
]
root
secondary
Required
By default, a device does not
function as a secondary root
bridge.
NOTE:
•
After specifying the current device as the root bridge or a secondary root bridge, you cannot change the
priority of the device.
•
Alternatively, you can configure the current device as the root bridge by setting the priority of the device
to 0. For the device priority configuration, see “
Configuring the priority of a device
.”
62