30
Configuring the root bridge or a secondary root
bridge
Restrictions and guidelines
You can have the spanning tree protocol determine the root bridge of a spanning tree through
calculation. You can also specify a device as the root bridge or as a secondary root bridge.
When you specify a device as the root bridge or as a secondary root bridge, follow these restrictions
and guidelines:
• A device has independent roles in different spanning trees. It can act as the root bridge in one
spanning tree and as a secondary root bridge in another. However, one device cannot be the
root bridge and a secondary root bridge in the same spanning tree.
• If you specify the root bridge for a spanning tree, no new root bridge is elected according to the
device priority settings. Once you specify a device as the root bridge or a secondary root bridge,
you cannot change the priority of the device.
• You can configure a device as the root bridge by setting the device priority to 0. For the device
priority configuration, see "Configuring the device priority."
Configuring the device as the root bridge of a spanning tree
1. Enter system view.
system-view
2. Configure the device as the root bridge.
{ In STP/RSTP mode:
stp root primary
{ In PVST mode:
stp vlan
vlan-id-list root primary
{ In MSTP mode:
stp [ instance instance-list ]
root primary
By default, the device is not a root bridge.
Configuring the device as a secondary root bridge of a
spanning tree
1. Enter system view.
system-view
2. Configure the device as a secondary root bridge.
{ In STP/RSTP mode:
stp root secondary
{ In PVST mode:
stp vlan
vlan-id-list root secondary
{ In MSTP mode:
stp [ instance instance-list ]
root secondary
By default, the device is not a secondary root bridge.