spanning-tree (Ethernet, LAG)

Configures the Spanning Tree Protocol (STP) path and priority costs for an Ethernet port or Link Aggregation Group (LAG).
Syntax
spanning-tree [ single ] [ ethernet unit/slot/port |lag lag-id ] { disable | path-cost { number | auto } | priority number }
no spanning-tree [ single ] [ ethernet unit/slot/port |lag lag-id ] { disable | path-cost { number | auto } | priority number }
Command Default

The Ethernet port parameters are preconfigured with default values.

Parameters
single
Configures a single STP instance.
ethernetunit/slot/port
Specifies the Ethernet port to be configured.
laglag-id
Specifies the LAG to be configured.
disable
Disables STP for the interface on the VLAN.
path-costnumber
Configures the cost of the port path to the root bridge. The range when "short mode" is configured is from 1 through 65535. The range when "long mode" is configured is from 1 through 200000000.
path-costauto
Configures the cost of the port path to be the value set by the system software.
prioritynumber
Sets the priority for the port. The priority value ranges from 0 through 240, in increments of 16. The default value is 128.
Modes

Global configuration mode

VLAN configuration mode

Usage Guidelines

The single keyword is available only in global configuration mode.

Configuring STP parameter values is optional. STP prefers the path with the lowest cost. 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 STP path cost calculation method depends on the 802.1D standard that is configured for the port. By default, the 802.1D 1998 standard is used for all ports running spanning tree. The 802.1D 2004 defined set of path costs allows for faster port speeds and is configured globally to ensure that all network bridges are running the same set of STP path costs.

The no form of the command disables STP on the Ethernet port.

Examples

The following example configures the STP path cost and priority for an Ethernet port.

device# configure terminal
device(config)# vlan 10
device(config-vlan-10)# spanning-tree ethernet 1/1/5 path-cost 15 priority 64

The following example configures the STP path cost when the 802.1D 2004 path cost method is configured.

device# configure terminal
device(config)# spanning-tree path-cost-method long
device(config)# vlan 10
device(config-vlan-10)# spanning-tree ethernet 1/1/6 path-cost 20000
History
Release version Command history
08.0.61 This command was modified to include the LAG ID option.
08.0.70 This command was modified to allow path cost values from the IEEE 802.1D 2004 standards.