stp vlan enable

Use stp vlan enable to enable the spanning tree feature for VLANs.

Use undo stp enable to disable the spanning tree feature for VLANs.

Syntax

stp vlan vlan-id-list enable

undo stp vlan vlan-id-list enable

Default

The spanning tree feature is enabled in VLANs.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

vlan vlan-id-list: Specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN or a range of VLANs in the form of vlan-id1 [ to vlan-id2 ]. The value for vlan-id2 must be equal to or greater than the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094. If you do not specify this option, this command globally enables or disables the spanning tree feature (VLANs are not included).

Usage guidelines

When you enable the spanning tree feature, the device operates in STP, RSTP, PVST, or MSTP mode, depending on the spanning tree mode setting.

When you enable the spanning tree feature, the device dynamically maintains the spanning tree status of VLANs, based on received configuration BPDUs. When you disable the spanning tree feature, the device stops maintaining the spanning tree status.

Examples

# In PVST mode, globally enable the spanning tree feature and then enable the spanning tree feature for VLAN 2.

<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp global enable
[Sysname] stp vlan 2 enable

Related commands

stp enable

stp global enable

stp mode