Configuring MSTP operation mode and global settings

The commands in this section apply at the switch (global) level. For configuring spanning tree settings on individual ports, see Configuring MSTP per-port parameters.

Selecting MSTP as the spanning tree mode


spanning-tree mode mstp

Specifies that spanning tree will run in MSTP mode.

Clearing spanning tree debug counters


spanning-tree clear-debug-counters

Clears spanning tree debug counters.

Resetting the configuration name of the MST region in which a switch resides


[no] spanning-tree config-name <ascii-string>

Resets the configuration name of the MST region in which the switch resides. This name can include up to 32 nonblank characters and is case-sensitive. On all switches within a given MST region, the configuration names must be identical. For more than one MSTP switch in the same MST region, the identical region name must be configured on all such switches. If the default configuration name is retained on a switch, it cannot exist in the same MST region with another switch.

The default name is a text string using the hexadecimal representation of the switch's MAC address.

The no form of the command overwrites the currently configured name with the default name.

[NOTE: ]

NOTE: This option is available only when the switch is configured for MSTP operation. There is no defined limit on the number of regions you can configure.

Designating the revision number of the MST region for a switch


spanning-tree config-revision <revision-number>

Configures the revision number designated for the MST region in which you want the switch to reside. This setting must be the same for all switches residing in the same region. Use this setting to differentiate between region configurations in situations such as the following:

  • Changing configuration settings within a region where you want to track the configuration versions you use

  • Creating a new region from a subset of switches in a current region and want to maintain the same region name.

  • Using the pending option to maintain two different configuration options for the same physical region.

This setting must be the same for all MSTP switches in the same MST region.

Range: 0 - 65535

Default: 0

[NOTE: ]

NOTE: This option is available only when the switch is configured for MSTP operation.

Setting the spanning tree compatibility mode


spanning-tree force-version [ stp-compatible | rstp-operation | mstp-operation ]

Sets the spanning tree compatibility mode. This command forces the switch to emulate behavior of earlier versions of spanning tree protocol, or return to MSTP behavior. The command is useful in test or debug applications and removes the need to reconfigure the switch for temporary changes in spanning tree operation.


The switch applies 802.1D STP operation on all ports.


The switch applies 802.1w operation on all ports except those ports where it detects a system using 802.1D Spanning Tree. RSTP is Rapid Spanning Tree Protocol.


The switch applies 802.1s MSTP operation on all ports where compatibility with 802.1D or 802.1w spanning tree protocols is not required.

[NOTE: ]

NOTE: Even when mstp-operation is selected, if the switch detects an 802.1D BPDU or an 802.1w BPDU on a port, it communicates with the device linked to that port using STP or RSTP BPDU packets. Also, if errors are encountered as described in Configuring MSTP at a glance, setting force-version to stp-compatible forces the MSTP switch to communicate out all ports using operations that are compatible with IEEE 802.1D STP.

[NOTE: ]

NOTE: When using MSTP rapid state transitions

Under some circumstances the rapid state transitions employed by MSTP can increase the rates of frame duplication and misordering in the switched LAN. To allow MSTP switches to support applications and protocols that may be sensitive to frame duplication and misordering, setting the Force Protocol Version (force-version) parameter to stp-compatible allows MSTP to operate with rapid transitions disabled. The value of this parameter applies to all ports on the switch.

Setting the time interval between listening, learning and forwarding states


spanning-tree forward-delay

Sets the time the switch waits between transitioning from listening to learning and from learning to forwarding states.

Range: 4 - 30

Default: 15 seconds

Setting spanning tree to operate in 802. ID legacy mode


[no] spanning-tree legacy-mode

Forces spanning tree to operate in legacy (802.!D) mode.

Default: MSTP-operation.

The no form of this command returns the switch to the default 802.1s native mode (MSTP-operation)


spanning-tree legacy-path-cost

Setting spanning tree to operate with 802. ID legacy path cost values


Forces spanning tree to operate with legacy (802.!D) path cost values.

Default: 802.1t.

The no form of the command returns the switch to the default 802.1t (not legacy) path cost values.

Specifying the time interval between BPDU transmissions


spanning-tree hello-time <1..10>

If MSTP is running and the switch is operating as the CIST (Common and Internal Spanning Tree) root for your network, this command specifies the time in seconds between transmissions of BPDUs for all ports on the switch configured with the Global option (the default). This parameter applies in MSTP, RSTP and STP modes.

During MSTP operation, you can override this global setting on a per-port basis with this command: spanning-tree <port-list> hello-time <1..10>.

Default: 2 seconds.

Setting the hop limit for BPDUs


spanning-tree max-hops <hop-count>

Resets the number of hops allowed for BPDUs in an MST region. When an MSTP switch receives a BPDU, it decrements the hop-count setting the BPDU carries. If the hop-count reaches zero, the receiving switch drops the BPDU.

The switch does not change the message-age and maximum-age data carried in the BPDU as it moves through the MST region and is propagated to other regions.

Range: 1 - 40 Default: 20

Setting the maximum age of received STP information


spanning-tree maximum age

Sets the maximum age time for received STP information before it is discarded.

Default: 20 seconds

Manipulating the pending MSTP configuration


spanning-tree pending [ apply | <config-revision> | <instance> | reset ]

Manipulates the pending MSTP configuration. The command is useful in test or debug applications and enables rapid reconfiguration of the switch for changes in spanning tree operation.


Applies pending MSTP configuration (swaps active and pending configurations).


Sets the pending MST region configuration name. Default is the switch's MAC address.


Sets the pending MST region configuration revision number. Default is 0.


Change pending MST instance configuration.


Copies the active configuration to pending.

Setting the bridge priority for a region and determining the root switch


spanning-tree priority <priority-multiplier>

Every switch running an instance of MSTP has a Bridge Identifier, which is a unique identifier that helps distinguish this switch from all others. The switch with the lowest Bridge Identifier is elected as the root for the tree.

The Bridge Identifier is composed of a configurable Priority component (2 bytes) and the bridge's MAC address (6 bytes). The ability to change the Priority component provides flexibility in determining which switch will be the root for the tree, regardless of its MAC address.

This command sets the switch (bridge) priority for the designated region in which the switch resides. The switch compares this priority with the priorities of other switches in the same region to determine the root switch for the region. The lower the priority value, the higher the priority. If there is only one switch in the region, then that switch is the root switch for the region.The root bridge in a region provides the path to connected regions for the traffic in VLANs assigned to the region's IST instance. Traffic in VLANs assigned to a numbered STP instance in a given region moves to other regions through the root switch for that instance.

The priority range for an MSTP switch is 0-61440. However, this command specifies the priority as a multiplier (0 - 15) of 4096. That is, when you specify a priority multiplier value of 0 - 15, the actual priority assigned to the switch is: (priority-multiplier) x 4096

For example, with 2 as the priority-multiplier on a given MSTP switch, the Switch Priority setting is 8,192.

[NOTE: ]

NOTE: If multiple switches in the same MST region have the same priority setting, then the switch with the lowest MAC address becomes the root switch for that region.

Enabling SNMP traps


[no] spanning-tree trap { errant-bpdu | loop-guard | new-root | root-guard }

Enables or disables SNMP traps for errant-BPDU, loop guard, new root and root guard event notifications. This command is designed to be used with the spanning-tree bpdu-filter command (see Configuring BPDU filtering) and the bpdu-protection command (see Enabling and disabling BPDU protection).


Enables SNMP notification when an errant BPDU is received. Designed for use with BPDU filtering (see Configuring BPDU filtering).


Enables SNMP notification when a loop guard inconsistency is detected. Designed for use with the Loop Guard option (see STP loop guard).


Enables SNMP notification when a new root is elected on any VLAN configured for MSTP on the switch.


Enables SNMP notification when a root guard inconsistency is detected. See Denying a port the role of root port.

Default for all of the above options: Disabled

The no form of the command disables traps on the switch.