75• When the root bridge of an instance fails or is shut down, the secondary root bridge (if you havespecified one) can take over the role of the primary root bridge. However, if you specify a newprimary root bridge for the instance then, the secondary root bridge will not 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 treeFollow these steps to configure the current device as the root bridge of a specific spanning tree:To do... Use the command... RemarksEnter system view system-view —Configure the current device as theroot bridge of a specific spanningtreestp [ instance instance-id ] rootprimaryRequiredBy default, a device does notfunction as the root bridge of anyspanning tree.Configuring the current device as a secondary root bridge of a specific spanning treeFollow these steps to configure the current device as a secondary root bridge of a specific spanning tree:To do... Use the command... RemarksEnter system view system-view —Configure the current device as asecondary root bridge of a specificspanning treestp [ instance instance-id ] rootsecondaryRequiredBy default, a device does notfunction as a secondary rootbridge.NOTE:• After specifying the current device as the root bridge or a secondary root bridge, you cannot change thepriority of the device.• Alternatively, you can also configure the current device as the root bridge by setting the priority of thedevice to 0. For the device priority configuration, see “Configuring the priority of a device.”Configuring the work mode of an MSTP deviceMSTP and RSTP are mutually compatible and can recognize each other’s protocol packets. However, STPis unable to recognize MSTP packets. For hybrid networking with legacy STP devices and for fullinteroperability with RSTP-enabled devices, MSTP supports the following work modes: STP-compatiblemode, RSTP mode, and MSTP mode.• In STP-compatible mode, all ports of the device send out STP BPDUs,• In RSTP mode, all ports of the device send out RSTP BPDUs. If the device detects that it is connectedto a legacy STP device, the port connecting to the legacy STP device will automatically migrate toSTP-compatible mode.• In MSTP mode, all ports of the device send out MSTP BPDUs. If the device detects that it is connectedto a legacy STP device, the port connecting to the legacy STP device will automatically migrate toSTP-compatible mode.Make this configuration on the root bridge and on the leaf nodes separately.Follow these steps to configure the MSTP work mode: