Multiple Spanning Tree Protocol Commands

This section describes the commands used to configure Multiple Spanning Tree Protocol (MSTP) feature.

For detailed information about concepts and configuration, see the Configure Multiple Spanning Tree Protocol chapter in the L2VPN and Ethernet Services Configuration Guide for Cisco NCS 5000 Series Routers.

instance (MSTP)

In order to configure the multiple spanning tree instance (MSTI), 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 6.3.1

This command was introduced.

Usage Guidelines


Note


An instance ID of 0 represents the Common Internal Spanning Tree (CIST) for the region.


Task ID

Task ID

Operations

interface

read, write

Examples

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


RP/0/RP0/CPU0:router(config-mstp)# instance 101
RP/0/RP0/CPU0:router(config-mstp-inst)#

interface (MSTP)

To enter the MSTP interface configuration submode, use the interface command in MSTP configuration submode.

interface interface-type interface-path-id

Syntax Description

interface-type

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

interface-path-id

Physical interface.

Note

 

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 6.1.2

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(config-mstp)# interface GigabitEthernet 0/0/0/7

name (MSTP)

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

name name

Syntax Description

name

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 6.3.1

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID

Task ID

Operations

interface

read, write

Examples

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


RP/0/RP0/CPU0:router(config-mstp)# name m1

portfast

To enable PortFast feature on the port and 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 6.1.2

This command was introduced.

Usage Guidelines

This command enables the portfast 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.

Task ID

Task ID

Operations

interface

read, write

Examples

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


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 6.3.1

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

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:


RP/0/RP0/CPU0: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
----------------------   -------- ------ ---------   ------------------------ --------
GigabitEthernet0/1/2/1   128.65   20000  DSGN FWD    0    4097 0004.9b78.0800 128.65  
GigabitEthernet0/1/2/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:


RP/0/RP0/CPU0: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 GigabitEthernet0/1/2/2  , Root Bridge ID 0002.9b78.0812
...
RP/0/RP0/CPU0: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
----------------------   -------- ------ ---------   ------------------------ --------
GigabitEthernet0/0/4/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 6.1.2

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 m0

vlan-ids (MSTP)

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

vlan-ids vlan-range-list

Syntax Description

vlan-range-list

A comma-separated list of VLAN ranges in the form a-b, c, d, e-f, g etc. Upto 3 ranges can be specified.

Command Default

None

Command Modes

MSTI configuration

Command History

Release

Modification

Release 6.3.1

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID

Task ID

Operations

interface

read, write

Examples

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


RP/0/RP0/CPU0:router(config-mstp-inst)# vlan-ids 2-1005