13-10
Software Configuration Guide—Release 12.2(25)SG
OL-7659-03
Chapter13 Understanding and Configuring STP
Configuring STP
Use the diameter keyword to specify the Layer 2 network diameter (the maximum number of bridge
hops between any two end stations in the network). When you specify t he network diameter, a switch
automatically picks an optimal hello time, forward delay time, and maximum age time for a network of
that diameter. This can significantly reduce the spanning tree convergence time.
Use the hello-time keyword to override the automatically calculated hello time.
Note We recommend that you avoid manually configuring the hello time, forward delay time, and maximum
age time after configuring the switch as the root bridge.
To configure a switch as the root switch, perform this task:
This example shows how to configure a switch as the root bridge for VLAN 10, with a network diameter
of 4:
Switch# configure terminal
Switch(config)# spanning-tree vlan 10 root primary diameter 4
Switch(config)# end
Switch#
This example shows how the configuration changes when a switch becomes a spanning tree root. This
is the configuration before the switch becomes the root for VLAN 1:
Switch#show spanning-tree vlan 1
VLAN1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address 0030.94fc.0a00
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32768, address 0001.6445.4400
Root port is 323 (FastEthernet6/3), cost of root path is 19
Topology change flag not set, detected flag not set
Number of topology changes 2 last change occurred 00:02:19 ago
from FastEthernet6/1
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers:hello 0, topology change 0, notification 0, aging 300
Port 323 (FastEthernet6/3) of VLAN1 is forwarding
Port path cost 19, Port priority 128, Port Identifier 129.67.
Designated root has priority 32768, address 0001.6445.4400
Designated bridge has priority 32768, address 0001.6445.4400
Designated port id is 129.67, designated path cost 0
Timers:message age 2, forward delay 0, hold 0
Number of transitions to forwarding state:1
BPDU:sent 3, received 91
Command Purpose
Step1 Switch(config)# [no] spanning-tree vlan
vlan_ID
root primary [diameter
hops
[hello-time
seconds
]]
Configures a switch as the root switch.
You can use the no keyword to restore the defaults.
Step2 Switch(config)# end Exits configuration mode.