Table Of Contents
clear mac address-table dynamic
clear spanning-tree detected-protocol
show forwarding consistency l2
show hardware mac address-table
show interface private-vlan mapping
show mac address-table aging-time
show running-config spanning-tree
spanning-tree bridge assurance
spanning-tree loopguard default
spanning-tree mst configuration
spanning-tree mst forward-time
spanning-tree mst port-priority
spanning-tree mst pre-standard
spanning-tree mst simulate pvst
spanning-tree mst simulate pvst global
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
switchport mode private-vlan host
switchport mode private-vlan promiscuous
switchport mode private-vlan promiscuous trunk
switchport mode private-vlan trunk secondary
switchport private-vlan association trunk
switchport private-vlan host-association
switchport private-vlan mapping trunk
switchport private-vlan trunk allowed vlan
switchport private-vlan trunk native vlan
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 dynamicswitch(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/20switch(config)#
Related Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 5Related Commands
Command Descriptionshow 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
Specifies the Ethernet.
ethernet interface-num
Module and port number.
port-channel channel-num
Port-channel number.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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/8Related Commands
Command Descriptionshow 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) Specifies the VLAN ID that you want to clear. Valid values are from 1 to 4096.
vlan-id
Number of the VLAN that you want to clear.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 countersRelated Commands
clear vtp counters
To clear the Virtual Trunking Protocol (VTP) counters, use the clear vtp counters command.
clear vtp counters
Syntax Description
This command has no arguments or keywords.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to clear the VTP counters:
switch# clear vtp countersswitch#Related Commands
Command Descriptionshow 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
This command has no arguments or keywords.
Defaults
Disabled
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 ports 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-vlanswitch(config)#
Related Commands
feature vtp
To enable VTPs, use the feature vtp command. To return to the default setting, use the no form of this command.
feature vtp
no feature vtp
Syntax Description
This command has no arguments or keywords.
Defaults
Disabled
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You must use this command to enable private VTP functionality. You must enable private VTP before you can configure or use any of the functionality.
Note When you disable the VTP feature, all of the VTP configurations are lost.
This command does not require a license.
Examples
This example shows how to enable VTP functionality on the device:
switch(config)#
feature vtpswitch(config)#
Related Commands
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
Defaults
No VLANs are mapped to any MST instance (all VLANs are mapped to the CIST instance).
Command Modes
MST configuration submode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 configurationswitch(
config-mst)#
instance 4 vlan 100-200switch(config-mst)#Related Commands
Command Descriptionshow spanning-tree mst configuration
Displays information about the MST protocol.
spanning-tree mst configuration
Enters MST configuration submode.
mac-address
To configure a static MAC address for a Layer 3 interface, use the mac address command. To return to the default settings, use the no form of this command.
mac-address mac-address
no mac-address mac-address
Syntax Description
Defaults
VDC MAC address
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You can specify a MAC address for all Layer 3 interfaces:
•Layer 3 interfaces
•Layer 3 port channels
•Layer 3 subinterfaces
•VLAN network interface
You cannot configure static MAC addresses on tunnel interfaces.
You cannot use this command on Layer 2 interfaces or individual members of a port channel.
See the Cisco Nexus 7000 Series NX-OS Interfaces Command Reference for information on configuring Layer 3 interfaces.
You cannot configure a static group MAC address to these interfaces.
This command does not require a license.
Examples
This example shows how to configure a static MAC address on a Layer 3 interface:
switch(config)#
interface ethernet 7/3switch(config-1f)#
mac-address 02c4.1e42.a3b2Related Commands
Command Descriptionshow interface
Displays information about the interface.
show running-config
Displays information about the current configuration.
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
Defaults
1800 seconds
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 that 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 might or might not be the default value of 300 seconds depending if the global configuration of the device for the aging time has been changed.
The 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 500switch(config)#
Related Commands
Command Descriptionshow 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
Defaults
None
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
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/1switch(config)#
Related Commands
media ethernet
Note The Cisco NX-OS software supports 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 Rolesnetwork-admin
vdc-admin
Usage Guidelines
The media ethernet command is not supported in Release 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 2switch(
config-vlan)#
media ethernetswitch(config-mst)#Related Commands
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 represents four numeric digits (including leading zeroes) equal to the VLAN ID number.
Command Modes
VLAN configuration submode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 2switch(
config-vlan)#
name accountingswitch(config-mst)#Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
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 configurationswitch(
config-mst)#
name accountingswitch(config-mst)#Related Commands
Command Descriptionshow 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 association
Syntax Description
Defaults
None
Command Modes
VLAN configuration submode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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.
This command does not require a license.
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 associationswitch(config-vlan)#Related Commands
Command Descriptionshow vlan
Displays information about VLANs.
show vlan private-vlan
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 Rolesnetwork-admin
vdc-admin
Command History
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.
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 19switch(config-vlan)# private-vlan isolatedswitch(config)# vlan 20switch(config-vlan)# private-vlan communityswitch(config)# vlan 21switch(config-vlan)# private-vlan communityswitch(config)# vlan 14switch(config-vlan)# private-vlan primaryswitch(config-vlan)# private-vlan association 19-21This example shows how to remove isolated VLAN 18 and community VLAN 20 from the private VLAN association:
switch(config)# vlan 14switch(config-vlan)# private-vlan association remove 18,20switch(config-vlan)#Related Commands
Command Descriptionshow 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
Defaults
None
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 5.x, 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 18switch(config-if)#
private-vlan mapping 20switch(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 terminalswitch(config)#
interface vlan 202switch(config-if)#
private-vlan mapping add 303-307,309,440switch(config-if)#
endThis example shows how to remove all private VLAN mappings from the SVI of VLAN 19:
switch(config)#
interface vlan 19switch(config-if)#
no private-vlan mappingswitch
(config-if)#
Related Commands
Command Descriptionshow 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 Rolesnetwork-admin
vdc-admin
Command History
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 configurationswitch(config-mst)# instance 1 vlan 2switch(config-mst)# exitThese secondary vlans are not mapped to the same instance as their primary:-> 3This example shows how to initialize PVLAN synchronization:
switch(config-mst)# private-vlan synchronizeswitch(config-mst)#Related Commands
Command Descriptionshow 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 Rolesnetwork-admin
vdc-admin
Command History
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 configurationswitch(
config-mst)#
revision 5switch(config-mst)#Related Commands
show forwarding consistency l2
To display information about discrepant, missing, or extra MAC addresses between the supervisor and the module, use the show forwarding consistency l2 command.
show forwarding consistency l2 {module}
Syntax Description
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Optimally, all the MAC address tables on each module exactly match the MAC address table on the supervisor.
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 forwarding consistency l2 9Legend: * - primary entry, G - Gateway MAC, (R) - Routed MAC age - seconds since last seenMissing entries in the MAC Table VLAN MAC Address Type age Secure NTFY Ports ---------+-----------------+--------+---------+------+------+----------------------------------G - 0018.bad7.e115 static - False False sup-eth1(R)* 1 0001.1234.5600 static - False False Eth9/25G2 0018.bad7.e115 static - False False sup-eth1(R)G3 0018.bad7.e115 static - False False sup-eth1(R)Extra and Discrepant entries in the MAC TableVLAN MAC Address Type age Secure NTFY Ports ---------+-----------------+--------+---------+------+------+----------------G - 0018.bad7.dc15 static - False False sup-eth1(R)* 1 0001.1234.5601 static - False False Eth9/25Related Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 the MAC address was learned.
•Static—Statically configured entry. The hardware does not modify this entry. This entry is not be aged by the line card process.
•SW—3-bit software value associated with this entry.
•Modified—MAC address entry that was modified by the hardware since last notification. This value is set when index value changes.
•Age byte—Age timer value when last packet arrived with this entry's MAC address as the source MAC address.
•Tmr sel—Age timer used for updating the age for this entry. Based on the aging value configured for the VLAN, one of the four timers is used for updating the age.
•GM—Specifies the gateway MAC address or not.
•Secure—Secured MAC address.
•TRAP—When this bit is set, the system drops any packet received with this source MAC address as this entry's MAC address.
•NTFY—Notify. When the Secured and Notify bits are both set, the system redirects packets to the supervisor when the hardware updates the index value.
•RM—Router MAC address.
•RMA—Router MAC address that is active.
Note The RM and RMA fields are not supported on the Cisco Nexus 7000. Series Switch
•Capture—When this bit is set, any packet sent to this destination is copied by setting the CAP1 bit.
•Fld—Flood bit. When this bit is set, any packet sent to this destination MAC causes 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 for VLAN 1 on module 2:
switch# show hardware mac address-table 2 vlan 1Valid| 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 0Related Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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.1a78Ethernet2/1 0000.0000.0000 0019.076c.4dacEthernet2/2 0000.0000.0000 0019.076c.4dadEthernet2/3 0000.0000.0000 0019.076c.4daeEthernet2/4 0000.0000.0000 0019.076c.4dafEthernet2/5 0000.0000.0000 0019.076c.4db0Ethernet2/6 0000.0000.0000 0019.076c.4db1Ethernet2/7 0000.0000.0000 0019.076c.4db2Ethernet2/8 0000.0000.0000 0019.076c.4db3Ethernet2/9 0000.0000.0000 0019.076c.4db4Ethernet2/10 0000.0000.0000 0019.076c.4db5Ethernet2/11 0000.0000.0000 0019.076c.4db6Ethernet2/12 0000.0000.0000 0019.076c.4db7Ethernet2/13 0000.0000.0000 0019.076c.4db8Ethernet2/14 0000.0000.0000 0019.076c.4db9Ethernet2/15 0000.0000.0000 0019.076c.4dbaEthernet2/16 0000.0000.0000 0019.076c.4dbbEthernet2/17 0000.0000.0000 0019.076c.4dbcEthernet2/18 0000.0000.0000 0019.076c.4dbdEthernet2/19 0000.0000.0000 0019.076c.4dbeEthernet2/20 0000.0000.0000 0019.076c.4dbfEthernet2/21 0000.0000.0000 0019.076c.4dc0Ethernet2/22 0000.0000.0000 0019.076c.4dc1Ethernet2/23 0000.0000.0000 0019.076c.4dc2Ethernet2/24 0000.0000.0000 0019.076c.4dc3Ethernet2/25 0000.0000.0000 0019.076c.4dc4Ethernet2/26 0000.0000.0000 0019.076c.4dc5Ethernet2/27 0000.0000.0000 0019.076c.4dc6Ethernet2/28 0000.0000.0000 0019.076c.4dc7Ethernet2/29 0000.0000.0000 0019.076c.4dc8Ethernet2/30 0000.0000.0000 0019.076c.4dc9Ethernet2/31 0000.0000.0000 0019.076c.4dcaEthernet2/32 0000.0000.0000 0019.076c.4dcbEthernet2/33 0000.0000.0000 0019.076c.4dccEthernet2/34 0000.0000.0000 0019.076c.4dcdEthernet2/35 0000.0000.0000 0019.076c.4dceEthernet2/36 0000.0000.0000 0019.076c.4dcfEthernet2/37 0000.0000.0000 0019.076c.4dd0Ethernet2/38 0000.0000.0000 0019.076c.4dd1Ethernet2/39 0000.0000.0000 0019.076c.4dd2Ethernet2/40 0000.0000.0000 0019.076c.4dd3Ethernet2/41 0000.0000.0000 0019.076c.4dd4Ethernet2/42 0000.0000.0000 0019.076c.4dd5Ethernet2/43 0000.0000.0000 0019.076c.4dd6Ethernet2/44 0000.0000.0000 0019.076c.4dd7Ethernet2/45 0000.0000.0000 0019.076c.4dd8Ethernet2/46 0000.0000.0000 0019.076c.4dd9Ethernet2/47 0000.0000.0000 0019.076c.4ddaEthernet2/48 0000.0000.0000 0019.076c.4ddbport-channel5 0000.0000.0000 0000.0000.0000port-channel20 0000.0000.0000 0000.0000.0000port-channel30 0000.0000.0000 0000.0000.0000port-channel50 0000.0000.0000 0000.0000.0000Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
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 mappingswitch(config)# show interface private-vlan mappingInterface Secondary VLAN Type--------- -------------- -----------------vlan200 201 isolatedvlan200 202 communityRelated Commands
Command Descriptionprivate-vlan mapping
Creates a mapping between the primary and secondary VLANs so that both VLANs share the same primary VLAN interface.
show interface pruning
To display interface trunk Virtual Trunking Protocol (VTP) pruning information, use the show interface pruning command.
show interface pruning
Syntax Description
This command has no keywords or arguments.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to display interface trunk VTP pruning information on the device:
switch# show interface pruning
Port Vlans pruned for lack of request by neighborEthernet1/33 10Ethernet1/34 10Port Vlan traffic requested of neighborEthernet1/33 1 <<<<<Ethernet1/34 1 <<<<<switch#Related Commands
Command Descriptionfeature vtp
Enables VTP on the device.
vtp domain
Configures the VTP domain name.
vtp version
Configures the VTP version.
show interface switchport
To display interface switchport information, use the show interface switchport command.
show interface [if-identifier] switchport
Syntax Description
if-identifier
(Optional) Identifier of an interface. Examples are ethernet 3/22 or port channel 120.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to display VTP interface switchport information on the device:
switch# show interface switchport
Name: Ethernet8/11Switchport: EnabledSwitchport Monitor: Not enabledOperational Mode: trunkAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Trunking VLANs Enabled: 1,10,20-30Pruning VLANs Enabled: 2-1001Administrative private-vlan primary host-association: noneAdministrative private-vlan secondary host-association: noneAdministrative private-vlan primary mapping: noneAdministrative private-vlan secondary mapping: noneAdministrative private-vlan trunk native VLAN: noneAdministrative private-vlan trunk encapsulation: dot1qAdministrative private-vlan trunk normal VLANs: noneAdministrative private-vlan trunk private VLANs: noneOperational private-vlan: noneswitch#Related Commands
Command Descriptionfeature vtp
Enables VTP on the device.
vtp domain
Configures the VTP domain name.
vtp version
Configures the VTP version.
show interface trunk
To display interface trunk information, use the show interface trunk command.
show interface [if-identifier] trunk
Syntax Description
if-identifier
(Optional) Identifier of an interface. Examples are ethernet 3/22 or port channel 120.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to display VTP interface trunk information on the device:
switch# show interface trunk
--------------------------------------------------------------------------------Port Native Status PortVlan Channel--------------------------------------------------------------------------------Eth1/33 1 trunking --Eth1/34 1 trunking ----------------------------------------------------------------------------------Port Vlans Allowed on Trunk--------------------------------------------------------------------------------Eth1/33 1,10Eth1/34 1,10--------------------------------------------------------------------------------Port Vlans Err-disabled on Trunk--------------------------------------------------------------------------------Eth1/33 noneEth1/34 none--------------------------------------------------------------------------------Port STP Forwarding--------------------------------------------------------------------------------Eth1/33 1,10Eth1/34 1,10--------------------------------------------------------------------------------Port VTP in spanning tree forwarding state and not pruned--------------------------------------------------------------------------------Eth1/33 1Eth1/34 1switch#Related Commands
Command Descriptionfeature vtp
Enables VTP on the device.
vtp domain
Configures the VTP domain name.
vtp version
Configures the VTP version.
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Release Modification4.0
This command was introduced.
4.2(1)
Display of configured static MAC address for Layer 3 port channels added.
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.
You can configure a VLAN network interface with a static MAC address, and this command will display that configured MAC address. See the mac-address command for information on configuring a VLAN network interface with a static MAC address.
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 5Vlan5 is administratively down, line protocol is downHardware is EtherSVI, address is 0000.0000.0000MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,reliability 255/255, txload 1/255, rxload 1/255Encapsulation ARPA, loopback not setKeepalive not supportedARP type: ARPALast clearing of "show interface" counters 01:21:551 minute input rate 0 bytes/sec, 0 packets/sec1 minute output rate 0 bytes/sec, 0 packets/secL3 Switched:input: 0 pkts, 0 bytes - output: 0 pkts, 0 bytesL3 in Switched:ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytesL3 out Switched:ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytesThis 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 noneThis example shows how to display the description for a specified VLAN:
switch# show interface vlan 100 description------------------------------------------Interface Description------------------------------------------Vlan100This example shows how to display information about the private VLAN mapping, if any, for a specified VLAN:
switch# show interface vlan 200 private-vlan mappingInterface Secondary VLAN--------- ----------------------------------------------------------------vlan200 201 202This example shows how to display the status for a specified VLAN:
switch# show interface vlan 5 status------------------------------------------Interface Status Protocol------------------------------------------Vlan5 admin down shutRelated Commands
Command Descriptionshow 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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 detailedVlan2counters:l3_average_input_bits 9947168160l3_average_input_packets 20723267l3_routed_bytes_in 39054410460l3_routed_pkts_in 650906841l3_ucast_bytes_in 39054410460l3_ucast_pkts_in 650906841This example shows how to display all detailed statistics for a specified VLAN:
switch(config)# show interface vlan 9 counters detailed allVlan9counters:0. l3_ipv4_ucast_bytes_in = 01. l3_ipv4_ucast_pkts_in = 02. l3_ipv4_mcast_bytes_in = 03. l3_ipv4_mcast_pkts_in = 04. l3_ipv6_ucast_bytes_in = 05. l3_ipv6_ucast_pkts_in = 06. l3_ipv6_mcast_bytes_in = 07. l3_ipv6_mcast_pkts_in = 08. l3_ipv4_ucast_bytes_out = 09. l3_ipv4_ucast_pkts_out = 010. l3_ipv4_mcast_bytes_out = 011. l3_ipv4_mcast_pkts_out = 012. l3_ipv6_ucast_bytes_out = 013. l3_ipv6_ucast_pkts_out = 014. l3_ipv6_mcast_bytes_out = 015. l3_ipv6_mcast_pkts_out = 016. l3_average_input_bytes = 017. l3_average_input_packets = 018. l3_average_output_bytes = 019. l3_average_output_packets = 020. l3_routed_bytes_in = 021. l3_routed_pkts_in = 022. l3_ucast_bytes_in = 023. l3_ucast_pkts_in = 024. l3_mcast_bytes_in = 025. l3_mcast_pkts_in = 026. l3_routed_bytes_out = 027. l3_routed_pkts_out = 028. l3_ucast_bytes_out = 029. l3_ucast_pkts_out = 030. l3_mcast_bytes_out = 031. l3_mcast_pkts_out = 0This 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.4dc7Ethernet2/29 0000.0000.0000 0019.076c.4dc8Ethernet2/30 0000.0000.0000 0019.076c.4dc9Related Commands
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 | count | interface {type slot/port | port-channel number} | vlan vlan-id]
Syntax Description
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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-tableLegend:* - primary entry, G - Gateway MAC, (R) - Routed MACage - seconds since last seenVLAN 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 information about the entries for the Layer 2 MAC address table for a specific module:
switch# show mac address-table 2Legend:* - primary entry, G - Gateway MAC, (R) - Routed MACage - seconds since last seenVLAN 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/13 0000.23bd.4fda dynamic 70 False False Eth1/1This 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.3fbdLegend:* - primary entry, G - Gateway MAC, (R) - Routed MACage - seconds since last seenVLAN 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 dynamicLegend:* - primary entry, G - Gateway MAC, (R) - Routed MACage - seconds since last seenVLAN 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/1This 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/13Legend:* - primary entry, G - Gateway MAC, (R) - Routed MACage - seconds since last seenVLAN MAC Address Type age Secure NTFY Ports---------+-----------------+--------+---------+------+------+----------------* 1 1234.dd56.ee89 dynamic 0 False False Eth2/13This example shows how to display the static entries in the Layer 2 MAC address table:
switch# show mac address-table staticLegend:* - primary entry, G - Gateway MAC, (R) - Routed MACage - seconds since last seenVLAN 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/1This example shows how to display the entries in the Layer 2 MAC address table for a specific VLAN:
switch# show mac address-table vlan 3Legend:* - primary entry, G - Gateway MAC, (R) - Routed MACage - seconds since last seenVLAN MAC Address Type age Secure NTFY Ports---------+-----------------+--------+---------+------+------+----------------* 3 1234.dd56.ee89 static - False False Eth2/1Related Commands
Command Descriptionmac 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 Rolesnetwork-admin
vdc-admin
Command History
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 the 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-timeVlan Aging Time---- ----------1 180050 1200100 1800Related Commands
Command Descriptionmac 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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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-treespanning-tree mode mstThis example shows how to display detailed information about the running STP configuration when you are running MST:
switch# show running-config spanning-tree allspanning-tree mode mstno spanning-tree port type edge defaultno spanning-tree port type network defaultspanning-tree bridge assuranceno spanning-tree loopguard defaultspanning-tree mst simulate pvst globalno snmp-server enable traps bridge topologychangeno snmp-server enable traps bridge newrootno snmp-server enable traps stpx inconsistencyno snmp-server enable traps stpx loop-inconsistencyno snmp-server enable traps stpx root-inconsistencyspanning-tree mst hello-time 2spanning-tree mst forward-time 15spanning-tree mst max-age 20spanning-tree mst max-hops 20spanning-tree mst 0 priority 32768spanning-tree mst configurationnamerevision 0instance 0 vlan 1-4094configure interface Ethernet8/1spanning-tree port-priority 128Related Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 VLAN 50:
switch(config)# show running-config vlan 50version 4.0(1)vlan 50Related Commands
show running-config vtp
To display the running configuration for the VLAN Trunking Protocol (VTP), use the show running-config vtp command.
show running-config vtp
Syntax Description
This command has no arguments or keywords
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command provides information about VTP.
This command does not require a license.
Examples
This example shows how to display the running configuration for VTP:
switch(config)# show running-config vtpversion 4.1(2)feature vtpvtp mode transparentvtp domain accountingRelated Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Release Modification4.0
This command was introduced.
4.1(3)
This command was enhanced to display when a port is part of a virtual port channel (vPC).
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-treeVLAN0001Spanning tree enabled protocol rstpRoot ID Priority 32769Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32769 (priority 32768 sys-id-ext 1)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pVLAN0002Spanning tree enabled protocol rstpRoot ID Priority 32770Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32770 (priority 32768 sys-id-ext 2)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pVLAN0003Spanning tree enabled protocol rstpRoot ID Priority 32771Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32771 (priority 32768 sys-id-ext 3)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pVLAN0004Spanning tree enabled protocol rstpRoot ID Priority 32772Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32772 (priority 32768 sys-id-ext 4)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pThis example shows how to display STP information when you are running MST:
switch# show spanning-treeMST0000Spanning tree enabled protocol mstpRoot ID Priority 32768Address 0018.bad8.fc150Cost 0Port 258 (Ethernet 2/2)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32768 (priority 32768 sys-id-ext 0)Address 0018.bad8.239dHello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface 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, P2pEth3/48 Desg FWD 20000 128.43228 P2pThis example shows how to display the blocked ports in spanning tree:
switch(config)# show spanning-tree blockedportsName Blocked Interfaces List-------------------- ------------------------------------VLAN0001 Eth8/2VLAN0002 Eth8/2VLAN0003 Eth8/2VLAN0004 Eth8/2VLAN0005 Eth8/2VLAN0006 Eth8/2VLAN0007 Eth8/2VLAN0008 Eth8/2VLAN0009 Eth8/2VLAN0010 Eth8/2This example shows how to determine if any ports are in any STP-inconsistent state:
switch#
show spanning-tree inconsistentportsName Interface Inconsistency-------------------- ---------------------- ------------------MST0000 Eth8/1 Bridge Assurance InconsistentMST0000 Eth8/2 Bridge Assurance InconsistentThis example shows how to display the path-cost method when you are running Rapid PVST+:
switch(config)# show spanning-tree pathcost methodSpanning tree default pathcost method used is shortThis example shows how to display the path-cost method when you are running MST:
switch(config)# show spanning-tree pathcost methodSpanning tree default pathcost method used is short (Operational value is long)Table 1-1 describes the fields that are shown in the examples.
Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
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 activeVLAN0001Spanning tree enabled protocol rstpRoot ID Priority 32769Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32769 (priority 32768 sys-id-ext 1)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pVLAN0002Spanning tree enabled protocol rstpRoot ID Priority 32770Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32770 (priority 32768 sys-id-ext 2)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pVLAN0003Spanning tree enabled protocol rstpRoot ID Priority 32771Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32771 (priority 32768 sys-id-ext 3)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pVLAN0004Spanning tree enabled protocol rstpRoot ID Priority 32772Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32772 (priority 32768 sys-id-ext 4)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pRelated Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 bridgeHello Max FwdMST Instance Bridge ID Time Age Dly Protocol---------------- --------------------------------- ----- --- --- --------MST0000 32768 (32768,0) 0018.bad7.fc15 2 20 15 mstpRelated Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 briefVLAN0001Spanning tree enabled protocol rstpRoot ID Priority 32769Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32769 (priority 32768 sys-id-ext 1)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pVLAN0002Spanning tree enabled protocol rstpRoot ID Priority 32770Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32770 (priority 32768 sys-id-ext 2)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pRelated Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 detailVLAN0001 is executing the rstp compatible Spanning Tree protocolBridge Identifier has priority 32768, sysid 1, address 0022.5579.7641Configured hello time 2, max age 20, forward delay 15Current root has priority 32769, address 000d.eca3.9f01Root port is 4105 (port-channel10), cost of root path is 4Topology change flag not set, detected flag not setNumber of topology changes 1 last change occurred 20:24:36 agofrom port-channel10Times: hold 1, topology change 35, notification 2hello 2, max age 20, forward delay 15Timers: hello 0, topology change 0, notification 0Port 4105 (port-channel10, vPC Peer-link) of VLAN0001 is root forwardingPort path cost 2, Port priority 128, Port Identifier 128.4105Designated root has priority 32769, address 000d.eca3.9f01Designated bridge has priority 32769, address 0022.5579.7341Designated port id is 128.4105, designated path cost 2Timers: message age 16, forward delay 0, hold 0Number of transitions to forwarding state: 1Link type is point-to-point by defaultBPDU: sent 36729, received 36739Port 4115 (port-channel20, vPC) of VLAN0001 is designated forwardingPort path cost 1, Port priority 128, Port Identifier 128.4115Designated root has priority 32769, address 000d.eca3.9f01Designated bridge has priority 32769, address 0022.5579.7341Designated port id is 128.4115, designated path cost 2Timers: message age 0, forward delay 0, hold 0Number of transitions to forwarding state: 0Link type is point-to-point by defaultBPDU: sent 0, received 0Port 4125 (port-channel30, vPC) of VLAN0001 is root forwardingPort path cost 1, Port priority 128, Port Identifier 128.4125Designated root has priority 32769, address 000d.eca3.9f01Designated bridge has priority 32769, address 000d.eca3.9f01Designated port id is 128.4125, designated path cost 0Timers: message age 0, forward delay 0, hold 0Number of transitions to forwarding state: 0Link type is point-to-point by defaultBPDU: sent 0, received 0Related Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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/2Vlan Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------VLAN0001 Altn BLK 20000 128.1025 P2pVLAN0002 Desg FWD 20000 128.1025 P2pThis example shows how to display STP information about a specified interface when you are running MST:
switch(config)# show spanning-tree interface ethernet 2/50Mst Instance Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------MST0000 Desg FWD 20000 128.1281 P2pThis 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 detailPort 1025 (Ethernet8/1) of VLAN0001 is alternate blockingPort path cost 20000, Port priority 128, Port Identifier 128.1025Designated root has priority 28672, address 0018.bad8.239dDesignated bridge has priority 28672, address 0018.bad8.239dDesignated port id is 128.1281, designated path cost 0Timers: message age 15, forward delay 0, hold 0Number of transitions to forwarding state: 1Link type is point-to-point by defaultThe port type is network by default.BPDU: sent 4657, received 188Port 1025 (Ethernet8/1) of VLAN0002 is designated forwardingPort path cost 20000, Port priority 128, Port Identifier 128.1025Designated root has priority 32770, address 0018.bad7.fc15Designated bridge has priority 32770, address 0018.bad7.fc15Designated port id is 128.1025, designated path cost 0Timers: message age 0, forward delay 0, hold 0Number of transitions to forwarding state: 1Link type is point-to-point by default The port type is network by default.BPDU: sent 4838, received 0This 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 detailPort 1281 (Ethernet10/1) of MST0000 is designated forwardingPort path cost 20000, Port priority 128, Port Identifier 128.1281Designated root has priority 28672, address 0018.bad8.239dDesignated bridge has priority 28672, address 0018.bad8.239dDesignated port id is 128.1281, designated path cost 0Timers: message age 0, forward delay 0, hold 0Number of transitions to forwarding state: 1Link type is point-to-point by default, InternalPVST Simulation is enabled by defaultBPDU: sent 290, received 0This example shows how to display detailed STP information about a specified port-channel interface when you are running a virtual port channel (vPC):
switch(config)# show spanning-tree interface port-channel 10Vlan Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------VLAN0001 Root FWD 2 128.4105 (vPC peer-link) P2pVLAN0002 Root FWD 2 128.4105 (vPC peer-link) P2pVLAN0003 Root FWD 2 128.4105 (vPC peer-link) P2pVLAN0004 Root FWD 2 128.4105 (vPC peer-link) P2pRelated Commands
show spanning-tree mst
To display information about the Multiple Spanning Tree (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]]
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 modeSee 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-4094Bridge address 0018.bad7.fc15 priority 32768 (32768 sysid 0)Root this switch for the CISTRegional Root this switchOperational hello time 2 , forward delay 15, max age 20, txholdcount 6Configured hello time 2 , forward delay 15, max age 20, max hops 20Interface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Eth8/1 Desg FWD 20000 128.1025 P2pEth8/2 Desg FWD 20000 128.1026 P2pThis example shows how to display STP information about a specific MST instance:
switch)# show spanning-tree mst 0##### MST0 vlans mapped: 1-4094Bridge address 0018.bad7.fc15 priority 32768 (32768 sysid 0)Root this switch for the CISTRegional Root this switchOperational hello time 2 , forward delay 15, max age 20, txholdcount 6Configured hello time 2 , forward delay 15, max age 20, max hops 20Interface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Eth8/1 Desg FWD 20000 128.1025 P2pEth8/2 Desg FWD 20000 128.1026 P2pThis example shows how to display detailed STP information about the MST protocol:
switch)# show spanning-tree mst detail##### MST0 vlans mapped: 1-4094Bridge address 0018.bad7.fc15 priority 32768 (32768 sysid 0)Root this switch for the CISTRegional Root this switchOperational hello time 2 , forward delay 15, max age 20, txholdcount 6Configured hello time 2 , forward delay 15, max age 20, max hops 20Eth8/1 of MST0 is designated forwardingPort info port id 128.1025 priority 128 cost 20000Designated root address 0018.bad7.fc15 priority 32768 cost 0Design. regional root address 0018.bad7.fc15 priority 32768 cost 0Designated bridge address 0018.bad7.fc15 priority 32768 port id 128.1025Timers: message expires in 0 sec, forward delay 0, forward transitions 1Bpdus sent 1379, received 3Eth8/2 of MST0 is designated forwardingPort info port id 128.1026 priority 128 cost 20000Designated root address 0018.bad7.fc15 priority 32768 cost 0Design. regional root address 0018.bad7.fc15 priority 32768 cost 0Designated bridge address 0018.bad7.fc15 priority 32768 port id 128.1026Timers: message expires in 0 sec, forward delay 0, forward transitions 1Bpdus sent 1380, received 2This example shows how to display STP information about specified MST interfaces:
switch)# show spanning-tree mst interface ethernet 8/2Eth8/2 of MST0 is designated forwardingPort 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 2Instance Role Sts Cost Prio.Nbr Vlans mapped-------- ---- --- --------- -------- -------------------------------0 Desg FWD 20000 128.1026 1-4094This example shows how to display information about the MST configuration:
switch)# show spanning-tree mst configurationName: [mst-bldg-sj6/3]Revision: 1 Instances Configured: 3Instance Vlans mapped--------- --------------------------------------------------0 12000 2-20004094 2001-4094----------------------------------------------------------------This example shows how to display the MD5 digest included in the current MST configuration:
switch)# show spanning-tree mst configuration digestName [mst-config]Revision 10 Instances configured 25Digest 0x40D5ECA178C657835C83BBCB16723192Pre-std Digest 0x27BF112A75B72781ED928D9EC5BB4251Related Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 rootMST Instance Root ID Cost Time Age Dly Root Port---------------- -------------------- ------ ----- --- --- ----------------MST0000 32768 0018.bad7.fc15 0 2 20 15 This bridge is rootRelated Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 summarySwitch is in rapid-pvst modeRoot bridge for: VLAN0001Port Type Default is disableEdge Port [PortFast] BPDU Guard Default is disabledEdge Port [PortFast] BPDU Filter Default is disabledBridge Assurance is enabledLoopguard Default is disabledPathcost method used is shortName Blocking Listening Learning Forwarding STP Active---------------------- -------- --------- -------- ---------- ----------VLAN0001 1 0 0 1 2VLAN0002 2 0 0 0 2VLAN0003 2 0 0 0 2---------------------- -------- --------- -------- ---------- ----------3 vlans 5 0 0 1 6STP-lite running in the following VLAN instances------------------------------------------------VLAN0002VLAN0003This example shows how to display a summary of STP information about the device when you are running MST:
switch(config)# show spanning-tree summarySwitch is in mst mode (IEEE Standard)Root bridge for: MST0000Port Type Default is disableEdge Port [PortFast] BPDU Guard Default is disabledEdge Port [PortFast] BPDU Filter Default is disabledBridge Assurance is enabledLoopguard Default is disabledPathcost method used is longPVST Simulation is enabledName Blocking Listening Learning Forwarding STP Active---------------------- -------- --------- -------- ---------- ----------MST0000 0 0 0 2 2---------------------- -------- --------- -------- ---------- ----------1 mst 0 0 0 2 2Related Commands
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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to display STP information about VLAN 4:
switch# show spanning-tree vlan 4VLAN0004Spanning tree enabled protocol rstpRoot ID Priority 32772Address 000d.eca3.9f01Cost 4Port 4105 (port-channel10)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32772 (priority 32768 sys-id-ext 4)Address 0022.5579.7641Hello Time 2 sec Max Age 20 sec Forward Delay 15 secInterface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- --------------------------------Po10 Root FWD 2 128.4105 (vPC peer-link) P2pPo20 Desg FWD 1 128.4115 (vPC) P2pPo30 Root FWD 1 128.4125 (vPC) P2pRelated Commands
show startup-config vlan
To display VLAN configuration information in the startup configuration, use the show startup-config vlan command.
show startup-config vlan {vlan-id}
Syntax Description
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to display the VLAN information in the startup configuration:
switch(config)# show startup-config vlanversion 4.1(2)vlan 1ip arp inspection vlan 1Related Commands
show startup-config vtp
To display VLAN Trunking Protocol (VTP) configuration information in the startup configuration, use the show startup-config vtp command.
show startup-config vtp
Syntax Description
This command has no arguments or keywords.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to display the VTP information in the startup configuration:
switch(config)# show startup-config vtp
version 4.1(2)feature vtpvtp mode transparentvtp domain accountingRelated Commands
show system vlan reserved
To display the system reserved VLAN range, use the show system vlan reserved command.
show system vlan reserved
Syntax Description
This command has no arguments or keywords.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
network-poerator
vdc-admin
vdc-operatorCommand History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to display the system reserved VLAN range:
switch# show system vlan reservedsystem current running vlan reservation: 3968-4095switch#Related Commands
Command Descriptionsystem vlan reserve
Configures the reserved VLAN range.
write erase all
Reverts to the default reserved VLAN range.
show vlan
To display VLAN information, use the show vlan command.
show vlan [all-ports | brief | {name name} | summary]
Syntax Description
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 vlanVLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Eth5/1, Eth5/2, Eth5/3, Eth5/4
Eth5/5, Eth5/6, Eth5/7, Eth5/8
Eth5/9, Eth5/10, Eth5/11
Eth5/12, Eth5/13, Eth5/14
Eth5/15, Eth5/16, Eth5/17
Eth5/18, Eth5/19, Eth5/20
Eth5/21, Eth5/22, Eth5/23
Eth5/24, Eth5/25, Eth5/26
Eth5/27, Eth5/28, Eth5/29
Eth5/30, Eth5/31, Eth5/32
Eth7/1
10 VLAN0010 active
VLAN Type Vlan-mode
---- ----- ----------
1 enet CE
10 enet FABRICPATH
Remote SPAN VLANs
-------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- --------------- -------------------------------------------
switch#
This example shows how to display the VLANs and all ports for each VLAN:
switch#
show vlan all-portsVLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Po5, Po37, Po50, Eth2/1, Eth2/2Eth2/3, Eth2/5, Eth2/7, Eth2/8Eth2/9, Eth2/10, Eth2/15Eth2/21, Eth2/22, Eth2/23Eth2/24, Eth2/25, Eth2/26Eth2/27, Eth2/28, Eth2/46Eth2/47, Eth2/485 VLAN0005 active6 VLAN0006 active7 VLAN0007 active8 test active9 VLAN0009 active10 VLAN0010 active50 VLAN0050 active Eth2/6100 trunked active200 VLAN0200 active201 VLAN0201 active202 VLAN0202 activeThis example shows how to display the VLAN name, status, and associated ports only:
switch#
show vlan briefVLAN 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 testVLAN 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 summaryNumber of existing VLANs : 9Number of existing user VLANs : 9Number of existing extended VLANs : 0Related Commands
Command Descriptionshow 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 the statistics for a specified VLAN or for all VLANs, use the show vlan counters command.
show vlan [id {vlan-id}] counters
Syntax Description
id
(Optional) Displays the VLAN ID that you want to clear.
vlan-id
Number of the VLAN that you want to clear. The range is from 1 to 4096.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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-20This command does not require a license.
Examples
This example shows how to display statistics for VLAN 9:
switch(config)# show vlan id 9 countersVlan Id :10L2 IPv4 Unicast Octets :0L2 IPv4 Unicast Packets :0L2 IPv4 Multicast Octets :0L2 IPv4 Multicast Packets :0L2 IPv6 Unicast Octets :0L2 IPv6 Unicast Packets :0L2 IPv6 Multicast Octets :0L2 IPv6 Multicast Packets :0L2 Unicast Octets :25600000L2 Unicast Packets :400000L2 Multicast Octets :0L2 Multicast Packets :0L2 Broadcast Octets :12800000L2 Broadcast Packets :200000L2 Unknown Unicast Octets :19200000L2 Unknown Unicast Packets :300000L3 Routed Octets In :0L3 Routed Packets In :0L3 Routed Octets Out :0L3 Routed Packets Out :0L3 Multicast Octets In :0L3 Multicast Packets In :0L3 Multicast Octets Out :0L3 Multicast Packets Out :0L3 Unicast Octets In :0L3 Unicast Packets In :0L3 Unicast Octets Out :0L3 Unicast Packets Out :0Related Commands
Command Descriptionclear 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 Rolesnetwork-admin
vdc-admin
Command History
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 nativevlan dot1q native tag is disabledRelated Commands
Command Descriptionvlan 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 the VLAN or range of VLANs. The range is from 1 to 4096.
counters
Statistics about specified VLANs.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 by 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 50VLAN Name Status Ports---- -------------------------------- --------- -------------------------------50 VLAN0050 active Eth2/6VLAN Type---- -----50 enetRemote SPAN VLAN----------------DisabledPrimary Secondary Type Ports------- --------- --------------- -------------------------------------------#This example shows how to display statistics for VLAN 10:
switch(config)# show vlan id 10 countersVlan Id :10L2 IPv4 Unicast Octets :0L2 IPv4 Unicast Packets :0L2 IPv4 Multicast Octets :0L2 IPv4 Multicast Packets :0L2 IPv6 Unicast Octets :0L2 IPv6 Unicast Packets :0L2 IPv6 Multicast Octets :0L2 IPv6 Multicast Packets :0L2 Unicast Octets :25600000L2 Unicast Packets :400000L2 Multicast Octets :0L2 Multicast Packets :0L2 Broadcast Octets :12800000L2 Broadcast Packets :200000L2 Unknown Unicast Octets :19200000L2 Unknown Unicast Packets :300000L3 Routed Octets In :0L3 Routed Packets In :0L3 Routed Octets Out :0L3 Routed Packets Out :0L3 Multicast Octets In :0L3 Multicast Packets In :0L3 Multicast Octets Out :0L3 Multicast Packets Out :0L3 Unicast Octets In :0L3 Unicast Packets In :0L3 Unicast Octets Out :0L3 Unicast Packets Out :0Related Commands
Command Descriptionclear vlan counters
Clears the counters for all or specified 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
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
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-vlanPrimary Secondary Type Ports------- --------- --------------- ------------------------200 201 isolated Eth2/26, Eth2/27200 202 community Eth2/26, Eth2/28This example shows how to display information for a specific private VLAN:
switch(config)# show vlan id 202 private-vlanPrimary Secondary Type Ports------- --------- --------------- ---------------------------200 202 community Eth2/26, Eth2/28This example shows how to display information about the types of all private VLANs on the device:
switch(config)# show vlan private-vlan typeVlan Type---- -----------------200 primary201 isolated202 communityThis example shows how to display information on the type for the specified private VLAN:
switch(config)# show vlan id 202 private-vlan typeVlan Type---- -----------------202 communityRelated Commands
show vtp counter
To display the Virtual Trunking Protocol (VTP) statistics information, use the show vtp counter command.
show vtp counter
Syntax Description
This command has no keywords or arguments.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to display statistics information about VTP on the device:
switch# show vtp counter
VTP statistics:Summary advertisements received : 544Subset advertisements received : 270Request advertisements received : 0Summary advertisements transmitted : 260Subset advertisements transmitted : 5Request advertisements transmitted : 274Number of config revision errors : 0Number of config digest errors : 270Number of V1 summary errors : 0VTP pruning statistics:Trunk Join Transmitted Join Received Summary advts received fromnon-pruning-capable device---------------- ---------------- ---------------- ---------------------------Ethernet1/31 12977 12982 542switch#Related Commands
Command Descriptionfeature vtp
Enables VTP on the device.
vtp domain
Configures the VTP domain name.
vtp version
Configures the VTP version.
show vtp interface
To display the Virtual Trunking Protocol (VTP) interface status and configuration, use the show vtp interface command.
show vtp interface [if-identifier]
Syntax Description
if-identifier
(Optional) Identifier of an interface. Examples are ethernet 3/22 or port channel 120.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
If a single interface is specified, then the information for that interface alone is presented to the user; otherwise, the command applies to all currently active interfaces.
This command does not require a license.
Examples
This example shows how to display the VTP interface status and configuration on the device:
switch# show vtp interface ethernet 3/22
Interface VTP Status--------------------------------Ethernet3/22 Enabledswitch#switch# show vtp interface
Interface VTP Status--------------------------------Ethernet1/8 EnabledEthernet3/2 DisabledEthernet3/22 Enabledswitch#Related Commands
show vtp password
To display a Virtual Trunking Protocol (VTP) password, use the show vtp password command.
show vtp password
Syntax Description
This command has no keywords or arguments.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to display a VTP password on the device:
switch# show vtp password squ1rrel
VTP password:switch#Related Commands
Command Descriptionfeature vtp
Enables VTP on the device.
vtp domain
Configures the VTP domain name.
vtp version
Configures the VTP version.
show vtp status
To display the Virtual Trunking Protocol (VTP) information, use the show vtp status command.
show vtp status
Syntax Description
This command has no keywords or arguments.
Defaults
None
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command is not available if VTP is not enabled.
Note You cannot enable or configure VTP pruning or V2 modes.
This command does not require a license.
Examples
This example shows how to display information about VTP on the device:
switch# show vtp status
VTP Status Information----------------------VTP Version : 2 (capable)Configuration Revision : 1Maximum VLANs supported locally : 1005Number of exisiting VLANs : 17VTP Operating Mode : ServerVTP Domain Name :VTP Pruning Mode : Disabled (Operationally Disabled)VTP V2 Mode : DisabledMD5 Digest : 0x8D 0x0D 0xB4 0xE8 0xC3 0x3C 0x7F 0x99Configuration last modified by 0.0.0.0 at 6-30-10 18:05:13VTP version running : 1switch#Related Commands
Command Descriptionfeature vtp
Enables VTP on the device.
vtp domain
Configures the VTP domain name.
vtp version
Configures the VTP version.
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 Rolesnetwork-admin
vdc-admin
Command History
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 2switch(
config-vlan)#
no shutdownswitch(config-vlan)#Related Commands
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
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 Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Caution Be careful when you enter the spanning-tree bpdufilter enable command on specified interfaces. Explicitly configuring BPDU Filtering on a port that is not connected to a host can cause a bridging loop because the port ignores 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 enableswitch(config-if)#Related Commands
spanning-tree bpduguard
To enable bridge protocol data unit (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
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 Rolesnetwork-admin
vdc-admin
Command History
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 enable—Unconditionally enables BPDU Guard on the interface.
•spanning-tree bpduguard disable—Unconditionally 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 enableswitch(config-if)#Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
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 bridge protocol data units (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 assuranceswitch(config)#
Related Commands
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 from 1 to 65536.
•long—The range is from 1 to 200,000,000.
auto
Sets the value of the port cost by the media speed of the interface (see Table 1-2 for the values).
Defaults
auto
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 path-cost calculation method for Rapid PVST+.
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 Per VLAN Spanning Tree Plus (PVST+). Use the spanning-tree mst cost command to set the port cost for Multiple Spanning Tree (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/0switch(config-if)#
spanning-tree cost 250switch(config-if)#
Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
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 rootswitch(config-if)#Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
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 sharedswitch(config-if)#Related Commands
Command Descriptionshow 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 Rolesnetwork-admin
vdc-admin
Command History
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 defaultswitch(config#Related Commands
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
Defaults
Rapid PVST+
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You cannot use both Rapid PVST+ and MST in a single virtual device context (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 mstswitch(config-mst)#
This example shows how to return to the default mode (Rapid PVST+):
switch(config)#
no spanning-tree modeswitch(config)#
Related Commands
Command Descriptionshow 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 Rolesnetwork-admin
vdc-admin
Command History
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:-> 3See 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 accessThis command does not require a license.
Examples
This example shows how to enter MST-configuration submode:
switch(config)#
spanning-tree mst configurationswitch(
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 configurationswitch(config)#
Related Commands
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
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 Rolesnetwork-admin
vdc-admin
Command History
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 does not require a license.
Examples
This example shows how to set the interface path cost:
switch(config-if)#
spanning-tree mst 0 cost 17031970switch(config-if)#
Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
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 20switch(config)#
Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
If you do not specify the hello-time value, the value is calculated from the network diameter.
Note We recommend that you configure the hello time to be 4 seconds when you are working with virtual port channels (vPCs).
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 3switch(config)#
Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
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 40switch(config)#
Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
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 25switch(config)#
Related Commands
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 Rolesnetwork-admin
vdc-admin
Command History
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 64switch(config-if)#
Related Commands
Command Descriptionshow spanning-tree mst
Displays the information about the MST protocol.
Configures the 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, Multiple Spanning Tree (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 Rolesnetwork-admin
vdc-admin
Command History
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 pre-standard 0 root priority 4096switch(config)#Related Commands
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
Defaults
priority-value default is 32768.
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
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 priority 4096switch(config)#Related Commands
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
Defaults
spanning-tree mst root has no default settings.
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You can enter the instance-id argument as a single instance or a range of instances, for example, 0-3,5,7-9.
The diameter dia and hello-time hello-time keywords and arguments are available for instance 0 (IST) only.
If you do not specify the hello-time argument, the argument is calculated from the network diameter. You must first specify the diameter dia keyword and argument before you can specify the hello-time hello-time keyword and argument.
This command does not require a license.
Examples
This example shows how to designate the primary root:
switch(config)# spanning-tree mst 0 root primaryswitch(config)#This example shows how to set the priority and timer values for the bridge:
switch(config)# spanning-tree mst 0 root primary diameter 7 hello-time 2switch(config)# spanning-tree mst 5 root primaryswitch(config)#Related Commands
spanning-tree mst simulate pvst
To prevent specific Multiple Spanning Tree (MST) interfaces from automatically interoperating with a connecting device running Rapid per VLAN Spanning Tree (Rapid PVST+), use the spanning-tree mst simulate pvst disable command. To return specific interfaces to the default settings that are set globally for the device, use the no form of this command. To reenable specific interfaces to automatically interoperate between MST and Rapid PVST+, use the spanning-tree mst simulate pvst command.
spanning-tree mst simulate pvst
no spanning-tree mst simulate pvst
spanning-tree mst simulate pvst disable
Syntax Description
This command has no keywords or arguments.
Defaults
Enabled. By default, all interfaces on the device interoperate seamlessly between MST and Rapid PVST+. See spanning-tree mst simulate pvst global to change this behavior globally.
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Note The interfaces must be in Layer 2 port mode to use this command.
MST interoperates with Rapid PVST+ with no need for user configuration. The PVST simulation feature enables this seamless interoperability. However, you may want to control the connection between MST and Rapid PVST+ to protect against accidentally connecting an MST-enabled port to a Rapid PVST+-enabled port.
When you use the spanning-tree mst simulate pvst disable command, specified MST interfaces that receive a Rapid PVST+ (SSTP) bridge protocol data unit (BPDU) move into the STP blocking state. Those interfaces remain in the inconsistent state until the port stops receiving Rapid PVST+ BPDUs, and then the port resumes the normal Spanning Tree Protocol STP transition process.
Note To block automatic MST and Rapid PVST+ interoperability for the entire device, use the no spanning-tree mst simulate pvst global command, which can be used in interface command mode.
This command is useful when you want to prevent accidental connection with a device running Rapid PVST+.
To reenable seamless operation between MST and Rapid PVST+ on specific interfaces, use the spanning-tree mst simulate pvst command.
This command does not require a license.
Examples
This example shows how to prevent specified ports from automatically interoperating with a connected device running Rapid PVST+:
switch(config-if)#
spanning-tree mst simulate pvst disableswitch(
config-if)#
Related Commands
spanning-tree mst simulate pvst global
To prevent the Multiple Spanning Tree (MST) device from automatically interoperating with a connecting device running Rapid Per VLAN Spanning Tree (Rapid PVST+), use the no spanning-tree mst simulate pvst global command. To return to the default settings, which is seamless operation between MST and Rapid PVST+ on the device, use the spanning-tree mst simulate pvst global command.
spanning-tree mst simulate pvst global
no spanning-tree mst simulate pvst global
Syntax Description
This command has no keywords or arguments.
Defaults
Enabled. By default, the device interoperates seamlessly between MST and Rapid PVST+.
Command Modes
Global configuration
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
MST does not require user configuration to interoperate with Rapid PVST+. The PVST simulation feature enables this seamless interoperability. However, you may want to control the connection between MST and Rapid PVST+ to protect against accidentally connecting an MST-enabled port to a Rapid PVST+-enabled port.
When you use the no spanning-tree mst simulate pvst global command, the device running in MST mode moves all interfaces that receive a Rapid PVST+ (SSTP) bridge protocol data unit (BPDU) into the Spanning Tree Protocol (STP) blocking state. Those interfaces remain in the inconsistent state until the port stops receiving Rapid PVST+ BPDUs, and then the port resumes the normal STP transition process.
You can also use this command from the interface mode, and the configuration applies to the entire device.
Note To block automatic MST and Rapid PVST+ interoperability for specific interfaces, see the spanning-tree mst simulate pvst command.
This command is useful when you want to prevent accidental connection with a device not running MST.
To return the device to seamless operation between MST and Rapid PVST+, use the spanning-tree mst simulate pvst global command.
This command does not require a license.
Examples
This example shows how to prevent all ports on the device from automatically interoperating with a connected device running Rapid PVST+:
switch(config)#
no spanning-tree mst simulate pvst globalswitch(
config)#
Related Commands
spanning-tree pathcost method
To set the default path-cost calculation method, use the spanning-tree pathcost method command. To return to the default settings, use the no form of this command.
spanning-tree pathcost method {long | short}
no spanning-tree pathcost method
Syntax Description
long
Specifies the 32-bit based values for port path costs.
short
Specifies the 16-bit based values for port path costs.
Defaults
short
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Note This command applies only to the Rapid Per VLAN Spanning Tree Plus (PVST+) spanning tree mode, which is the default mode. When you are using MST spanning tree mode, the device uses only the long method for calculating path cost; this is not user-configurable for MST.
The long path-cost calculation method uses all 32 bits for path-cost calculations and yields valued in the range of 2 through 2,00,000,000.
The short path-cost calculation method (16 bits) yields values in the range of 1 through 65535.
This command does not require a license.
Examples
This example shows how to set the default pathcost method to long:
switch(config)#
spanning-tree pathcost method longswitch(config)#
Related Commands
spanning-tree port type edge
To configure an interface connected to a Layer 2 host as an edge port, which automatically transitions the port to the spanning tree forwarding state without passing through the blocking or learning states, use the spanning-tree port type edge command. To return the port to a normal spanning tree port, use the no spanning-tree port type command or the spanning-tree port type normal command.
spanning-tree port type edge [trunk]
no spanning-tree port type
spanning-tree port type normal
Syntax Description
Defaults
The default is the global setting for the default port type edge that is configured when you entered the spanning-tree port type edge default command. If you did not configure a global setting, the default spanning tree port type is normal.
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You can also use this command to configure a port in trunk mode as a spanning tree edge port.
Caution 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 linkup occurs, spanning tree edge ports are moved directly to the spanning tree forwarding state without waiting for the standard forward-time delay.
Note This functionality that was previously provided by the Cisco-proprietary PortFast feature.
When you use this command, the system returns a message similar to the following:
Warning: portfast should only be enabled on ports connected to a singlehost. Connecting hubs, concentrators, switches, bridges, etc... to thisinterface when portfast is enabled, can cause temporary bridging loops.Use with CAUTIONWhen you use this command without the trunk keyword, the system returns a message similar to the following:
%Portfast has been configured on GigabitEthernet2/8 but will onlyhave effect when the interface is in a non-trunking mode.To configure trunk interfaces as spanning tree edge ports, use the spanning-tree port type trunk command. To remove the spanning tree edge port type setting, use the spanning-tree port type normal command.
The default spanning tree port type is normal.
This command does not require a license.
Examples
This example shows how to configure an interface connected to a Layer 2 host as an edge port, which automatically transitions that interface to the forwarding state on linkup:
switch(config-if)#
spanning-tree port type edgeswitch(config-if)#
Related Commands
Command Descriptionshow spanning-tree interface
Displays the information about the spanning tree interface.
spanning-tree port type edge bpdufilter default
To enable BPDU Filtering by default on all spanning tree edge ports, use the spanning-tree port type edge bpdufilter default command. To disable BPDU Filtering by default on all edge ports, use the no form of this command.
spanning-tree port type edge bpdufilter default
no spanning-tree port type edge bpdufilter default
Syntax Description
This command has no keywords or arguments.
Defaults
Disabled
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
To enable BPDU Filtering by default, you must:
•Configure the interface as a spanning tree edge port by using the spanning-tree port type edge or the spanning-tree port type edge default command.
•Enable BPDU Filtering.
Use this command to enable BPDU Filtering globally on all spanning tree edge ports. BPDU Filtering prevents a port from sending or receiving any BPDUs.
Caution Be careful when using this command. Using this command incorrectly can cause bridging loops.
You can override the global effects of this spanning-tree port type edge bpdufilter default command by configuring BPDU Filtering at the interface level. See the spanning-tree bpdufilter command for complete information on using this feature at the interface level.
Note Be careful when enabling BPDU Filtering. The feature's functionality is different when you enable it on a per-port basis or globally. When enabled globally, BPDU Filtering is applied only on ports that are operational spanning tree edge ports. Ports send a few BPDUs at a linkup before they effectively filter outbound BPDUs. If a BPDU is received on an edge port, that port immediately becomes a normal spanning tree port with all the normal transitions and BPDU Filtering is disabled. When enabled locally on a port, BPDU Filtering prevents the device from receiving or sending BPDUs on this port.
This command does not require a license.
Examples
This example shows how to enable BPDU Filtering globally on all spanning tree edge operational ports by default:
switch(config)#
spanning-tree port type edge bpdufilter defaultswitch(config)#
Related Commands
spanning-tree port type edge bpduguard default
To enable BPDU Guard by default on all spanning tree edge ports, use the spanning-tree port type edge bpduguard default command. To disable BPDU Guard on all edge ports by default, use the no form of this command.
spanning-tree port type edge bpduguard default
no spanning-tree port type edge bpduguard default
Syntax Description
This command has no keywords or arguments.
Defaults
Disabled
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
To enable BPDU Guard by default, you must do the following:
•Configure the interface as spanning tree edge ports by entering the spanning-tree port type edge or the spanning-tree port type edge default command.
•Enable BPDU Guard.
Use this command to enable BPDU Guard globally on all spanning tree edge ports. BPDU Guard disables a port if it receives a BPDU.
Global BPDU Guard is applied only on spanning tree edge ports.
You can also enable BPDU Guard per interface; see the spanning-tree bpduguard command for more information.
Note We recommend that you enable BPDU Guard on all spanning tree edge ports.
This command does not require a license.
Examples
This example shows how to enable BPDU Guard by default on all spanning tree edge ports:
switch(config)#
spanning-tree port type edge bpduguard defaultswitch(config)#
Related Commands
spanning-tree port type edge default
To configure all access ports that are connected to Layer 2 hosts as edge ports by default, use the spanning-tree port type edge default command. To restore all ports connected to Layer 2 hosts as normal spanning tree ports by default, use the no form of this command.
spanning-tree port type edge default
no spanning-tree port type edge default
Syntax Description
This command has no arguments or keywords.
Defaults
Disabled
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Use this command to automatically configure all interfaces as spanning tree edge ports by default. This command does not work on trunk ports.
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 a linkup occurs, an interface configured as an edge port automatically moves the interface directly to the spanning tree forwarding state without waiting for the standard forward-time delay. (This transition was previously configured as the Cisco-proprietary PortFast feature.)
When you use this command, the system returns a message similar to the following:
Warning: this command enables portfast by default on all interfaces. Youshould now disable portfast explicitly on switched ports leading to hubs,switches and bridges as they may create temporary bridging loops.You can configure individual interfaces as edge ports using the spanning-tree port type edge command.
The default spanning tree port type is normal.
This command does not require a license.
Examples
This example shows how to globally configure all ports connected to Layer 2 hosts as spanning tree edge ports:
switch(config)#
spanning-tree port type edge defaultswitch(config)#
Related Commands
Command Descriptionshow spanning-tree summary
Displays information about the spanning tree configuration.
Configures an interface as a spanning tree edge port.
spanning-tree port type network
To configure the interface that connects to a Layer 2 switch or bridge as a network spanning tree port, regardless of the global configuration, use the spanning-tree port type network command. To return the port to a normal spanning tree port, use the spanning-tree port type normal command.
spanning-tree port type network
no spanning-tree port type
spanning-tree port type normal
Syntax Description
This command has no arguments or keywords.
Defaults
The default is the global setting for the default port type network that is configured when you entered the spanning-tree port type network default command. If you did not configure a global setting, the default spanning tree port type is normal.
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Use this command to configure an interface that connects to a Layer 2 switch or bridge as a spanning tree network port. Bridge Assurance runs only on Spanning Tree Protocol (STP) network ports.
Note If you mistakenly configure ports connected to Layer 2 hosts as STP network ports and enable Bridge Assurance, those ports automatically move into the blocking state.
Note Bridge Assurance is enabled by default, and all interfaces configured as spanning tree network ports have Bridge Assurance enabled.
To configure a port as a spanning tree network port, use the spanning-tree port type network command. To remove this configuration, use the spanning-tree port type normal command. When you use the no spanning-tree port type command, the software returns the port to the global default setting for network port types.
You can configure all ports that are connected to Layer 2 switches or bridges as spanning tree network ports by default by entering the spanning-tree port type network default command.
The default spanning tree port type is normal.
This command does not require a license.
Examples
This example shows how to configure an interface connected to a Layer 2 switch or bridge as a spanning tree network port:
switch(config-if)#
spanning-tree port type networkswitch(config-if)#
Related Commands
Command Descriptionshow spanning-tree interface
Displays information about the spanning tree configuration per specified interface.
spanning-tree port type network default
To configure all ports as spanning tree network ports by default, use the spanning-tree port type network default command. To restore all ports to normal spanning tree ports by default, use the no form of this command.
spanning-tree port type network default
no spanning-tree port type network default
Syntax Description
This command has no arguments or keywords.
Defaults
Disabled
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Use this command to automatically configure all interfaces that are connected to Layer 2 switches or bridges as spanning tree network ports by default. Then, you can use the spanning-tree port type edge command to configure specified ports that are connected to Layer 2 hosts as spanning-tree edge ports.
Note If you mistakenly configure ports connected to Layer 2 hosts as Spanning Tree Protocol (STP) network ports and Bridge Assurance is enabled, those ports automatically move into the blocking state.
If you have enabled Bridge Assurance on the device, all network ports automatically run that feature. To enable Bridge Assurance, see the spanning-tree bridge assurance command.
Configure only the ports that connect to other Layer 2 switches or bridges as network ports because the Bridge Assurance feature causes network ports that are connected to Layer 2 hosts to move into the spanning tree blocking state.
You can identify individual interfaces as network ports by using the spanning-tree port type network command.
The default spanning tree port type is normal.
This command does not require a license.
Examples
This example shows how to globally configure all ports connected to Layer 2 switches or bridges as spanning tree network ports:
switch(config)#
spanning-tree port type network defaultswitch(config)#
Related Commands
Command Descriptionshow spanning-tree summary
Displays information about the spanning tree configuration.
spanning-tree port-priority
To set an interface priority when two bridges compete for position as the root bridge, use the spanning-tree port-priority command. The priority you set breaks the tie. To return to the default settings, use the no form of this command.
spanning-tree [vlan vlan-id] port-priority value
no spanning-tree [vlan vlan-id] port-priority
Syntax Description
vlan vlan-id
(Optional) Specifies the VLAN identification number; the range of valid values is from 0 to 4094.
value
Port priority; valid values are from 1 to 224 in increments of 32.
Defaults
value is 128.
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Note Use this command to configure the port priority for Rapid Per VLAB Spanning Tree Plus (PVST+) spanning tree mode, which is the default Spanning Tree Protocol (STP) mode. To configure the port priority for Multiple Spanning Tree (MST) spanning tree mode, use the spacing-tree mst port-priority command.
Do not use the vlan vlan-id parameter on access ports. The software uses the port priority value for access ports and the VLAN port priority values for trunk ports.
The priority values are 0, 32, 64, 96, 128, 160, 192, and 224. All other values are rejected.
This command does not require a license.
Examples
This example shows how to increase the likelihood that the spanning tree instance on access port interface 2/0 is chosen as the root bridge by changing the port priority to 32:
switch(config-if)#
spanning-tree port-priority 32switch(config-if)#
Related Commands
spanning-tree interface priority
Displays information on the spanning tree port priority for the interface.
spanning-tree vlan
To configure Spanning Tree Protocol (STP) parameters on a per-VLAN basis, use the spanning-tree vlan command. To return to the default settings, use the no form of this command.
spanning-tree vlan vlan-id [forward-time value | hello-time value | max-age value | priority value | [root {primary | secondary} [diameter dia [hello-time hello-time]]]]
no spanning-tree vlan vlan-id [forward-time | hello-time | max-age | priority | root]
Syntax Description
Defaults
The defaults are as follows:
•forward-time—15 seconds
•hello-time—2 seconds
•max-age—20 seconds
•priority—32768
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Caution When disabling spanning tree on a VLAN using the no spanning-tree vlan vlan-id command, ensure that all switches and bridges in the VLAN have spanning tree disabled. You cannot disable spanning tree on some switches and bridges in a VLAN and leave it enabled on other switches and bridges in the same VLAN because switches and bridges with spanning tree enabled have incomplete information about the physical topology of the network.
Caution We do not recommend disabling spanning tree even in a topology that is free of physical loops. Spanning tree is a safeguard against misconfigurations and cabling errors. Do not disable spanning tree in a VLAN without ensuring that there are no physical loops present in the VLAN.
When setting the max-age seconds, if a bridge does not see BPDUs from the root bridge within the specified interval, it assumes that the network has changed and recomputes the spanning-tree topology.
The spanning-tree root primary alters this device's bridge priority to 24576. If you enter the spanning-tree root primary command and the device does not become the root then the bridge priority is changed to 4096 less than the bridge priority of the current bridge. The command fails if the value required to be the root bridge is less than 1. If the device does not become the root, an error results.
If the network devices are set for the default bridge priority of 32768 and you enter the spanning-tree root secondary command, the software alters this device's bridge priority to 28762. If the root device fails, this device becomes the next root switch.
Use the spanning-tree root command on the backbone switches only.
Note We recommend that you configure the hello time to be 4 seconds when you are working with virtual port channels (vPCs).
This command does not require a license.
Examples
This example shows how to enable spanning tree on VLAN 200:
switch(config)#
spanning-tree vlan 200switch(config)#
This example shows how to configure the device as the root switch for VLAN 10 with a network diameter of 4:
switch(config)#
spanning-tree vlan 10 root primary diameter 4switch(config)#
This example shows how to configure the device as the secondary root switch for VLAN 10 with a network diameter of 4:
switch(config)#
spanning-tree vlan 10 root secondary diameter 4switch(config)#
Related Commands
state
To set the operational state for a VLAN, use the state command. To return a VLAN to its default operational state, use the no form of this command.
state {active | suspend}
no state
Syntax Description
active
Specifies that the VLAN is actively passing traffic.
suspend
Specifies that the VLAN is not passing any packets.
Defaults
active
Command Modes
VLAN configuration submode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You cannot suspend the state for VLAN 1 or VLANs 1006 to 4094.
VLANs in the suspended state do not pass packets.
This command does not require a license.
Examples
This example shows how to suspend VLAN 2:
switch(config)#
vlan 2switch(
config-vlan)#
state suspendswitch(config-mst)#Related Commands
switchport mode private-vlan host
To set the interface type to be a Layer 2 host port for a private VLAN, use the switchport mode private-vlan host command.
switchport mode private-vlan host
Syntax Description
This command has no keywords or arguments.
Defaults
None
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You must first use the switchport command on the interface before you can use the switchport mode private-vlan host command.
When you configure a port as a host private VLAN port and one of the following applies, the port becomes inactive:
•The port does not have a valid private VLAN association configured.
•The port is a Switched Port Analyzer (SPAN) destination.
•The private VLAN association is suspended.
If you delete a private VLAN port association, or if you configure a private port as a SPAN destination, the deleted private VLAN port association or the private port that is configured as a SPAN destination becomes inactive.
Note We recommend that you enable spanning tree BPDU Guard on all private VLAN host ports.
This command does not require a license.
Examples
This example shows how to set a port to host mode for private VLANs:
switch(config-if)#
switchport mode private-vlan hostswitch(config-if)#
Related Commands
Command Descriptionshow interface switchport
Displays information on all interfaces configured as switchports.
switchport mode private-vlan promiscuous
To set the interface type to be a Layer 2 promiscuous port for a private VLAN, use the switchport mode private-vlan promiscuous command.
switchport mode private-vlan promiscuous
Syntax Description
This command has no keywords or arguments.
Defaults
None
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You must first use the switchport command on the interface before you can use the switchport mode private-vlan promiscuous command.
When you configure a port as a promiscuous private VLAN port and one of the following applies, the port becomes inactive:
•The port does not have a valid private VLAN mapping configured.
•The port is a Switched Port Analyzer (SPAN) destination.
If you delete a private VLAN port mapping or if you configure a private port as a SPAN destination, the deleted private VLAN port mapping or the private port that is configured as a SPAN destination becomes inactive.
See the private-vlan command for more information on promiscuous ports.
This command does not require a license.
Examples
This example shows how to set a port to promiscuous mode for private VLANs:
switch(config-if)#
switchport mode private-vlan promiscuousswitch(config-if)#
Related Commands
Command Descriptionshow interface switchport
Displays information on all interfaces configured as switchports.
switchport mode private-vlan promiscuous trunk
To set the interface type to be a Layer 2 promiscuous trunk port for a private VLAN, use the switchport mode private-vlan promiscuous trunk command.
switchport mode private-vlan promiscuous trunk
Syntax Description
This command has no keywords or arguments.
Defaults
None
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Note See the Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide for more information on trunk interfaces.
You must first use the switchport command on the interface before you can use the switchport mode private-vlan promiscuous trunk command. To return to the default Layer 3 port mode, enter the no switchport command.
Beginning with Cisco Release 5.0(2) for the Cisco Nexus 7000 Series devices, you can configure private VLAN promiscuous trunk ports to carry traffic for multiple primary VLANs and their mapped secondary VLANs.
You must map the primary and secondary VLANs, by entering the private-vlan mapping command, before the pair you are mapping to a promiscuous trunk port can become operational. You can map 16 pairs of primary and secondary VLANs to a private VLAN promiscuous trunk port.
This command does not require a license.
Examples
This example shows how to set a port to be a promiscuous trunk port for private VLANs:
switch(config-if)#
switchport mode private-vlan promiscuous trunkswitch(config-if)#
Related Commands
Command Descriptionshow interface switchport
Displays information about all interfaces configured as switchports.
switchport mode private-vlan trunk secondary
To set the interface type to be a Layer 2 isolated trunk port for a private VLAN, use the switchport mode private-vlan trunk secondary command.
switchport mode private-vlan trunk secondary
Syntax Description
This command has no keywords or arguments.
Defaults
None
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
Note See the Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide for more information on trunk interfaces.
You must first use the switchport command on the interface before you can use the switchport mode private-vlan trunk secondary command. To return to the default Layer 3 port mode, enter the no switchport command.
Note You can only make private VLAN isolated ports trunk ports; you cannot make private VLAN community ports trunk ports.
Beginning with Cisco Release 5.0(2) for the Cisco Nexus 7000 Series devices, you can configure private VLAN isolated trunk ports to carry traffic for multiple isolated VLANs and their associated primary VLANs.
Note Each secondary VLAN on an isolated trunk port must be associated with a different primary VLAN. You cannot put two isolated VLANs that are associated with the same primary VLAN into a private VLAN isolated trunk port.
You can map 16 pairs of primary and secondary VLANs to a private VLAN isolated trunk port.
You must associate the primary and secondary isolated VLANs before the pair you map to an isolated trunk port can become operational.
Note We recommend that you enable spanning tree BPDU Guard on all private VLAN host ports.
This command does not require a license.
Examples
This example shows how to set a port to be an isolated trunk port for private VLANs:
switch(config-if)#
switchport mode private-vlan trunk secondaryswitch(config-if)#
Related Commands
Command Descriptionshow interface switchport
Displays information about all interfaces configured as switchports.
switchport private-vlan association trunk
To add private VLANs, associated isolated VLANs, and primary VLANs to a private VLAN isolated trunk port, use the switchport private-vlan association trunk command. To remove the private VLAN association from the port, use the no form of this command.
switchport private-vlan association trunk {primary-vlan-id} {secondary-vlan-id}
no switchport private-vlan association trunk [{primary-vlan-id} {secondary-vlan-id}]
Syntax Description
Defaults
None
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You must have configured the interface using the switchport mode private-vlan trunk secondary command before this command becomes operational.
You use the switchport private-vlan association trunk command to add private VLANs, isolated VLANs, and their associated primary VLANs to the isolated trunk port. In this way, the isolated trunk port can carry multiple private VLANs. You can add up to 16 pairs of isolated and primary VLANs to each isolated trunk port. You must associate the private VLANs by entering the private-vlan association command before this command becomes operational.
Note Each secondary VLAN on an isolated trunk port must be associated with a different primary VLAN. You cannot put two isolated VLANs that are associated with the same primary VLAN into a private VLAN isolated trunk port.
Delete associations by doing the following:
•Private VLAN associations, both primary and secondary VLANs, by entering the no form of this command.
•Secondary VLANs and their associated primary VLANs by entering the no form of the command with the primary-vlan-id argument
•Specified primary and secondary associated private VLANs by entering the no form of the command and the primary-vlan-id and secondary-vlan-id arguments.
This command does not require a license.
Examples
This example shows how to add isolated VLAN 200 and its associated primary VLAN 100 to a private VLAN isolated trunk port:
switch(config-if)#
switchport private-vlan association trunk 100 200switch(config-if)#
Related Commands
switchport private-vlan host-association
To define a private VLAN association for an isolated or community port, use the switchport private-vlan host-association command. To remove the private VLAN association from the port, use the no form of this command.
switchport private-vlan host-association {primary-vlan-id} {secondary-vlan-id}
no switchport private-vlan host-association
Syntax Description
primary-vlan-id
Number of the primary VLAN of the private VLAN relationship.
secondary-vlan-id
Number of the secondary VLAN of the private VLAN relationship.
Defaults
None
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
There is no run-time effect on the port unless it is in private VLAN-host mode. If the port is in private VLAN-host mode but neither of the VLANs exist, the command is allowed but the port is made inactive. The port also may be inactive when the association between the private VLANs is suspended.
The secondary VLAN may be an isolated or community VLAN.
See the private-vlan command for more information on primary VLANs, secondary VLANs, and isolated or community ports.
This command does not require a license.
Examples
This example shows how to configure a Layer 2 host private VLAN port with a primary VLAN (VLAN 18) and a secondary VLAN (VLAN 20):
switch(config-if)#
switchport private-vlan host-association 18 20switch(config-if)#
This example shows how to remove the private VLAN association from the port:
switch(config-if)#
no switchport private-vlan host-associationswitch(config-if)#
Related Commands
switchport private-vlan mapping trunk
To add or remove private VLAN pairs to the private VLAN promiscuous trunk port, use the switchport private-vlan mapping trunk command. To remove private VLAN mappings from the promiscuous trunk interface, use the no form of this command.
switchport private-vlan mapping trunk primary-vlan {add secondary-vlan-list | remove secondary-vlan-list}
no switchport private-vlan mapping trunk [{primary-vlan} [{secondary-vlan-list}]]
Syntax Description
Defaults
None
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You must have configured the interface by using the switchport mode private-vlan trunk promiscuous command before this command becomes operational.
You use the switchport private-vlan mapping trunk command to add private VLANs, primary VLANs, and specified associated secondary VLANs to the promiscuous trunk port. In this way, the promiscuous trunk port can carry multiple private VLANs as well as normal VLANs. The secondary VLAN can be either an isolated or community VLAN. The private VLAN mapping between primary and secondary VLANs must be operational (see the private-vlan mapping command). You can add up to 16 pairs of isolated and primary VLANs to each isolated trunk port.
You must reenter the command for each primary VLAN that you are working with.
When you are using the no form of this command, the following guidelines apply:
•If you do not specify any primary VLANs, the system removes all the private VLANs on this interface.
•If you specify only the primary VLAN, the system removes that primary VLAN and all secondary VLANs associated with that primary VLAN on this interface.
•If you specify the primary VLAN and specific secondary VLANs, the system removes only those specified private VLAN pairs from this interface.
Note You must configure this interface as a VLAN interface if you want Layer 3 communication on this port.
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.
This command does not require a license.
Examples
This example shows how to map two primary VLANs and selected associated secondary VLANs to the promiscuous trunk interface:
switch(config-if)#
switchport private-vlan mapping trunk 200 add 3,5switch(config-if)#
switchport private-vlan mapping trunk 100 add 10switch(config-if)#
Related Commands
switchport private-vlan trunk allowed vlan
To add allowed VLANs to the private VLAN promiscuous and isolated trunk ports, use the switchport private-vlan trunk allowed vlan command. To remove VLANs from the promiscuous and isolated trunk interfaces, use the no form of this command.
switchport private-vlan trunk allowed vlan {add vlan-list | all | except vlan-list | none | remove vlan-list}
no switchport private-vlan trunk no allowed vlan vlan-list
Syntax Description
Defaults
Empty; no VLANs are allowed on the private VLAN promiscuous and isolated trunk ports by default.
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You must have configured the interface by using either the switchport mode private-vlan trunk secondary or the switchport mode private-vlan trunk promiscuous command for this command to become operational.
When you map the private primary and secondary private VLANs to the isolated and promiscuous trunk ports, the system automatically adds all the primary VLANs into the list of allowed VLANs for this interface.
Note Ensure that the native VLAN is on the allowed VLANs on this interface. By default, these interface do not allow any traffic. So, even if you are using the default VLAN 1 as the native VLAN, you must configure that VLAN as allowed or you will not pass traffic.
This command does not require a license.
Examples
This example shows how to configure the native default VLAN 1 to be allowed on a private VLAN promiscuous or isolated trunk port:
switch(config-if)#
switchport private-vlan trunk allowed vlan add 1switch(config-if)#
Related Commands
switchport private-vlan trunk native vlan
To set the native VLAN for private VLAN promiscuous and isolated trunk ports, use the switchport private-vlan trunk native vlan command. To return to the default value, use the no form of this command.
switchport private-vlan trunk native vlan vlan-id
no switchport private-vlan trunk native vlan vlan-id
Syntax Description
vlan-list
Native VLAN for the private VLAN promiscuous and isolated trunk interfaces. The range of valid values is from 1 to 3968 and 4048 to 4093.
Defaults
1
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
You must have configured the interface by using either the switchport mode private-vlan trunk secondary or the switchport mode private-vlan trunk promiscuous command before this command becomes operational.
Note If you are using a private VLAN as the native VLAN for the promiscuous trunk port, you must enter a value for a primary VLAN or a normal VLAN; you cannot configure a secondary VLAN as the native VLAN. If you are using a private VLAN as the native VLAN for the isolated trunk port, you must enter a value for a secondary VLAN or a normal VLAN; you cannot configure a primary VLAN as the native VLAN.
This command does not require a license.
Examples
This example shows how to configure the native VLAN on a private VLAN promiscuous or isolated trunk port:
switch(config-if)#
switchport private-vlan trunk native vlan 5switch(config-if)#
Related Commands
switchport trunk pruning vlan
To configure pruning eligibility on trunk ports, use the switchport trunk pruning vlan command.
switchport trunk pruning vlan [add | except | none | remove] vlan-id
Syntax Description
Defaults
None
Command Modes
Interface configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to add a VLAN to the current list:
switch(config-if)# switchport trunk pruning vlan add 20
switch(config-if)#This example shows how to remove a VLAN from the current list:
switch(config-if)# switchport trunk pruning vlan remove 12
switch(config-if)#Related Commands
system vlan reserve
To configure a reserved VLAN range, use the system vlan reserve command. To delete the reserved VLAN range configuration, use the no form of this command.
system vlan start-vlan-id reserve
no system vlan start-vlan-id reserve
Syntax Description
start-vlan-id
Starting VLAN ID. 128 VLANS are reserved starting from the start VLAN ID. For example, if you specify the starting VLAN ID as 0, the reserved VLAN range is from 0 to 127.
Defaults
3968-4096
Command Modes
Any command mode
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
When you configure the system reserved VLAN range, all configuration on the VLANs that fall under the reserved VLAN range are deleted.
The user-configured system reserved VLAN range comes into effect only after a reload.
This command does not require a license.
Examples
This example shows how to configure a reserved VLAN range:
switch#
system vlan 2000 reserveThis will delete all configs on vlans 2000-2127. Continue anyway? [no]
switch#
This example shows how to remove the reserved VLAN configuration:
switch
#
no system vlan 2000 reserveThis will delete all configs on vlans 2000-2127. Continue anyway? [no]
switch
#
Related Commands
Command Descriptionwrite erase
Reverts to the default reserved VLAN range.
show system vlan reserved
Displays information about the reserved VLAN usage.
vlan (global configuration mode)
To add a VLAN or to enter the VLAN configuration mode, use the vlan command. To delete the VLAN and exit the VLAN configuration mode, use the no form of this command.
vlan {vlan-id | vlan-range}
no vlan {vlan-id | vlan-range}
Syntax Description
Defaults
None
Command Modes
Global configuration
Note You can also create and delete VLANs in the VLAN configuration submode using these same commands.
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
When you enter the vlan vlan-id command, a new VLAN is created with all default parameters and causes the CLI to enter VLAN configuration submode. If the vlan-id argument that you entered matches an existing VLAN, nothing happens except that you enter VLAN configuration submode.
You can enter the vlan-range using a comma (,), a dash (-), and the number.
VLAN 1 parameters are factory configured and cannot be changed; you cannot create or delete this VLAN. Additionally, you cannot create or delete VLAN 4095 or any of the internally allocated VLANs.
When you delete a VLAN, all the access ports in that VLAN are shut down and no traffic flows. On trunk ports, the traffic continues to flow for the other VLANs allowed on that port, but the packets for the deleted VLAN are dropped. However, the system retains all the VLAN-to-port mapping for that VLAN, and when you reenable, or recreate, that specified VLAN, the device automatically reinstates all the original ports to that VLAN.
This command does not require a license.
Examples
This example shows how to add a new VLAN and enter VLAN configuration submode:
switch(config)#
vlan 2switch(config-vlan)#
This example shows how to add a range of new VLANs and enter VLAN configuration submode:
switch(config)#
vlan 2,5,10-12,20,25,4000switch(config-vlan)#
This example shows how to delete a VLAN:
switch(config)#
no vlan 2switch(config)#
Related CommandsP
vlan configuration
To configure a VLAN prior to or without needing to actually create the VLAN, use the vlan configuration command.
vlan configuration vlan-id
Syntax Description
vlan-id
VLAN ID. The range is from 1 to 2499 and from 2628 to 4093. The VLAN range can be specified in the format shown in this example: 1-5, 10 or 2-5,7-19.
Defaults
None
Command Modes
Global configuration mode (config)
Supported User Rolesnetwork-admin
vdc-adminCommand History
Usage Guidelines
If you use the vlan configuration command to configure a VLAN that you have not yet created and you later want to create that VLAN, use the vlan command to create the configured VLAN.
The show vlan command does not display any VLAN until and unless you actually create the VLAN.
This command does not require a license.
Examples
This example shows how to configure a VLAN and enter the VLAN configuration mode:
switch# configure terminal
switch(config)# vlan configuration 2-5,7-19
switch(config-vlan-config)#Related Commands
Command Descriptionshow running-config vlan
Displays the running configuration for a specified VLAN.
vtp domain
To set the name of the Virtual Trunking Protocol (VTP) administrative domain, use the vtp domain command. To remove the VTP domain name, use the no form of this command.
vtp domain domain-name
no vtp domain domain-name
Syntax Description
domain-name
Name of the VTP administrative domain. The domain name can be a maximum of 32 characters.
Defaults
None
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command is not available if VTP is not enabled.
A network device can be in only one VTP domain. A VTP domain is made up of one or more network devices that share the same VTP domain name and that are inconnected with trunk interfaces.
This command does not require a license.
Examples
This example shows how to configure the VTP domain name:
switch(config)#
vtp domain accontingswitch(config)#
Related CommandsP
vtp file
To set the name of a Virtual Trunking Protocol (VTP) file, use the vtp file command.
vtp file file-name
Syntax Description
Defaults
None
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to set a name of a VTP file:
switch(config)#
vtp file eng_vlans.infoswitch(config)#
Related CommandsP
vtp mode
To configure the Virtual Trunking Protocol (VTP) device mode, use the vtp mode command. To return to default values, use the no form of this command.
vtp mode {client | off | server | transparent}
no vtp mode
Syntax Description
client
Sets the device to client mode.
off
Sets the device to off mode.
server
Sets the device to server mode.
transparent
Sets the device to transparent mode.
Defaults
None
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to set the device to client mode:
switch(config)#
vtp mode clientswitch(config)#
This example shows how to set the device to off mode:
switch(config)#
vtp mode offswitch(config)#
This example shows how to set the device to server mode:
switch(config)#
vtp mode serverswitch(config)#
Related CommandsP
vtp mode transparent
To configure the Virtual Trunking Protocol (VTP) mode, use the vtp mode transparent command.
vtp mode transparent
Syntax Description
This command has no keywords or arguments.
Defaults
None
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command is not available if VTP is not enabled. This command is optional because VTP runs only in transparent mode.
This command does not require a license.
Examples
This example shows how to configure the VTP mode:
switch(config)#
vtp mode transparentswitch(config)#
Related CommandsP
vtp password
To create a Virtual Trunking Protocol (VTP) password, use the vtp password command. To delete the password, use the no form of this command.
vtp password password-value
no vtp password
Syntax Description
Defaults
None
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to create a VTP password:
switch(config)#
vtp password squ1rrelswitch(config)#
This example shows how to delete a VTP password:
switch(config)#
no vtp password squ1rrelswitch(config)#
Related CommandsP
vtp pruning
To set the Virtual Trunking Protocol (VTP) adminstrative domain to permit pruning, use the vtp pruning command. To remove the VTP domain permit pruning, use the no form of this command.
vtp pruning
no vtp pruning
Syntax Description
This command has no arguments or keywords.
Defaults
Disabled
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to set the VTP administrative domain to permit pruning:
switch(config)#
vtp pruningPruning switched on.
switch(config)#
This example shows how to remove the VTP administrative domain to permit pruning:
switch(config)# no vtp pruning
Pruning switched off.switch(config)#Related CommandsP
vtp version
To configure the Virtual Trunking Protocol (VTP) version you want to use, use the vtp version command. To return to default values, use the no vtp version command.
vtp version {1 | 2}
no vtp version
Syntax Description
Defaults
1
Command Modes
Global configuration
Supported User Rolesnetwork-admin
vdc-admin
Command History
Usage Guidelines
This command is not available if VTP is not enabled.
This command does not require a license.
Examples
This example shows how to configure the VTP version:
switch(config)#
vtp version 2switch(config)#
Related CommandsP