< Home

(Optional) Configuring the Root Bridge and Secondary Root Bridge

Context

Although the root bridge of a spanning tree is usually and automatically calculated, you can also manually configure a root bridge or secondary root bridge. The following provides more details regarding configuring a root bridge or secondary root bridge:
  • Configuring a root bridge: A spanning tree can have only one effective root bridge. When two or more devices are specified as root bridges for a spanning tree, the device with the smallest MAC address is elected as the root bridge.
  • Configuring a secondary root bridge: You can specify multiple secondary root bridges for each spanning tree. When the root bridge fails or is powered off, a secondary root bridge becomes the new root bridge. If a new root bridge is specified, the secondary root bridge will no longer be the root bridge. If there are multiple secondary root bridges, the one with the smallest MAC address becomes the root bridge of the spanning tree.

It is recommended that you specify the root bridge and secondary root bridge when configuring STP/RSTP.

Procedure

  • Configure a device as the root bridge.
    1. Run system-view

      The system view is displayed.

    2. Run stp root primary

      The device is configured as the root bridge.

      By default, a device does not function as the root bridge. After you run this command, the priority value of the device is set to 0 and cannot be changed.

  • Configure a device as the secondary root bridge.
    1. Run system-view

      The system view is displayed.

    2. Run stp root secondary

      The device is configured as the secondary root bridge.

      By default, a device does not function as the secondary root bridge. After you run this command, the priority value of the device is set to 4096 and cannot be changed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >