Previous Topic

Next Topic

Book Contents

Spanning Tree Protocol (STP) Commands

This section describes the commands you use to configure Spanning Tree Protocol (STP). STP helps prevent network loops, duplicate messages, and network instability.

NOTE: STP is disabled by default. When you enable STP on the switch, STP is still disabled on each port. If STP is disabled, the system does not forward BPDU messages.

spanning-tree

This command sets the spanning-tree operational mode to enabled.

no spanning-tree

This command sets the spanning-tree operational mode to disabled. While disabled, the spanning-tree configuration is retained and can be changed, but is not activated.

spanning-tree bpdufilter

Use this command to enable BPDU Filter on an interface or range of interfaces.

no spanning-tree bpdufilter

Use this command to disable BPDU Filter on the interface or range of interfaces.

spanning-tree bpdufilter default

Use this command to enable BPDU Filter on all the edge port interfaces.

no spanning-tree bpdufilter default

Use this command to disable BPDU Filter on all the edge port interfaces.

spanning-tree bpduflood

Use this command to enable BPDU Flood on an interface or range of interfaces.

no spanning-tree bpduflood

Use this command to disable BPDU Flood on the interface or range of interfaces.

spanning-tree bpduguard

Use this command to enable BPDU Guard on the switch.

no spanning-tree bpduguard

Use this command to disable BPDU Guard on the switch.

spanning-tree bpdumigrationcheck

Use this command to force a transmission of rapid spanning tree (RSTP) and multiple spanning tree (MSTP) BPDUs. Use the <unit/slot/port> parameter to transmit a BPDU from a specified interface, or use the all keyword to transmit BPDUs from all interfaces. This command forces the BPDU transmission when you execute it, so the command does not change the system configuration or have a “no” version.

spanning-tree configuration name

This command sets the Configuration Identifier Name for use in identifying the configuration that this switch is currently using. The <name> is a string of up to 32 characters.

no spanning-tree configuration name

This command resets the Configuration Identifier Name to its default.

spanning-tree configuration revision

This command sets the Configuration Identifier Revision Level for use in identifying the configuration that this switch is currently using. The Configuration Identifier Revision Level is a number in the range of 0 to 65535.

no spanning-tree configuration revision

This command sets the Configuration Identifier Revision Level for use in identifying the configuration that this switch is currently using to the default value.

spanning-tree edgeport

This command specifies that this port is an Edge Port within the common and internal spanning tree. This allows this port to transition to Forwarding State without delay.

no spanning-tree edgeport

This command specifies that this port is not an Edge Port within the common and internal spanning tree.

spanning-tree forceversion

This command sets the Force Protocol Version parameter to a new value. Use 802.1d to specify that the switch transmits ST BPDUs rather than MST BPDUs (IEEE 802.1d functionality supported). Use 802.1w to specify that the switch transmits RST BPDUs rather than MST BPDUs (IEEE 802.1w functionality supported). Use 802.1s to specify that the switch transmits MST BPDUs (IEEE 802.1s functionality supported).

no spanning-tree forceversion

This command sets the Force Protocol Version parameter to the default value.

spanning-tree forward-time

This command sets the Bridge Forward Delay parameter to a new value for the common and internal spanning tree. The forward-time value is in seconds within a range of 4 to 30, with the value being greater than or equal to “(Bridge Max Age / 2) + 1”.

no spanning-tree forward-time

This command sets the Bridge Forward Delay parameter for the common and internal spanning tree to the default value.

spanning-tree guard

This command selects whether loop guard or root guard is enabled on an interface or range of interfaces. If neither is enabled, then the port operates in accordance with the multiple spanning tree protocol.

no spanning-tree guard

This command disables loop guard or root guard on the interface.

spanning-tree max-age

This command sets the Bridge Max Age parameter to a new value for the common and internal spanning tree. The max-age value is in seconds within a range of 6 to 40, with the value being less than or equal to 2 x (<Bridge Forward Delay - 1>).

no spanning-tree max-age

This command sets the Bridge Max Age parameter for the common and internal spanning tree to the default value.

spanning-tree max-hops

This command sets the MSTP Max Hops parameter to a new value for the common and internal spanning tree. The max-hops value is a range from 1 to 127.

no spanning-tree max-hops

This command sets the Bridge Max Hops parameter for the common and internal spanning tree to the default value.

spanning-tree mst

This command sets the Path Cost or Port Priority for this port within the multiple spanning tree instance or in the common and internal spanning tree. If you specify an <mstid> parameter that corresponds to an existing multiple spanning tree instance, the configurations are done for that multiple spanning tree instance. If you specify 0 (defined as the default CIST ID) as the <mstid>, the configurations are done for the common and internal spanning tree instance.

If you specify the cost option, the command sets the path cost for this port within a multiple spanning tree instance or the common and internal spanning tree instance, depending on the <mstid> parameter. You can set the path cost as a number in the range of 1 to 200000000 or auto. If you select auto the path cost value is set based on Link Speed.

If you specify the port-priority option, this command sets the priority for this port within a specific multiple spanning tree instance or the common and internal spanning tree instance, depending on the <mstid> parameter. The port-priority value is a number in the range of 0 to 240 in increments of 16.

no spanning-tree mst

This command sets the Path Cost or Port Priority for this port within the multiple spanning tree instance, or in the common and internal spanning tree to the respective default values. If you specify an <mstid> parameter that corresponds to an existing multiple spanning tree instance, you are configuring that multiple spanning tree instance. If you specify 0 (defined as the default CIST ID) as the <mstid>, you are configuring the common and internal spanning tree instance.

If you specify the cost, this command sets the path cost for this port within a multiple spanning tree instance or the common and internal spanning tree instance, depending on the <mstid> parameter, to the default value, i.e. a path cost value based on the Link Speed. If you specify external-cost, this command sets the external path cost for this port for mst ‘0’ instance, to the default value, i.e. a path cost value based on the Link Speed.

If you specify port-priority, this command sets the priority for this port within a specific multiple spanning tree instance or the common and internal spanning tree instance, depending on the <mstid> parameter, to the default value.

spanning-tree cost <1-200000000>

This command sets the external cost as a number in the range of 1 to 200000000 or auto. If you specify auto, the external path cost value is set based on Link Speed.

spanning-tree mst instance

This command adds a multiple spanning tree instance to the switch. The parameter <mstid> is a number within a range of 1 to 4094, that corresponds to the new instance ID to be added. The maximum number of multiple instances supported by the switch is 4.

no spanning-tree mst instance

This command removes a multiple spanning tree instance from the switch and reallocates all VLANs allocated to the deleted instance to the common and internal spanning tree. The parameter <mstid> is a number that corresponds to the desired existing multiple spanning tree instance to be removed.

spanning-tree mst priority

This command sets the bridge priority for a specific multiple spanning tree instance. The parameter <mstid> is a number that corresponds to the desired existing multiple spanning tree instance. The priority value is a number within a range of 0 to 61440 in increments of 4096. If you specify 0 (defined as the default CIST ID) as the <mstid>, this command sets the Bridge Priority parameter to a new value for the common and internal spanning tree. The bridge priority value is a number within a range of 0 to 61440. The twelve least significant bits are masked according to the 802.1s specification. This causes the priority to be rounded down to the next lower valid priority.

no spanning-tree mst priority

This command sets the bridge priority for a specific multiple spanning tree instance to the default value. The parameter <mstid> is a number that corresponds to the desired existing multiple spanning tree instance. If 0 (defined as the default CIST ID) is passed as the <mstid>, this command sets the Bridge Priority parameter for the common and internal spanning tree to the default value.

spanning-tree mst vlan

This command adds an association between a multiple spanning tree instance and a VLAN so that the VLAN is no longer associated with the common and internal spanning tree. The parameter <mstid> is a number that corresponds to the desired existing multiple spanning tree instance. The <vlanid> corresponds to an existing VLAN ID.

no spanning-tree mst vlan

This command removes an association between a multiple spanning tree instance and a VLAN so that the VLAN is again be associated with the common and internal spanning tree. The parameter <mstid> is a number that corresponds to the desired existing multiple spanning tree instance. The <vlanid> corresponds to an existing VLAN ID.

spanning-tree port mode

This command sets the Administrative Switch Port State for this port to enabled.

no spanning-tree port mode

This command sets the Administrative Switch Port State for this port to disabled.

spanning-tree port mode all

This command sets the Administrative Switch Port State for all ports to enabled.

no spanning-tree port mode all

This command sets the Administrative Switch Port State for all ports to disabled.

show spanning-tree

This command displays spanning tree settings for the common and internal spanning tree. The following details are displayed.

The display parameters for above command are:

show spanning-tree brief

This command displays spanning tree settings for the bridge. The following information appears.

The display parameters for above command are:

show spanning-tree interface

This command displays the settings and parameters for a specific switch port within the common and internal spanning tree. The <unit/slot/port> is the desired switch port. The following details are displayed on execution of the command.

The display parameters for above command are:

show spanning-tree mst port detailed

This command displays the detailed settings and parameters for a specific switch port within a particular multiple spanning tree instance. The parameter <mstid> is a number that corresponds to the desired existing multiple spanning tree instance. The <unit/slot/port> is the desired switch port.

The display parameters for above command are:

If you specify 0 (defined as the default CIST ID) as the <mstid>, this command displays the settings and parameters for a specific switch port within the common and internal spanning tree. The <unit/slot/port> is the desired switch port. In this case, the following are displayed.

show spanning-tree mst port summary

This command displays the settings of one or all ports within the specified multiple spanning tree instance. The parameter <mstid> indicates a particular MST instance. The parameter {<unit/slot/port> | all} indicates the desired switch port or all ports.

If you specify 0 (defined as the default CIST ID) as the <mstid>, the status summary displays for one or all ports within the common and internal spanning tree.

The display parameters for above command are:

show spanning-tree mst port summary active

This command displays settings for the ports within the specified multiple spanning tree instance that are active links.

The display parameters for above command are:

show spanning-tree mst summary

This command displays summary information about all multiple spanning tree instances in the switch. On execution, the following details are displayed.

The display parameters for above command are:

show spanning-tree summary

This command displays spanning tree settings and parameters for the switch. The following details are displayed on execution of the command.

The display parameters for above command are:

show spanning-tree vlan

This command displays the association between a VLAN and a multiple spanning tree instance. The <vlanid> corresponds to an existing VLAN ID.

The display parameters for above command are:

See also

Switching Commands

Port Configuration Commands

VLAN Commands

Private VLAN Commands

Ethernet Ring Protection Commands

Double VLAN Commands

Voice VLAN Commands

Provider Bridge Commands

802.1AS Timesync Commands

Provisioning (IEEE 802.1p) Commands

Protected Ports Commands

GARP Commands

GVRP Commands

GMRP Commands

Port-Based Network Access Control Commands

Switch Port Auto-recovery (SPAR) Commands

802.1X Supplicant Commands

Storm-Control Commands

Link Local Protocol Filtering Commands

MMRP Commands

MSRP Commands

MVRP Commands

Port-Channel/LAG (802.3ad) Commands

Port Mirroring

Static MAC Filtering

DHCP L2 Relay Agent Comamnds

DHCP Client Commands

DHCP Snooping Configuration Commands

Dynamic ARP Inspection Commands

IGMP Snooping Configuration Commands

IGMP Snooping Querier Commands

MLD Snooping Commands

MLD Snooping Querier Commands

Port Security Commands

LLDP (802.1AB) Commands

LLDP-MED Commands

Denial of Service Commands

MAC Database Commands

ISDP Commands

Ethernet in the First Mile Operations and Maintenance Commands

Connectivity Fault Management Commands