< Home

stp mode (system view)

Function

The stp mode command sets the operation mode of the spanning tree protocol on a switching device.

The undo stp mode command restores the default operation mode of the spanning tree protocol.

By default, the switching device operates in MSTP mode.

Format

stp mode { mstp | rstp | stp | vbst }

undo stp mode

Parameters

Parameter Description Value
mstp Indicates the MSTP mode. -
rstp Indicates the RSTP mode. -
stp Indicates the STP mode. -
vbst Indicates the VBST mode. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On the network running a spanning tree protocol, switches running different spanning tree protocols cannot communicate with each other. As a result, spanning trees cannot be properly calculated. A switch has four operation modes: VBST, MSTP, RSTP, and STP.

The stp mode command can be used to set a proper operation mode for a spanning tree protocol on a switching device and enables the switching device to identify BPDUs sent by a switching device that runs a different spanning tree protocol during communication.

By default, all ports on a switching device operate in MSTP mode. When a switching device finds that it is directly connected to an STP switching device, it automatically switches the operation mode and the port directly connected to the STP switching device to STP.

Configuration Impact

  • After the stp mode vbst command is run on a switch, all ports running VBST on the switch, excluding the ports directly connected to STP switches, operate in VBST mode and can send VBST BPDUs. The ports directly connected to STP switches operate in STP mode.

  • After the stp mode mstp command is run on a switching device, all ports running MSTP on the switching device, excluding the ports directly connected to STP switching devices, operate in MSTP mode and can send MSTP BPDUs. The ports directly connected to STP switching devices operate in STP mode.

  • After the stp mode rstp command is run on a switching device, all ports running RSTP on the switching device, excluding the ports directly connected to STP switching devices, operate in RSTP mode and can send RSTP BPDUs. The ports directly connected to STP switching devices operate in STP mode.

  • After the stp mode stp command is run on a switching device, all ports of the switching device operate in STP mode and send configured BPDUs.

Precautions

  • A port operating in MSTP mode can communicate with a port operating in RSTP mode.

  • VBST BPDUs and RST BPDUs can be used at the same time.
  • The stp mode rstp command can be used to enable a switch that does not support MSTP to communicate with an STP switch.

  • In VBST mode, the MAC address 0100-0CCC-CCCD is displayed in the display bpdu mac-address command output. In STP/RSTP/MSTP mode, the MAC address 0100-0CCC-CCCD is not displayed unless the bpdu mac-address command specifies the MAC address as 0100-0CCC-CCCD.

  • An Eth-Trunk on the S5720-EI, S6720-EI, and S6720S-EI can meet at most three of the following conditions simultaneously:
    • The Eth-Trunk is a Layer 2 interface, or the working mode of the Eth-Trunk is changed from Layer 3 to Layer 2 using the portswitch or portswitch batch command.
    • The Eth-Trunk is configured as a Layer 2 remote observing port using the observe-port command.
    • The operating mode of the spanning tree protocol is set to VBST on the switch using the stp mode command.
    • VBST is enabled on the Eth-Trunk using the stp enable command.
  • The mac-address learning disable command must be run in the VLAN view to disable the MAC address learning function in VLANs on all the intermediate devices between the monitoring device and the observing port. Otherwise, mirrored traffic will be discarded on the intermediate devices.

Example

# Set the operation mode of the switching device to the STP mode.

<HUAWEI> system-view
[HUAWEI] stp mode stp
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >