The stp enable command enables STP/Rapid Spanning Tree Protocol (RSTP)/Multiple Spanning Tree Protocol (MSTP) on an interface.
The undo stp enable command cancels the stp enable command configuration.
The stp disable command disables STP/RSTP/MSTP on an interface.
The undo stp disable command cancels the stp disable command configuration.
By default, STP/RSTP/MSTP is enabled on a Layer 2 interface.
Usage Scenario
On a complex Layer 2 network, STP/RSTP/MSTP can be configured on devices to prevent or break loops.
To enable STP/RSTP/MSTP, run the stp enable command. The devices running STP/RSTP/MSTP exchange information to discover loops on the network and block some interfaces to trim the ring topology into a loop-free tree topology. This prevents packet replication and circular propagation and device performance deterioration.
Spanning tree calculation consumes system resources. Therefore, run the stp disable command to disable STP/RSTP/MSTP on devices or interfaces that do not need to participate in spanning tree calculation.
Configuration Impact
If STP/RSTP/MSTP is enabled on an interface, the interface participates in spanning tree calculation, and its forwarding state is determined based the calculation result.
If STP/RSTP/MSTP is disabled on an interface, the interface does not participate in spanning tree calculation and is always in the forwarding state.Precautions