Cisco Nexus 7000 Series NX-OS Layer 2 Command Reference, Release 4.0
Cisco NX-OS Layer 2 Commands

Table Of Contents

Cisco NX-OS Layer 2 Commands

clear mac address-table dynamic

clear spanning-tree counters

clear spanning-tree detected-protocol

clear vlan counters

feature private-vlan

instance vlan

mac address-table aging-time

mac address-table static

media ethernet

name (VLAN configuration)

name (mst configuration)

private-vlan

private-vlan association

private-vlan mapping

private-vlan synchronize

revision

show hardware mac address-table

show interface mac-address

show interface private-vlan mapping

show interface vlan

show interface vlan counters

show mac address-table

show mac address-table aging-time

show running-config spanning-tree

show running-config vlan

show spanning-tree

show spanning-tree active

show spanning-tree bridge

show spanning-tree brief

show spanning-tree detail

show spanning-tree interface

show spanning-tree mst

show spanning-tree root

show spanning-tree summary

show spanning-tree vlan

show vlan

show vlan counters

show vlan dot1q tag native

show vlan id

show vlan private-vlan

shutdown (VLAN configuration)

spanning-tree bpdufilter

spanning-tree bpduguard

spanning-tree bridge assurance

spanning-tree cost

spanning-tree guard

spanning-tree link-type

spanning-tree loopguard default

spanning-tree mode

spanning-tree mst configuration

spanning-tree mst cost

spanning-tree mst forward-time

spanning-tree mst hello-time

spanning-tree mst max-age

spanning-tree mst max-hops

spanning-tree mst port-priority

spanning-tree mst pre-standard

spanning-tree mst priority

spanning-tree mst root

spanning-tree mst simulate pvst

spanning-tree mst simulate pvst global

spanning-tree pathcost method

spanning-tree port type edge

spanning-tree port type edge bpdufilter default

spanning-tree port type edge bpduguard default

spanning-tree port type edge default

spanning-tree port type network

spanning-tree port type network default

spanning-tree port-priority

spanning-tree vlan

state

switchport mode private-vlan host

switchport mode private-vlan promiscuous

switchport private-vlan host-association

switchport private-vlan mapping

vlan (global configuration mode)


Cisco NX-OS Layer 2 Commands


This chapter describes the Cisco NX-OS Layer 2 commands.

clear mac address-table dynamic

To clear the dynamic address entries from the MAC address table in Layer 2, use the clear mac address-table dynamic command.

clear mac address-table dynamic [[address mac_addr] [vlan vlan_id] [interface {type slot/port | port-channel number}]

Syntax Description

address mac_addr

(Optional) Specifies the MAC address to remove from the table. Use the format XXXX.XXXX.XXXX.

vlan vlan_id

(Optional) Specifies the VLAN from which the MAC address should be removed from the table. The range of valid values is from 1 to 4094.

interface {type slot/port | port-channel number}]

(Optional) Specifies the interface. Use either the type of interface, the slot number, and the port number, or the port-channel number.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

Use the clear mac address-table dynamic command with no arguments to remove all dynamic entries from the table.

To clear static MAC addresses from the table, use the no mac address-table static command in configuration mode.

If the clear mac address-table dynamic command is entered with no options, all dynamic addresses are removed. If you specify an address but do not specify an interface, the address is deleted from all interfaces. If you specify an interface but do not specify an address, the device removes all addresses on the specified interfaces.

This command does not require a license.

Examples

This example shows how to clear all the dynamic Layer 2 entries from the MAC address table:

switch(config)# clear mac address-table dynamic 
switch(config) # 

This example shows how to clear all the dynamic Layer 2 entries from the MAC address table for VLAN 20 on port 2/20:

switch(config)# clear mac address-table dynamic vlan 20 interface ethernet 2/20
switch(config)# 

Related Commands

Command
Description

show mac address-table

Displays the information about the MAC address table.


clear spanning-tree counters

To clear the counters for the Spanning Tree Protocol (STP), use the clear spanning-tree counters command.

clear spanning-tree counters [vlan vlan-id] [interface {ethernet {interface-num} | port-channel {channel-num}}]

Syntax Description

vlan vlan-id

(Optional) Specifies the VLAN. The range is from 1 to 4094.

interface

(Optional) Specifies the interface type.

ethernet interface-num

Module and port number.

port-channel channel-num

Port-channel number.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You can clear all the STP counters on the entire device, per VLAN, or per interface.

This command does not require a license.

Examples

This example shows how to clear the STP counters for VLAN 5:

switch# clear spanning-tree counters vlan 5

Related Commands

Command
Description

show spanning-tree

Displays information about the spanning tree state.

show spanning-tree mst

Displays information about MST spanning tree state.


clear spanning-tree detected-protocol

To restart the protocol migration, use the clear spanning-tree detected-protocol command.

clear spanning-tree detected-protocol [interface {ethernet {interface-num} | port-channel {channel-num}}]

Syntax Description

interface

(Optional) Specifies the interface type.

ethernet interface-num

Module and port number.

port-channel channel-num

Port-channel number.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

Rapid per VLAN Spanning Tree Plus (Rapid PVST+) and Multiple Spanning Tree (MST) have built-in compatibility mechanisms that allow them to interact properly with other versions of IEEE spanning tree or other regions. For example, a bridge running Rapid PVST+ can send 802.1D bridge protocol data units (BPDUs) on one of its ports when it is connected to a legacy bridge. An MST bridge can detect that a port is at the boundary of a region when it receives a legacy BPDU or an MST BPDU that is associated with a different region.

These mechanisms are not always able to revert to the most efficient mode. For example, a Rapid PVST+ bridge that is designated for a legacy 802.1D bridge stays in 802.1D mode even after the legacy bridge has been removed from the link. Similarly, an MST port assumes that it is a boundary port when the bridges to which it is connected have joined the same region.

To force the MST port to renegotiate with the neighbors, enter the clear spanning-tree detected-protocol command.

If you enter the clear spanning-tree detected-protocol command with no arguments, the command is applied to every port of the device.

This command does not require a license.

Examples

This example shows how to restart the protocol migration on a specific interface:

switch# clear spanning-tree detected-protocol interface gigabitethernet5/8

Related Commands

Command
Description

show spanning-tree

Displays information about the spanning tree state.

show spanning-tree mst

Displays information about MST spanning tree state.


clear vlan counters

To clear the counters for a specified VLAN or all VLANs, use the clear vlan counters command.

clear vlan [id {vlan-id}] counters

Syntax Description

id

(Optional) VLAN ID you want to clear. Valid values are from 1 to 4096.

vlan-id

VLAN that you want to clear.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

If you do not specify a VLAN ID, the system clears the counters for all the VLANs, including private VLANs.

This command does not require a license.

Examples

This example shows how to clear the counters for VLAN 50:

switch# clear vlan 50 counters

Related Commands

Command
Description

show vlan counters

Displays information on statistics for all VLANs or the specified VLAN.

show interface counters

Displays information about the statistics for the specified VLANs.


feature private-vlan

To enable private VLANs, use the feature private-vlan command. To return to the default settings, use the no form of this command.

feature private-vlan

no feature private-vlan

Syntax Description

None

Defaults

Disabled

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You must use this command to enable private VLAN functionality. You must enable private VLANs before the private VLANs are visible to the user. When private VLANs are disabled, all of the configuration on the feature is removed from the interfaces.

You cannot apply the no feature private-vlan command if the device has any operational ports in private VLAN mode. You must shut down all operational ports in private VLAN mode before you use the no feature private-vlan command. After you shut down the interfaces and enter the no feature private-vlan command, these port return to the default mode.

This command does not require a license.

Examples

This example shows how to enable private VLAN functionality on the device:

switch(config)# feature private-vlan
switch(config)# 

Related Commands

Command
Description

show vlan private-vlan

Displays information on private VLANs. If the feature is not enabled, this command returns an error.


instance vlan

To map a VLAN or a set of VLANs to a Multiple Spanning Tree instance (MSTI), use the instance vlan command. To delete the instance and return the VLANs to the default instance (CIST), use the no form of this command.

instance instance-id vlan vlan-id

no instance instance-id vlan vlan-id

Syntax Description5

instance-id

Instances to which the specified VLANs are mapped; the range of valid values is from 0 to 4094.

vlan-id

Number of the VLANs that you are mapping to the specified MSTI; the range of valid values is from 1 to 4094.


Defaults

No VLANs are mapped to any MST instance (all VLANs are mapped to the CIST instance).

Command Modes

mst configuration submode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

The vlans vlan-range is entered as a single value or a range.

You cannot map VLANs 3968 to 4047 or 4094 to an MST instance. These VLANs are reserved for internal use by the device.

The mapping is incremental, not absolute. When you enter a range of VLANs, this range is added to or removed from the existing instances.

Any unmapped VLAN is mapped to the CIST instance.


Caution When you change the VLAN-to-MSTI mapping, the system restarts MST.

This command does not require a license.

Examples

This example shows how to map a range of VLANs to MSTI 4:

switch(config)# spanning-tree mst configuration
switch(config-mst)# instance 4 vlan 100-200
switch(config-mst)#

Related Commands

Command
Description

show spanning-tree mst configuration

Displays information about the MST protocol.

spanning-tree mst configuration

Enters MST configuration submode.



mac address-table aging-time

To configure the aging time for entries in the Layer 2 table, use the mac address-table aging-time command. To return to the default settings, use the no form of this command.

mac address-table aging-time seconds [vlan vlan_id]

no mac address-table aging-time [vlan vlan_id]

Syntax Description

seconds

Aging time for MAC table entries for Layer 2. The range is from 120 to 918000 seconds. The default is 1800 seconds. Entering 0 disables the aging time.

vlan vlan_id

(Optional) Specifies the VLAN to apply the changed aging time.


Defaults

1800 seconds

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

Enter 0 seconds to disable the aging process.

The age value may be rounded off to the nearest multiple of 5 seconds. If the system rounds the value to a different value from that specified by the user (from the rounding process), the system returns an informational message.

When you use this command in the global configuration mode, the age values of all VLANs for which a configuration has not been specified are modified and those VLANs with specifically modified aging times are not modified. When you use the no form of this command without the VLAN parameter, only those VLANs that have not been specifically configured for the aging time reset to the default value. Those VLANs with specifically modified aging times are not modified.

When you use this command and specify a VLAN, the aging time for only the specified VLAN is modified. When you use the no form of this command and specify a VLAN, the aging time for the VLAN is returned to the current global configuration for the aging time, which may or may not be the default value of 300 seconds depending if the global configuration of the device for aging time has been changed.

Aging time is counted from the last time that the switch detected the MAC address.

This command does not require a license.

Examples

This example shows how to change the length of time an entry remains in the MAC address table to 500 seconds for the entire device:

switch(config)# mac address-table aging-time 500
switch(config)# 

Related Commands

Command
Description

show mac address-table

Displays information about the MAC address table.

clear mac address-table aging-time

Displays information about the MAC address aging time.


mac address-table static

To configure a static entry for the Layer 2 MAC address table, use the mac address-table static command. To delete the static entry, use the no form of this command.

mac address-table static mac-address vlan vlan-id {[drop | interface {type slot/port | port-channel number]}

no mac address-table static {address mac_addr} {vlan vlan_id}

Syntax Description

mac-address

Specifies the MAC address to add to the table. Use the format XXXX.XXXX.XXXX.

vlan vlan-id

Specifies the VLAN to apply static MAC address; valid values are from 1 to 4094.

drop

Drops all traffic that is received from and going to the configured MAC address in the specified VLAN.

type slot/port

(Optional) Specifies the interface. Use the type of interface, the slot number, and the port number.

port-channel number

(Optional) Specifies the interface. Use the port-channel number.


Defaults

None

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You cannot apply the mac address-table static mac-address vlan vlan-id drop command to a multicast MAC address.

The output interface specified cannot be a VLAN interface or a Switched Virtual Interface (SVI).

Use the no form to remove entries that are profiled by the combination of specified entry information.

This command does not require a license.

Examples

This example shows how to add a static entry to the MAC address table:

switch(config)# mac address-table static 0050.3e8d.6400 vlan 3 interface ethernet 2/1
switch(config)# 

Related Commands

Command
Description

show mac address-table

Displays information about MAC address table.


media ethernet


Note You can have only Ethernet VLANs on the DC-OS. Although the media ethernet command appears on the device, it does not apply to any configuration.


To set the media type for a VLAN to Ethernet, use the media ethernet command. Use the no form of this command to return to the default value.

media ethernet

no media

Syntax Description

This command has no arguments or keywords.

Defaults

Ethernet is the only media type supported.

Command Modes

VLAN configuration submode

Supported User Roles

network-admin

vdc-admin

Usage Guidelines

The media ethernet command is not supported in 4.0.

This command does not require a license.

Examples

This example shows how to set the media type to Ethernet for VLAN 2:

switch(config)# vlan 2
switch(config-vlan)# media ethernet
switch(config-mst)#

Related Commands

Command
Description

show vlan

Displays VLAN information.


name (VLAN configuration)

To set the name for a VLAN, use the name command. To remove the user-configured name from a VLAN, use the no form of this command.

name vlan-name

no name

Syntax Description

vlan-name

Name of the VLAN; you can use up to 32 alphanumeric, case-sensitive characters.

Note The name must be unique within each VDC.


Defaults

The vlan-name argument is VLANxxxx where xxxx represent four numeric digits (including leading zeroes) equal to the VLAN ID number.

Command Modes

VLAN configuration submode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

The name must be unique within the VDC, and the same name can be reused in a separate VDC.

You cannot change the name for the default VLAN, VLAN 1, or for the internally allocated VLANs.

This command does not require a license.

Examples

This example shows how to name VLAN 2:

switch(config)# vlan 2
switch(config-vlan)# name accounting
switch(config-mst)#

Related Commands

Command
Description

show vlan

Displays VLAN information.


name (mst configuration)

To set the name of a Multiple Spanning Tree (MST) region, use the name command. To return to the default name, use the no form of this command.

name name

no name name

Syntax Description

name

Name to assign to the MST region. It can be any string with a maximum length of 32 alphanumeric characters.


Defaults

None

Command Modes

mst configuration submode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

Two or more devices with the same VLAN mapping and configuration version number are considered to be in different MST regions if the region names are different.


Caution Be careful when using the name command to set the name of an MST region. If you make a mistake, you can put the device in a different region. The configuration name is a case-sensitive parameter.

This command does not require a license.

Examples

This example shows how to name a region:

switch(config)# spanning-tree mst configuration
switch(config-mst)# name accounting
switch(config-mst)#

Related Commands

Command
Description

show spanning-tree mst configuration

Displays information about the MST protocol.

spanning-tree mst configuration

Enters MST configuration submode.



private-vlan

To configure private VLANs, use the private-vlan command. To return the specified VLAN(s) to normal VLAN mode, use the no form of this command.

private-vlan {isolated | community | primary}

no private-vlan {isolated | community | primary}

Syntax Description

isolated

Designates the VLAN as an isolated secondary VLAN.

community

Designates the VLAN as a community secondary VLAN.

primary

Designates the VLAN as the primary VLAN.


Defaults

None

Command Modes

VLAN configuration submode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You must enable private VLANs by using the feature private-vlan command before you can configure private VLANs. The commands for configuring private VLANs are not visible until you enable private VLANs.


Note Before you configure a VLAN as a secondary VLAN, either community or isolated, you must shut down the VLAN interface, or Switched Virtual Interface (SVI), for that VLAN.


If you delete either the primary or secondary VLAN, the ports that are associated with the VLAN become inactive. When you enter the no private-vlan command, the VLAN returns to the normal VLAN mode. All primary and secondary associations on that VLAN are suspended, but the interfaces remain in private VLAN mode. However, when you reconvert the specified VLAN to private VLAN mode, the original associations are reinstated.

If you enter the no vlan command for the primary VLAN, all private VLAN associations with that VLAN are lost. However, if you enter the no vlan command for a secondary VLAN, the private VLAN associations with that VLAN are suspended and return when you recreate the specified VLAN and configure it as the previous secondary VLAN.

You cannot configure VLAN1 or the internally allocated VLANs as private VLANs.

A private VLAN is a set of private ports that are characterized by using a common set of VLAN number pairs. Each pair is made up of at least two special unidirectional VLANs and is used by isolated ports and/or by a community of ports to communicate with routers.

An isolated VLAN is a VLAN that is used by isolated ports to communicate with promiscuous ports. An isolated VLAN's traffic is blocked on all other private ports in the same VLAN. Its traffic can only be received by standard trunking ports and promiscuous ports that are assigned to the corresponding primary VLAN.

A promiscuous port is defined as a private port that is assigned to a primary VLAN.

A community VLAN is defined as the VLAN that carries the traffic among community ports and from community ports to the promiscuous ports on the corresponding primary VLAN.

A primary VLAN is defined as the VLAN that is used to convey the traffic from the routers to customer end stations on private ports.

Multiple community and isolated VLANs are allowed. If you enter a range of primary VLANs, the system uses the first number in the range for the association.

Examples

This example shows how to remove a private VLAN relationship from the primary VLAN. The associated secondary VLANs are not deleted.

switch(config-vlan)# no private-vlan association
switch(config-vlan)#

Related Commands

Command
Description

show vlan

Displays information about VLANs.

show vlan private-vlan [type]

Displays information about private VLANs.


private-vlan association

To configure the association between a primary VLAN and a secondary VLAN on a private VLAN, use the private-vlan association command. To remove the association, use the no form of this command.

private-vlan association {[add] secondary-vlan-list | remove secondary-vlan-list}

no private-vlan association

Syntax Description

add

Associates a secondary VLAN to a primary VLAN.

secondary-vlan-list

Number of the secondary VLAN.

remove

Clears the association between a secondary VLAN and a primary VLAN.


Defaults

None

Command Modes

VLAN configuration submode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You must enable private VLANs by using the feature private-vlan command before you can configure private VLANs. The commands for configuring private VLANs are not visible until you enable private VLANs.


Note Before you configure a VLAN as a secondary VLAN, either community or isolated, you must shut down the VLAN interface, or switched virtual interface (SVI), for that VLAN.


If you delete either the primary or secondary VLAN, the ports that are associated with the VLAN become inactive. When you enter the no private-vlan command, the VLAN returns to the normal VLAN mode. All primary and secondary associations on that VLAN are suspended, but the interfaces remain in private VLAN mode. However, when you reconvert the specified VLAN to private VLAN mode, the original associations are reinstated.

If you enter the no vlan command for the primary VLAN, all private VLAN associations with that VLAN are lost. However, if you enter the no vlan command for a secondary VLAN, the private VLAN associations with that VLAN are suspended and return when you recreate the specified VLAN and configure it as the previous secondary VLAN.

The secondary-vlan-list argument cannot contain spaces. It can contain multiple comma-separated items. Each item can be a single secondary VLAN ID or a hyphenated range of secondary VLAN IDs. The secondary-vlan-list parameter can contain multiple secondary VLAN IDs.

A private VLAN is a set of private ports that are characterized by using a common set of VLAN number pairs. Each pair is made up of at least two special unidirectional VLANs and is used by isolated ports and/or by a community of ports to communicate with routers.

Multiple community and isolated VLANs are allowed. If you enter a range of primary VLANs, the system uses the first number in the range for the association.

Isolated and community VLANs can only be associated with one primary VLAN. You cannot configure a VLAN that is already associated to a primary VLAN as a primary VLAN.

See the Cisco DC-OS Layer 2 Switching Configuration Guide for additional configuration guidelines.

This command does not require a license.

Examples

This example shows how to create a private VLAN relationship between the primary VLAN 14, the isolated VLAN 19, and the community VLANs 20 and 21:

switch(config)# vlan 19
switch(config-vlan)# private-vlan isolated
switch(config)# vlan 20
switch(config-vlan)# private-vlan community
switch(config)# vlan 21
switch(config-vlan)# private-vlan community
switch(config)# vlan 14
switch(config-vlan)# private-vlan primary
switch(config-vlan)# private-vlan association 19-21

This example shows how to remove isolated VLAN 18 and community VLAN 20 from the private VLAN association:

switch(config)# vlan 14
switch(config-vlan)# private-vlan association remove 18,20
switch(config-vlan)#

Related Commands

Command
Description

show vlan

Displays information about VLANs.

show vlan private-vlan [type]

Displays information about private VLANs.


private-vlan mapping

To create a mapping between the primary and the secondary VLANs so that both VLANs share the same Layer 3 VLAN interface, or switched virtual interface (SVI), use the private-vlan mapping command under the SVI. To remove all private VLAN mappings from the Layer 3 VLAN interface, use the no form of this command.

private-vlan mapping {[add] secondary-vlan-list | remove secondary-vlan-list}

no private-vlan mapping

Syntax Description

add

Maps the secondary VLAN to the primary VLAN.

secondary-vlan-list

VLAN ID of the secondary VLANs to map to the primary VLAN.

remove

Removes the mapping between the secondary VLAN and the primary VLAN.


Defaults

None

Command Modes

Interface configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You must enable private VLANs by using the feature private-vlan command before you can configure private VLANs. The commands for configuring private VLANs are not visible until you enable private VLANs.

The private-vlan mapping command is valid in the interface configuration mode of the primary VLAN.

The secondary-vlan-list argument cannot contain spaces. It can contain multiple comma-separated items. Each item can be a single secondary VLAN ID or a hyphenated range of secondary VLAN IDs.


Note You must enable VLAN interfaces, or SVIs, before you can configure the SVI. Use the feature interface-vlan command to enable VLAN interfaces.
See the Cisco NX-OS Interfaces Configuration Guide for information on creating and configuring VLAN interfaces.


Traffic that is received on the secondary VLAN is routed by the SVI of the primary VLAN.

When you configure VLANs as secondary private VLANs, the SVIs of those existing VLANs do not function and are considered as down after you enter this command.

You can map a secondary VLAN to only one primary SVI. If you configure the primary VLAN as a secondary VLAN, all the mappings that are specified in this command are suspended.

You must first associate all secondary VLANs with the primary VLAN using the private-vlan command. If you configure a mapping between two VLANs that do not have a valid Layer 2 association, the mapping configuration does not take effect.

See the private-vlan command for more information about primary and secondary VLANs.

This command does not require a license.

Examples

This example shows how to map the interface of VLAN 20 to the Layer 3 VLAN interface, or SVI, of VLAN 18:

switch(config)# interface vlan 18
switch(config-if)# private-vlan mapping 20
switch(config-if)#

This example shows how to permit routing of secondary VLAN-ingress traffic from private VLANs 303 through 307, 309, and 440:

switch# configure terminal 
switch(config)# interface vlan 202 
switch(config-if)# private-vlan mapping add 303-307,309,440 
switch(config-if)# end 

This example shows how to remove all private VLAN mappings from the SVI of VLAN 19:

switch(config)# interface vlan 19
switch(config-if)# no private-vlan mapping

switch(config-if)#

Related Commands

Command
Description

show interface private-vlan mapping

Displays information on secondary private VLAN mapping to VLAN interface.


private-vlan synchronize

To map the secondary VLANs to the same MST instance as the primary VLAN, use the private-vlan synchronize command.

private-vlan synchronize

Syntax Description

This command has no keywords or arguments.

Defaults

This command has no default settings.

Command Modes

mst configuration submode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

If you do not map secondary VLANs to the same MST instance as the associated primary VLAN when you exit the MST configuration submode, the device displays a warning message that lists the secondary VLANs that are not mapped to the same instance as the associated VLAN. The private-vlan synchronize command automatically maps all secondary VLANs to the same instance as the associated primary VLANs.

This command does not require a license.

Examples

This example assumes that a primary VLAN 2 and a secondary VLAN 3 are associated to VLAN 2, and that all VLANs are mapped to the CIST instance 1. This example also shows the output if you try to change the mapping for the primary VLAN 2 only:

switch(config)# spanning-tree mst configuration 
switch(config-mst)# instance 1 vlan 2
switch(config-mst)# exit
These secondary vlans are not mapped to the same instance as their primary:
-> 3

This example shows how to initialize PVLAN synchronization:

switch(config-mst)# private-vlan synchronize
switch(config-mst)# 

Related Commands

Command
Description

show spanning-tree mst configuration

Displays information about the MST protocol.

spanning-tree mst configuration

Enters MST configuration submode.



revision

To set the revision number for the Multiple Spanning Tree (MST) region configuration, use the revision command. To return to the default settings, use the no form of this command.

revision version

no revision version

Syntax Description

version

Revision number for the MST region configuration; the range of valid values is from 0 to 65535.


Defaults

0

Command Modes

mst configuration submode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

Two or more devices with the same VLAN mapping and name are considered to be in different MST regions if the configuration revision numbers are different.


Caution Be careful when using the revision command to set the revision number of the MST region configuration because a mistake can put the device in a different region.

This command does not require a license.

Examples

This example shows how to set the revision number of the MST region configuration:

switch(config)# spanning-tree mst configuration
switch(config-mst)# revision 5
switch(config-mst)#

Related Commands

Command
Description

show spanning-tree mst

Displays information about the MST protocol.


show hardware mac address-table

To display information about the hardware MAC addresses, use the show hardware mac address-table command.

show hardware mac address table {module}

[address {mac-address}{[interface {ethernet slot/port | port-channel channel-number}] [vlan vlan-id]]

[dynamic [address {mac-address}] [interface {ethernet slot/port | port-channel channel-number}] [vlan vlan-id]]

[interface {ethernet slot/port | port-channel channel-number}] [address {mac-address}] [vlan vlan-id]]

[static [address {mac-address}] [interface {ethernet slot/port | port-channel channel-number}] [vlan vlan-id]]

[vlan {vlan-id} [address mac-address] [interface {ethernet slot/port | port-channel channel-number}]

Syntax Description

module

Specifies the module number.

address {mac-address}

(Optional) Specifies the MAC address in the format of X.X.X, XX-XX-XX-XX-XX-XX, XX:XX:XX:XX:XX:XX, XXXX.XXXX.XXXX.

ethernet {slot/port | port-channel number}]

(Optional) Specifies the interface. Use either ethernet with the slot number and the port number, or the port-channel number.

vlan {vlan-id}

(Optional) Specifies the VLAN number.

dynamic

(Optional) Specifies dynamic entries only.

static

(Optional) Specifies static entries only.


Defaults

None

Command Modes

Any command mode.

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

The fields are as follows:

Valid—Entry is valid in hardware.

PI—Primary entry.

BD—bridge domain.

MAC—MAC address.

Index—Destination index; identifies the port on which MAC was learned.

Static—Statically configured entry.Hardware will not modify this entry. This entry will not be aged by the line card process.

SW—3-bit software value associated with this entry.

Modified—MAC entry was modified by hardware since last notification. This is set when index value changes.

Age byte—Age timer value when last packet arrived with this entry's MAC as source MAC.

Tmr sel—Age timer used for updating the age for this entry. Based on aging value configured for the VLAN, one of the four timers will be used for updating the age.

GM—Specifies gateway MAC or not.

Secure—Secured MAC.

TRAP—When this bit is set, the system drops any packet received with this source MAC as this entry's MAC.

NTFY—Notify. When Secured and Notify bits are both set, the system redirects packets to the supervisor when hardware updates the index value.

RM—Router MAC.

RMA—Router MAC active.


Note The RM and RMA fields are not supported on the Nexus 7000.


Capture—When this bit is set, any packet sent to this destination will be copied by setting CAP1 bit.

Fld—Flood bit. When this bit is set, any packet sent to this destination MAC will cause the flood bit to be set in the result.

Always learn—Always learn. When this bit is set, the hardware modifies the index value irrespective of whether this entry is marked static or not.

This command does not require a license.

Examples

This example shows how to display hardware information about all the MAC addresses VLAN 1 on module 2:

switch# show hardware mac address-table 2 vlan 1

Valid| PI| BD |      MAC      |  Index |Stat| SW| Modi| Age| Tmr| GM| Sec| TR | NT | RM | RMA | Cap|Fld| Always
     |   |    |               |        |  ic|   | fied|Byte| Sel|    |ure| AP | FY |    |     |TURE|   |  Learn
-----+---+----+---------------+--------+----+---+-----+----+----+----+----+---+----+----+-----+----+---+-------
  1    0    1  0100.0cff.fffe  0x00421    1   1    0   152   0     0   0    0    0    0     0   1    0      0

Related Commands

Command
Description

show mac address-table

Displays information about the MAC address table.


show interface mac-address

To display information about the MAC address and the burned-in MAC address, use the show interface mac-address command.

show interface [type slot/port] mac-address

Syntax Description

type slot/port

(Optional) Type of interface, slot number, and port number.


Defaults

None

Command Modes

Any command mode.

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

If you do not specify the interface, the system displays all the MAC addresses. This command displays both the burned-in MAC address and the configured MAC address.

This command does not require a license.

Examples

This example shows how to display information about all the MAC addresses for the device:

switch# show interface mac-address

-----------------------------------------------------------------------------
Interface                  Mac-Address     Burn-in Mac-Address
-----------------------------------------------------------------------------
mgmt0                      0019.076c.1a78  0019.076c.1a78
Ethernet2/1                0000.0000.0000  0019.076c.4dac
Ethernet2/2                0000.0000.0000  0019.076c.4dad
Ethernet2/3                0000.0000.0000  0019.076c.4dae
Ethernet2/4                0000.0000.0000  0019.076c.4daf
Ethernet2/5                0000.0000.0000  0019.076c.4db0
Ethernet2/6                0000.0000.0000  0019.076c.4db1
Ethernet2/7                0000.0000.0000  0019.076c.4db2
Ethernet2/8                0000.0000.0000  0019.076c.4db3
Ethernet2/9                0000.0000.0000  0019.076c.4db4
Ethernet2/10               0000.0000.0000  0019.076c.4db5
Ethernet2/11               0000.0000.0000  0019.076c.4db6
Ethernet2/12               0000.0000.0000  0019.076c.4db7
Ethernet2/13               0000.0000.0000  0019.076c.4db8
Ethernet2/14               0000.0000.0000  0019.076c.4db9
Ethernet2/15               0000.0000.0000  0019.076c.4dba
Ethernet2/16               0000.0000.0000  0019.076c.4dbb
Ethernet2/17               0000.0000.0000  0019.076c.4dbc
Ethernet2/18               0000.0000.0000  0019.076c.4dbd
Ethernet2/19               0000.0000.0000  0019.076c.4dbe
Ethernet2/20               0000.0000.0000  0019.076c.4dbf
Ethernet2/21               0000.0000.0000  0019.076c.4dc0
Ethernet2/22               0000.0000.0000  0019.076c.4dc1
Ethernet2/23               0000.0000.0000  0019.076c.4dc2
Ethernet2/24               0000.0000.0000  0019.076c.4dc3
Ethernet2/25               0000.0000.0000  0019.076c.4dc4
Ethernet2/26               0000.0000.0000  0019.076c.4dc5
Ethernet2/27               0000.0000.0000  0019.076c.4dc6
Ethernet2/28               0000.0000.0000  0019.076c.4dc7
Ethernet2/29               0000.0000.0000  0019.076c.4dc8
Ethernet2/30               0000.0000.0000  0019.076c.4dc9
Ethernet2/31               0000.0000.0000  0019.076c.4dca
Ethernet2/32               0000.0000.0000  0019.076c.4dcb
Ethernet2/33               0000.0000.0000  0019.076c.4dcc
Ethernet2/34               0000.0000.0000  0019.076c.4dcd
Ethernet2/35               0000.0000.0000  0019.076c.4dce
Ethernet2/36               0000.0000.0000  0019.076c.4dcf
Ethernet2/37               0000.0000.0000  0019.076c.4dd0
Ethernet2/38               0000.0000.0000  0019.076c.4dd1
Ethernet2/39               0000.0000.0000  0019.076c.4dd2
Ethernet2/40               0000.0000.0000  0019.076c.4dd3
Ethernet2/41               0000.0000.0000  0019.076c.4dd4
Ethernet2/42               0000.0000.0000  0019.076c.4dd5
Ethernet2/43               0000.0000.0000  0019.076c.4dd6
Ethernet2/44               0000.0000.0000  0019.076c.4dd7
Ethernet2/45               0000.0000.0000  0019.076c.4dd8
Ethernet2/46               0000.0000.0000  0019.076c.4dd9
Ethernet2/47               0000.0000.0000  0019.076c.4dda
Ethernet2/48               0000.0000.0000  0019.076c.4ddb
port-channel5              0000.0000.0000  0000.0000.0000
port-channel20             0000.0000.0000  0000.0000.0000
port-channel30             0000.0000.0000  0000.0000.0000
port-channel50             0000.0000.0000  0000.0000.0000

Related Commands

Command
Description

show mac address-table

Displays information about the MAC address table.

mac address-table static

Adds static entries to the MAC-address table or configures a static MAC address with IGMP snooping disabled for that address.


show interface private-vlan mapping

To display information about the private VLAN mapping for the primary VLAN interfaces, use the show interface private-vlan mapping command.

show interface private-vlan mapping

Syntax Description

This command has no arguments or keywords.

Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You can use this command to display the primary and secondary VLAN mapping that allows both VLANs to share the VLAN interface of the primary VLAN.

This command does not require a license.

Examples

This example shows how to display information about the primary and secondary private VLAN mapping:

switch# show interface private-vlan mapping

switch(config)# show interface private-vlan mapping
Interface Secondary VLAN Type
--------- -------------- -----------------
vlan200   201            isolated
vlan200   202            community

Related Commands

Command
Description

private-vlan mapping

Creates a mapping between the primary and secondary VLANs so that both VLANs share the same primary VLAN interface.


show interface switchport

Displays information about the switchports, including those in private VLANs.

show vlan private-vlan

Displays information about all private VLANs on the device.

show vlan

Displays summary information about all VLANs.


show interface vlan

To display information about specified VLANs, use the show interface vlan command.

show interface vlan vlan-id [brief | description | private-vlan mapping | status]

Syntax Description

vlan-id

Number of the VLAN. The range of values is from 1 to 4096.

brief

(Optional) Displays a brief description about a specified VLAN.

description

(Optional) Displays a detailed description about a specified VLAN.

private-vlan mapping

(Optional) Displays information about the private VLAN mapping, if any, for specified VLAN.

status

(Optional) Displays information about the status for a specified VLAN.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You can use this command to display information about a specified VLAN, including the private VLANs.

The information is gathered at 1-minute intervals.

When you specify a primary VLAN, the device displays all secondary VLANs mapped to the specified primary VLAN.

The device displays the output for the private-vlan mapping keyword only when you specify a primary private VLAN. If you specify a secondary private VLAN and enter the private-vlan mapping keyword, the output is blank.


Note To display more statistics for the specified VLAN, use the show interface vlan counters and show vlan counters commands.

To display more information about private VLANs, see the show interface private-vlan commands.


This command does not require a license.

Examples

This example shows how to display information about the specified VLAN. This command displays statistical information gathered on the VLAN at 1-minute intervals:


switch# show interface vlan 5
Vlan5 is administratively down, line protocol is down
  Hardware is EtherSVI, address is  0000.0000.0000
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
   reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive not supported
  ARP type: ARPA
  Last clearing of "show interface" counters 01:21:55
  5 minute input rate 0 bytes/sec, 0 packets/sec
  5 minute output rate 0 bytes/sec, 0 packets/sec
  L3 Switched:
    input: 0 pkts, 0 bytes - output: 0 pkts, 0 bytes
  L3 in Switched:
    ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes
  L3 out Switched:
    ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes

This example shows how to display a brief description for a specified VLAN. This displays shows the secondary VLAN and type, if configured, and the status:

switch# show interface vlan 5 brief

-------------------------------------------------------------------------------
Interface      Secondary VLAN(Type)                    Status     Reason
-------------------------------------------------------------------------------
Vlan5          --                                      down       none

This example shows how to display the description for a specified VLAN:

switch# show interface vlan 100 description

------------------------------------------
Interface    Description
------------------------------------------
Vlan100

This example shows how to display information about the private VLAN mapping, if any, for a specified VLAN:

switch# show interface vlan 200 private-vlan mapping

Interface Secondary VLAN
--------- ----------------------------------------------------------------
vlan200   201  202

This example shows how to display the status for a specified VLAN:

switch# show interface vlan 5 status

------------------------------------------
Interface          Status         Protocol
------------------------------------------
Vlan5              admin down         shut

Related Commands

Command
Description

show interface switchport

Displays information about the switchports, including those configured for private VLANs,

show interface vlan counters

Displays the statistics for VLANs.


show vlan

Displays summary information for all VLANs.

show vlan private-vlan

Displays summary information for all private VLANs.


show interface vlan counters

To display the statistics for a specified VLAN, use the show interface vlan counters command.

show interface vlan {vlan-id} counters [detailed [all] | snmp]

Syntax Description

vlan-id

VLAN or range of VLANs for which you want to display statistics. The range is from 1 to 4096.

all

(Optional) Displays all the detailed information for the particular VLAN, including statistics per byte.

snmp

(Optional) Displays the MIB values.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You can use this command to display information about the received octets, unicast packets, multicast packets, and broadcast packets as well as the transmitted octets, unicast packets, multicast packets, and broadcast packets for all VLANs, including private VLANs.

This command does not require a license.

Examples

This example shows how to display the statistics for a specified VLAN:

switch# show interface vlan 9 counters

--------------------------------------------------------------------------------
Port              InOctets   InUcastPkts   InMcastPkts   InBcastPkts
--------------------------------------------------------------------------------
Vlan9                    0             0             0            --

--------------------------------------------------------------------------------
Port             OutOctets  OutUcastPkts  OutMcastPkts  OutBcastPkts
--------------------------------------------------------------------------------
Vlan9                    0             0             0            --

This example shows how to display only the nonzero counters for a specified VLAN:

switch# show interface vlan 2 counters detailed

Vlan2
  counters:
  l3_average_input_bits                        9947168160
  l3_average_input_packets                       20723267
  l3_routed_bytes_in                          39054410460
  l3_routed_pkts_in                             650906841
  l3_ucast_bytes_in                           39054410460
  l3_ucast_pkts_in                              650906841

This example shows how to display all detailed statistics for a specified VLAN:

switch(config)# show interface vlan 9 counters detailed all
Vlan9
  counters:
   0.             l3_ipv4_ucast_bytes_in = 0
   1.              l3_ipv4_ucast_pkts_in = 0
   2.             l3_ipv4_mcast_bytes_in = 0
   3.              l3_ipv4_mcast_pkts_in = 0
   4.             l3_ipv6_ucast_bytes_in = 0
   5.              l3_ipv6_ucast_pkts_in = 0
   6.             l3_ipv6_mcast_bytes_in = 0
   7.              l3_ipv6_mcast_pkts_in = 0
   8.            l3_ipv4_ucast_bytes_out = 0
   9.             l3_ipv4_ucast_pkts_out = 0
  10.            l3_ipv4_mcast_bytes_out = 0
  11.             l3_ipv4_mcast_pkts_out = 0
  12.            l3_ipv6_ucast_bytes_out = 0
  13.             l3_ipv6_ucast_pkts_out = 0
  14.            l3_ipv6_mcast_bytes_out = 0
  15.             l3_ipv6_mcast_pkts_out = 0
  16.             l3_average_input_bytes = 0
  17.           l3_average_input_packets = 0
  18.            l3_average_output_bytes = 0
  19.          l3_average_output_packets = 0
  20.                 l3_routed_bytes_in = 0
  21.                  l3_routed_pkts_in = 0
  22.                  l3_ucast_bytes_in = 0
  23.                   l3_ucast_pkts_in = 0
  24.                  l3_mcast_bytes_in = 0
  25.                   l3_mcast_pkts_in = 0
  26.                l3_routed_bytes_out = 0
  27.                 l3_routed_pkts_out = 0
  28.                 l3_ucast_bytes_out = 0
  29.                  l3_ucast_pkts_out = 0
  30.                 l3_mcast_bytes_out = 0
  31.                  l3_mcast_pkts_out = 0

This example shows how to display the MIB values for a specified VLAN:

switch(config)# show interface vlan 9 counters snmp

-------------------------------------------------------------------------------
Port              InOctets   InUcastPkts   InMcastPkts   InBcastPkts
-------------------------------------------------------------------------------
Vlan9                    0             0             0            --

-------------------------------------------------------------------------------
Port             OutOctets  OutUcastPkts  OutMcastPkts  OutBcastPkts
-------------------------------------------------------------------------------
Vlan9                    0             0             0            --
Ethernet2/28               0000.0000.0000  0019.076c.4dc7
Ethernet2/29               0000.0000.0000  0019.076c.4dc8
Ethernet2/30               0000.0000.0000  0019.076c.4dc9

Related Commands

Command
Description

clear counters

Clears counters on the interfaces.


show mac address-table

To display the information about the MAC address table, use the show mac address-table command.

show mac address-table [num] [dynamic | static] [address mac-address | interface {type slot/port | port-channel number} | vlan vlan-id]

Syntax Description

num

(Optional) MAC address table for a specified module.

Note When you use this argument, the system displays all the entries on that module as specified by any of the following optional arguments. When you do not use this argument, the system displays only the primary entries on all modules.

dynamic

(Optional) Displays information about the dynamic MAC address table entries only.

static

(Optional) Displays information about the static MAC address table entries only.

address mac-address

(Optional) Displays information about the MAC address table for a specific MAC address.

interface {type slot/port | port-channel number}]

(Optional) Specifies the interface. Use either the type of interface, the slot number, and the port number, or the port-channel number.

static

(Optional) Displays information about the static MAC address table entries only.

vlan vlan-id

(Optional) Displays information for a specific VLAN only; the range of valid values is from 1 to 4094.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

A primary entry is a MAC address learned on that interface.


Note Use the show mac address-table command without the num argument to display only the primary entries on all modules. When you use the num argument, the device displays all the entries on that module as specified by additional optional arguments.


The device maintains static MAC address entries saved in the startup-config file across reboots and flushes the dynamic entries.

The MAC address table for each virtual device context (VDC) is separate and distinct.


Note To display the MAC address for the VDC, use the show vdc command.


This command does not require a license.

Examples


Note In the following examples, NTFY means notify.


This example shows how to display the information about the entries for the Layer 2 MAC address table:

switch# show mac address-table
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC
        age - seconds since last seen
   VLAN     MAC Address      Type      age     Secure  NTFY   Ports
---------+-----------------+--------+---------+------+------+----------------
G     -    0018.bad8.3fbd    static       -     False  False sup-eth1(R)
* 3        1234.dd56.ee89    static       -     False  False Eth2/1

NTFY means notify.

This example shows how to display the information about the entries for the Layer 2 MAC address table for a specific module:

switch# show mac address-table 2
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC
        age - seconds since last seen
   VLAN     MAC Address      Type      age     Secure  NTFY   Ports
---------+-----------------+--------+---------+------+------+----------------
G     -    0018.bad8.3fbd    static       -     False  False sup-eth1(R)
* 3        1234.dd56.ee89    static       -     False  False Eth2/1
3          0000.23bd.4fda    dynamic     70     False  False Eth1/1

This example shows how to display the information about the entries for the Layer 2 MAC address table for a specific MAC address:

switch# show mac address-table address 0018.bad8.3fbd
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC
        age - seconds since last seen
   VLAN     MAC Address      Type      age     Secure  NTFY   Ports
---------+-----------------+--------+---------+------+------+----------------
G     -    0018.bad8.3fbd    static       -     False  False sup-eth1(R)

This example shows how to display the information about the dynamic entries for the Layer 2 MAC address table:

switch# show mac address-table dynamic
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC
        age - seconds since last seen
   VLAN     MAC Address      Type      age     Secure  NTFY   Ports
---------+-----------------+--------+---------+------+------+---------------- 
* 3        0010.fcbc.3fbd    dynamic    1265    False  False Eth2/12
* 3        1234.dd56.ee89    dynamic    850     False  False Eth2/1

This example shows how to display the information about the Layer 2 MAC address table for a specific interface:

switch# show mac address-table interface ethernet 2/13
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC
        age - seconds since last seen
   VLAN     MAC Address      Type      age     Secure  NTFY   Ports
---------+-----------------+--------+---------+------+------+----------------
* 1       1234.dd56.ee89    dynamic    0       False  False Eth2/13


This example shows how to display the static entries in the Layer 2 MAC address table:

switch# show mac address-table static
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC
        age - seconds since last seen
   VLAN     MAC Address      Type      age     Secure  NTFY   Ports
---------+-----------------+--------+---------+------+------+----------------
G     -    0018.bad8.3fbd    static       -     False  False sup-eth1(R)
* 3        1234.dd56.ee89    static       -     False  False Eth2/1

This example shows how to display the entries in the Layer 2 MAC address table for a specific VLAN:

switch# show mac address-table vlan 3
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC
        age - seconds since last seen
   VLAN     MAC Address      Type      age     Secure  NTFY   Ports
---------+-----------------+--------+---------+------+------+----------------
* 3        1234.dd56.ee89    static       -     False  False Eth2/1

Related Commands

Command
Description

mac address-table static

Adds static entries to the MAC address table or configures a static MAC address with IGMP snooping disabled for that address.


show mac address-table aging-time

To display information about the timeout values for the MAC address table, use the show mac-address-table aging-time command.

show mac address-table aging-time [vlan vlan-id]

Syntax Description

vlan vlan-id

(Optional) Displays information for a specific VLAN only; the range of valid values is from 1 to 4094.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You can configure the MAC address aging time per VLAN or for the entire device. The valid range is from 120 to 918000, Entering 0 disables MAC aging time.

This command does not require a license.

Examples

This example shows how to display MAC address aging times:

switch# show mac address-table aging-time
Vlan    Aging Time
----    ----------
1       1800
50      1200
100     1800 

Related Commands

Command
Description

mac address-table aging-time

Configures the aging time for entries in the Layer 2 table.


show running-config spanning-tree

To display the running configuration for the Spanning Tree Protocol (STP), use the show running-config spanning-tree command.

show running-config spanning-tree [all]

Syntax Description

all

(Optional) Displays current STP operating information including the default settings.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command provides information about the Spanning Tree Protocol.


Note The display output differs slightly depending on whether you are running Rapid Per VLAN Spanning Tree (Rapid PVST+) or Multiple Spanning Tree (MST).


This command does not require a license.

Examples

This example shows how to display information about the running STP configuration when you are running MST:

switch# show running-config spanning-tree
spanning-tree mode mst

This example shows how to display detailed information about the running STP configuration when you are running MST:

switch# show running-config spanning-tree all

spanning-tree mode mst
no spanning-tree port type edge default
no spanning-tree port type network default
spanning-tree bridge assurance
no spanning-tree loopguard default
spanning-tree mst simulate pvst global
no snmp-server enable traps bridge topologychange
no snmp-server enable traps bridge newroot
no snmp-server enable traps stpx inconsistency
no snmp-server enable traps stpx loop-inconsistency
no snmp-server enable traps stpx root-inconsistency
spanning-tree mst hello-time 2
spanning-tree mst forward-time 15
spanning-tree mst max-age 20
spanning-tree mst max-hops 20
spanning-tree mst 0 priority 32768
spanning-tree mst configuration
  name
  revision 0
  instance 0 vlan 1-4094
configure interface Ethernet8/1
  spanning-tree port-priority 128

Related Commands

Command
Description

show spanning-tree

Displays information about STP.


show running-config vlan

To display the running configuration for a specified VLAN, use the show running-config vlan command.

show running-config vlan {vlan-id}

Syntax Description

vlan-id

Number of VLAN or range of VLANs. Valid numbers range from 1 to 4096.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command provides information about the specified VLAN, including private VLANs.

The display varies with your configuration. If you configure the name, shutdown status, or suspended status, these are also displayed.

This command does not require a license.

Examples

This example shows how to display the running configuration for VLAN50:

switch(config)# show running-config vlan 50
version 4.0(1)
vlan 50

Related Commands

Command
Description

show vlan

Displays information about all the VLANs on the device.


show spanning-tree

To display information about the Spanning Tree Protocol (STP), use the show spanning-tree command.

show spanning-tree [blockedports | inconsistentports | pathcost method]

Syntax Description

blockedports

(Optional) Displays the alternate ports blocked by STP.

inconsistentports

(Optional) Displays the ports that are in an inconsistent STP state.

pathcost method

(Optional) Displays whether the short or long path-cost method is used,

Note Differs for Rapid Per VLAN Spanning Tree (Rapid PVST+) and Multiple Spanning Tree (MST):
- With Rapid PVST+, this value is configurable and the default is short.
- With MST, this value is nonconfigurable and the operational value is always long.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

The STP port type displays only when you have configured the port as either an STP edge port or an STP network port. If you have not configured the STP port type, no port type displays.


Note The display output differs slightly depending on whether you are running Rapid PVST+ or MST.


This command does not require a license.

Examples

This example shows how to display STP when you are running Rapid PVST+:

switch# show spanning-tree

VLAN0001
  Spanning tree enabled protocol rstp
  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         Role Sts Cost       Prio.Nbr   Type
---------------- ----- --- ---------  --------   ------------------------------------
Eth2/1            Altn  BKN 4         128.257    Network, P2p
Eth2/2            Desg  FWD 4         128.270    P2p

This example shows how to display STP information when you are running MST:

switch# show spanning-tree

MST0000
  Spanning tree enabled protocol mstp
  Root ID    Priority    32768
             Address     0018.bad8.fc150
             Cost        0
             Port         258 (Ethernet 2/2)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768 (priority 32768 sys-id-ext 0)
             Address     0018.bad8.239d
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

Interface         Role Sts Cost       Prio.Nbr   Type
---------------- ----- --- ---------  --------   ------------------------------------
Eth2/1            Altn  BKN 20000     128.257    Network, P2p   BA_Inc.
Eth2/2            Root  FWD 20000     128.258    Edge, P2p
Eth3/48           Desg  FWD 20000     128.43228  P2p

This example shows how to display the blocked ports in spanning tree:

switch(config)# show spanning-tree blockedports

Name                 Blocked Interfaces List
-------------------- ------------------------------------
VLAN0001             Eth8/2
VLAN0002             Eth8/2
VLAN0003             Eth8/2
VLAN0004             Eth8/2
VLAN0005             Eth8/2
VLAN0006             Eth8/2
VLAN0007             Eth8/2
VLAN0008             Eth8/2
VLAN0009             Eth8/2
VLAN0010             Eth8/2

This example shows how to determine if any ports are in any STP-inconsistent state:

switch#  show spanning-tree inconsistentports 

Name                 Interface              Inconsistency
-------------------- ---------------------- ------------------
MST0000              Eth8/1                 Bridge Assurance Inconsistent
MST0000              Eth8/2                 Bridge Assurance Inconsistent

This example shows how to display the path-cost method when you are running Rapid PVST+:

switch(config)# show spanning-tree pathcost method

Spanning tree default pathcost method used is short

This example shows how to display the path-cost method when you are running MST:

switch(config)# show spanning-tree pathcost method

Spanning tree default pathcost method used is short (Operational value is long)

Table 1-1 describes the fields that are shown in the examples.

Table 1-1 show spanning-tree Command Output Options

Field
Definition and Options

Role

Current port STP role. Valid values are as follows:

Desg (designated)

Root

Altn (alternate)

Back (backup)

Sts

Current port STP state. Valid values are as follows:

BLK (blocking)

DIS (disabled)

LRN (learning)

FWD (forwarding)

Type

Status information; valid values are as follows:

P2p/Shr—The interface is considered as a point-to-point (resp. shared) interface by the spanning tree.

Edge—The port is configured as an STP edge port (either globally using the default command or directly on the interface) and no BPDU has been received.

Network—The port is configured as an STP network port (either globally using the default command or directly on the interface).

*ROOT_Inc, *LOOP_Inc, *PVID_Inc, *BA_Inc, and *TYPE_Inc—The port is in a broken state (BKN*) for an inconsistency. The port would be Root inconsistent, Loopguard inconsistent, PVID inconsistent, Bridge Assurance inconsistent, or Type inconsistent.


Related Commands

Command
Description

show spanning-tree mst

Displays information about the MST STP.

show spanning-tree active

Displays information about the STP active interfaces only.

show spanning-tree bridge

Displays the bridge ID, timers, and protocol for the local bridge on the device.

show spanning-tree brief

Displays a brief summary of STP information.

show spanning-tree detail

Displays detailed information about STP.

show spanning-tree interface

Displays the STP interface status and configuration of specified interfaces.

show spanning-tree root

Displays the status and configuration of the root bridge for the STP instance to which this device belongs.

show spanning-tree summary

Displays summary information about STP.

show spanning-tree vlan

Displays STP information about specified VLANs.


show spanning-tree active

To display Spanning Tree Protocol (STP) information on STP-active interfaces only, use the show spanning-tree active command.

show spanning-tree active [brief | detail]

Syntax Description

brief

(Optional) Displays a brief summary of STP interface information.

detail

(Optional) Displays a detailed summary of STP interface information.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to display STP information on the STP active interfaces:


switch# show spanning-tree active

MST0000
  Spanning tree enabled protocol mstp
  Root ID    Priority    32768
             Address     0018.bad7.fc15
             This bridge is the root
             Hello Time  2  sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768  (priority 32768 sys-id-ext 0)
             Address     0018.bad7.fc15
             Hello Time  2  sec  Max Age 20 sec  Forward Delay 15 sec

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Eth8/1           Desg FWD 20000     128.1025 P2p
Eth8/2           Desg FWD 20000     128.1026 P2p

Related Commands

Command
Description

show spanning-tree mst

Displays information about the MST STP.

show spanning-tree

Displays information about STP.

show spanning-tree bridge

Displays the bridge ID, timers, and protocol for the local bridge on the device.

show spanning-tree brief

Displays a brief summary of STP information.

show spanning-tree detail

Displays detailed information about STP.

show spanning-tree interface

Displays the STP interface status and configuration about specified interfaces.

show spanning-tree root

Displays the status and configuration of the root bridge for the STP instance to which this device belongs.

show spanning-tree summary

Displays summary information about STP.

show spanning-tree vlan

Displays STP information about specified VLANs.


show spanning-tree bridge

To display the status and configuration of the Spanning-Tree Protocol (STP) local bridge, use the show spanning-tree bridge command.

show spanning-tree bridge [address | brief | detail | forward-time | hello-time | id | max-age | priority [system-id] | protocol]

Syntax Description

address

(Optional) Displays the MAC address for the STP local bridge.

brief

(Optional) Displays a brief summary of the status and configuration for the STP bridge.

detail

(Optional) Displays a detailed summary of the status and configuration for the STP bridge.

forward-time

(Optional) Displays the STP forward delay interval for the bridge.

hello-time

(Optional) Displays the STP hello time for the bridge.

id

(Optional) Displays the STP bridge identifier for the bridge.

max-age

(Optional) Displays the STP maximum-aging time for the bridge.

priority

(Optional) Displays the bridge priority for this bridge.

system-id

(Optional) Displays the bridge priority with the system ID extension for this bridge.

protocol

(Optional) Displays which STP protocol is active, Rapid Per VLAN Spanning Tree (Rapid PVST+) or Multiple Spanning Tree (MST) on the device.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to display STP information for the bridge:

switch(config)# show spanning-tree bridge

                                                   Hello  Max  Fwd
MST Instance                 Bridge ID              Time  Age  Dly  Protocol
---------------- --------------------------------- -----  ---  ---  --------
MST0000             32768 (32768,0) 0018.bad7.fc15    2    20   15  mstp

Related Commands

Command
Description

show spanning-tree mst

Displays information about the MST STP.

show spanning-tree

Displays information about STP.

show spanning-tree active

Displays information about the STP active interfaces only.

show spanning-tree brief

Displays a brief summary of STP information.

show spanning-tree detail

Displays detailed information about STP.

show spanning-tree interface

Displays the STP interface status and configuration of specified interfaces.

show spanning-tree root

Displays the status and configuration of the root bridge for the STP instance to which this device belongs.

show spanning-tree summary

Displays summary information about STP.

show spanning-tree vlan

Displays STP information about specified VLANs.


show spanning-tree brief

To display a brief summary of the Spanning Tree Protocol (STP) status and configuration on the device, use the show spanning-tree brief command.

show spanning-tree brief [active]

Syntax Description

active

(Optional) Displays information about the STP active interfaces only.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to display a brief summary of STP information:

switch(config)# show spanning-tree brief

MST0000
  Spanning tree enabled protocol mstp
  Root ID    Priority    32768
             Address     0018.bad7.fc15
             This bridge is the root
             Hello Time  2  sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768  (priority 32768 sys-id-ext 0)
             Address     0018.bad7.fc15
             Hello Time  2  sec  Max Age 20 sec  Forward Delay 15 sec

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Eth8/1           Desg FWD 20000     128.1025 P2p
Eth8/2           Desg FWD 20000     128.1026 P2p

Related Commands

Command
Description

show spanning-tree mst

Displays information about the MST STP.

show spanning-tree

Displays information about STP.

show spanning-tree active

Displays information about the STP active interfaces only.

show spanning-tree bridge

Displays the bridge ID, timers, and protocol for the local bridge on the device.

show spanning-tree detail

Displays detailed information about STP.

show spanning-tree interface

Displays the STP interface status and configuration of specified interfaces.

show spanning-tree root

Displays the status and configuration of the root bridge for the STP instance to which this device belongs.

show spanning-tree summary

Displays summary information about STP.

show spanning-tree vlan

Displays STP information about specified VLANs.


show spanning-tree detail

To display detailed information on the Spanning Tree Protocol (STP) status and configuration on the device, use the show spanning-tree detail command.

show spanning-tree detail [active]

Syntax Description

active

(Optional) Displays information about the STP active interfaces only.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to display detailed information about the STP configuration:

switch(config)# show spanning-tree detail

MST0000 is executing the mstp compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, sysid 0, address 0018.bad7.fc15
  Configured hello time 2, max age 20, forward delay 15
  We are the root of the spanning tree
  Topology change flag not set, detected flag not set
  Number of topology changes 3 last change occurred 0:19:16 ago
          from Ethernet8/1
  Times:  hold 1, topology change 35, notification 2
          hello 2, max age 20, forward delay 15
  Timers: hello 0, topology change 0, notification 0

 Port 1025 (Ethernet8/1) of MST0000 is designated forwarding
   Port path cost 20000, Port priority 128, Port Identifier 128.1025
   Designated root has priority 32768, address 0018.bad7.fc15
   Designated bridge has priority 32768, address 0018.bad7.fc15
   Designated port id is 128.1025, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is point-to-point by default, Internal
   PVST Simulation is enabled by default
   BPDU: sent 581, received 3

 Port 1026 (Ethernet8/2) of MST0000 is designated forwarding
   Port path cost 20000, Port priority 128, Port Identifier 128.1026
   Designated root has priority 32768, address 0018.bad7.fc15
   Designated bridge has priority 32768, address 0018.bad7.fc15
   Designated port id is 128.1026, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is point-to-point by default, Internal
   PVST Simulation is enabled by default
   BPDU: sent 582, received 2

Related Commands

Command
Description

show spanning-tree mst

Displays information about the MST STP.

show spanning-tree

Displays information about STP.

show spanning-tree active

Displays information about the STP active interfaces only.

show spanning-tree bridge

Displays the bridge ID, timers, and protocol for the local bridge on the device.

show spanning-tree brief

Displays brief summary information about STP.

show spanning-tree interface

Displays the STP interface status and configuration about specified interfaces.

show spanning-tree root

Displays the status and configuration of the root bridge for the STP instance to which this device belongs.

show spanning-tree summary

Displays summary information about STP.

show spanning-tree vlan

Displays STP information about specified VLANs.


show spanning-tree interface

To display information about the Spanning Tree Protocol (STP) interface status and configuration of specified interfaces, use the show spanning-tree interface command.

show spanning-tree interface {ethernet {slot/port} | port-channel {channel-number}} [active [brief | detail] | brief [active] | cost | detail [active] | edge | inconsistency | priority | rootcost | state]

Syntax Description

ethernet {slot/port} | port-channel {channel-number}

Enters the interface that you want to display.

active

(Optional) Displays information about the STP active interfaces only on the specified interfaces.

brief

(Optional) Displays a brief summary about the specified STP interfaces.

detail

(Optional) Displays detailed information about the specified STP interfaces.

cost

(Optional) Displays the STP path cost for the specified interfaces.

edge

(Optional) Displays the STP-type edge port information for the specified interfaces.

inconsistency

(Optional) Displays the port STP inconsistency state for the specified interfaces.

priority

(Optional) Displays the STP port priority for the specified interfaces.

rootcost

(Optional) Displays the path cost to the root for specified interfaces.

Sts

Current port STP state. Valid values are as follows:

BLK (blocking)

DIS (disabled)

LRN (learning)

FWD (forwarding)


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

The STP port type displays only when you have configured the port as either an STP edge port or an STP network port. If you have not configured the STP port type, no port type displays.

If you specify an interface that is not running STP, the device returns an error message.

When you are running MST, this command displays the PVST simulation setting.


Note If you are running MST, use the show spanning-tree mst command to show more detail on the specified interfaces.


This command does not require a license.

Examples

This example shows how to display STP information about a specified interface when you are running Rapid PVST+:

switch(config)# show spanning-tree interface ethernet 8/2

Vlan             Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
VLAN0001         Altn BLK 20000     128.1025 P2p

VLAN0002         Desg FWD 20000     128.1025 P2p

This example shows how to display STP information about a specified interface when you are running MST:

switch(config)# show spanning-tree interface ethernet 2/50

Mst Instance     Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
MST0000          Desg FWD 20000     128.1281 P2p

This example shows how to display detailed STP information about a specified interface when you are running Rapid PVST+:

switch(config)# show spanning-tree interface ethernet 8/1 detail

Port 1025 (Ethernet8/1) of VLAN0001 is alternate blocking
   Port path cost 20000, Port priority 128, Port Identifier 128.1025
   Designated root has priority 28672, address 0018.bad8.239d
   Designated bridge has priority 28672, address 0018.bad8.239d
   Designated port id is 128.1281, designated path cost 0
   Timers: message age 15, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is point-to-point by default
   The port type is network by default.
   BPDU: sent 4657, received 188

 Port 1025 (Ethernet8/1) of VLAN0002 is designated forwarding
   Port path cost 20000, Port priority 128, Port Identifier 128.1025
   Designated root has priority 32770, address 0018.bad7.fc15
   Designated bridge has priority 32770, address 0018.bad7.fc15
   Designated port id is 128.1025, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is point-to-point by default 
   The port type is network by default.
   BPDU: sent 4838, received 0

This example shows how to display detailed STP information about a specified interface when you are running MST:

switch(config)# show spanning-tree interface ethernet 10/1 detail

Port 1281 (Ethernet10/1) of MST0000 is designated forwarding
   Port path cost 20000, Port priority 128, Port Identifier 128.1281
   Designated root has priority 28672, address 0018.bad8.239d
   Designated bridge has priority 28672, address 0018.bad8.239d
   Designated port id is 128.1281, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is point-to-point by default, Internal
   PVST Simulation is enabled by default
   BPDU: sent 290, received 0

Related Commands

Command
Description

show spanning-tree mst

Displays information about the MST STP.

show spanning-tree

Displays information about STP.

show spanning-tree active

Displays information about the STP active interfaces only.

show spanning-tree bridge

Displays the bridge ID, timers, and protocol for the local bridge on the device.

show spanning-tree brief

Displays brief summary information about STP.

show spanning-tree detail

Displays detailed information about STP.

show spanning-tree root

Displays the status and configuration of the root bridge for the STP instance to which this device belongs.

show spanning-tree summary

Displays summary information about STP.

show spanning-tree vlan

Displays STP information about specified VLANs.


show spanning-tree mst

To display information on MST status and configuration, use the show spanning-tree mst command.

show spanning-tree mst [instance-id [detail | interface {ethernet {slot/port} | port-channel {channel-number}} [detail]]] | [configuration [digest]] | [detail] | [interface {ethernet {slot/port} | port-channel {channel-number}} [detail]]

instance-id

(Optional) MST instance that you want to display.

detail

(Optional) Displays detailed MST information.

ethernet [slot/port] | port-channel [channel-number]

Enter the interface or range of interfaces that you want to display.

configuration

(Optional) Displays current MST regional information. Displays VLAN-to-instance mapping of all VLANs.

digest

(Optional) Displays information about the MD5 digest.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

If you are not running in Spanning Tree Protocol (STP) Multiple Spanning Tree (MST) mode, but are running in STP Rapid Per VLAN Spanning Tree (Rapid PVST+) mode, when you enter this command, the device returns the following message:

ERROR: Switch is not in mst mode

See Table 1-1 for information on valid values for fields.

This command does not require a license.

Examples

This example shows how to display STP information about MST instance information for the VLAN ports that are currently active:

switch# show spanning-tree mst

##### MST0    vlans mapped:   1-4094
Bridge        address 0018.bad7.fc15  priority      32768 (32768 sysid 0)
Root          this switch for the CIST
Regional Root this switch
Operational   hello time 2 , forward delay 15, max age 20, txholdcount 6
Configured    hello time 2 , forward delay 15, max age 20, max hops    20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Eth8/1           Desg FWD 20000     128.1025 P2p
Eth8/2           Desg FWD 20000     128.1026 P2p

This example shows how to display STP information about a specific MST instance:

switch)# show spanning-tree mst 0

##### MST0    vlans mapped:   1-4094
Bridge        address 0018.bad7.fc15  priority      32768 (32768 sysid 0)
Root          this switch for the CIST
Regional Root this switch
Operational   hello time 2 , forward delay 15, max age 20, txholdcount 6
Configured    hello time 2 , forward delay 15, max age 20, max hops    20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Eth8/1           Desg FWD 20000     128.1025 P2p
Eth8/2           Desg FWD 20000     128.1026 P2p

This example shows how to display detailed STP information about the MST protocol:

switch)# show spanning-tree mst detail

##### MST0    vlans mapped:   1-4094
Bridge        address 0018.bad7.fc15  priority      32768 (32768 sysid 0)
Root          this switch for the CIST
Regional Root this switch
Operational   hello time 2 , forward delay 15, max age 20, txholdcount 6
Configured    hello time 2 , forward delay 15, max age 20, max hops    20


Eth8/1 of MST0 is designated forwarding
Port info             port id       128.1025  priority    128  cost   20000
Designated root       address 0018.bad7.fc15  priority  32768  cost   0
Design. regional root address 0018.bad7.fc15  priority  32768  cost   0
Designated bridge     address 0018.bad7.fc15  priority  32768  port id 128.1025
Timers: message expires in 0 sec, forward delay 0, forward transitions 1
Bpdus sent 1379, received 3

Eth8/2 of MST0 is designated forwarding
Port info             port id       128.1026  priority    128  cost   20000
Designated root       address 0018.bad7.fc15  priority  32768  cost   0
Design. regional root address 0018.bad7.fc15  priority  32768  cost   0
Designated bridge     address 0018.bad7.fc15  priority  32768  port id 128.1026
Timers: message expires in 0 sec, forward delay 0, forward transitions 1
Bpdus sent 1380, received 2


This example shows how to display STP information about specified MST interfaces:

switch)# show spanning-tree mst interface ethernet 8/2

Eth8/2 of MST0 is designated forwarding
Port Type: normal         (default)           port guard : none        (default)
Link type: point-to-point (auto)              bpdu filter: disable     (default)
Boundary : internal                           bpdu guard : disable     (default)
Bpdus sent 1423, received 2

Instance Role Sts Cost      Prio.Nbr Vlans mapped
-------- ---- --- --------- -------- -------------------------------
0        Desg FWD 20000     128.1026 1-4094

This example shows how to display information about the MST configuration:

switch)# show spanning-tree mst configuration

Name:       [mst-bldg-sj6/3]
Revision:   1       Instances Configured: 3
Instance    Vlans mapped
---------   --------------------------------------------------
0	       1
2000	       2-2000
4094       2001-4094
----------------------------------------------------------------  

This example shows how to display the MD5 digest included in the current MST configuration:

switch)# show spanning-tree mst configuration digest

Name      [mst-config]
Revision  10    Instances configured 25
Digest          0x40D5ECA178C657835C83BBCB16723192
Pre-std Digest  0x27BF112A75B72781ED928D9EC5BB4251

Related Commands

Command
Description

show spanning-tree

Displays information about STP.

show spanning-tree active

Displays information about the STP active interfaces only.

show spanning-tree bridge

Displays the bridge ID, timers, and protocol for the local bridge on the device.

show spanning-tree brief

Displays brief summary information about STP.

show spanning-tree detail

Displays detailed information about STP.

show spanning-tree interface

Displays the STP interface status and configuration of specified interfaces.

show spanning-tree root

Displays the status and configuration of the root bridge for the STP instance to which this device belongs.

show spanning-tree summary

Displays summary information about STP.

show spanning-tree vlan

Displays STP information about specified VLANs.


show spanning-tree root

To display the status and configuration of the Spanning Tree Protocol (STP) root bridge, use the show spanning-tree root command.

show spanning-tree root [address | brief | cost | detail | forward-time | hello-time | id | max-age | port | priority [system-id]]

Syntax Description

address

(Optional) Displays the MAC address for the STP root bridge.

brief

(Optional) Displays a brief summary of the status and configuration for the the root bridge.

cost

(Optional) Displays the path cost from the root to this bridge.

detail

(Optional) Displays detailed information about the status and configuration for the root bridge.

forward-time

(Optional) Displays the STP forward delay interval for the root bridge.

hello-time

(Optional) Displays the STP hello time for the root bridge.

id

(Optional) Displays the STP bridge identifier for the root bridge.

max-age

(Optional) Displays the STP maximum-aging time for the root bridge.

port

(Optional) Displays which port is the root port.

priority

(Optional) Displays the bridge priority for the root bridge.

system-id

(Optional) Displays the bridge identifier with the system ID extension for the root bridge.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to display information for the root bridge:

switch(config)# show spanning-tree root

MST Instance           Root ID          Cost  Time Age Dly  Root Port
---------------- -------------------- ------ ----- --- ---  ----------------
MST0000          32768 0018.bad7.fc15       0    2   20  15  This bridge is root

Related Commands

Command
Description

show spanning-tree mst

Displays information about the MST STP.

show spanning-tree

Displays information about STP.

show spanning-tree active

Displays information about the STP active interfaces only.

show spanning-tree bridge

Displays the bridge ID, timers, and protocol for the local bridge on the device.

show spanning-tree brief

Displays a brief summary about STP information.

show spanning-tree detail

Displays detailed information about STP.

show spanning-tree interface

Displays the STP interface status and configuration of specified interfaces.

show spanning-tree summary

Displays summary information about STP.

show spanning-tree vlan

Displays STP information about specified VLANs.


show spanning-tree summary

To display summary Spanning Tree Protocol (STP) information on the device, use the show spanning-tree summary command.

show spanning-tree summary [totals]

Syntax Description

totals

(Optional) Displays totals only of STP information.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

The display output for this command differs when you are running Rapid Per VLAN Spanning Tree (Rapid PVST+) or Multiple Spanning Tree (MST).

This command does not require a license.

Examples

This example shows how to display a summary of STP information about the device when you are running Rapid PVST+:

switch(config)# show spanning-tree summary

Switch is in rapid-pvst mode
Root bridge for: VLAN0002
Port Type Default                        is disable
Edge Port [PortFast] BPDU Guard Default  is disabled
Edge Port [PortFast] BPDU Filter Default is disabled
Bridge Assurance                         is enabled
Loopguard Default                        is disabled
Pathcost method used                     is short

Name                   Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001                    41         0        0          1         42
VLAN0002                     0         0        0         42         42
---------------------- -------- --------- -------- ---------- ----------
2 vlans                     41         0        0         43         84

This example shows how to display a summary of STP information about the device when you are running MST:

switch(config)# show spanning-tree summary

Switch is in mst mode (IEEE Standard)
Root bridge for: MST0000
Port Type Default                        is disable
Edge Port [PortFast] BPDU Guard Default  is disabled
Edge Port [PortFast] BPDU Filter Default is disabled
Bridge Assurance                         is enabled
Loopguard Default                        is disabled
Pathcost method used                     is long
PVST Simulation                          is enabled

Name                   Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
MST0000                      0         0        0          2          2
---------------------- -------- --------- -------- ---------- ----------
1 mst                        0         0        0          2          2

Related Commands

Command
Description

show spanning-tree mst

Displays information about the MST STP.

show spanning-tree

Displays information about STP.

show spanning-tree active

Displays information about the STP active interfaces only.

show spanning-tree bridge

Displays the bridge ID, timers, and protocol for the local bridge on the device.

show spanning-tree brief

Displays a brief summary about STP information.

show spanning-tree detail

Displays detailed information about STP.

show spanning-tree interface

Displays the STP interface status and configuration of specified interfaces.

show spanning-tree root

Displays the status and configuration of the root bridge for the STP instance to which this device belongs.

show spanning-tree vlan

Displays STP information about specified VLANs.


show spanning-tree vlan

To display Spanning Tree Protocol (STP) information for specified VLANs, use the show spanning-tree vlan command.

show spanning-tree vlan {vlan-id}
[active [brief | detail]
|
blockedports
| bridge [address] | brief | detail | forward-time | hello-time | id | max-age | priority [system-id] | protocol}
|
brief [active]
|
detail
|
inconsistentports
|
interface {ethernet {slot/port} | port-channel {channel-number}} [active [brief | detail]] | brief [active] | cost | detail [active] | edge | inconsistency | priority | rootcost | state]]
|
root [address | brief | cost | detail | forward-time | hello-time | id | max-age | port | priority [system-id]]
| summary}

Syntax Description

vlan-id

VLAN or range of VLANs that you want to display. The range is from 1 to 4096.

active

(Optional) Displays information on STP VLANs and active ports.

brief

(Optional) Displays a brief summary of STP information for the specified VLANs.

detail

(Optional) Displays detailed STP information for the specified VLANs.

blockedports

(Optional) Displays the STP alternate ports in the blocked state for the specified VLANs.

bridge

(Optional) Displays the status and configuration of the bridge for the specified VLANs.

address

(Optional) Displays the MAC address for the specified STP bridge for the specified VLANs.

forward-time

(Optional) Displays the STP forward delay interval for the bridge for the specified VLANs.

hello-time

(Optional) Displays the STP hello time for the bridge for the specified VLANs.

id

(Optional) Displays the STP bridge identifier for the specified VLANs.

max-age

(Optional) Displays the STP maximum-aging time for the specified VLANs.

priority

(Optional) Displays the STP priority for the specified VLANs.

system-id

(Optional) Displays the bridge identification with the system ID added for the specified VLANs.

protocol

(Optional) Displays which STP protocol is active on the device

inconsistentports

(Optional) Displays the ports that are in an inconsistent STP state for specified VLANs.

ethernet [slot/port] | port-channel [channel-number]

Enter the interface for the specified VLANs that you want to display.

cost

(Optional) Displays the STP path cost for the specified VLANs.

edge

(Optional) Displays the STP-type edge port information for the specified interface for the specified VLANs.

inconsistency

(Optional) Displays the STP port inconsistency state for the specified interface for the specified VLANs.

priority

(Optional) Displays the STP priority for the specified VLANs.

rootcost

(Optional) Displays the path cost to the root for specified interfaces for the specified VLANs.

state

Current port STP state. Valid values are as follows:

BLK (blocking)

DIS (disabled)

LRN (learning)

FWD (forwarding)

port

(Optional) Displays information about the root port for the specified VLANs,

summary

(Optional) Displays summary STP information about the specified VLANs.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to display STP information about VLAN 1:

switch# show spanning-tree vlan 1

MST0000
  Spanning tree enabled protocol mstp
  Root ID    Priority    32768
             Address     0018.bad7.fc15
             This bridge is the root
             Hello Time  2  sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768  (priority 32768 sys-id-ext 0)
             Address     0018.bad7.fc15
             Hello Time  2  sec  Max Age 20 sec  Forward Delay 15 sec

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Eth8/1           Desg FWD 20000     128.1025 P2p
Eth8/2           Desg FWD 20000     128.1026 P2p

Related Commands

Command
Description

show spanning-tree mst

Displays information about the MST STP.

show spanning-tree

Displays information about STP.

show spanning-tree active

Displays information about the STP active interfaces only.

show spanning-tree bridge

Displays the bridge ID, timers, and protocol for the local bridge on the device.

show spanning-tree brief

Displays brief summary information about STP.

show spanning-tree detail

Displays detailed information about STP.

show spanning-tree interface

Displays the STP interface status and configuration of specified interfaces.

show spanning-tree root

Displays the status and configuration of the root bridge for the STP instance to which this device belongs.

show spanning-tree summary

Displays summary information about STP.


show vlan

To display VLAN information, use the show vlan command.

show vlan [all-ports | brief | {name name} | summary]

Syntax Description

all-ports

(Optional) Displays all ports on VLANs.

brief

(Optional) Displays only a single line for each VLAN, naming the VLAN, status, and ports.

name name

(Optional) Displays information about a single VLAN that is identified by the VLAN name; valid values are an ASCII string from 1 to 32 characters.

summary

(Optional) Displays the number of existing VLANs on the device.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command displays information for all VLANs, including private VLANs, on the device.

Each access port can belong to only one VLAN. Trunk ports can be on multiple VLANs.


Note Although a port can be associated with a VLAN as an access VLAN, a native VLAN, or one of the trunk allowed ports, the display under Ports for this commands lists only access VLANs.


If you shut down a VLAN using the state suspend or the state active command, these values appear in the Status field:

suspended—The VLAN is suspended.

active—The VLAN is active.

If you shut down a VLAN using the shutdown command, these values appear in the Status field:

act/lshut—The VLAN status is active but shut down locally.

sus/lshut—The VLAN status is suspended but shut down locally.

If a VLAN is shut down internally, these values appear in the Status field:

act/ishut—The VLAN status is active but shut down internally.

sus/ishut—The VLAN status is suspended but shut down internally.

If a VLAN is shut down locally and internally, the value that is displayed in the Status field is act/ishut or sus/ishut. If a VLAN is shut down locally only, the value that is displayed in the Status field is act/lshut or sus/lshut.

Examples

This example shows how to display information for all VLANs on the device:

switch# show vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth2/5, Eth2/7, Eth2/8, Eth2/9
                                                Eth2/10, Eth2/15, Eth2/47
                                                Eth2/48
5    VLAN0005                         active
6    VLAN0006                         active
7    VLAN0007                         active
8    test                             active
9    VLAN0009                         active
10   VLAN0010                         active
50   VLAN0050                         active    Eth2/6
100  trunked                          active

VLAN Type
---- -----
1    enet
5    enet
6    enet
7    enet
8    enet
9    enet
10   enet
50   enet
100  enet

Remote SPAN VLANs
-------------------------------------------------------------------------------

Primary  Secondary  Type             Ports
-------  ---------  ---------------  -------------------------------------------

This example shows how to display the VLANs and all ports for each VLAN:

switch# show vlan all-ports


VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Po5, Po37, Po50, Eth2/1, Eth2/2
                                                Eth2/3, Eth2/5, Eth2/7, Eth2/8
                                                Eth2/9, Eth2/10, Eth2/15
                                                Eth2/21, Eth2/22, Eth2/23
                                                Eth2/24, Eth2/25, Eth2/26
                                                Eth2/27, Eth2/28, Eth2/46
                                                Eth2/47, Eth2/48
5    VLAN0005                         active
6    VLAN0006                         active
7    VLAN0007                         active
8    test                             active
9    VLAN0009                         active
10   VLAN0010                         active
50   VLAN0050                         active    Eth2/6
100  trunked                          active
200  VLAN0200                         active
201  VLAN0201                         active
202  VLAN0202                         active

This example shows how to display the VLAN name, status, and associated ports only:

switch# show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth2/5, Eth2/7, Eth2/8, Eth2/9
                                                Eth2/10, Eth2/15, Eth2/47
                                                Eth2/48
5    VLAN0005                         active
6    VLAN0006                         active
7    VLAN0007                         active
8    test                             active
9    VLAN0009                         active
10   VLAN0010                         active
50   VLAN0050                         active    Eth2/6
100  trunked                          active.

This example shows how to display the VLAN information for a specific VLAN by name:

switch# show vlan name test

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
8    test                             active

VLAN Type
---- -----
8    enet

Remote SPAN VLAN
----------------
Disabled

Primary  Secondary  Type             Ports
-------  ---------  ---------------  -------------------------------------------100 

This example shows how to display information about the number of VLANs configured on the device:


switch# show vlan summary

Number of existing VLANs           : 9
 Number of existing user VLANs     : 9
 Number of existing extended VLANs : 0

Related Commands

Command
Description

show interface switchport

Displays information about the switch ports, including those switch ports in private VLANs,

show vlan private-vlan

Displays private VLAN information.


show vlan counters

To display statistic for a specified VLAN or for all VLANs, use the show vlan counters command.

show vlan [id {vlan-id}] counters

Syntax Description

id

(Optional) VLAN ID you want to clear. Valid values are from 1 to 4096.

vlan-id

VLAN that you want to clear.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command displays the counters for all the VLANs, including the private VLANs, on the device.

If you omit the VLAN ID, the system displays statistics for all the VLANs on the device. This command displays:

Transmitted and received unicast, multicast, and routed packets and octets

Information about Layer 2, IPv4, and IPv6 unicast, multicast, and unknown packets and octets

Separate VLAN ranges with a hyphen, and separate VLANs with a comma and no spaces in between. For example, you can enter the following:

switch# show vlan id 1-4,3,7,5-20

This command does not require a license.

Examples

This example shows how to display statistics for VLAN 9:

switch(config)# show vlan id 9 counters

Vlan Id                             :10 
L2 IPv4 Unicast Octets              :0 
L2 IPv4 Unicast Packets             :0 
L2 IPv4 Multicast Octets            :0 
L2 IPv4 Multicast Packets           :0 
L2 IPv6 Unicast Octets              :0 
L2 IPv6 Unicast Packets             :0 
L2 IPv6 Multicast Octets            :0 
L2 IPv6 Multicast Packets           :0 
L2 Unicast Octets                   :25600000 
L2 Unicast Packets                  :400000 
L2 Multicast Octets                 :0 
L2 Multicast Packets                :0 
L2 Broadcast Octets                 :12800000 
L2 Broadcast Packets                :200000 
L2 Unknown Unicast Octets           :19200000 
L2 Unknown Unicast Packets          :300000 
L3 Routed Octets In                 :0 
L3 Routed Packets In                :0 
L3 Routed Octets Out                :0 
L3 Routed Packets Out               :0 
L3 Multicast Octets In              :0 
L3 Multicast Packets In             :0 
L3 Multicast Octets Out             :0 
L3 Multicast Packets Out            :0 
L3 Unicast Octets In                :0 
L3 Unicast Packets In               :0 
L3 Unicast Octets Out               :0 
L3 Unicast Packets Out              :0 

Related Commands

Command
Description

clear vlan counters

Clears the counters for all or specified VLANs on the device.


show vlan dot1q tag native

To display the status of tagging on the native VLANs, use the show vlan dot1q tag native command.

show vlan dot1q tag native

Syntax Description

This command has no arguments or keywords.

Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to display the status of native VLAN tagging on the device:

switch# show vlan dot1q tag native

vlan dot1q native tag is disabled

Related Commands

Command
Description

vlan dot1q tag native

Enables 802.1Q tagging for all the VLANs in a trunk on the device.


show vlan id

To display information and statistics for an individual VLAN or a range of VLANs, use the show vlan id command.

show vlan id [counters]

Syntax Description

id

Number of VLAN or range of VLANs. Valid numbers are 1 to 4096.

counters

Statistics about specified VLANs.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

Use this command to display information and statistics about an individual VLAN or a range of VLANs, including private VLANs.

When you use the counters argument, this command displays the following statistics for the individual VLAN or range of VLANs:

Transmitted and received unicast, multicast, and routed packets and octets

Information on Layer 2, IPv4, and IPv6 unicast, multicast, and unknown packets and octets


Note You can also display information about individual VLANs using the show vlan name command.


This command does not require a license.

Examples

This example shows how to display information for VLAN 50:


switch# show vlan id 50

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
50   VLAN0050                         active    Eth2/6

VLAN Type
---- -----
50   enet

Remote SPAN VLAN
----------------
Disabled

Primary  Secondary  Type             Ports
-------  ---------  ---------------  -------------------------------------------
#

This example shows how to display statistics for VLAN 10:

switch(config)# show vlan id 10 counters

Vlan Id                             :10 
L2 IPv4 Unicast Octets              :0 
L2 IPv4 Unicast Packets             :0 
L2 IPv4 Multicast Octets            :0 
L2 IPv4 Multicast Packets           :0 
L2 IPv6 Unicast Octets              :0 
L2 IPv6 Unicast Packets             :0 
L2 IPv6 Multicast Octets            :0 
L2 IPv6 Multicast Packets           :0 
L2 Unicast Octets                   :25600000 
L2 Unicast Packets                  :400000 
L2 Multicast Octets                 :0 
L2 Multicast Packets                :0 
L2 Broadcast Octets                 :12800000 
L2 Broadcast Packets                :200000 
L2 Unknown Unicast Octets           :19200000 
L2 Unknown Unicast Packets          :300000 
L3 Routed Octets In                 :0 
L3 Routed Packets In                :0 
L3 Routed Octets Out                :0 
L3 Routed Packets Out               :0 
L3 Multicast Octets In              :0 
L3 Multicast Packets In             :0 
L3 Multicast Octets Out             :0 
L3 Multicast Packets Out            :0 
L3 Unicast Octets In                :0 
L3 Unicast Packets In               :0 
L3 Unicast Octets Out               :0 
L3 Unicast Packets Out              :0 

Related Commands

Command
Description

clear vlan counters

Clears the counters for all or specified VLANs on the device.


show vlan

Displays information about VLANs on the device.


show vlan private-vlan

To display private VLAN information, use the show vlan private-vlan command.

show vlan [id {vlan-id}] private-vlan [type]

Syntax Description

vlan-id

(Optional) Private VLAN information for the specified VLAN. The range is from 1 to 4096.

type

(Optional) Displays the private VLAN type (primary, isolated, or community).


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to display information about all private VLANs on the device:

switch(config)# show vlan private-vlan

Primary  Secondary  Type             Ports
-------  ---------  ---------------  ------------------------
200      201        isolated         Eth2/26, Eth2/27
200      202        community        Eth2/26, Eth2/28

This example shows how to display information for a specific private VLAN:

switch(config)# show vlan id 202 private-vlan

Primary  Secondary  Type             Ports
-------  ---------  ---------------  ---------------------------
200      202        community        Eth2/26, Eth2/28

This example shows how to display information about the types of all private VLANs on the device:

switch(config)# show vlan private-vlan type

Vlan Type
---- -----------------
200  primary
201  isolated
202  community

This example shows how to display information on the type for the specified private VLAN:

switch(config)# show vlan id 202 private-vlan type

Vlan Type
---- -----------------
202  community

Related Commands

Command
Description

show interface switchport

Displays information about the switch ports, including those in private switch ports VLANs.

show interface private-vlan mapping

Displays information about the private VLAN mapping between the primary and secondary VLANs so that both VLANs share the same primary VLAN interface.

show vlan

Displays information about all the VLANs on the device.


shutdown (VLAN configuration)

To shut down the local traffic on a VLAN, use the shutdown command. To return a VLAN to its default operational state, use the no form of this command.

shutdown

no shutdown

Syntax Description

This command has no arguments or keywords.

Defaults

no shutdown

Command Modes

VLAN configuration submode

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You cannot shut down, or disable, VLAN 1 or VLANs 1006 to 4094.

Once you shut down a VLAN, the traffic ceases to flow on that VLAN. Access ports on that VLAN are also brought down; trunk ports continue to carry traffic for the other VLANs allowed on that port. However, the interface associations for the specified VLAN remain, and when you reenable, or recreate, that specified VLAN, the device automatically reinstates all the original ports to that VLAN.

To find out if a VLAN has been shut down internally, check the Status field in the show vlan command output. If a VLAN is shut down internally, one of these values appears in the Status field:

act/lshut—VLAN status is active and shut down internally.

sus/lshut—VLAN status is suspended and shut down internally.


Note If the VLAN is suspended and shut down, you use both the no shutdown and state active commands to return the VLAN to the active state.


This command does not require a license.

Examples

This example shows how to restore local traffic on VLAN 2 after you have shut down, or disabled, the VLAN:

switch(config)# vlan 2
switch(config-vlan)# no shutdown
switch(config-vlan)#

Related Commands

Command
Description

show vlan

Displays VLAN information.


spanning-tree bpdufilter

To enable BPDU Filtering on the interface, use the spanning-tree bpdufilter command. To return to the default settings, use the no form of this command.

spanning-tree bpdufilter {enable | disable}

no spanning-tree bpdufilter

Syntax Description

enable

Enables BPDU Filtering on this interface.

disable

Disables BPDU Filtering on this interface.


Defaults

The setting that is already configured when you enter the spanning-tree port type edge bpdufilter default command.

Command Modes

Interface configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines


Caution Be careful when you enter the spanning-tree bpdufilter enable command on specified interfaces. Explicitly configuring BPDU Filtering on a port this is not connected to a host can cause a bridging loop because the port will ignore any BPDU that it receives, and the port moves to the STP forwarding state.

Entering the spanning-tree bpdufilter enable command to enable BPDU Filtering overrides the spanning tree edge port configuration. That port then returns to the normal spanning tree port type and moves through the normal spanning tree transitions.

Use the spanning-tree port type edge bpdufilter default command to enable BPDU Filtering on all spanning tree edge ports.

This command does not require a license.

Examples

This example shows how to enable BPDU Filtering on this interface:

switch(config-if)# spanning-tree bpdufilter enable
switch(config-if)# 

Related Commands

Command
Description

show spanning-tree summary

Displays information about the spanning tree state.


spanning-tree bpduguard

To enable BPDU Guard on an interface, use the spanning-tree bpduguard command. To return to the default settings, use the no form of this command.

spanning-tree bpduguard {enable | disable}

no spanning-tree bpduguard

Syntax Description

enable

Enables BPDU Guard on this interface.

disable

Disables BPDU Guard on this interface.


Defaults

The setting that is already configured when you enter the spanning-tree port type edge bpduguard default command.

Command Modes

Interface configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

BPDU Guard prevents a port from receiving BPDUs. If the port still receives a BPDU, it is put in the error-disabled state as a protective measure.


Caution Be careful when using this command. You should use this command only with interfaces that connect to end stations; otherwise, an accidental topology loop could cause a data-packet loop and disrupt the device and network operation.

When you enable this BPDU Guard command globally, the command applies only to spanning tree edge ports. See spanning-tree port type edge bpduguard default for more information on the global command for BPDU Guard. However, when you enable this feature on an interface, it applies to that interface regardless of the spanning tree port type.

This command has three states:

spanning-tree bpduguard enableUnconditionally enables BPDU Guard on the interface.

spanning-tree bpduguard disableUnconditionally disables BPDU Guard on the interface.

no spanning-tree bpduguard—Enables BPDU Guard on the interface if it is an operational spanning tree edge port and if the spanning-tree port type edge bpduguard default command is configured.

Typically, this feature is used in a service-provider environment where the network administrator wants to prevent an access port from participating in the spanning tree.

This command does not require a license.

Examples

This example shows how to enable BPDU Guard on this interface:

switch(config-if)# spanning-tree bpduguard enable
switch(config-if)# 

Related Commands

Command
Description

show spanning-tree summary

Displays information about the spanning tree state.


spanning-tree bridge assurance

To enable Bridge Assurance on the device, use the spanning-tree bridge assurance command. To disable Bridge Assurance, use the no form of this command.

spanning-tree bridge assurance

no spanning-tree bridge assurance

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

Use this command to enable Bridge Assurance on the device.

Bridge Assurance is active only on spanning tree network interfaces. To configure an interface as a spanning tree network interface, use either the spanning-tree port type network command or the spanning-tree port type network default command.


Note Bridge Assurance works only on point-to-point links. You must configure this feature on both ends of the link.


When Bridge Assurance is enabled on network ports, all ports send BPDUs. When a Bridge Assurance-enabled network port does not receive any BPDUs for a specified period, that interface moves into the blocking state. After the network port receives a BPDU again, the port begins its normal spanning tree transitions.

An interface that is connected to a Layer 2 host and misconfigured as a spanning tree network port moves into the blocking state.


Note Bridge Assurance is configured globally only.


This command does not require a license.

Examples

This example shows how to enable Bridge Assurance on the device:

switch(config)# spanning-tree bridge assurance
switch(config)# 

Related Commands

Command
Description

show spanning-tree summary

Displays information about the spanning tree state.


spanning-tree cost

To set the path cost of the interface for Spanning Tree Protocol (STP) calculations, use the spanning-tree cost command. To return to the default settings, use the no form of this command.

spanning-tree [vlan vlan-id] cost {value | auto}

no spanning-tree [vlan vlan-id] cost

Syntax Description

vlan vlan-id

(Optional) Lists the VLANs on this trunk interface for which you want to assign the path cost. You do not use this parameter on access ports. The range is from 1 to 4094.

value

Value of the port cost. The available cost range depends on the path-cost calculation method as follows:

short—The range is 1 to 65536.

long—The range is 1 to 200,000,000.

auto

Sets the value of the port cost by the media speed of the interface (see to Table 1-2 for the values).


Defaults

auto

Command Modes

Interface configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

The STP port path cost default value is determined from the media speed and path-cost calculation method of a LAN interface (see Table 1-2). See the spanning-tree pathcost method command for information on setting the pathcost calculation method for Rapid PVST+.

Table 1-2 Default Port Cost 

Bandwidth
Short Path-Cost Method Port Cost
Long Path-Cost Method Port Cost

10 Mbps

100

2,000,000

100 Mbps

19

200,000

1 Gigabit Ethernet

4

20,000

10 Gigabit Ethernet

2

2,000


When you configure the value, note that higher values indicate higher costs.

On access ports, assign the port cost by port. On trunk ports, assign the port cost by VLAN; you can configure all the VLANs on a trunk port as the same port cost.

The port channel bundle is considered a single port. The port cost is the aggregation of all the configured port costs assigned to that channel.


Note Use this command to set the port cost for Rapid PVST+. Use the spanning-tree mst cost command to set the port cost for MST.


This command does not require a license.

Examples

This example shows how to access an interface and set a path cost value of 250 for the spanning tree VLAN that is associated with that interface:

switch(config)# interface ethernet 2/0
switch(config-if)# spanning-tree cost 250
switch(config-if)#

Related Commands

Command
Description

show spanning-tree

Displays information about the spanning tree configuration.


spanning-tree guard

To enable or disable Loop Guard or Root Guard, use the spanning-tree guard command. To return to the default settings, use the no form of this command.

spanning-tree guard {loop | root | none}

no spanning-tree guard

Syntax Description

loop

Enables Loop Guard on the interface.

root

Enables Root Guard on the interface.

none

Sets the guard mode to none.


Defaults

Disabled

Command Modes

Interface configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You cannot enable Loop Guard if Root Guard is enabled, although the device accepts the command to enable Loop Guard on spanning tree edge ports.

This command does not require a license.

Examples

This example shows how to enable Root Guard:

switch(config-if)# spanning-tree guard root
switch(config-if)#

Related Commands

Command
Description

show spanning-tree summary

Displays information about the spanning tree state.


spanning-tree link-type

To configure a link type for a port, use the spanning-tree link-type command. To return to the default settings, use the no form of this command.

spanning-tree link-type {auto | point-to-point | shared}

no spanning-tree link-type

Syntax Description

auto

Sets the link type based on the duplex setting of the interface.

point-to-point

Specifies that the interface is a point-to-point link.

shared

Specifies that the interface is a shared medium.


Defaults

auto

Command Modes

Interface configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

Fast transition (specified in IEEE 802.1w) works only on point-to-point links between two bridges.

By default, the device derives the link type of a port from the duplex mode. A full-duplex port is considered as a point-to-point link while a half-duplex configuration is assumed to be on a shared link.

If you designate a port as a shared link, you cannot use the fast transition feature, regardless of the duplex setting.

This command does not require a license.

Examples

This example shows how to configure the port as a shared link:

switch(config-if)# spanning-tree link-type shared
switch(config-if)# 

Related Commands

Command
Description

show spanning-tree interface

Displays information about the spanning tree state.


spanning-tree loopguard default

To enable Loop Guard as a default on all ports of a given bridge, use the spanning-tree loopguard default command. To disable Loop Guard, use the no form of this command.

spanning-tree loopguard default

no spanning-tree loopguard default

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

Loop Guard provides additional security in the bridge network. Loop Guard prevents alternate or root ports from becoming the designated port because of a failure that could lead to a unidirectional link.

Loop Guard operates only on ports that are considered point-to-point links by the spanning tree, and it does not run on spanning tree edge ports.

When you enter the Loop Guard command for the specified interface, that spanning-tree guard loop command overrides this command.

This command does not require a license.

Examples

This example shows how to enable Loop Guard:

switch(config)# spanning-tree loopguard default
switch(config#

Related Commands

Command
Description

show spanning-tree summary

Displays information about the spanning tree state.


spanning-tree mode

To switch between Rapid per VLAN Spanning Tree Plus (Rapid PVST+) and Multiple Spanning Tree (MST) Spanning Tree Protocol (STP) modes, use the spanning-tree mode command. To return to the default settings, use the no form of this command.

spanning-tree mode {rapid-pvst | mst}

no spanning-tree mode

Syntax Description

rapid-pvst

Sets the STP mode to Rapid PVST+.

mst

Sets the STP mode to MST.


Defaults

Rapid PVST+

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You cannot use both Rapid PVST+ and MST in a single VDC. You can, however, use Rapid PVST+ in one VDC and MST in another VDC.


Caution Be careful when using the spanning-tree mode command to switch between Rapid PVST+ and MST modes. When you enter the command, all STP instances are stopped for the previous mode and are restarted in the new mode. Using this command may cause the user traffic to be disrupted.

This command does not require a license.

Examples

This example shows how to switch to MST mode:

switch(config)# spanning-tree mode mst
switch(config-mst)#

This example shows how to return to the default mode (Rapid PVST+):

switch(config)# no spanning-tree mode
switch(config)#

Related Commands

Command
Description

show spanning-tree summary

Displays the information about the spanning tree configuration.


spanning-tree mst configuration

To enter the Multiple Spanning Tree (MST) configuration submode, use the spanning-tree mst configuration command. To return to the default settings, use the no form of this command.

spanning-tree mst configuration

no spanning-tree mst configuration

Syntax Description

This command has no keywords or arguments.

Defaults

The default value for the MST configuration is the default value for all its parameters:

No VLANs are mapped to any MST instance (all VLANs are mapped to the CIST instance).

The region name is an empty string.

The revision number is 0.

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

The MST configuration consists of three main parameters:

Instance VLAN mapping—See the instance vlan command.

Region name—See the name (mst configuration) command.

Configuration revision number—See the revision command.

The abort and exit commands allow you to exit mst configuration submode. The difference between the two commands depends on whether you want to save your changes or not.

The exit command commits all the changes before leaving mst configuration submode.

The abort command leaves mst configuration submode without committing any changes.

If you do not map secondary VLANs to the same instance as the associated primary VLAN, when you exit mst configuration submode, the following warning message is displayed:

These secondary vlans are not mapped to the same instance as their primary:
-> 3

See the switchport mode private-vlan host command to fix this problem.

Changing an mst configuration submode parameter can cause connectivity loss. To reduce service disruptions, when you enter mst configuration submode, make changes to a copy of the current MST configuration. When you are done editing the configuration, you can apply all the changes at once by using the exit keyword, or you can exit the submode without committing any change to the configuration by using the abort keyword.

In the unlikely event that two users commit a new configuration at exactly at the same time, this warning message displays:

% MST CFG:Configuration change lost because of concurrent access

This command does not require a license.

Examples

This example shows how to enter MST-configuration submode:

switch(config)# spanning-tree mst configuration
switch(config-mst)# 

This example shows how to reset the MST configuration (name, instance mapping, and revision number) to the default settings:

switch(config)# no spanning-tree mst configuration
switch(config)# 

Related Commands

Command
Description

instance vlan

Maps a VLAN or a set of VLANs to an MST instance.

name (mst configuration)

Sets the name of an MST region.

revision

Sets the revision number for the MST configuration.

show spanning-tree mst

Displays the information about the MST protocol.


spanning-tree mst cost

To set the path-cost parameter for any Multiple Spanning Tree (MST) instance (including the common and internal spanning tree [CIST] with instance ID 0) use the spanning-tree mst cost command. To return to the default settings, use the no form of this command.

spanning-tree mst instance-id cost {cost | auto}

no spanning-tree mst instance-id cost

Syntax Description

instance-id

Instance ID number; the range of valid values is from 0 to 4094.

cost

Port cost for an instance; the range of valid values is from 1 to 200,000,000.

auto

Sets the value of the port cost by the media speed of the interface.


Defaults

auto

10 Mbps—2,000,000

100 Mbps—200,000

1 Gigabit Ethernet—20,000

10 Gigabit Ethernet—2,000

Command Modes

Interface configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

The port cost depends on the port speed; the faster interface speeds indicate smaller costs. MST always uses long path costs.

Higher cost values indicate higher costs. When entering the cost, do not include a comma in the entry; for example, enter 1000, not 1,000.

The port-channel bundle is considered a single port. The port cost is the aggregation of all the configured port costs assigned to that channel.

This command has no licensing requirements.

Examples

This example shows how to set the interface path cost:

switch(config-if)# spanning-tree mst 0 cost 17031970
switch(config-if)# 

Related Commands

Command
Description

show spanning-tree mst [detail]

Displays the information about the MST protocol.


spanning-tree mst forward-time

To set the forward-delay timer for all the instances on the device, use the spanning-tree mst forward-time command. To return to the default settings, use the no form of this command.

spanning-tree mst forward-time seconds

no spanning-tree mst forward-time

Syntax Description

seconds

Number of seconds to set the forward-delay timer for all the instances on the device; the range of valid values is from 4 to 30 seconds.


Defaults

15

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to set the forward-delay timer:

switch(config)# spanning-tree mst forward-time 20

switch(config)#

Related Commands

Command
Description

show spanning-tree mst [detail]

Displays the information about the MST protocol.


spanning-tree mst hello-time

To set the hello-time delay timer for all the instances on the device, use the spanning-tree mst hello-time command. To return to the default settings, use the no form of this command.

spanning-tree mst hello-time seconds

no spanning-tree mst hello-time

Syntax Description

seconds

Number of seconds to set the hello-time delay timer for all the instances on the device; the range of valid values is from 1 to 10 seconds.


Defaults

2

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

If you do not specify the hello-time value, the value is calculated from the network diameter.

This command does not require a license.

Examples

This example shows how to set the hello-time delay timer:

switch(config)# spanning-tree mst hello-time 3

switch(config)#

Related Commands

Command
Description

show spanning-tree mst [detail]

Displays the information about the MST protocol.


spanning-tree mst max-age

To set the max-age timer for all the instances on the device, use the spanning-tree mst max-age command. To return to the default settings, use the no form of this command.

spanning-tree mst max-age seconds

no spanning-tree mst max-age

Syntax Description

seconds

Number of seconds to set the max-age timer for all the instances on the device; the range of valid values is from 6 to 40 seconds.


Defaults

20

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This parameter is used only by Instance 0 or the IST.

This command does not require a license.

Examples

This example shows how to set the max-age timer:

switch(config)# spanning-tree mst max-age 40

switch(config)#

Related Commands

Command
Description

show spanning-tree mst [detail]

Displays the information about the MST protocol.


spanning-tree mst max-hops

To specify the number of possible hops in the region before a bridge protocol data unit (BPDU) is discarded, use the spanning-tree mst max-hops command. To return to the default settings, use the no form of this command.

spanning-tree mst max-hops hop-count

no spanning-tree mst max-hops

Syntax Description

hop-count

Number of possible hops in the region before a BPDU is discarded; the range of valid values is from 1 to 255 hops.


Defaults

20

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to set the number of possible hops:

switch(config)# spanning-tree mst max-hops 25

switch(config)#

Related Commands

Command
Description

show spanning-tree mst [detail]

Displays the information about the MST protocol.


spanning-tree mst port-priority

To set the port-priority parameters for any Multiple Spanning Tree (MST) instance—including the common and internal spanning tree (CIST) with instance ID 0—use the spanning-tree mst port-priority command. To return to the default settings, use the no form of this command.

spanning-tree mst instance-id port-priority priority

no spanning-tree mst instance-id port-priority

Syntax Description

instance-id

Instance ID number; valid values are from 0 to 4094.

priority

Port priority for an instance; the range of valid values is from 0 to 224 in increments of 32.


Defaults

priority is 128.

Command Modes

Interface configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

Higher port-priority priority values indicate smaller priorities.

The priority values are 0, 32, 64, 96, 128, 160, 192, and 224. All other values are rejected.

Examples

This example shows how to set the interface priority:

switch(config-if)# spanning-tree mst 0 port-priority 64
switch(config-if)# 

Related Commands

Command
Description

show spanning-tree mst [detail]

Displays the information about the MST protocol.

spanning-tree port-priority

Configures port priority for default STP, which is Rapid PVST+.


spanning-tree mst pre-standard

To force the specified interface to send pre-standard, rather than standard, MST messages, use the spanning-tree mst pre-standard command. To return to the default setting, use the no form of this command.

spanning-tree mst pre-standard

no spanning-tree mst pre-standard

Syntax Description

This command has no keywords or arguments.

Defaults

None

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0(2)

This command was introduced.


Usage Guidelines

You can set the bridge priority in increments of 4096 only. When you set the priority, valid values are 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, and 61440.

You can set the priority argument to 0 to make the device root.

You can enter the instance-id argument as a single instance or a range of instances, for example, 0-3,5,7-9.

This command does not require a license.

Examples

This example shows how to set the bridge priority:

switch(config)# spanning-tree mst 0 root priority 4096
switch(config)# 

Related Commands

Command
Description

show spanning-tree mst [interface {interface}] [detail]

Displays detailed information about the MST protocol for the specified interface.


spanning-tree mst priority

To set the bridge priority, use the spanning-tree mst priority command. To return to the default setting, use the no form of this command.

spanning-tree mst {instance-id} priority priority-value

no spanning-tree mst {instance-id} priority

Syntax Description

instance-id

Instance identification number; the range of valid values is from 0 to 4094.

priority-value

Bridge priority; see the "Usage Guidelines" section for valid values and additional information.


Defaults

priority-value default is 32768.

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification

4.0

This command was introduced.


Usage Guidelines

You can set the bridge priority in increments of 4096 only. When you set the priority, valid values are 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, and 61440.

You can set the priority argument to 0 to make the device root.

You can enter the instance-id argument as a single instance or a range of instances, for example, 0-3,5,7-9.

This command does not require a license.

Examples

This example shows how to set the bridge priority:

switch(config)# spanning-tree mst 0 root priority 4096
switch(config)# 

Related Commands

Command
Description

show spanning-tree mst [detail]

Displays the information about the MST protocol.


spanning-tree mst root

To designate the primary and secondary root and set the timer value for an instance, use the spanning-tree mst root command. To return to the default settings, use the no form of this command.

spanning-tree mst {instance-id} root {primary | secondary} [diameter dia [hello-time hello-time]]

no spanning-tree mst {instance-id} root

Syntax Description

instance-id

Instance identification number; the range of valid values is from 0 to 4094.

primary

Specifies the high priority (low value) that is high enough to make the bridge root of the spanning-tree instance.

secondary

Specifies the device as a secondary root, should the primary root fail.

diameter dia

(Optional) Specifies the timer values for the bridge that are based on the network diameter.

hello-time hello-time

(Optional) Specifies the duration between the generation of configuration messages by the root device. The range is from 1 to 10 seconds; the default is 2 seconds.


Defaults

spanning-tree mst root has no default settings.

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release
Modification