Multiple Spanning Tree Protocol Commands

This module describes the commands used to configure multiple spanning tree protocol. For detailed information about MSTP concepts, configuration tasks, and examples, see the L2VPN and Ethernet Services Configuration Guide for Cisco 8000 Series Routers.

allow-legacy-bpdu

To enable MSTP to accept legacy TCN notifications and allow it to prompt a flush rather than putting the interface into an error-disabled state, use the allow-legacy-bpdu command in the MSTP interface configuration submode.

allow-legacy-bpdu

Syntax Description

This command has no keywords or arguments.

Command Default

allow-legacy-bpdu is disabled.

Command Modes

MSTP interface configuration

Command History

Release

Modification

Release 7.1.1

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID

Task ID

Operations

ethernet-services

read, write

Examples

The following example shows how to enable allow-legacy-bpdu command:

Router# config
Router(config)# spanning-tree MST test
Router(config-mstp)# allow-legacy-bpdu

instance (MSTP)

To enter the multiple spanning tree instance (MSTI) configuration submode, use the instance command in MSTP configuration submode.

instance id

Syntax Description

id

MSTI ID. Range is 0 to 4094.

Command Default

None

Command Modes

MSTP configuration

Command History

Release

Modification

Release 7.2.12

This command was introduced.

Usage Guidelines


Note


An instance ID of 0 represents the CIST for the region.


Task ID

Task ID

Operations

interface

read, write

Examples

The following example shows how to enter the MSTI configuration submode:


Router# configure
Router(config)#spanning-tree mst a
Router(config-mstp)# instance 101
Router(config-mstp-inst)#

interface (MSTP)

To enter the MSTP interface configuration submode, and to enable STP for the specified port, use the interface command in MSTP configuration submode.

interface interface-type interface-path-id

Syntax Description

interface

Interface type. For more information, use the question mark (?) online help function.

interface-path-id

Physical interface.

Use the show interfaces command to see a list of all possible interfaces currently configured on the router.

For more information about the syntax for the router, use the question mark (?) online help function.

Command Default

None

Command Modes

MSTP configuration

Command History

Release

Modification

Release 7.2.12

This command was introduced.

Usage Guidelines

A given port may only be enabled with one of MSTP, MSTAG, REPAG, PVSTAG or PVRSTAG.

Task ID

Task ID

Operations

interface

read, write

Examples

The following example shows how to enter the MSTP interface configuration submode:

Router# configure
Router(config)# spanning-tree mst M0
Router(config-mstp)# interface hundredGigE 0/0/0/1
Router(config-mstp-if)#

name (MSTP)

To set the name of the MSTP region, use the name command in MSTP configuration submode.

name name

Syntax Description

name

Specifies the name of the mstp region.

String of a maximum of 32 characters conforming to the definition of SnmpAdminString in RFC 2271.

Command Default

The MAC address of the switch, formatted as a text string using the hexadecimal representation specified in IEEE Std 802.

Command Modes

MSTP configuration

Command History

Release

Modification

Release 7.2.12

This command was introduced.

Task ID

Task ID

Operations

interface

read, write

Examples

The following example shows how to set the name of the MSTP region to m1:


Router# configure
RP/0/RP0/CPU0:ios(config)#spanning-tree mst M0
Router(config-mstp)# name m1

portfast

To enable Port Fast on the port, and optionally enable BPDU guard, use the portfast command in MSTP interface configuration submode.

portfast [bpduguard]

Syntax Description

This command has no keywords or arguments.

Command Default

PortFast is disabled.

Command Modes

MSTP interface configuration

Command History

Release

Modification

Release 7.2.12

This command was introduced.

Usage Guidelines

You must disable and re-enable the port for Port Fast configuration to take effect. Use shutdown and no shutdown command (in interface configuration mode) to disable and re-enable the port.

This command enables the Port Fast feature (also known as edge port). When this is enabled, MSTP treats the port as an edge port, i.e., it keeps it in forwarding state and does not generate topology changes if the port goes down or comes up. It is not expected to receive MSTP BPDUs on an edge port. BPDU guard is a Cisco extension that causes the interface to be shut down using error-disable if an MSTP BPDU is received. For more information on Port Fast feature, refer to the Multiple Spanning Tree Protocol module in the L2VPN and Ethernet Services Configuration Guide for Cisco 8000 Series Routers

Task ID

Task ID

Operations

interface

read, write

Examples

The following example shows how to enable PortFast and BPDU guard on the port:


Router# configure
Router(config)# spanning-tree mst a
Router(config-mstp)# interface HundredGigE0/0/0/2
Router(config-mstp-if)# portfast 
Router(config-mstp-if)# portfast bpduguard

show spanning-tree mst

To display the multiple spanning tree protocol status information, use the show spanning-tree mst command in EXEC mode.

show spanning-tree mst protocol instance identifier [instance instance-id] [blocked-ports | brief]

Syntax Description

protocol instance identifier

String of a maximum of 25 characters that identifies the protocol instance.

instance instance-id

Forward interface in rack/slot/instance/port format.

brief

Displays a summary of MST information only.

blocked-ports

Displays MST information for blocked ports only.

Command Default

None

Command Modes

EXEC

Command History

Release

Modification

Release 7.2.12

This command was introduced.

Task ID

Task ID

Operations

interface

read

Examples

The following example shows the output from the show spanning-tree mst command, which produces an overview of the spanning tree protocol state:


Router# show spanning-tree mst a instance 0
Operating in Provider Bridge mode
MSTI 0 (CIST):

  VLANS Mapped: 1-100, 500-1000, 1017

  Root ID    Priority    4097
             Address     0004.9b78.0800
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec


  Bridge ID  Priority    4097   (priority 4096 sys-id-ext 1)
             Address     0004.9b78.0800
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

 
Interface                Port ID                     Designated               Port ID
Name                     Prio.Nbr Cost   Role State  Cost Bridge ID           Prio.Nbr
----------------------   -------- ------ ---------   ------------------------ --------
HundredGigEthernet0/0/0/1   128.65   20000  DSGN FWD    0    4097 0004.9b78.0800 128.65  
HundredGigEthernet0/0/0/2   128.66   20000  DSGN FWD    0    4097 0004.9b78.0800 128.66  
...

The following example shows the output from the show spanning-tree mst command when the brief and blocked-ports keywords are used:


Router# show spanning-tree mst a brief
MSTI 0 (CIST):
  VLAN IDs: 1-100, 500-1000, 1017
  This is the Root Bridge
MSTI 1:
  VLAN IDS: 101-499
  Root Port HundredGigEthernet0/0/0/2  , Root Bridge ID 0002.9b78.0812
...
Router# show spanning-tree mst blocked-ports
MSTI 0 (CIST):
 
Interface                Port ID                     Designated               Port ID
Name                     Prio.Nbr Cost   Role State  Cost Bridge ID           Prio.Nbr
----------------------   -------- ------ ---------   ------------------------ --------
HundredGigEthernet0/0/0/4      128.196  200000 ALT  BLK    0    4097 0004.9b78.0800 128.195 
...

spanning-tree mst

To enter the MSTP configuration submode, use the spanning-tree mst command in global configuration mode.

spanning-tree mst protocol instance identifier

Syntax Description

protocol instance identifier

String of a maximum of 25 characters that identifies the protocol instance.

Command Default

None

Command Modes

Global configuration

Command History

Release

Modification

Release 7.2.12

This command was introduced.

Usage Guidelines


Note


In MSTP configuration, only one protocol instance can be configured at a time.


Task ID

Task ID

Operations

interface

read, write

Examples

The following example shows how to enter the MSTP configuration submode:


Router(config)# spanning-tree mst a
Router(config-mstp)#

vlan-id (MSTP)

To associate a set of VLAN IDs with the current MSTI, use the vlan-id command in MSTI configuration submode.

vlan-id vlan-range [vlan-range] [vlan-range] [vlan-range]

Syntax Description

vlan-range

List of VLAN ranges in the form a-b, c, d, e-f, g etc.

Command Default

None

Command Modes

MSTI configuration

Command History

Release

Modification

Release 7.2.12

This command was introduced.

Task ID

Task ID

Operations

interface

read, write

Examples

The following example shows how to use the vlan-id command:


Router(config-mstp-inst)# vlan-id 2-1005