Table of Contents

Preface

New and Changed Information

Layer 2 Commands

Cisco Nexus 3548 Switch NX-OS Layer 2 Switching Command Reference

Preface

. It also provides information on how to obtain related documentation.

This preface includes the following sections:

- Audience

- Document Conventions

- Related Documentation

- Documentation Feedback

- Obtaining Documentation and Submitting a Service Request

Audience

This publication is for experienced network administrators who configure and maintain Cisco Nexus Series switches.

Document Conventions

Command descriptions use these conventions:

Convention

Description

boldface font

Commands and keywords are in boldface.

italic font

Arguments for which you supply values are in italics.

[ ]

Elements in square brackets are optional.

[ x | y | z ]

Optional alternative keywords are grouped in brackets and separated by vertical bars.

string

A nonquoted set of characters. Do not use quotation marks around the string or the string will include the quotation marks.

Screen examples use these conventions:

Terminal sessions and information that the switch displays are in screen font.

Information that you must enter is in boldface screen font.

Arguments for which you supply values are in italic screen font.

< >

Nonprinting characters, such as passwords, are in angle brackets.

[ ]

Default responses to system prompts are in square brackets.

!, #

An exclamation point (!) or a pound sign (#) at the beginning of a line of code indicates a comment line.

This document uses the following conventions:

Note Means reader take note. Notes contain helpful suggestions or references to material not covered in the manual.

Caution Means reader be careful. In this situation, you might do something that could result in equipment damage or loss of data.

Related Documentation

Documentation for the Cisco Nexus 3000 Series Switch is available at the following URL:

The documentation set is divided into the following categories:

Release Notes

The release notes are available at the follwing URL:

Installation and Upgrade Guides

The installation and upgrade guides are available at the following URL:

Command References

The command references are available at the following URL:

Technical References

The technical references are available at the following URL:

Configuration Guides

The configuration guides are available at the following URL:

Error and System Messages

The system message reference guide is available at the following URL:

Documentation Feedback

. We appreciate your feedback.

Obtaining Documentation and Submitting a Service Request

.

. The RSS feeds are a free service.

New and Changed Information

This chapter provides release-specific information for each new and changed feature in the Cisco Nexus 3548 Switch NX-OS Layer 2 Switching Command Reference. The latest version of this document is available at the following Cisco website:

available at the following Cisco website:

summarizes the new and changed features, and tells you where they are documented.

Table 1 New and Changed Information

Feature

Description

Changed in Release

Where Documented

MAC Move Tables

Added support for mac address-table loop-detect port-down command.

6.0(2)A8(1)

mac address-table loop-detect port-down

Flex Links

This feature was introduced to configure a pair of layer 2 interfaces (switch ports or port channels) as Flex Link interfaces, where one interface is configured to act as a backup to the other.

6.0(2)A3(1)

feature flexlink

show interface switchport backup

switchport backup interface

Link negotiation

This feature was introduced to enable or disable auto-negotiation on 1 Gigabit ports.

5.0(3)A1(2)

negotiate auto

Layer 2 Commands

This chapter describes the Cisco NX-OS Layer 2 commands available on the Cisco Nexus 3548 switches.

Note The internal CLI commands are not supported on the Cisco Nexus Series switches.

cdp

form of this command.

}

}

Syntax Description

}

Configures the version to use to send CDP advertisements. Version-2 is the default state.

Enables CDP for all Ethernet interfaces.

Configures the format of the CDP device ID.

Uses the MAC address as the CDP device ID.

Uses the serial number as the CDP device ID.

Uses the system name, which can be expressed as a fully qualified domain name, as the CDP device ID. This is the default.

Specifies the amount of time a receiver should hold CDP information before discarding it. The range is from 10 to 255 seconds; the default is 180 seconds.

Sets the transmission frequency of CDP updates in seconds. The range is from 5 to 254; the default is 60 seconds.

Command Default

None

Command Modes

Global configuration mode

Switch profile configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

This example shows how to configure CDP advertisements on a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# cdp advertise v1

switch(config-sync-sp)#

This example shows how to configure the MAC address as the CDP device ID in a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# cdp format device-id mac-address

switch(config-sync-sp)#

This example shows how to enable CDP on all Ethernet interfaces:

switch# configure terminal

switch(config)# cdp enable

switch(config)#

This example shows how to configure the MAC address as the CDP device ID:

switch# configure terminal

switch(config)# cdp format device-id mac-address

switch(config)#

This example shows how to disable CDP on all Ethernet interfaces:

switch# configure terminal

switch(config)# no cdp enable

switch(config)#

Related Commands

Command

Description

Displays Cisco Discovery Protocol (CDP) information.

Displays information about the switch profile and the configuration revision.

Creates or configures a switch profile.

clear mac address-table dynamic

command.

]

Syntax Description

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

(Optional) Specifies the interface for which MAC addresses should be removed from the table. The type can be either Ethernet or EtherChannel.

(Optional) Specifies the Ethernet interface and the slot number and port number. The slot number is from 1 to 255, and the port number is from 1 to 128.

range is from 1 to 4096.

(Optional) Specifies the VLAN from which MAC addresses should be removed from the table. The VLAN ID range is from 1 to 4092.

Command Default

None

Command Modes

Switch profile configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

5.0(3)A1(1)

Support for this command was introduced in switch profiles.

Usage Guidelines

command with no arguments to remove all dynamic entries from the table.

command.

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 switch removes all addresses on the specified interfaces.

This command does not require a license.

Examples

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

switch# clear mac address-table dynamic

switch#

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

switch# clear mac address-table dynamic vlan 2

switch#

This example shows how to clear all the dynamic entries from the MAC address table in a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# mac-learn disable

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

switch(config-sync-sp)#

Related Commands

Command

Description

Displays the information about the MAC address table.

Displays information about the switch profile and the configuration revision.

Creates or configures a switch profile.

clear spanning-tree counters

command.

]

Syntax Description

(Optional) Specifies the interface type.

Specifies the slot and port number.

Specifies the EtherChannel number.

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

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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

This command does not require a license.

Examples

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

switch# clear spanning-tree counters vlan 5

switch#

Related Commands

Command

Description

Displays information about the spanning tree state.

clear spanning-tree detected-protocol

command. With no arguments, the command is applied to every port of the switch.

}]

Syntax Description

(Optional) Specifies the interface type.

Specifies the slot and port number.

Specifies the EtherChannel number.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

Rapid per VLAN Spanning Tree Plus (Rapid PVST+) and Multiple Spanning Tree (MST) have built-in compatibility mechanisms that allow them to interact properly with other versions of IEEE spanning tree or other regions. For example, a switch running Rapid PVST+ can send 802.1D bridge protocol data units (BPDUs) on one of its ports when it is connected to a legacy device. An MST switch 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+ switch 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.

command.

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 ethernet 1/4

switch#

Related Commands

Command

Description

Displays information about the spanning tree state.

clear vtp counters

command.

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

Use this command to clear the VTP statistics, such as the VTP requests, VTP advertisements, and configuration revisions.

This command does not require a license.

Examples

This example shows how to clear the VTP counters:

switch# clear vtp counters

switch#

Related Commands

Command

Description

Displays VTP counters.

Displays VTP information.

errdisable detect cause

form of this command.

}

}

Syntax Description

Enables error detection on all cases.

Enables error disable detection on linkstate-flapping.

Enables error disable detection on loopback.

Command Default

Enabled

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

When error disable detection is enabled and a cause is detected on an interface, the interface is placed in an err-disabled state, which is an operational state that is similar to the link-down state.

This command does not require a license.

Examples

This example shows how to enable the err-disabled detection on linkstate-flapping:

switch# configure terminal

switch(config)# errdisable detect cause link-flap

switch(config)#

Related Commands

Command

Description

Configures recovery from the err-disabled state.

Displays the interface error disabled state.

errdisable recovery cause

form of this command.

}

}

Syntax Description

Enables the timer to recover from all causes.

Enables the timer to recover from the bridge protocol data unit (BPDU) Guard error-disabled state.

Enables the timer to recover from a stp set port state failure.

Enables the timer to recover from linkstate flapping.

Enables the timer to recover from the pause rate limit error-disabled state.

Enables the timer to recover from the Unidirectional Link Detection (UDLD) error-disabled state.

Command Default

None

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

When an error-disables recovery is enabled, the interface automatically recovers from the error-disabled state, and the device retries bringing the interface up.

This command does not require a license.

Examples

This example shows how to enable an error-disabled recovery from linkstate flapping:

switch# configure terminal

switch(config)# errdisable recovery cause link-flap

switch(config)#

Related Commands

Command

Description

Enables the error-disabled (err-disabled) detection.

Displays the interface error-disabled state.

errdisable recovery interval

form of this command.

Syntax Description

Error disable recovery time interval. The range is from 30 to 65535 seconds.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

When error disable recovery is enabled, the interface automatically recovers from the err-disabled state, and the device retries bringing the interface up.

The device waits 300 seconds to retry.

This command does not require a license.

Examples

This example shows how to enable error disable recovery time interval to 100 seconds:

switch# configure terminal

switch(config)# errdisable recovery interval 100

switch(config)#

Related Commands

Command

Description

Enables an error-disabled recovery on an interface.

Displays the interface error-disabled state.

feature flexlink

To enable Flex Links, use the feature flexlink command. To disable Flex Links, use the no form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release

Modification

6.0(2)A3(1)

This command was introduced.

Examples

This example shows how to enable VTP on the switch:

switch# configure terminal

switch(config)# feature flexlink

switch(config)#

Related Commands

Command

Description

Displays the status of features enabled or disabled on the switch.

Configures Flex Links, which are two interfaces that provide backup to each other, on a Layer 2 interface.

feature vtp

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

This example shows how to enable VTP on the switch:

switch# configure terminal

switch(config)# feature vtp

switch(config)#

Related Commands

Command

Description

Displays the VTP information.

Configures VTP.

instance vlan

form of this command.

]

Syntax Description

Instances to which the specified VLANs are mapped. The range is from 0 to 4094.

Specifies the number of the VLANs that you are mapping to the specified MSTI. The VLAN ID range is from 1 to 4094.

Command Default

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

Command Modes

MST configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

The VLAN identifier is entered as a single value or a range.

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# configure terminal

switch(config)# spanning-tree mst configuration

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

switch(config-mst)#

Related Commands

Command

Description

Displays information about the MST protocol.

Enters MST configuration mode.

ip igmp snooping (EXEC)

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

IGMP snooping is enabled.

Note If the global setting is disabled, then all VLANs are treated as disabled, whether they are enabled or not.

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

This example shows how to enable IGMP snooping:

switch# ip igmp snooping

switch#

Related Commands

Command

Description

Displays IGMP snooping information and configuration.

ip igmp snooping (VLAN)

form of this command

Syntax Description

Parameter to configure. See the “Usage Guidelines” section for additional information.

Command Default

The default settings are as follows:

- explicit-tracking —enabled

- fast-leave —disabled for all VLANs

- last-member-query-interval seconds —1

- querier IP-address —disabled

- report-suppression —enabled

Command Modes

Switch profile VLAN configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

5.0(3)A1(1)

Support was added for the following IGMP parameters in a switch profile:

- link-local-groups-suppression

- optimised-multicast-flood

- v3-report-suppression

Usage Guidelines

.

Table 1 IGMP Snooping Parameters

Keyword and Argument

Description

Enables tracking IGMPv3 membership reports for each port on a per-VLAN basis. The default is enabled on all VLANs.

Enables IGMPv3 snooping fast-leave processing. The default is disabled for all VLANs.

Removes the group if no hosts respond to an IGMP query message. The valid value is from 1 to 25 seconds. The default is 1 second.

Enables suppression of IGMP reports from link-local groups.

Configures a static connection to a multicast router. The specified interface is Ethernet or EtherChannel.

Configures Optimized Multicast Flood (OMF) on all VLANs.

Configures a snooping querier. The IP address is used as the source in messages. The default is disabled.

Limits the membership report traffic sent to multicast-capable routers. When you disable report suppression, all IGMP reports are sent as is to multicast-capable routers. The default is enabled.

Configures an interface belonging to a VLAN as a static member of a multicast group. The specified interface is Ethernet or EtherChannel.

Configures IGMPv3 report suppression and proxy reporting for VLANs.

This command does not require a license.

Examples

This example shows how to configure IGMP snooping parameters for VLAN 5:

switch# configure terminal

switch(config)# vlan 5

switch(config-vlan)# ip igmp snooping last-member-query-interval 3

switch(config-vlan)# ip igmp snooping querier 192.168.2.106

switch(config-vlan)# ip igmp snooping explicit-tracking

switch(config-vlan)# ip igmp snooping fast-leave

switch(config-vlan)# ip igmp snooping report-suppression

switch(config-vlan)# ip igmp snooping mrouter interface ethernet 1/10

switch(config-vlan)# ip igmp snooping static-group 192.168.1.1 interface ethernet 1/10

switch(config-vlan)#

Related Commands

Command

Description

Displays the IGMP snooping information and configuration.

lldp

form of this command.

}}

}}

Syntax Description

Specifies the hold time (in seconds) to set the length of time that a device should save LLDP information received before discarding it.

The range is from 10 to 255, and the default is 120 seconds.

Specifies the length of time (in seconds) to wait before performing LLDP initialization on any interface.

The range is from 1 to 10 seconds, and the default is 2 seconds.

Specifies the rate (in seconds) at which LLDP packets are sent.

The range is from 5 to 254 seconds, and the default is 30 seconds.

Specifies the Type Length Value (TLV) message.

Specifies the Data Center Ethernet Parameter Exchange (DCBXP) TLV messages.

Specifies the management address TLV messages.

Specifies the port description TLV messages.

Specifies the port VLAN ID TLV messages.

Specifies the system capabilities TLV messages.

Specifies the system description TLV messages.

Specifies the system name TLV messages.

Command Default

Holdtime (before discarding): 120 seconds.

Reinitialization delay: 2 seconds.

Timer (packet update frequency): 30 seconds.

TLV-select: Enabled to send and receive all TLVs.

Command Modes

Switch profile configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

5.0(3)A1(1)

Support was added to configure LLDP options in switch profiles.

Usage Guidelines

Note LLDP, which is a neighbor discovery protocol that is used for network devices to advertise information about themselves to other devices on the network, is enabled on the switch by default.

The LLDP settings include the length of time before discarding LLDP information received from peers, the length of time to wait before performing LLDP initialization on any interface, and the rate at which LLDP packets are sent.

LLDP supports a set of attributes that it uses to discover neighbor devices. These attributes contain type, length, and value descriptions and are referred to as TLVs. LLDP supported devices can use TLVs to receive and send information to their neighbors. Details such as configuration information, device capabilities, and device identity can be advertised using this protocol.

The switch supports these basic management TLVs. These are mandatory LLDP TLVs.

- Data Center Ethernet Parameter Exchange (DCBXP) TLV

- Management address TLV

- Port description TLV

- Port VLAN ID TLV (IEEE 802.1 organizationally specific TLVs)

- System capabilities TLV

- System description TLV

- System name TLV

The Data Center Bridging Exchange Protocol (DCBXP) is an extension of LLDP. It is used to announce, exchange, and negotiate node parameters between peers. DCBXP parameters are packaged into a specific DCBXP TLV. This TLV is designed to provide an acknowledgement to the received LLDP packet.

command. DCBXP is disabled on ports where LLDP transmit or receive is disabled.

This command does not require a license.

Examples

This example shows how to configure the global LLDP holdtime to 200 seconds:

switch# configure terminal

switch(config)# lldp holdtime 200

switch(config)#

This example shows how to enable LLDP to send or receive the management address TLVs:

switch# configure terminal

switch(config)# lldp tlv-select management-address

switch(config)#

This example shows how to disable LLDP to send or receive the DCBXP TLVs:

switch# configure terminal

switch(config)# no lldp tlv-select dcbxp

switch(config)#

This example shows how to configure the LLDP packet rate to 60 seconds in a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# lldp timer 60

switch(config-sync-sp)#

Related Commands

Command

Description

Configures the LLDP feature on an interface.

Displays the LLDP configuration information.

Displays information about the switch profile and the configuration revision.

Creates or configures a switch profile.

mac address-table aging-time

form of this command.

]

]

Syntax Description

Aging time for MAC address table entries. The range is from 0 to 1000000 seconds. The default is 300 seconds. Entering 0 disables MAC address aging.

(Optional) Specifies the VLAN to which the changed aging time should be applied. The range is from 1 to 3967 and 4048 to 4093.

Command Default

1800 seconds

Command Modes

Switch profile configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

5.0(3)A1(1)

Support to configure MAC address table aging time was added to switch profiles.

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.

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.

form of this command and specify a VLAN, the aging time for the VLAN is returned to the current global configuration for the aging time, which may or may not be the default value of 300 seconds depending if the global configuration of the switch for the aging time has been changed.

Note In Cisco NX-OS Release 5.0(3)A1(1), you can configure the MAC aging timer on a global basis but not on a per VLAN basis.

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 switch:

switch# configure terminal

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

switch(config)#

This example shows how to change the length of time an entry remains in the MAC address table to 300 seconds for a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# mac address-table aging-time 300

switch(config-sync-sp)#

Related Commands

Command

Description

Displays information about the MAC address table.

Displays information about the MAC address aging time.

Displays information about the switch profile and the configuration revision.

Creates or configures a switch profile.

mac address-table loop-detect port-down

To configure the action of bringing down the port with the lower interface index when a MAC address move loop is detected between two ports, use the mac address-table loop-detect port-down command. To revert to the default action of disabling MAC learning on a VLAN, use the no form of this command.

mac address-table loop-detect port-down

no mac address-table loop-detect port-down

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Command History

Release

Modification

6.0(2)A8(1)

This command was introduced.

Usage Guidelines

When the number of MAC address moves between two ports exceeds a threshold, it forms a loop. Until Cisco NX-OS Release 6.0(2)A8(1), when a loop was detected between two ports, MAC learning would be disabled between 120 seconds and 240 seconds on a VLAN by which MAC learning happened. Starting with Cisco NX-OS Release 6.0(2)A8(1), when such a loop is detected, you can now bring down the port with the lower interface index by using the mac address-table loop-detect port-down command.

Examples

This example shows how to configure port-down as the action for MAC move loop detection:

switch# configure terminal

switch(config)# mac address-table loop-detect port-down

switch(config)#show mac address-table loop-detect

Port Down Action Mac Loop Detect: enabled

mac address-table static

form of this command.

}

}

Syntax Description

MAC address to add to the table. Use the format EEEE.EEEE.EEEE.

Specifies the VLAN to apply the static MAC address. The VLAN ID range is from 1 to 3967 and 4048 to 4093.

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

Specifies the interface. The type can be either Ethernet or EtherChannel.

Specifies the Ethernet interface and the slot number and port number. The slot number is from 1 to 255, and the port number is from 1 to 128.

Specifies the EtherChannel interface and EtherChannel number. The range is from 1 to 4096.

Command Default

None

Command Modes

Switch profile configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

5.0(3)A1(1)

Support was added to configure static MAC address table entries in switch profiles.

Usage Guidelines

command to a multicast MAC address.

This command does not require a license.

Examples

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

switch# configure terminal

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

switch(config)#

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

switch# config sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

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

switch(config-sync-sp)#

Related Commands

Command

Description

Displays information about the MAC address table.

Displays information about the switch profile and the configuration revision.

Creates or configures a switch profile.

mac-learn

form of this command.

Syntax Description

Disables MAC learning on the specified interface.

Command Default

Enabled

Command Modes

Switch profile configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

By default, each interface automatically learns the MAC addresses of entering traffic.

command to clear the dynamic address entries from the MAC address table.

form of this command reenables MAC address learning.

This command does not require a license.

Examples

This example shows how to disable MAC address learning on the switch and then clear the the dynamic address entries from the MAC address table:

switch# configure terminal

switch(config)# mac-learn disable

switch(config)# clear mac address-table dynamic

switch(config)#

This example shows how to disable MAC address learning on a switch profile, and then clear the the dynamic address entries from the MAC address table:

switch# config sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# mac-learn disable

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

switch(config-sync-sp)#

Related Commands

Command

Description

Clears the dynamic address entries from the MAC address table.

Displays information about the switch profile and the configuration revision.

Creates or configures a switch profile.

name (VLAN configuration)

form of this command.

Syntax Description

represents four numeric digits (including leading zeroes) equal to the VLAN ID number (for example, VLAN0002).

Command Default

None

Command Modes

Switch profile VLAN configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

5.0(3)A1(1)

Support for this command was introduced in switch profiles.

Usage Guidelines

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# configure terminal

switch(config)# vlan 2

switch(config-vlan)# name accounting

switch(config-vlan)#

This example shows how to name VLAN 3 in a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# vlan 3

switch(config-sync-sp-vlan)# name Sales

switch(config-sync-sp-vlan)#

Related Commands

Command

Description

Displays the switch profile configuration.

Displays VLAN information.

name (MST configuration)

form of this command.

Syntax Description

Command Default

None

Command Modes

MST configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

Two or more switches 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 switch 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# configure terminal

switch(config)# spanning-tree mst configuration

switch(config-mst)# name accounting

switch(config-mst)#

Related Commands

Command

Description

Displays information about the MST protocol.

Enters MST configuration mode.

negotiate auto

To enable autonegotiation on a specified 1-Gigabit Ethernet port, use the negotiate auto command. To disable autonegotiation, use the no form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

Enabled

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(2)

This command was introduced.

Usage Guidelines

You can use this command only on Ethernet and EtherChannel interfaces.

Use the negotiate auto command with the speed command.

command to disable autonegotiation on 1-Gigabit ports when the connected peer does not support autonegotiation. By default, autonegotiation is enabled on 1-Gigabit ports and disabled on 10-Gigabit ports. You cannot disable autonegotiation on 1-Gigabit ports.

Caution We do not recommend that you enable autonegotiation on 10-Gigabit ports. Enabling autonegotiation on 10-Gigabit ports brings the link down.

This command does not require a license.

Examples

This example shows how to enable link negotiation on a specified Ethernet interface:

switch# configure terminal

switch(config)# interface ethernet 1/5

switch(config-if)# negotiate auto

switch(config-if)#

This example shows how to enable link negotiation on a specified Ethernet interface and advertise that the interface is capable of only 1000 megabyte speed.

switch# configure terminal

switch(config)# interface ethernet 1/5

switch(config)# speed 1000

switch(config-if)# negotiate auto

switch(config-if)#

This example shows how to enable link negotiation on a specified Ethernet interface and configure the interface to negotiate to all capable speeds. On an RJ45 jack, the interface can autonegotiate to 10, 100, or 1000 megabytes. (Autonegotiation is not possible on 10 or 40 Gigabyte interfaces.)

switch# configure terminal

switch(config)# interface ethernet 1/5

switch(config)# speed auto

switch(config-if)# negotiate auto

switch(config-if)#

Related Commands

Command

Description

Displays information about the interfaces.

Displays the running configuration information for configured interfaces.

revision

form of this command.

Syntax Description

Command Default

Revision 0

Command Modes

MST configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

Two or more switches 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 switch in a different region.

This command does not require a license.

Examples

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

switch(config)# spanning-tree mst configuration

switch(config-mst)# revision 5

switch(config-mst)#

Related Commands

Command

Description

Displays information about the MST protocol.

show interface switchport backup

command.

Syntax Description

(Optional) Displays detailed information for backup interfaces.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

6.0(2)A3(1)

This command was introduced.

Examples

This example shows how to display information for all Flex Links:

switch# show interface switchport backup

Switch Backup Interface Pairs:

Active Interface Backup Interface State

------------------------------------------------------------------------

Ethernet1/1 Ethernet1/2 Active Down/Backup Down

Ethernet1/8 Ethernet1/45 Active Down/Backup Down

Ethernet1/48 Ethernet1/4 Active Down/Backup Down

port-channel10 port-channel20 Active Down/Backup Up

port-channel300 port-channel301 Active Down/Backup Down

switch#

This example shows how to display the detailed information for all Flex Links:

switch# show interface switchport backup detail

Switch Backup Interface Pairs:

Active Interface Backup Interface State

------------------------------------------------------------------------

Ethernet1/1 Ethernet1/2 Active Down/Backup Down

Preemption Mode : off

Multicast Fast Convergence : Off

Bandwidth : 10000000 Kbit (Ethernet1/1), 10000000 Kbit (Ethernet1/2)

Ethernet1/8 Ethernet1/45 Active Down/Backup Down

Preemption Mode : forced

Preemption Delay : 10 seconds

Multicast Fast Convergence : Off

Bandwidth : 10000000 Kbit (Ethernet1/8), 10000000 Kbit (Ethernet1/45)

Ethernet1/48 Ethernet1/4 Active Down/Backup Down

Preemption Mode : forced

Preemption Delay : 50 seconds

Multicast Fast Convergence : Off

Bandwidth : 10000000 Kbit (Ethernet1/48), 10000000 Kbit (Ethernet1/4)

port-channel10 port-channel20 Active Down/Backup Up

Preemption Mode : forced

Preemption Delay : 10 seconds

Multicast Fast Convergence : Off

Bandwidth : 100000 Kbit (port-channel10), 10000000 Kbit (port-channel20)

port-channel300 port-channel301 Active Down/Backup Down

Preemption Mode : off

Multicast Fast Convergence : Off

Bandwidth : 100000 Kbit (port-channel300), 100000 Kbit (port-channel301)

switch#

show ip igmp snooping

command.

]

Syntax Description

(Optional) Displays information about the explicit host-tracking status for IGMPv2 and IGMPv3 hosts. If you provide this keyword, you must specify a VLAN.

(Optional) Specifies a VLAN. The VLAN ID range is from1 to 4094.

(Optional) Displays information for the IGMP group address.

(Optional) Displays detailed information for the group.

(Optional) Displays information about dynamically detected multicast routers.

(Optional) Displays information about the snooping querier if defined.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

6.0(2)A8(3)

, support for IGMPv2 hosts has been added.

Examples

This example shows how to display the IGMP snooping configuration of the switch:

switch# show ip igmp snooping

Global IGMP Snooping Information:

IGMP Snooping enabled

Optimised Multicast Flood (OMF) disabled

IGMPv1/v2 Report Suppression enabled

IGMPv3 Report Suppression disabled

Link Local Groups Suppression enabled

IGMP Snooping information for vlan 1

IGMP snooping enabled

Optimised Multicast Flood (OMF) disabled

IGMP querier none

Switch-querier disabled

IGMPv3 Explicit tracking enabled

IGMPv2 Fast leave disabled

IGMPv1/v2 Report suppression enabled

IGMPv3 Report suppression disabled

Link Local Groups suppression enabled

Router port detection using PIM Hellos, IGMP Queries

Number of router-ports: 0

Number of groups: 0

Active ports:

Eth1/1 Eth1/2 Eth1/48

switch#

This example shows how to display the IGMP snooping configuration for VLAN 1:

switch# show ip igmp snooping vlan 1

IGMP Snooping information for vlan 1

IGMP snooping enabled

Optimised Multicast Flood (OMF) disabled

IGMP querier none

Switch-querier disabled

IGMPv3 Explicit tracking enabled

IGMPv2 Fast leave disabled

IGMPv1/v2 Report suppression enabled

IGMPv3 Report suppression disabled

Link Local Groups suppression enabled

Router port detection using PIM Hellos, IGMP Queries

Number of router-ports: 0

Number of groups: 0

Active ports:

Eth1/1 Eth1/2 Eth1/48

switch#

This example shows how to display the IGMP snooping configuration for explicit tracking on an IGMPv2 host:

switch# show ip igmp snooping explicit tracking

IGMP Snooping Explicit-tracking information

Vlan Source/Group

Intf Reporter Uptime Last-Join Expires Ver Reports

100 */225.1.1.69

Eth1/43 10.1.1.2 00:00:02 00:00:02 00:04:17 v2 1

100 */225.1.1.70

Eth1/43 10.1.1.2 00:00:02 00:00:02 00:04:17 v2 1

100 */225.1.1.71

Eth1/43 10.1.1.2 00:00:02 00:00:02 00:04:17 v2 1

100 */225.1.1.72

Eth1/43 10.1.1.2 00:00:02 00:00:02 00:04:17 v2 1

100 */225.1.1.73

Eth1/43 10.1.1.2 00:00:02 00:00:02 00:04:17 v2 1

100 */225.1.1.74

Eth1/43 10.1.1.2 00:00:02 00:00:02 00:04:17 v2 1

100 */225.1.1.75

Eth1/43 10.1.1.2 00:00:02 00:00:02 00:04:17 v2 1

100 */225.1.1.76

Eth1/43 10.1.1.2 00:00:02 00:00:02 00:04:17 v2 1

100 */225.1.1.77

Eth1/43 10.1.1.2 00:00:02 00:00:02 00:04:17 v2 1

100 */225.1.1.78

Eth1/43 10.1.1.2 00:00:02 00:00:02 00:04:17 v2 1

switch#

Related Commands

Command

Description

Globally enables IGMP snooping. IGMP snooping must be globally enabled in order to be enabled on a VLAN.

Enables IGMP snooping on the VLAN interface.

show lldp

command.

}]}

Syntax Description

Displays LLDP interface information, or LLDP neighbor information on an interface.

Displays the configuration information of the Ethernet IEEE 802.3z interface. The slot number is from 1 to 255, and the port number is from 1 to 128.

Displays the configuration information of the management interface. The management interface number is 0.

Displays information about LLDP neighbors.

(Optional) Displays the detailed information about LLDP neighbors.

Displays information about LLDP timers.

Displays information about the TLVs.

Displays the LLDP counters configured on the switch.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

Note LLDP, which is a neighbor discovery protocol that is used for network devices to advertise information about themselves to other devices on the network, is enabled on the switch by default.

Examples

This example shows how to display LLDP interface information:

switch# show lldp traffic interface ethernet 1/1

LLDP interface traffic statistics:

Total frames transmitted: 7490

Total entries aged: 0

Total frames received: 7458

Total frames received in error: 0

Total frames discarded: 0

Total unrecognized TLVs: 0

switch#

This example shows how to display LLDP management interface information:

switch# show lldp traffic interface mgmt 0

This example shows how to display LLDP timers configured on the switch:

switch# show lldp timers

LLDP Timers:

Holdtime in seconds: 120

Reinit-time in seconds: 2

Transmit interval in seconds: 30

switch#

This example shows how to display LLDP neighbor information:

switch# show lldp neighbors detail

switch#

This example shows how to display LLDP information for a specified interface:

switch# show lldp interface ethernet 1/1

This example shows how to display the TLV information:

switch# show lldp tlv-select

management-address

port-description

port-vlan

system-capabilities

system-description

system-name

dcbxp

switch#

This example shows how to display LLDP traffic information:

switch# show lldp traffic

LLDP traffic statistics:

Total frames transmitted: 7571

Total entries aged: 0

Total frames received: 5694

Total frames received in error: 0

Total frames discarded: 0

Total unrecognized TLVs: 0

switch#

Related Commands

Command

Description

Configures the global LLDP options on the switch.

Configures the LLDP feature on an interface.

show mac address-table aging-time

command.

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

This example shows how to display MAC address aging times:

switch# show mac address-table aging-time

Vlan Aging Time

----- ----------

4040 300

1 300

switch#

Related Commands

Command

Description

Configures the aging time for entries in the MAC address table.

Displays information about the MAC address table.

show mac address-table count

command.

]

Syntax Description

(Optional) Displays a count of the MAC address table entries for a specific address.

(Optional) Displays a count of the dynamic MAC addresses.

(Optional) Displays a count of the static MAC addresses.

(Optional) Specifies the interface. The interface can be Ethernet or EtherChannel.

number is from 1 to 128.

(Optional) Specifies the EtherChannel interface. The EtherChannel number is from 1 to 4096.

(Optional) Displays information for a specific VLAN. The range is from 1 to 4094.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

This example shows how to display the number of dynamic entries currently in the MAC address table:

switch# show mac address-table count dynamic

MAC Entries for all vlans:

Total MAC Addresses in Use: 1

switch#

Related Commands

Command

Description

Displays information about the MAC address table.

show mac address-table notification

command.

}

Syntax Description

Displays notification messages about MAC addresses that were moved.

Displays notification messages sent when the MAC address table threshold was exceeded.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

This example shows how to display MAC address move notifications:

switch# show mac address-table notification mac-move

MAC Move Notify Triggers: 0

Number of MAC Addresses added: 6

Number of MAC Addresses moved: 0

Number of MAC Addresses removed: 3

switch#

Related Commands

Command

Description

Configures a log message notification when the MAC address is moved.

Displays information about the MAC address table.

show mac address-table

command.

]

Syntax Description

(Optional) Displays information about a specific MAC address.

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

(Optional) Specifies the interface. The interface can be either Ethernet or EtherChannel.

number is from 1 to 128.

(Optional) Specifies the EtherChannel interface. The EtherChannel number is from 1 to 4096.

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

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

(Optional) Displays information for a specific VLAN. The VLAN ID range is from 1 to 4094.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

The switch maintains static MAC address entries that are saved in its startup configuration across reboots and flushes the dynamic entries.

Examples

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

switch# show mac address-table

Legend:

* - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC

age - seconds since first seen

VLAN MAC Address Type age Secure NTFY Ports

---------+-----------------+--------+---------+------+----+------------------

* 1 0011.2233.4455 static 0 F F Eth1/1

* 1 0015.0015.0041 dynamic 360 F F Eth1/48

* 1 0055.4433.2211 static 0 F F Eth1/2

switch#

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

switch# show mac address-table address 0015.0015.0041

Legend:

* - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC

age - seconds since first seen

VLAN MAC Address Type age Secure NTFY Ports

---------+-----------------+--------+---------+------+----+------------------

* 1 0015.0015.0041 dynamic 550 F F Eth1/48

switch#

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

switch# show mac address-table dynamic

Legend:

* - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC

age - seconds since first seen

VLAN MAC Address Type age Secure NTFY Ports

---------+-----------------+--------+---------+------+----+------------------

* 1 0015.0015.0041 dynamic 410 F F Eth1/48

switch#

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

switch# show mac address-table interface ethernet 1/2

Legend:

* - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC

age - seconds since first seen

VLAN MAC Address Type age Secure NTFY Ports

---------+-----------------+--------+---------+------+----+------------------

* 1 0055.4433.2211 static 0 F F Eth1/2

switch#

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

switch# show mac address-table static

Legend:

* - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC

age - seconds since first seen

VLAN MAC Address Type age Secure NTFY Ports

---------+-----------------+--------+---------+------+----+------------------

* 1 0011.2233.4455 static 0 F F Eth1/1

* 1 0055.4433.2211 static 0 F F Eth1/2

switch#

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

switch# show mac address-table vlan 1

Legend:

* - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC

age - seconds since first seen

VLAN MAC Address Type age Secure NTFY Ports

---------+-----------------+--------+---------+------+----+------------------

* 1 0011.2233.4455 static 0 F F Eth1/1

* 1 0015.0015.0041 dynamic 510 F F Eth1/48

* 1 0055.4433.2211 static 0 F F Eth1/2

switch#

Related Commands

Command

Description

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

Displays information about the time-out values for the MAC address table.

Displays the number of entries currently in the MAC address table.

show running-config spanning-tree

command.

}]

Syntax Description

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

(Optional) Displays the STP information for a specific interface.

(Optional) Displays the STP information for an Ethernet interface. The slot number is from 1 to 255, and the port number is from 1 to 128.

(Optional) Displays the STP information for an EtherChannel interface. The EtherChannel number is from 1 to 4096.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

This example shows how to display information on the running STP configuration:

switch# show running-config spanning-tree

spanning-tree mode mst

switch#

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

switch# show running-config spanning-tree all

spanning-tree mode mst

no spanning-tree port type edge default

no spanning-tree port type network default

spanning-tree bridge assurance

no spanning-tree loopguard default

spanning-tree mst simulate pvst global

no snmp-server enable traps bridge topologychange

no snmp-server enable traps bridge newroot

no snmp-server enable traps stpx inconsistency

no snmp-server enable traps stpx loop-inconsistency

no snmp-server enable traps stpx root-inconsistency

spanning-tree mst hello-time 2

spanning-tree mst forward-time 15

spanning-tree mst max-age 20

spanning-tree mst max-hops 20

spanning-tree mst 0 priority 32768

spanning-tree mst configuration

name

revision 0

instance 0 vlan 1-4094

interface Ethernet1/1

spanning-tree port-priority 128

spanning-tree cost auto

spanning-tree link-type auto

spanning-tree port type network

no spanning-tree bpduguard

no spanning-tree bpdufilter

switch#

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

Related Commands

Command

Description

Displays information about STP.

show running-config vlan

command.

Syntax Description

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

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

This command provides information on the specified VLAN.

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

Examples

This example shows how to display the running configuration for VLAN 5:

switch# show running-config vlan 5

!Command: show running-config vlan 5

!Time: Fri May 28 10:41:28 2010

version 5.0(3)A1(1)

vlan 5

switch#

Related Commands

Command

Description

Displays information about all the VLANs on the switch.

show running-config vtp

command.

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

This example shows how to display the VTP running configuration on the switch:

switch# show running-config vtp

Related Commands

Command

Description

Copies the running configuration to the startup configuration file.

Enables VTP on the switch.

Configures the VTP administrative domain.

Stores the VTP configuration in a file.

show spanning-tree

command.

]

Syntax Description

(Optional) Displays the alternate ports blocked by STP.

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

(Optional) Displays whether short or long path cost method is used. The method differs for Rapid Per VLAN Spanning Tree Plus (Rapid PVST+) (configurable, default is short) and Multiple Spanning Tree (MST) (nonconfigurable, operational value is always long).

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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

commands.

Table 2 show spanning-tree Command Output Fields

Field

Definition

Role

Current port STP role. Valid values are as follows:

- Desg (designated)

- Root

- Altn (alternate)

- Back (backup)

Sts

Current port STP state. Valid values are as follows:

- BLK (blocking)

- DIS (disabled)

- LRN (learning)

- FWD (forwarding)

Type

Status information. Valid values are as follows:

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

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

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

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

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

Examples

This example shows how to display spanning tree information:

switch# show spanning-tree

VLAN0001

Spanning tree enabled protocol rstp

Root ID Priority 32769

Address 0005.0505.053c

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0005.0505.053c

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Eth1/1 Desg FWD 2 128.129 P2p

Eth1/2 Desg FWD 2 128.130 P2p

Eth1/39 Desg FWD 2 128.167 P2p

Eth1/41 Desg FWD 2 128.169 P2p

Eth1/48 Desg FWD 2 128.176 P2p

switch#

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

switch# show spanning-tree blockedports

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

switch# show spanning-tree inconsistentports

This example shows how to display the path cost method:

switch# show spanning-tree pathcost method

Spanning tree default pathcost method used is short

switch#

Related Commands

Command

Description

Displays information about STP active interfaces only.

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

Displays a brief summary about STP.

Displays detailed information about STP.

Displays the STP interface status and configuration of specified interfaces.

Displays information about Multiple Spanning Tree (MST) STP.

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

Displays summary information about STP.

Displays STP information for specified VLANs.

show spanning-tree active

command.

]

Syntax Description

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

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

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

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

switch# show spanning-tree active

VLAN0001

Spanning tree enabled protocol rstp

Root ID Priority 32769

Address 0005.0505.053c

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0005.0505.053c

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Eth1/1 Desg FWD 2 128.129 P2p

Eth1/2 Desg FWD 2 128.130 P2p

Eth1/39 Desg FWD 2 128.167 P2p

Eth1/41 Desg FWD 2 128.169 P2p

Eth1/48 Desg FWD 2 128.176 P2p

switch#

Related Commands

Command

Description

Displays information about STP.

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

Displays a brief summary about STP.

Displays detailed information about STP.

Displays the STP interface status and configuration of specified interfaces.

Displays information about Multiple Spanning Tree (MST) STP.

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

Displays summary information about STP.

Displays STP information for specified VLANs.

show spanning-tree bridge

command.

]

Syntax Description

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

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

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

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

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

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

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

(Optional) Displays the bridge priority for this bridge.

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

(Optional) Displays whether the Rapid Per VLAN Spanning Tree Plus (Rapid PVST+) or Multiple Spanning Tree (MST) protocol is active.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

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

switch# show spanning-tree bridge

Hello Max Fwd

Vlan Bridge ID Time Age Dly Protocol

---------------- --------------------------------- ----- --- --- --------

VLAN0001 32769 (32768,1) 0005.73c6.40c1 2 20 15 rstp

VLAN0018 32786 (32768,18) 0005.73c6.40c1 2 20 15 rstp

switch#

describes the fields shown in the display.

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

switch# show spanning-tree bridge address

VLAN0001 0005.73c6.40c1

VLAN0018 0005.73c6.40c1

switch#

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

switch# show spanning-tree bridge detail

VLAN0001

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0005.73c6.40c1

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

VLAN0018

Bridge ID Priority 32786 (priority 32768 sys-id-ext 18)

Address 0005.73c6.40c1

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

switch#

This example shows how to display the STP forward delay interval for the bridge:

switch# show spanning-tree bridge forward-time

VLAN0001 15

VLAN0018 15

switch#

This example shows how to display the STP hello time for the bridge:

switch# show spanning-tree bridge hello-time

VLAN0001 2

VLAN0018 2

switch#

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

switch# show spanning-tree bridge id

VLAN0001 8001.0005.73c6.40c1

VLAN0018 8012.0005.73c6.40c1

switch#

This example shows how to display the STP maximum-aging time for the bridge:

switch# show spanning-tree bridge max-age

VLAN0001 20

VLAN0018 20

switch#

This example shows how to display the bridge priority with the system ID extension for the bridge:

switch# show spanning-tree bridge priority system-id

VLAN0001 32769 (32768,1)

VLAN0018 32786 (32768,18)

switch#

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

switch# show spanning-tree bridge protocol

VLAN0001 rstp

VLAN0018 rstp

switch#

describes the fields shown in the display.

Table 3 show spanning-tree bridge Field Descriptions

Field

Description

Vlan

VLAN for which spanning-tree information is shown.

Bridge ID

Bridge identifier of the bridge.

Hello Time

Amount of time, in seconds, that the bridge sends bridge protocol data units (BPDUs).

Max Age

Amount of time, in seconds, that a BPDU packet should be considered valid.

Fwd Dly

Amount of time, in seconds, that the port spends in listening or learning mode.

Protocol

Type of spanning-tree protocol enabled on the VLAN.

Related Commands

Command

Description

Displays the running configuration information about the Bridge Assurance.

Enables STP Bridge Assurance on the switch.

show spanning-tree brief

command.

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

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

switch(config)# show spanning-tree brief

VLAN0001

Spanning tree enabled protocol rstp

Root ID Priority 32769

Address 0005.0505.053c

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0005.0505.053c

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Eth1/1 Desg FWD 2 128.129 P2p

Eth1/2 Desg FWD 2 128.130 P2p

Eth1/39 Desg FWD 2 128.167 P2p

Eth1/41 Desg FWD 2 128.169 P2p

Eth1/48 Desg FWD 2 128.176 P2p

switch(config)#

Related Commands

Command

Description

Clears the STP counters.

show spanning-tree detail

command.

]

Syntax Description

(Optional) Displays information about STP active interfaces only.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

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

switch# show spanning-tree detail

VLAN0001 is executing the rstp compatible Spanning Tree protocol

Bridge Identifier has priority 32768, sysid 1, address 0005.0505.053c

Configured hello time 2, max age 20, forward delay 15

We are the root of the spanning tree

Topology change flag not set, detected flag not set

Number of topology changes 25 last change occurred 0:59:03 ago

from Ethernet1/48

Times: hold 1, topology change 35, notification 2

hello 2, max age 20, forward delay 15

Timers: hello 0, topology change 0, notification 0

Port 129 (Ethernet1/1) of VLAN0001 is designated forwarding

Port path cost 2, Port priority 128, Port Identifier 128.129

Designated root has priority 32769, address 0005.0505.053c

Designated bridge has priority 32769, address 0005.0505.053c

<--Output truncated-->

switch#

Related Commands

Command

Description

Clears the STP counters.

show spanning-tree interface

command.

]

Syntax Description

Specifies the interface. The interface can be Ethernet or EtherChannel.

number is from 1 to 128.

Specifies the EtherChannel interface and number. The EtherChannel number is from 1 to 4096.

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

(Optional) Displays brief summary of STP information on the specified interfaces.

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

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

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

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

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

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

(Optional) Displays the current port STP state.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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

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

When you are running Multiple Spanning Tree (MST), this command displays the Per VLAN Spanning Tree (PVST) simulation setting.

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

Examples

This example shows how to display STP information on a specified interface:

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

Vlan Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

VLAN0001 Desg FWD 2 128.129 P2p

switch(config)#

This example shows how to display detailed STP information on a specified interface:

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

Port 129 (Ethernet1/1) of VLAN0001 is designated forwarding

Port path cost 2, Port priority 128, Port Identifier 128.129

Designated root has priority 32769, address 0005.0505.053c

Designated bridge has priority 32769, address 0005.0505.053c

Designated port id is 128.129, designated path cost 0

Timers: message age 0, forward delay 0, hold 0

Number of transitions to forwarding state: 1

Link type is point-to-point by default

BPDU: sent 18697, received 0

switch(config)#

This example shows how to display STP port inconsistency state information for a specified interface:

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

VLAN0001 none

switch(config)#

This example shows how to display STP port priority information for a specified interface:

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

VLAN0001 128

switch(config)#

Related Commands

Command

Description

Clears the STP counters.

show spanning-tree mst

command.

]]

]]

]]

Syntax Description

(Optional) Multiple Spanning Tree (MST) instance range that you want to display. For example, 0 to 3, 5, 7 to 9.

(Optional) Displays detailed Multiple Spanning Tree (MST) information.

(Optional) Specifies the interface. The interface can be Ethernet or EtherChannel.

number is from 1 to 128.

(Optional) Specifies the EtherChannel interface and number. The EtherChannel number is from 1 to 4096.

(Optional) Displays current Multiple Spanning Tree (MST) regional information including the VLAN-to-instance mapping of all VLANs.

(Optional) Displays information about the MD5 digest.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

If the switch is not running in STP Multiple Spanning Tree (MST) mode when you enter this command, it returns the following message:

ERROR: Switch is not in mst mode

Examples

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

switch# show spanning-tree mst

This example shows how to display STP information about a specific Multiple Spanning Tree (MST) instance:

switch)# show spanning-tree mst 0

This example shows how to display detailed STP information about the Multiple Spanning Tree (MST) protocol:

switch)# show spanning-tree mst detail

This example shows how to display STP information about specified Multiple Spanning Tree (MST) interfaces:

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

This example shows how to display information about the Multiple Spanning Tree (MST) configuration:

switch)# show spanning-tree mst configuration

This example shows how to display the MD5 digest included in the current Multiple Spanning Tree (MST) configuration:

switch)# show spanning-tree mst configuration digest

Related Commands

Command

Description

Clears the STP counters.

show spanning-tree root

command.

]]

Syntax Description

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

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

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

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

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

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

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

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

(Optional) Displays which port is the root port.

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

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

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

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

switch(config)# show spanning-tree root detail

VLAN0001

Root ID Priority 32769

Address 0005.0505.053c

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

switch(config)#

Related Commands

Command

Description

Clears the STP counters.

show spanning-tree summary

command.

]

Syntax Description

(Optional) Displays totals only of STP information.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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

Examples

This example shows how to display a summary of STP information on the switch:

switch# show spanning-tree summary

Switch is in rapid-pvst mode

Root bridge for: VLAN0001

Port Type Default is disable

Edge Port [PortFast] BPDU Guard Default is disabled

Edge Port [PortFast] BPDU Filter Default is disabled

Bridge Assurance is enabled

Loopguard Default is disabled

Pathcost method used is short

Name Blocking Listening Learning Forwarding STP Active

---------------------- -------- --------- -------- ---------- ----------

VLAN0001 0 0 0 5 5

---------------------- -------- --------- -------- ---------- ----------

1 vlan 0 0 0 5 5

switch#

Related Commands

Command

Description

Clears the STP counters.

show spanning-tree vlan

command.

]]

]

]

]]

]]

]

]]

]]

]

Syntax Description

VLAN or range of VLANs that you want to display.

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

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

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

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

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

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

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

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

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

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

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

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

(Optional) Displays which STP protocol is active on the switch.

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

(Optional) Specifies the interface. The interface can be Ethernet or EtherChannel.

number is from 1 to 128.

(Optional) Specifies the EtherChannel interface and number. The EtherChannel number is from 1 to 4096.

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

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

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

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

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

(Optional) Displays the current port STP state. Valid values are blocking, disabled, learning, and forwarding.

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

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

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

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

switch# show spanning-tree vlan 1

VLAN0001

Spanning tree enabled protocol rstp

Root ID Priority 32769

Address 0005.0505.053c

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0005.0505.053c

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Eth1/1 Desg FWD 2 128.129 P2p

Eth1/2 Desg FWD 2 128.130 P2p

Eth1/39 Desg FWD 2 128.167 P2p

Eth1/41 Desg FWD 2 128.169 P2p

Eth1/48 Desg FWD 2 128.176 P2p

switch#

Related Commands

Command

Description

Clears the STP counters.

Displays summary information about STP.

show udld

command.

]

Syntax Description

number is from 1 to 128.

Displays the UDLD global status and configuration information on all interfaces.

Displays information about UDLD neighbor interfaces.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

This example shows how to display UDLD information for all interfaces:

switch# show udld

Interface Ethernet1/1

--------------------------------

Port enable administrative configuration setting: device-default

Port enable operational state: enabled

Current bidirectional state: unknown

Current operational state: link-up - Multiple neighbor not detected

Message interval: 7

Timeout interval: 5

Last pkt send on: 751414, May 28 11:08:40 2010

Probe pkt send on: 751414, May 28 11:08:40 2010

Echo pkt send on: None.

Flush pkt send on: None.

Last pkt recv on: None.

Probe pkt recv on: None.

Echo pkt recv on: None.

Flush pkt recv on: None.

Deep pkt inspections done: None.

Mismatched if index found: None.

Deep pkt inspection drops: None.

<--Output truncated-->

switch#

This example shows how to display the UDLD information for a specified interface:

switch# show udld ethernet 1/1

Interface Ethernet1/1

--------------------------------

Port enable administrative configuration setting: device-default

Port enable operational state: enabled

Current bidirectional state: unknown

Current operational state: advertisement - Multiple neighbor not detected

Message interval: 7

Timeout interval: 5

Last pkt send on: 781338, May 28 11:09:48 2010

Probe pkt send on: 781338, May 28 11:09:48 2010

Echo pkt send on: None.

Flush pkt send on: None.

Last pkt recv on: None.

Probe pkt recv on: None.

Echo pkt recv on: None.

Flush pkt recv on: None.

Deep pkt inspections done: None.

Mismatched if index found: None.

Deep pkt inspection drops: None.

switch#

This example shows how to display the UDLD global status and configuration on all interfaces:

switch# show udld global

UDLD global configuration mode: enabled

UDLD global message interval: 15

switch#

This example shows how to display the UDLD neighbor interfaces:

switch# show udld neighbors

Related Commands

Command

Description

Configures the UDLD protocol on the switch.

Configures the UDLD protocol on an Ethernet interface.

show vlan

vlan command.

]

Syntax Description

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

(Optional) Displays information about a single VLAN that is identified by the VLAN name.

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

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

This command displays information for all VLANs on the switch.

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, only access VLANs are shown under Ports in the display.

command, these values appear in the Status field:

- suspended—VLAN is suspended.

- active—VLAN is active.

command, these values appear in the Status field:

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

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

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

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

- sus/ishut—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 switch:

switch# show vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Eth1/1, Eth1/2, Eth1/3, Eth1/4

Eth1/6, Eth1/7, Eth1/8, Eth1/9

Eth1/10, Eth1/11, Eth1/12

Eth1/13, Eth1/14, Eth1/15

Eth1/16, Eth1/17, Eth1/18

Eth1/19, Eth1/20, Eth1/21

Eth1/22, Eth1/23, Eth1/24

Eth1/25, Eth1/26, Eth1/27

Eth1/28, Eth1/29, Eth1/30

Eth1/31, Eth1/32, Eth1/33

Eth1/34, Eth1/35, Eth1/36

Eth1/37, Eth1/38, Eth1/39

Eth1/40, Eth1/41, Eth1/42

Eth1/43, Eth1/44, Eth1/45

Eth1/46, Eth1/47, Eth1/48

Eth1/49, Eth1/50, Eth1/51

Eth1/52, Eth1/53, Eth1/54

Eth1/55, Eth1/56, Eth1/57

Eth1/58, Eth1/59, Eth1/60

Eth1/61, Eth1/62, Eth1/63

Eth1/64

5 VLAN0005 active

Remote SPAN VLANs

-------------------------------------------------------------------------------

Primary Secondary Type Ports

------- --------- --------------- -------------------------------------------

5 primary

switch#

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

switch# show vlan brief

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Eth1/1, Eth1/2, Eth1/3, Eth1/4

Eth1/6, Eth1/7, Eth1/8, Eth1/9

Eth1/10, Eth1/11, Eth1/12

Eth1/13, Eth1/14, Eth1/15

Eth1/16, Eth1/17, Eth1/18

Eth1/19, Eth1/20, Eth1/21

Eth1/22, Eth1/23, Eth1/24

Eth1/25, Eth1/26, Eth1/27

Eth1/28, Eth1/29, Eth1/30

<--Output truncated-->

switch#

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

switch# show vlan name VLAN0005

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

5 VLAN0005 active

Remote SPAN VLAN

----------------

Disabled

Primary Secondary Type Ports

------- --------- --------------- -------------------------------------------

switch#

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

switch# show vlan summary

Number of existing VLANs : 2

Number of existing user VLANs : 2

Number of existing extended VLANs : 0

switch#

Related Commands

Command

Description

Displays information about the ports.

show vlan dot1Q tag native

command.

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

This example shows how to display the status of 802.1Q tagging on the native VLANs:

switch# show vlan dot1Q tag native

vlan dot1q native tag is enabled

switch#

Related Commands

Command

Description

Enables dot1q (IEEE 802.1Q) tagging for all native VLANs on all trunked ports on the switch.

show vlan id

command.

}

Syntax Description

VLAN or range of VLANs that you want to display.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

Use this command to display information and statistics on an individual VLAN or a range of VLANs.

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

Examples

This example shows how to display information for the individual VLAN 5:

switch# show vlan id 5

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

5 VLAN0005 active

Remote SPAN VLAN

----------------

Disabled

Primary Secondary Type Ports

------- --------- --------------- -------------------------------------------

5 primary

switch#

Related Commands

Command

Description

Displays information about VLANs on the switch.

show vtp counters

command.

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command.

Note VTP pruning is not supported in Cisco NX-OS Release 5.0(3)A1(1).

Examples

This example shows how to display the VTP counters:

switch# show vtp counters

Related Commands

Command

Description

Enables VTP on the switch.

Enables VTP on an interface.

show vtp interface

command.

]

Syntax Description

(Optional) Displays the VTP configuration on Ethernet interfaces. The slot number is from 1 to 255, and the port number can be from 1 to 128.

(Optional) Displays the VTP configuration on EtherChannel interfaces. The EtherChannel number can be from 1 to 4096.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command.

Examples

This example shows how to display the VTP configuration information on all interfaces:

switch# show vtp interface

This example shows how to display the VTP configuration information for an Ethernet interface:

switch# show vtp interface ethernet 1/12

This example shows how to display the VTP configuration information for an EtherChannel interface:

switch# show vtp interface port-channel 23

Related Commands

Command

Description

Enables VTP on the switch.

Displays the Ethernet interfaces configured on the switch.

Displays the EtherChannels configured on the switch.

Displays the VTP configuration status.

Enables VTP on an interface.

show vtp password

command.

]

Syntax Description

(Optional) Specifies the VTP administrative domain.

VTP domain ID. The ID can be from 0 to 4294967295.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command.

Examples

This example shows how to display the VTP password configured for administrative domain 1:

switch# show vtp password domain 1

Related Commands

Command

Description

Enables VTP on the switch.

Configures the VTP domain.

Configures the VTP administrative password.

show vtp status

command.

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command.

Examples

This example shows how to display the VTP domain status:

switch# show vtp status

VTP Status Information

----------------------

VTP Version : 2 (capable)

Configuration Revision : 0

Maximum VLANs supported locally : 1005

Number of existing VLANs : 1

VTP Operating Mode : Transparent

VTP Domain Name : Accounting

VTP Pruning Mode : Disabled (Operationally Disabled)

VTP V2 Mode : Disabled

VTP Traps Generation : Disabled

MD5 Digest : 0xDF 0x75 0x14 0x0C 0x3E 0xE0 0xA1 0x7E

Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

VTP version running : 1

switch#

Related Commands

Command

Description

Enables VTP on the switch.

Configures the VTP domain.

Configures the VTP version.

shutdown (VLAN configuration)

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

Not shut down

Command Modes

Switch profile VLAN configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

5.0(3)A1(1)

Support for this command was introduced in switch profiles.

Usage Guidelines

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

that specified VLAN, the switch automatically reinstates all the original ports to that VLAN.

command output. If a VLAN is shut down internally, one of these values appears in the Status field:

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

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

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

This command does not require a license.

Examples

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

switch(config)# vlan 2

switch(config-vlan)# no shutdown

switch(config-vlan)#

This example shows how to shut down local traffic on VLAN 3 in a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# vlan 3

switch(config-sync-sp-vlan)# shutdown

switch(config-sync-sp-vlan)#

Related Commands

Command

Description

Displays VLAN information.

spanning-tree bpdufilter

form of this command.

}

Syntax Description

Enables BPDU Filtering on this interface.

Disables BPDU Filtering on this interface.

Command Default

command.

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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.

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

command to enable BPDU Filtering on all spanning tree edge ports.

This command does not require a license.

Examples

This example shows how to explicitly enable BPDU Filtering on the Ethernet spanning tree edge port 1/4:

switch (config)# interface ethernet 1/4

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

switch(config-if)#

Related Commands

Command

Description

Displays information about the spanning tree state.

spanning-tree bpduguard

form of this command.

}

Syntax Description

Enables BPDU Guard on this interface.

Disables BPDU Guard on this interface.

Command Default

command.

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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

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

command 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 enable

switch(config-if)#

Related Commands

Command

Description

Displays information about the spanning tree state.

spanning-tree bridge

form of this command.

Syntax Description

Enables bridge assurance on all network ports.

Command Default

None

Command Modes

Switch profile configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

You can use Bridge Assurance to protect against certain problems that can cause bridging loops in the network. Bridge Assurance is enabled only on spanning tree network ports that are point-to-point links.

This command does not require a license.

Examples

This example shows how to enable Bridge Assurance on all network ports on the switch:

switch(config)# spanning-tree bridge assurance

switch(config)#

This example shows how to enable Bridge Assurance in a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

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

switch(config-sync-sp)#

Related Commands

Command

Description

Displays information about the spanning tree bridge.

Displays the running configuration information about spanning trees.

spanning-tree cost

form of this command.

}

Syntax Description

(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 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.

for the values).

Command Default

Port cost is set by the media speed.

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command for information on setting the path cost calculation method for Rapid per VLAN Spanning Tree Plus (Rapid PVST+).

Table 4 Default Port Cost

Bandwidth

Short Path Cost Method Port Cost

Long Path Cost Method Port Cost

10 Mbps

100

2,000,000

100 Mbps

19

200,000

1-Gigabit Ethernet

4

20,000

10-Gigabit Ethernet

2

2,000

, higher values will 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 EtherChannel bundle is considered as a single port. The port cost is the aggregation of all the configured port costs assigned to that channel.

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

This command does not require a license.

Examples

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

switch# configure terminal

switch(config)# interface ethernet 1/4

switch(config-if)# spanning-tree cost 250

switch(config-if)#

Related Commands

Command

Description

Displays information about the spanning tree configuration.

spanning-tree guard

form of this command.

}

Syntax Description

Enables Loop Guard on the interface.

Sets the guard mode to none.

Enables Root Guard on the interface.

Command Default

Disabled

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

You cannot enable Loop Guard if Root Guard is enabled, although the switch 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# configure terminal

switch(config)# interface ethernet 1/1

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

switch(config-if)#

Related Commands

Command

Description

Displays information about the spanning tree state.

spanning-tree link-type

form of this command.

}

Syntax Description

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

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

Specifies that the interface is a shared medium.

Command Default

Link type set automatically based on the duplex setting.

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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

By default, the switch 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.

Note On a Cisco Nexus 3000 Series switch, port duplex is not configurable.

This command does not require a license.

Examples

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

switch# configure terminal

switch(config)# interface ethernet 1/1

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

switch(config-if)#

Related Commands

Command

Description

Displays information about the spanning tree state.

spanning-tree loopguard default

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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

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

command for the specified interface overrides this global Loop Guard command.

This command does not require a license.

Examples

This example shows how to enable Loop Guard:

switch# configure terminal

switch(config)# spanning-tree loopguard default

switch(config)#

Related Commands

Command

Description

Displays information about the spanning tree state.

spanning-tree mode

form of this command.

}

Syntax Description

Sets the STP mode to Rapid PVST+.

Sets the STP mode to MST.

Command Default

Rapid PVST+

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

You cannot simultaneously run MST and Rapid PVST+ on the switch.

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# configure terminal

switch(config)# spanning-tree mode mst

switch(config-mst)#

Related Commands

Command

Description

Displays the information about the spanning tree configuration.

spanning-tree mst configuration

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

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 Common and Internal Spanning Tree (CIST) instance.

- The region name is an empty string.

- The revision number is 0.

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

The MST configuration consists of three main parameters:

- Instance VLAN mapping—See the instance vlan command.

- Region name—See the name (MST configuration) command.

- Configuration revision number—See the revision command.

commands allow you to exit MST configuration mode. 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 mode.

- The abort command leaves MST configuration mode 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 mode, the following warning message is displayed:

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

-> 3

Changing an MST configuration mode parameter can cause connectivity loss. To reduce service disruptions, when you enter MST configuration mode, 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.

In the unlikely event that two administrators commit a new configuration at exactly the same time, this warning message is displayed:

% MST CFG:Configuration change lost because of concurrent access

This command does not require a license.

Examples

This example shows how to enter MST-configuration mode:

switch# configure terminal

switch(config)# spanning-tree mst configuration

switch(config-mst)#

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

switch# configure terminal

switch(config)# no spanning-tree mst configuration

switch(config)#

Related Commands

Command

Description

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

Sets the name of an MST region.

Sets the revision number for the MST configuration.

Displays the information about the MST protocol.

spanning-tree mst cost

form of this command.

}

Syntax Description

Instance ID number. The range is from 0 to 4094.

Port cost for an instance. The range is from 1 to 200,000,000.

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

Command Default

Automatically set port cost values:

- 10 Mbps—2,000,000

- 100 Mbps—200,000

- 1-Gigabit Ethernet—20,000

- 10-Gigabit Ethernet—2,000

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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

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

The EtherChannel bundle is considered as 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# configure terminal

switch(config)# interface ethernet 1/1

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

switch(config-if)#

Related Commands

Command

Description

Displays the information about the MST protocol.

spanning-tree mst forward-time

form of this command.

Syntax Description

Number of seconds to set the forward-delay timer for all the instances on the switch. The range is from 4 to 30 seconds.

Command Default

15 seconds

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

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

switch# configure terminal

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

switch(config)#

Related Commands

Command

Description

Displays the information about the MST protocol.

spanning-tree mst hello-time

form of this command.

Syntax Description

Number of seconds to set the hello-time delay timer for all the instances on the switch. The range is from 1 to 10 seconds.

Command Default

2 seconds

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

value, the value is calculated from the network diameter.

This command does not require a license.

Examples

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

switch# configure terminal

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

switch(config)#

Related Commands

Command

Description

Displays the information about the MST protocol.

spanning-tree mst max-age

form of this command.

Syntax Description

Number of seconds to set the max-age timer for all the instances on the switch. The range is from 6 to 40 seconds.

Command Default

20 seconds

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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

This command does not require a license.

Examples

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

switch# configure terminal

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

switch(config)#

Related Commands

Command

Description

Displays the information about the MST protocol.

spanning-tree mst max-hops

form of this command.

Syntax Description

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

Command Default

20 hops

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Examples

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

switch# configure terminal

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

switch(config)#

Related Commands

Command

Description

Displays the information about the MST protocol.

spanning-tree mst port-priority

form of this command.

Syntax Description

Instance ID number. The range is from 0 to 4094.

Port priority for an instance. The range is from 0 to 224 in increments of 32.

Command Default

Port priority value is 128.

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

values indicate smaller priorities.

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 set the interface priority:

switch# configure terminal

switch(config)# interface ethernet 1/1

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

switch(config-if)#

Related Commands

Command

Description

Displays the information about the MST protocol.

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

spanning-tree mst priority

form of this command.

Syntax Description

Instance identification number. The range is from 0 to 4094.

Bridge priority. See the “Usage Guidelines” section for valid values and additional information.

Command Default

Bridge priority default is 32768.

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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

argument to 0 to make the switch root.

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# configure terminal

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

switch(config)#

Related Commands

Command

Description

Displays the information about the MST protocol.

spanning-tree mst root

form of this command.

]]

Syntax Description

Instance identification number. The range is from 0 to 4094.

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

Specifies the switch as a secondary root, if the primary root fails.

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

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

Command Default

None

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

argument as a single instance or a range of instances, for example, 0-3,5,7-9.

keyword and argument.

This command does not require a license.

Examples

This example shows how to designate the primary root:

switch# configure terminal

switch(config)# spanning-tree mst 0 root primary

switch(config)#

This example shows how to set the priority and timer values for the bridge:

switch# configure terminal

switch(config)# spanning-tree mst 0 root primary diameter 7 hello-time 2

switch(config)#

Related Commands

Command

Description

Displays the information about the MST protocol.

spanning-tree mst simulate pvst

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

this setting globally.

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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.

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 STP transition process.

Note To block automatic MST and Rapid PVST+ interoperability for the entire switch, use no spanning-tree mst simulate pvst global command.

This command is useful when you want to prevent accidental connection with a device running Rapid 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# configure terminal

switch(config)# interface ethernet 1/1

switch(config-if)# spanning-tree mst simulate pvst disable

switch(config-if)#

Related Commands

Command

Description

Enables global seamless interoperation between MST and Rapid PVST+.

spanning-tree mst simulate pvst global

command.

Syntax Description

This command has no arguments or keywords.

Command Default

Enabled. By default, the switch interoperates seamlessly between MST and Rapid PVST+.

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

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.

command, the switch 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 switch.

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.

command.

This command does not require a license.

Examples

This example shows how to prevent all ports on the switch from automatically interoperating with a connected device running Rapid PVST+:

switch# configure terminal

switch(config)# no spanning-tree mst simulate pvst global

switch(config)#

Related Commands

Command

Description

Enables seamless interoperation between MST and Rapid PVST+ by the interface.

spanning-tree pathcost method

form of this command.

}

Syntax Description

Specifies the 32-bit based values for port path costs.

Specifies the 16-bit based values for port path costs.

Command Default

Short

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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.

path-cost calculation method (16 bits) yields values in the range of 1 through 65535.

Note This command applies only to the Rapid per VLAN Spanning Tree Plus (Rapid PVST+) spanning tree mode, which is the default mode. When you are using Multiple Spanning Tree (MST) spanning tree mode, the switch uses only the long method for calculating path cost; this is not user-configurable for MST.

This command does not require a license.

Examples

This example shows how to set the default pathcost method to long:

switch# configure terminal

switch(config)# spanning-tree pathcost method long

switch(config)#

Related Commands

Command

Description

Displays information about the spanning tree state.

spanning-tree port type edge

command.

]

Syntax Description

(Optional) Configures the trunk port as a spanning tree edge port.

Command Default

command. If you did not configure a global setting, the default spanning tree port type is normal.

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

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 switch and network operation.

When a 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 is the same 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 single

host. Connecting hubs, concentrators, switches, bridges, etc... to this

interface when portfast is enabled, can cause temporary bridging loops.

Use with CAUTION

keyword, the system returns an additional message similar to the following:

%Portfast has been configured on Ethernet1/40 but will only

have effect when the interface is in a non-trunking mode.

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 host as an edge port, which automatically transitions that interface to the forwarding state on a linkup:

switch# configure terminal

switch(config)# interface ethernet 1/1

switch(config-if)# spanning-tree port type edge

switch(config-if)#

Related Commands

Command

Description

Displays information about the spanning tree state.

spanning-tree port type edge bpdufilter default

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

To enable BPDU Filtering by default, you must do the following:

- Configure the interface as a spanning tree edge port, 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 cautious when using this command; incorrect usage can cause bridging loops.

command for complete information on using this feature at the interface level.

Note The BPDU Filtering 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 switch 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# configure terminal

switch(config)# spanning-tree port type edge bpdufilter default

switch(config)#

Related Commands

Command

Description

Displays the information about the spanning tree configuration.

Enables BPDU Filtering on the interface.

Configures an interface as a spanning tree edge port.

spanning-tree port type edge bpduguard default

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

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.

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# configure terminal

switch(config)# spanning-tree port type edge bpduguard default

switch(config)#

Related Commands

Command

Description

Displays the information about the spanning tree configuration.

Enables BPDU guard on the interface.

Configures an interface as a spanning tree edge port.

spanning-tree port type edge default

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

Use this command to automatically configure all interfaces as spanning tree edge ports by default. This command will 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 switch 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. You

should now disable portfast explicitly on switched ports leading to hubs,

switches and bridges as they may create temporary bridging loops.

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 hosts as spanning tree edge ports:

switch# configure terminal

switch(config)# spanning-tree port type edge default

switch(config)#

Related Commands

Command

Description

Displays information about the spanning tree configuration.

Configures an interface as a spanning tree edge port.

spanning-tree port type network

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

command. If you did not configure a global setting, the default spanning tree port type is normal.

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

Use this command to configure an interface that connects to a switch 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 hosts as STP network ports and enable Bridge Assurance, those ports will 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.

command, the software returns the port to the global default setting for network port types.

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 switch or bridge as a spanning tree network port:

switch# configure terminal

switch(config)# interface ethernet 1/1

switch(config-if)# spanning-tree port type network

switch(config-if)#

Related Commands

Command

Description

Displays information about the spanning tree configuration per specified interface.

spanning-tree port type network default

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command to configure specified ports that are connected to hosts as spanning-tree edge ports.

Note If you mistakenly configure ports connected to hosts as Spanning Tree Protocol (STP) network ports and Bridge Assurance is enabled, those ports will automatically move into the blocking state.

Configure only the ports that connect to other switches as network ports because the Bridge Assurance feature causes network ports that are connected to hosts to move into the spanning tree blocking state.

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 switches as spanning tree network ports:

switch# configure terminal

switch(config)# spanning-tree port type network default

switch(config)#

Related Commands

Command

Description

Displays information about the spanning tree configuration.

spanning-tree port-priority

form of this command.

Syntax Description

(Optional) Specifies the VLAN identification number. The range is from 0 to 4094.

Port priority. The range is from 1 to 224, in increments of 32.

Command Default

Port priority default value is 128.

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

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.

Note Use this command to configure the port priority for Rapid per VLAN Spanning Tree Plus (Rapid PVST+) spanning tree mode, which is the default STP mode. To configure the port priority for Multiple Spanning Tree (MST) spanning tree mode, use the spacing-tree mst port-priority command.

This command does not require a license.

Examples

This example shows how to increase the probability 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# configure terminal

switch(config)# interface ethernet 1/1

switch(config-if)# spanning-tree port-priority 32

switch(config-if)#

Related Commands

Command

Description

Displays information about the spanning tree state.

Displays information on the spanning tree port priority for the interface.

spanning-tree vlan

form of this command.

]]]]

]

Syntax Description

VLAN identification number. The VLAN ID range is from 0 to 4094.

(Optional) Specifies the STP forward-delay time. The range is from 4 to 30 seconds.

(Optional) Specifies the number of seconds between the generation of configuration messages by the root switch. The range is from 1 to 10 seconds.

(Optional) Specifies the maximum number of seconds that the information in a bridge protocol data unit (BPDU) is valid. The range is from 6 to 40 seconds.

(Optional) Specifies the STP-bridge priority; the valid values are 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, or 61440. All other values are rejected.

(Optional) Forces this switch to be the root bridge.

(Optional) Forces this switch to be the root switch if the primary root fails.

(Optional) Specifies the maximum number of bridges between any two points of attachment between end stations.

Command Default

The defaults are as follows:

- forward-time —15 seconds

- hello-time —2 seconds

- max-age —20 seconds

- priority —32768

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

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.

, 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 switch’s bridge priority to 24576. If you enter the spanning-tree root primary command and the switch 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 switch 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 switch’s bridge priority to 28762. If the root switch fails, this switch becomes the next root switch.

Use the spanning-tree root commands on the backbone switches only.

This command does not require a license.

Examples

This example shows how to enable spanning tree on VLAN 200:

switch# configure terminal

switch(config)# spanning-tree vlan 200

switch(config)#

This example shows how to configure the switch as the root switch for VLAN 10 with a network diameter of 4:

switch# configure terminal

switch(config)# spanning-tree vlan 10 root primary diameter 4

switch(config)#

This example shows how to configure the switch as the secondary root switch for VLAN 10 with a network diameter of 4:

switch# configure terminal

switch(config)# spanning-tree vlan 10 root secondary diameter 4

switch(config)#

Related Commands

Command

Description

Displays information about the spanning tree state.

state

form of this command.

}

Syntax Description

Specifies that the VLAN is actively passing traffic.

Specifies that the VLAN is not passing any packets.

Command Default

The VLAN is actively passing traffic.

Command Modes

Switch profile VLAN configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

5.0(3)A1(1)

Support for this command was introduced in a switch profile.

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# configure terminal

switch(config)# vlan 2

switch(config-vlan)# state suspend

switch(config-vlan)#

This example shows how to suspend VLAN 5 in a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# vlan 5

switch(config-sync-sp-vlan)# state suspend

switch(config-sync-sp-vlan)#

Related Commands

Command

Description

Displays VLAN information.

storm-control

form of this command.

percentage[.fraction]

percentage[.fraction]

Syntax Description

Configures traffic storm control for broadcast traffic.

Configures traffic storm control for multicast traffic.

port

Configures traffic storm control for unicast, multicast, and broadcast traffic.

level percentage. fraction

Specifies the percentage of total available interface bandwidth that the controlled traffic can use.

- The level can range from 0 to 100.

- The optional fraction of a level can range from 0 to 99.

- 100 percent means no traffic storm control.

- 0.0 percent suppresses all traffic.

Command Default

Traffic storm control is disabled by default.

Command Modes

Interface configuration mode

Command History

Release

Modification

6.0(2)A8(1)

Storm control aggregation was introduced.

Usage Guidelines

- You can configure traffic storm control on Ethernet and port-channel interfaces.

- Because of hardware limitations and the method by which packets of different sizes are counted, the level percentage is an approximation. Depending on the sizes of the frames that make up the incoming traffic, the actual enforced level might differ from the configured level by several percentage points.

- Storm control is only for ingress traffic, specifically for unknown unicast, unknown multicast, and broadcast traffic.

- Storm-control is applied on each member of a port channel individually and not on the port channel as a whole.

Examples

This example shows how to configure traffic storm control for port channels 122 and 123:

switch# configure terminal

switch(config)# interface port-channel 122, port-channel 123

switch(config-if-range)# storm-control port level 66.75

switch(config-if-range)# storm-control multicast level 66.75

switch(config-if-range)# storm-control broadcast level 66.75

switch(config-if-range)#

This example shows how to configure traffic storm control for Ethernet 1/7, Ethernet 1/8:

switch# configure terminal

switch(config)# interface ethernet 1/7, ethernet 1/8

switch(config-if-range)# storm-control port level 66.75

switch(config-if-range)# storm-control multicast level 66.75

switch(config-if-range)# storm-control broadcast level 66.75

switch(config-if-range)#

Related Commands

Command

Description

Displays the running configuration information for configured interfaces.

svi enable

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

VLAN interfaces are disabled.

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command before you can create VLAN interfaces.

This command does not require a license.

Examples

This example shows how to enable the interface VLAN feature on the switch:

switch# configure terminal

switch(config)# svi enable

switch(config)#

Related Commands

Command

Description

Creates a VLAN interface.

switchport access vlan

form of this command.

Syntax Description

VLAN to set when the interface is in access mode. The range is from 1 to 4094, except for the VLANs reserved for internal use.

Command Default

VLAN 1

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command to reset the access-mode VLAN to the appropriate default VLAN for the switch. This action may generate messages on the device to which the port is connected.

This command does not require a license.

Examples

This example shows how to configure an Ethernet interface to join VLAN 2:

switch# configure terminal

switch(config)# interface ethernet 1/7

switch(config-if)# switchport access vlan 2

switch(config-if)#

Related Commands

Command

Description

Displays the administrative and operational status of a port.

Related Commands

Command

Description

Displays information on all interfaces configured as switch ports.

switchport backup interface

To configure Flex Links, which are two interfaces that provide backup to each other, on a Layer 2 interface, use the switchport backup interface command. To remove the Flex Links configuration, use the no form of this command.

Syntax Description

Specifies the backup Ethernet interface. The slot number is 1 and the port number is from 1 to 48.

port-channel channel-no

Specifies the port channel interface. The interface number is from 1 to 4096.

multicast

(Optional) Specifies to configure the multicast parameters.

fast-convergence

(Optional) Configures fast convergence on the backup interface.

preemption

(Optional) Specifies to configure a preemption scheme for a backup interface pair.

delay delay-time

(Optional) Specifies a preemption delay. The range is from 1 to 300 seconds. The default preemption delay is 35 seconds

mode

(Optional) Specifies the preemption mode.

bandwidth

(Optional) Specifies that the interface with the higher available bandwidth always preempts the backup.

forced

(Optional) Specifies the interface that always preempts the backup.

off

(Optional) Specifies no preemption occurs from backup to active.

Command Default

None

Command Modes

Interface configuration mode

Command History

Release

Modification

6.0(2)A3(1)

This command was introduced.

Usage Guidelines

Note This command is applicable to the Cisco Nexus 3500 Series switches only.

- Before you use this command, ensure that you enable Flex Links on the switch by using the feature flexlink command.

Note Ensure that the virtual port channel (vPC) is disabled on the switch.

- A Flex Links port can only be a physical Ethernet port or a port channel.

- You cannot configure Flex Links port on the following types of interface:

– Interface with port security enabled

– Layer 3 interface

– Switched Port Analyzer (SPAN) destination

– Port channel member

– Interface configured with private VLAN

– Endnode mode

– Fabric path core interface (Layer 2 multipath)

Examples

This example shows how to configure Ethernet 1/1 and Ethernet 1/12 as Flex Links:

switch# configure terminal

switch(config)# interface ethernet 1/1

switch(config-if)# switchport backup interface ethernet 1/12

switch(config-if)#

This example shows how to configure EtherChannel 100 and EtherChannel 101 as Flex Links:

switch# configure terminal

switch(config)# interface port-channel 100

switch(config-if)# switchport backup interface port-channel 101

switch(config-if)#

This example shows how to configure the Ethernet interface to always preempt the backup:

switch# configure terminal

switch(config)# interface ethernet1/10

switch(config-if)# switchport backup interface ethernet1/2 preemption mode forced

switch(config-if)#

This example shows how to configure the Ethernet interface preemption delay time:

switch# configure terminal

switch(config)# interface ethernet1/1

switch(config-if)# switchport backup interface ethernet1/12 preemption delay 150

switch(config-if)#

This example shows how to configure fast convergence on the backup interface:

switch# configure terminal

switch(config)# interface ethernet1/1

switch(config-if)# switchport backup interface ethernet1/12 multicast fast-convergence

switch(config-if)#

Related Commands

Command

Description

Enables Flex Links for Layer 2 interfaces.

show interface switchport backup

Displays backup interfaces.

switchport mac-learn disable

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Interface configuration mode

Command History

Release

Modification

6.0(2)A1(1d)

This command was introduced.

Usage Guidelines

interface command to clear the dynamic address entries for a specified interface from the MAC address table.

In Warp mode, the Cisco Nexus 3500 switch does not flood Layer 3 traffic to the VLAN in which the port configured by using the switchport mac-learn disable command is present, and the traffic is dropped. In Normal mode, the switch should flood the Layer 3 traffic to this VLAN.

Examples

This example shows how to how to disable MAC address learning on Layer 2 interfaces:

switch# configure terminal

switch(config)# interface ethernet 1/4

switch(config-if)# switchport mac-learn disable

switch(config-if)# clear mac address-table dynamic interface ethernet 1/4

Related Commands

Command

Description

Clears the dynamic address entries for the specified interface from the MAC address table.

switchport monitor rate-limit

form of this command.

]

Syntax Description

(Optional) Specifies that the rate limit is 1 GB.

Command Default

None

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

This example shows how to limit the bandwidth on Ethernet interface 1/2 to 1 GB:

switch# configure terminal

switch(config)# interface ethernet 1/2

switch(config-if)# switchport monitor rate-limit 1G

switch(config-if)#

Related Commands

Command

Description

Displays information on all interfaces configured as switch ports.

vlan

form of this command.

}

}

Syntax Description

Number of the VLAN. The range is from 1 to 4094.

Note You cannot create, delete, or modify VLAN 1 or any of the internally allocated VLANs.

Range of configured VLANs; see the “Usage Guidelines” section for a list of valid values.

Command Default

None

Command Modes

Switch profile configuration mode

Note You can also create and delete VLANs in the VLAN configuration mode using these same commands.

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

5.0(3)A1(1)

Support for this command was introduced in switch profiles.

Usage Guidelines

argument that you entered matches an existing VLAN, nothing happens except that you enter VLAN configuration mode.

), 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.

that specified VLAN, the switch automatically reinstates all the original ports to that VLAN.

In Cisco NX-OS 5.0(3)A1(1), you can configure VLANs on a device configured as a VLAN Trunking Protocol (VTP) server or transparent device. If the VTP device is configured as a client, you cannot add a VLAN or enter the VLAN configuration mode.

This command does not require a license.

Examples

This example shows how to add a new VLAN and enter VLAN configuration mode:

switch# configure terminal

switch(config)# vlan 2

switch(config-vlan)#

This example shows how to add a range of new VLANs and enter VLAN configuration mode:

switch# configure terminal

switch(config)# vlan 2,5,10-12,20,25,4000

switch(config-vlan)#

This example shows how to add a new VLAN and enter VLAN configuration mode in a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# vlan 3

switch(config-sync-sp-vlan)#

This example shows how to delete a VLAN:

switch# configure terminal

switch(config)# no vlan 2

switch(config)#

Related Commands

Command

Description

Configures the Internet Group Management Protocol (IGMP) on a VLAN.

Sets the name for a VLAN.

Displays VLAN information.

Shuts down the local traffic on a VLAN.

Sets the operational state for a VLAN.

vlan dot1Q tag native

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Switch profile configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

5.0(3)A1(1)

Support for this command was introduced in switch profiles.

Usage Guidelines

Typically, you configure 802.1Q trunks with a native VLAN ID, which strips tagging from all packets on that VLAN.

command. The switch will tag the traffic received on the native VLAN and admit only 802.1Q-tagged frames, dropping any untagged traffic, including untagged traffic in the native VLAN.

Control traffic continues to be accepted as untagged on the native VLAN on a trunked port, even when the vlan dot1q tag native command is enabled.

Note The vlan dot1q tag native command is enabled on global basis.

This command does not require a license.

Examples

This example shows how to enable 802.1Q tagging on the switch:

switch# configure terminal

switch(config)# vlan dot1q tag native

switch(config)#

This example shows how to disable 802.1Q tagging on the switch:

switch# configure terminal

switch(config)# no vlan dot1q tag native

Turning off vlan dot1q tag native may impact the functioning of existing dot1q tunnel ports

switch(config)#

This example shows how to enable 802.1Q tagging in a switch profile:

switch# configure sync

Enter configuration commands, one per line. End with CNTL/Z.

switch(config-sync)# switch-profile s5010

Switch-Profile started, Profile ID is 1

switch(config-sync-sp)# vlan dot1q tag native

switch(config-sync-sp)#

Related Commands

Command

Description

Displays the status of tagging on the native VLAN.

vtp (interface)

form of this command.

Syntax Description

This command has no arguments or keywords.

Command Default

VTP is enabled on a trunk interface

Command Modes

Interface configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command.

VLAN Trunking Protocol (VTP) is a Cisco Proprietary Layer 2 messaging protocol used to distribute the VLAN configuration information across multiple devices within a VTP domain.

This command does not require a license.

Examples

This example shows how to enable VTP on an interface:

switch# configure terminal

switch(config)# interface ethernet 1/1

switch(config-if)# vtp

switch(config-if)#

Related Commands

Command

Description

Copies the running configuration to the startup configuration.

Enables VTP on the switch.

Displays the running VTP configuration.

Displays VTP information.

Enables Simple Network Management Protocol (SNMP) notifications.

vtp domain

form of this command.

Syntax Description

VTP domain name. The name can be a maximum of 32 ASCII characters.

Command Default

Blank (NULL)

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command.

VLAN Trunking Protocol (VTP) is a Cisco Proprietary Layer 2 messaging protocol used to distribute the VLAN configuration information across multiple devices within a VTP domain. Without VTP, you must configure VLANs in each device in the network. Using VTP, you configure VLANs on a VTP server and then distribute the configuration to other VTP devices in the VTP domain.

This command does not require a license.

Examples

This example shows how to create a VTP domain named accounting:

switch# configure terminal

switch(config)# vtp domain accounting

switch(config)#

Related Commands

Command

Description

Enables VTP on the switch.

Displays the running VTP configuration.

Displays VTP information.

vtp file

form of this command.

Syntax Description

Specifies that the VTP configuration file is to be stored in the bootflash memory of the NVRAM. The colon character (:) is required after the file system name.

/. The double slash (//) is required.

(Optional) Name of the destination directory. The directory name is case sensitive.

Name of the VTP configuration file.

Note There can be no spaces in the bootflash://server/directory/filename string. Individual elements of this string are separated by colons (:) and slashes (/).

Command Default

VTP database file, vlan.dat

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command.

The default configuration file is stored in the VTP database, vlan.dat, in NVRAM. VTP configuration information is also stored in the startup configuration file.

Note Do not delete the vlan.dat file.

When a switch in a VTP domain reloads, the switch updates the VTP domain and VLAN configuration information from the information contained in the VTP database file (vlan.dat) or the startup configuration file.

If the VTP domain names in the VTP database and the startup configuration file match, the VTP database is ignored. The VTP and VLAN configurations in the startup configuration file are used to restore the configuration in this VTP device.

If the VTP domain information in the startup configuration file does not match with that in the VTP database file, then the configuration in the VTP database file is used to restore the configuration in the transparent VTP device.

This command does not require a license.

Examples

This example shows how to store the VTP configuration to a file named myvtp.txt in the local writable storage file system, bootflash:

switch# configure terminal

switch(config)# vtp file bootflash:///myvtp.txt

switch(config)#

Related Commands

Command

Description

Enables VTP on the switch.

Displays the running VTP configuration.

Displays VTP information.

vtp password

Command

Description

Enables VTP on the switch.

Displays VTP information.

Configures VLANs.

form of this command.

Syntax Description

VTP domain password. The password is in ASCII text and can be a maximum of 64 characters.

Command Default

None

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

If you configure a password for VTP, you must configure the password on all switches in the VTP domain. The password must be the same password on all those switches. The VTP password that you configure is translated by an algorithm into a 16-byte word (MD5 value) that is carried in all summary-advertisement VTP packets.

This command does not require a license.

Examples

This example shows how to configure a password for the VTP administrative domain named accounting:

switch# configure terminal

switch(config)# vtp domain accounting

switch(config)# vtp password cisco

switch(config)#

Related Commands

Command

Description

Displays the VTP domain password.

Displays VTP information.

vtp version

form of this command.

Syntax Description

VTP version. The range is from 1 to 2.

Command Default

Version 1 enabled

Version 2 disabled

Command Modes

Global configuration mode

Command History

Release

Modification

5.0(3)A1(1)

This command was introduced.

Usage Guidelines

command.

If you enable VTP, you must configure either version 1 or version 2. If you are using VTP in a Token Ring environment, you must use version 2.

This command does not require a license.

Examples

This example shows how to enable VTP version 2 for Token Ring VLANs:

switch# configure terminal

switch(config)# vtp version 2

switch(config)#

Related Commands

Command

Description

Enables VTP on the switch.

Displays VTP information.

Cisco Nexus 3548 Switch NX-OS Layer 2 Switching Command Reference

First Published: December 2012

Last Modified: May 2016

THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB’s public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS” WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks . Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

Cisco Nexus 3548 Switch NX-OS Layer 2 Switching Command Reference

© 2016 Cisco Systems, Inc. All rights reserved.