spanning-tree

Configures STP on all ports on a device.
Syntax
spanning-tree [ single ] [ forward-delay seconds ] [ hello-time seconds ] [ max-age seconds ] [ priority number ]
no spanning-tree [ single ] [ forward-delay seconds ] [ hello-time seconds ] [ max-age seconds ] [ priority number ]
Command Default

STP is not enabled. Once STP is enabled, the STP port parameters are preconfigured with default values.

Parameters
single
Enables Single STP.
forward-delay seconds
Configures the time period a port waits before it forwards an RST BPDU after a topology change. This value ranges from 4 through 30 seconds. The default is 15 seconds.
hello-time seconds
Configures the time interval between two Hello packets. This value ranges from 1 through 10 seconds. The default is 2 seconds.
max-age seconds
Configures the time period the device waits to receive a Hello packet before it initiates a topology change. The time period ranges from 6 through 40 seconds. The default is 20 seconds.
priority number
Configures the priority of the bridge. The value ranges from 0 through 65535. A lower numerical value means the bridge has a higher priority. Thus, the highest priority is 0. The default is 32768.
Modes

Global configuration mode

VLAN configuration mode

Usage Guidelines

You can specify some or all of the parameters on the same command line.

The single option which configures a Single STP is available only in the global configuration mode.

The value of max-age must be greater than the value of forward-delay to ensure that the downstream bridges do not age out faster than the upstream bridges (those bridges that are closer to the root bridge).

Configuring the STP parameters is optional. All parameters have default values. Additionally, all values will be globally applied to all ports on the system or on the port-based VLAN for which they are defined.

The no form of the command disables STP.

Examples

The following example configures a Single STP.

device(config)# spanning-tree single

The following example configures the STP parameters.

device(config)# vlan 200
device(config-vlan-200)# spanning-tree forward-delay 4 hello-time 5 max-age 4 priority 20