63
By default, the spanning tree feature is globally disabled. When the spanning tree feature is globally
enabled, it is enabled on all ports.
To enable or disable the spanning tree feature globally (not for any VLANs), use this command without
Configured in system view, the setting takes effect globally.
Configured in Ethernet interface view or WLAN mesh interface view, the setting takes effect on the
interface only.
When you enable the spanning tree feature, the device works in STP-compatible, RSTP or MSTP mode,
depending on the spanning tree mode setting.
When the spanning tree feature is enabled, the device dynamically maintains the spanning tree status of
VLANs based on received configuration BPDUs. When the spanning tree feature is disabled, the device
stops maintaining the spanning tree status.
Related commands:
stp mode
.
Examples
# In MSTP mode, enable the spanning tree feature globally.
<Sysname> system-view
[Sysname] stp enable
# In MSTP mode, disable the spanning tree feature on port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] undo stp enable
stp loop-protection
Syntax
stp loop-protection
undo stp
loop-protection
View
Ethernet interface view, WLAN mesh interface view
Default level
2: System level
Parameters
None
Description
Use
stp loop-protection
to enable the loop guard function on the ports.
Use
undo stp loop-protection
to restore the default.
By default, the loop guard function is disabled.
Among loop guard, root guard and edge port settings, only the first configured function takes effect on
a port.
Related commands:
stp edged-port
and
stp root-protection
.