328
Configuring STP
How to Configure STP
Configuring the Root Switch
Configuring a Secondary Root Switch
Command Purpose
1. configure terminal Enters global configuration mode.
2. spanning-tree vlan vlan-id root primary
[diameter net-diameter [hello-time seconds]]
Configures a switch to become the root for the specified
VLAN.
vlan-id—Specifies a single VLAN identified by VLAN ID
number, a range of VLANs separated by a hyphen, or a
series of VLANs separated by a comma.
(Optional) diameter net-diameter—Specifies the
maximum number of switches between any two end
stations.
(Optional) hello-time seconds—Specifies the interval in
seconds between the generation of configuration
messages by the root switch.
3. end Returns to privileged EXEC mode.
Command Purpose
1. configure terminal Enters global configuration mode.
2. spanning-tree vlan vlan-id root secondary
[diameter net-diameter [hello-time
seconds]]
Configures a switch to become the secondary root for the specified
VLAN.
vlan-id—Specifies a single VLAN identified by VLAN ID number,
a range of VLANs separated by a hyphen, or a series of VLANs
separated by a comma. The range is 1 to 4096.
(Optional) diameter net-diameter—Specifies the maximum
number of switches between any two end stations. The range is
2 to 7.
(Optional) hello-time seconds—Specifies the interval in seconds
between the generation of configuration messages by the root
switch. The range is 1 to 10; the default is 2.
Use the same network diameter and hello-time values that you used
when configuring the primary root switch. See Configuring the Root
Switch, page 328.
3. end Returns to privileged EXEC mode.