110Enabling the spanning tree featureYou must enable the spanning tree feature for the device before any other spanning tree relatedconfigurations can take effect. In STP, RSTP, or MSTP mode, make sure the spanning tree feature isenabled globally and on the desired ports. In PVST mode, make sure the spanning tree feature isenabled globally, in the desired VLANs, and on the desired ports.To exclude specific ports from spanning tree calculation and save CPU resources, disable the spanningtree feature for these ports with the undo stp enable command. Make sure no loops occur in the networkafter you disable the spanning tree feature on these ports.Enabling the spanning tree feature in STP/RSTP/MSTP modeStep Command Remarks1. Enter system view. system-view N/A2. Enable the spanning treefeature. stp global enable• If the device starts up with the initialsettings, the spanning tree feature isdisabled globally by default.• If the device starts up with the factorydefaults, the spanning tree feature isenabled globally by default.For more information about the startupconfiguration, see FundamentalsConfiguration Guide.3. Enter Layer 2 Ethernet oraggregate interface view.interface interface-typeinterface-number N/A4. (Optional.) Enable thespanning tree feature for theport.stp enable By default, the spanning tree feature isenabled on all ports.Enabling the spanning tree feature in PVST modeStep Command Remarks1. Enter system view. system-view N/A2. Enable the spanning treefeature. stp global enable• If the device starts up with the initialsettings, the spanning tree feature isdisabled globally by default.• If the device starts up with the factorydefaults, the spanning tree feature isenabled globally by default.For more information about the startupconfiguration, see FundamentalsConfiguration Guide.3. Enable the spanning treefeature in VLANs.stp vlan vlan-id-listenableThe spanning tree feature is enabled for allVLANs.