23-8
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
 
Chapter 23      Configuring STP and MST
Configuring STP
Note The spanning tree commands described in this chapter can be configured on any interface except those 
configured with the no switchport command.
Enabling STP
Note By default, spanning tree is enabled on all the VLANs.
You can enable a spanning tree on a per-VLAN basis. The switch maintains a separate instance of 
spanning tree for each VLAN (except on VLANs on which you have disabled a spanning tree).
To enable a spanning tree on a per-VLAN basis, perform this task:
This example shows how to enable a spanning tree on VLAN 200:
Switch# configure terminal 
Switch(config)# spanning-tree vlan 200 
Switch(config)# end 
Switch#
Note Because spanning tree is enabled by default, entering a show running command to view the resulting 
configuration does not display the command you entered to enable spanning tree.
This example shows how to verify that spanning tree is enabled on VLAN 200:
Switch# show spanning-tree vlan 200 
 VLAN200 is executing the ieee compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, address 0050.3e8d.6401
  Configured hello time 2, max age 20, forward delay 15
  Current root has priority 16384, address 0060.704c.7000
  Root port is 264 (FastEthernet5/8), cost of root path is 38
  Topology change flag not set, detected flag not set
  Number of topology changes 0 last change occurred 01:53:48 ago
  Times:  hold 1, topology change 24, notification 2
          hello 2, max age 14, forward delay 10
  Timers: hello 0, topology change 0, notification 0
 Port 264 (FastEthernet5/8) of VLAN200 is forwarding
   Port path cost 19, Port priority 128, Port Identifier 129.9.
   Designated root has priority 16384, address 0060.704c.7000
   Designated bridge has priority 32768, address 00e0.4fac.b000
   Designated port id is 128.2, designated path cost 19
   Timers: message age 3, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
Command Purpose
Step 1
Switch# configure terminal
Enters global configuration mode.
Step 2
Switch(config)# spanning-tree vlan vlan_ID 
Enables spanning tree for VLAN vlan_id. The vlan_ID value 
can range from 1 to 4094.
Step 3
Switch(config)# end 
Exits configuration mode.
Step 4
Switch# show spanning-tree vlan vlan_ID 
Verifies that spanning tree is enabled.