hit counter script
Cisco Catalyst 2960-X Command Reference Manual

Cisco Catalyst 2960-X Command Reference Manual

Layer 2
Hide thumbs Also See for Catalyst 2960-X:
Table of Contents

Advertisement

Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS
Release 15.0(2)EX
First Published: July 10, 2013
Americas Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
Text Part Number: OL-29043 -01

Advertisement

Table of Contents
loading

Summary of Contents for Cisco Catalyst 2960-X

  • Page 1 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX First Published: July 10, 2013 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 527-0883 Text Part Number: OL-29043 -01...
  • Page 2 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.
  • Page 3 Searching and Filtering Output of show and more Commands Accessing the CLI through a Console Connection or through Telnet Layer 2 Commands C H A P T E R 3 channel-group channel-protocol clear lacp Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 4 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 5 (global configuration) spanning-tree portfast (interface configuration) spanning-tree transmit hold-count spanning-tree uplinkfast spanning-tree vlan switchport access vlan switchport mode switchport nonegotiate udld udld port udld reset Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 6 Contents Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 7: Preface

    An ellipsis (three consecutive nonbolded periods without spaces) after a syntax element indicates that the element can be repeated. A vertical line, called a pipe, indicates a choice within a set of keywords or arguments. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 8 Means the described action saves time. You can save time by performing the action described in the Timesaver paragraph. Warning Means reader be warned. In this situation, you might perform an action that could result in bodily injury. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 9: Related Documentation

    Obtaining Documentation and Submitting a Service Request For information on obtaining documentation, submitting a service request, and gathering additional information, see the monthly What's New in Cisco Product Documentation, which also lists all new and revised Cisco technical documentation, at: http://www.cisco.com/en/US/docs/general/whatsnew/whatsnew.html...
  • Page 10 Preface Obtaining Documentation and Submitting a Service Request Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 11: Chapter

    How to Use the CLI to Configure Features, page 9 Information About Using the Command-Line Interface This section describes the Cisco IOS command-line interface (CLI) and how to use it to configure your switch. Command Modes The Cisco IOS user interface is divided into many different modes. The commands available to you depend on which mode you are currently in.
  • Page 12 (with a Ethernet ports. To return to specific interface). privileged EXEC mode, press Ctrl-Z or enter end. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 13: Using The Help System

    Obtains a list of commands that begin with a particular character string. Example: Switch# di? dir disable disconnect Step 3 abbreviated-command-entry <Tab> Completes a partial command name. Example: Switch# sh conf<tab> Switch# show configuration Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 14: Understanding Abbreviated Commands

    CLI Error Messages This table lists some error messages that you might encounter while using the CLI to configure your switch. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 15: Configuration Logging

    The software provides a history or record of commands that you have entered. The command history feature is particularly useful for recalling long or complex commands or entries, including access lists. You can customize this feature to suit your needs. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 16: Changing The Command History Buffer Size

    Returns to more recent commands in the history buffer after recalling commands with Ctrl-P or the up arrow key. Repeat the key sequence to recall successively more recent commands. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 17: Disabling The Command History Feature

    Command or Action Purpose Step 1 terminal editing Reenables the enhanced editing mode for the current terminal session in the privileged EXEC mode. Example: Switch# terminal editing Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 18 Command or Action Purpose Step 2 terminal no editing Disables the enhanced editing mode for the current terminal session in the privileged EXEC mode. Example: Switch# terminal no editing Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 19: Editing Commands Through Keystrokes

    Capitalizes at the cursor. Esc L Changes the word at the cursor to lowercase. Esc U Capitalizes letters from the cursor to the end of the word. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 20: Editing Command Lines That Wrap

    When the cursor first reaches the end of the line, the line is shifted ten spaces to the left and redisplayed. The dollar sign ($) shows that the Switch(config)# access-list 101 permit tcp Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 21: Searching And Filtering Output Of Show And More Commands

    Vlan1 is up, line protocol is up Vlan10 is up, line protocol is down GigabitEthernet1/0/1 is up, line protocol is down GigabitEthernet1/0/2 is up, line protocol is up Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 22: Accessing The Cli Through A Console Connection Or Through Telnet

    After you connect through the console port, through the Ethernet management port, through a Telnet session or through an SSH session, the user EXEC prompt appears on the management station. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 23: Layer 2 Commands

    49 • pagp port-priority, page 51 • pagp timer, page 53 • port-channel load-balance, page 54 • show etherchannel, page 55 • show lacp, page 58 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 24 104 • spanning-tree port-priority, page 105 • spanning-tree portfast (global configuration), page 106 • spanning-tree portfast (interface configuration), page 108 • spanning-tree transmit hold-count, page 110 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 25 115 • switchport mode, page 116 • switchport nonegotiate, page 119 • udld, page 121 • udld port, page 123 • udld reset, page 125 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 26: Channel-Group

    The LAN Lite feature set supports up to six Etherchannels. The LAN Base feature set supports up to 24 Etherchannels; however, in mixed stack configurations, only six EtherChannels are supported. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 27 Do not configure a secure port as part of an EtherChannel or configure an EtherChannel port as a secure port. For a complete list of configuration guidelines, see the “Configuring EtherChannels” chapter in the software configuration guide for this release. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 28 Accesses or creates a port channel. interface port-channel Displays EtherChannel information for a channel. show etherchannel Displays LACP channel-group information. show lacp Displays Port Aggregation Protocol (PAgP) channel-group show pagp information. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 29: Channel-Protocol

    This example shows how to specify LACP as the protocol that manages the EtherChannel: Switch(config-if)# channel-protocol lacp You can verify your settings by entering the show etherchannel [channel-group-number] protocol privileged EXEC command. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 30 Related Commands Command Description Assigns an Ethernet port to an EtherChannel group, or enables an channel-group EtherChannel mode, or both. Displays EtherChannel information for a channel. show etherchannel Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 31: Clear Lacp

    You can verify that the information was deleted by entering the show lacp counters or the show lacp channel-group-number counters privileged EXEC command. Related Commands Command Description Displays LACP channel-group information. show lacp Enables debugging of LACP. debug lacp Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 32: Clear Pagp

    You can verify that the information was deleted by entering the show pagp privileged EXEC command. Related Commands Command Description Displays Port Aggregation Protocol (PAgP) channel-group information. show pagp Enables debugging of PAgP. debug pagp Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 33: Clear Spanning-Tree Counters

    If the interface-id value is not specified, spanning-tree counters are cleared for all interfaces. Examples This example shows how to clear spanning-tree counters for all interfaces: Switch# clear spanning-tree counters Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 34: Clear Spanning-Tree Detected-Protocols

    Use the clear spanning-tree detected-protocols command in this situation. Examples This example shows how to restart the protocol migration process on a port: Switch# clear spanning-tree detected-protocols interface gigabitethernet2/0/1 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 35: Debug Etherchannel

    This example shows how to display all EtherChannel debug messages: Switch# debug etherchannel all This example shows how to display debug messages related to EtherChannel events: Switch# debug etherchannel event Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 36 Layer 2 Commands debug etherchannel Related Commands Command Description Displays EtherChannel information for a channel. show etherchannel Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 37: Debug Lacp

    This example shows how to display all LACP debug messages: Switch# debug LACP all This example shows how to display debug messages related to LACP events: Switch# debug LACP event Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 38: Debug Pagp

    To enable debugging on a stack member without first starting a session on the stack master, use the remote command switch-number LINE command in privileged EXEC mode. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 39 This example shows how to display all PAgP debug messages: Switch# debug pagp all This example shows how to display debug messages related to PAgP events: Switch# debug pagp event Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 40: Debug Platform Etherchannel

    To enable debugging on a stack member without first starting a session on the stack master, use the remote command switch-number LINE command in privileged EXEC mode. Examples This example shows how to display debug messages related to Etherchannel initialization: Switch# debug platform etherchannel init Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 41: Debug Platform Pm

    Displays port manager event debug messages. pm-span Displays port manager Switched Port Analyzer (SPAN) event debug messages. pm-vectors Displays port manager vector-related event debug messages. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 42 To enable debugging on a stack member without first starting a session on the stack master, use the remote command switch-number LINE command in privileged EXEC mode. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 43 Layer 2 Commands debug platform pm Examples This example shows how to display debug messages related to the creation and deletion of VLANs: Switch# debug platform pm vlans Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 44: Debug Spanning-Tree

    Displays per-VLAN spanning-tree plus (PVST+) event debug messages. root Displays spanning-tree root-event debug messages. snmp Displays spanning-tree Simple Network Management Protocol (SNMP) handling debug messages. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 45 To enable debugging on a stack member without first starting a session on the stack master, use the remote command switch-number LINE command in privileged EXEC mode. Examples This example shows how to display all spanning-tree debug messages: Switch# debug spanning-tree all Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 46: Debug Platform Udld

    To enable debugging on a stack member without first starting a session on the stack master, use the remote command switch-number LINE command in privileged EXEC mode. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 47: Interface Port-Channel

    Only one port channel in a channel group is allowed. Follow these guidelines when you use the interface port-channel command: • If you want to use the Cisco Discovery Protocol (CDP), you must configure it on the physical port and not on the port channel interface.
  • Page 48 Related Commands Command Description Assigns an Ethernet port to an EtherChannel group, or enables an channel-group EtherChannel mode, or both. Displays EtherChannel information for a channel. show etherchannel Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 49: Lacp Port-Priority

    Use the show lacp internal privileged EXEC command to display LACP port priorities and internal port number values. For information about configuring LACP on physical ports, see the configuration guide for this release. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 50 Assigns an Ethernet port to an EtherChannel group, or enables an channel-group EtherChannel mode, or both. Configures the LACP system priority. lacp system-priority Displays LACP channel-group information. show lacp Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 51: Lacp System-Priority

    This example shows how to set the LACP system priority: Switch(config)# lacp system-priority 20000 You can verify your settings by entering the show lacp sys-id privileged EXEC command. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 52 Assigns an Ethernet port to an EtherChannel group, or enables an channel-group EtherChannel mode, or both. Configures the port priority for the Link Aggregation Control Protocol lacp port-priority (LACP). Displays LACP channel-group information. show lacp Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 53: Link State Group

    This example shows how to configure the interfaces as upstream in group 2: Switch# configure terminal Switch(config)# interface range gigabitethernet2/0/1 -2 Switch(config-if-range)# link state group 2 upstream Switch(config-if-range)# end Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 54: Link State Track

    Use the link state group command to create and configure the link-state group. You then can use this command to enable the link-state group. Examples This example shows how to enable link-state group 2: Switch# configure terminal Switch(config)# link state track 2 Switch(config)# end Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 55: Pagp Learn-Method

    MAC address by using the port-channel load-balance src-mac global configuration command. Use the pagp learn-method interface configuration command only in this situation. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 56 Related Commands Command Description Selects a port over which all traffic through the EtherChannel is sent. pagp port-priority Displays Port Aggregation Protocol (PAgP) channel-group information. show pagp Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 57: Pagp Port-Priority

    This example shows how to set the port priority to 200: Switch(config-if)# pagp port-priority 200 You can verify your setting by entering the show running-config privileged EXEC command or the show pagp channel-group-number internal privileged EXEC command. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 58 Provides the ability to learn the source address of incoming packets. pagp learn-method Sets the load-distribution method among the ports in the EtherChannel. port-channel load-balance Displays Port Aggregation Protocol (PAgP) channel-group information. show pagp Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 59: Pagp Timer

    This command is available for all interfaces configured as part of a PAgP port channel. Examples This example shows how to set the PAgP timer expiration to 50 seconds: Switch(config-if)# pagp timer 50 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 60: Port-Channel Load-Balance

    You can verify your setting by entering the show running-config privileged EXEC command or the show etherchannel load-balance privileged EXEC command. Examples This example shows how to set the load-distribution method to dst-mac: Switch(config)# port-channel load-balance dst-mac Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 61: Show Etherchannel

    Switch> show etherchannel 1 detail Group state = L2 Ports: 2 Maxports = 16 Port-channels: 1 Max Port-channels = 16 Protocol: LACP Ports in the group: ------------------- Port: Gi1/0/1 ------------ Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 62 Logical slot/port = 10/1 Number of ports = 2 Port state = Port-channel Ag-Inuse Protocol = LACP Ports in the Port-channel: Index Load Port EC state No of bits ------+------+------+------------------+----------- Gi1/0/1 Active Gi1/0/2 Active Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 63 Assigns an Ethernet port to an EtherChannel group, or enables an channel-group EtherChannel mode, or both. Restricts the protocol used on a port to manage channeling. channel-protocol Accesses or creates a port channel. interface port-channel Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 64: Show Lacp

    Switch> show lacp counters LACPDUs Marker Marker Response LACPDUs Port Sent Recv Sent Recv Sent Recv Pkts --------------------------------------------------------------------- Channel group:1 Gi2/0/1 Gi2/0/2 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 65 Admin Oper Port Port Port Flags State Priority Number State Gi2/0/1 bndl 32768 0x3D Gi2/0/2 bndl 32768 0x3D The following table describes the fields in the display: Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 66 Oper Key Runtime operational key that is being used by this port. LACP automatically generates this value as a hexadecimal number. Port Number Port number. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 67 The system identification is made up of the system priority and the system MAC address. The first two bytes are the system priority, and the last six bytes are the globally administered individual MAC address associated to the system. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 68 Enables debugging of LACP. debug lacp Configures the port priority for the Link Aggregation Control Protocol lacp port-priority (LACP). Configures the LACP system priority. lacp system-priority Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 69: Show Link State Group

    Downstream Interfaces : Gi1/0/11(Dis) Gi1/0/12(Dis) Gi1/0/13(Dis) Gi1/0/14(Dis) Link State Group: 2 Status: Enabled, Down Upstream Interfaces : Gi1/0/15(Dwn) Gi1/0/16(Dwn) Gi1/0/17(Dwn) Downstream Interfaces : Gi1/0/11(Dis) Gi1/0/12(Dis) Gi1/0/13(Dis) Gi1/0/14(Dis) (Up):Interface up (Dwn):Interface Down (Dis):Interface disabled Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 70: Show Pagp

    Gi1/0/1 Gi1/0/2 This is an example of output from the show pagp dual-active command: Switch> show pagp dual-active PAgP dual-active detection enabled: Yes PAgP dual-active version: 1.1 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 71 Gi01//1 9s SC 10001 Gi1/0/2 switch-p2 0002.4b29.4600 Gi1/0/2 24s SC 10001 Related Commands Command Description Clears PAgP channel-group information. clear pagp Enables debugging of PAgP. debug pagp Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 72: Show Platform Backup Interface

    Use this command only when you are working directly with a technical support representative while troubleshooting a problem. Do not use this command unless a technical support representative asks you to do Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 73: Show Platform Etherchannel

    Use this command only when you are working directly with a technical support representative while troubleshooting a problem. Do not use this command unless a technical support representative asks you to do Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 74: Show Platform Pm

    Displays port administrative and operation fields for the specified interface. stack-view Displays status information for the stack. This keyword is not supported in the LAN Lite image. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 75 Use this command only when you are working directly with your technical support representative while troubleshooting a problem. Do not use this command unless your technical support representative asks you to do so. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 76: Show Platform Spanning-Tree

    Use this command only when you are working directly with your technical support representative while troubleshooting a problem. Do not use this command unless your technical support representative asks you to do so. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 77: Show Spanning-Tree

    (Optional) Specifies the VLAN ID. The range is 1 to 4094. Command Modes User EXEC Privileged EXEC Command History Release Modification Cisco IOS 15.0(2)EX This command was introduced. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 78 Portfast is disabled by default PortFast BPDU Guard is disabled by default Portfast BPDU Filter is disabled by default Loopguard is disabled by default UplinkFast is enabled Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 79 (default) Boundary : boundary (STP) bpdu guard : disable (default) Bpdus sent 5, received 74 Instance role state cost prio vlans mapped root FWD 200000 1,12,14-4094 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 80: Show Udld

    Current neighbor state: Bidirectional Device name: Switch-A Port ID: Gi2/0/1 Neighbor echo 1 device: Switch-B Neighbor echo 1 port: Gi2/0/2 Message interval: 5 CDP Device name: Switch-A Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 81 UDLD normally, the neighbor state and local state should be bidirectional. If the link is down or the neighbor is not UDLD-capable, no cache entries appear. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 82 Enables UDLD on an individual interface or prevents a fiber-optic interface from udld port being enabled by the udld global configuration command. Resets all interfaces shut down by UDLD and permits traffic to pass through again. udld reset Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 83: Spanning-Tree Backbonefast

    Use the show spanning-tree privileged EXEC command to verify your settings. Examples The following example shows how to enable BackboneFast on the switch: Switch(config)# spanning-tree backbonefast Related Commands Command Description Displays spanning-tree information. show spanning-tree Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 84: Spanning-Tree Bpdufilter

    You can globally enable BPDU filtering on all Port Fast-enabled interfaces with the spanning-tree portfast bpdufilter default command. The spanning-tree bpdufilter enable command overrides the PortFast configuration. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 85 This example shows how to enable BPDU filtering on this interface: Switch(config-if)# spanning-tree bpdufilter enable Switch(config-if)# Related Commands Command Description Enables PortFast on the interface. spanning-tree portfast (interface configuration) Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 86: Spanning-Tree Bpduguard

    This example shows how to enable BPDU guard on an interface: Switch(config-if)# spanning-tree bpduguard enable Switch(config-if)# Related Commands Command Description Enables PortFast on the interface. spanning-tree portfast (interface configuration) Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 87: Spanning-Tree Cost

    Switch(config-if)# spanning-tree cost 250 This example shows how to set the path cost to 300 for VLANS 10, 12 to 15, and 20: Switch(config-if)# spanning-tree vlan 10,12-15,20 cost 300 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 88 Related Commands Command Description Displays spanning-tree information. show spanning-tree Sets the interface priority for spanning tree. spanning-tree port-priority Configures STP on a per-VLAN basis. spanning-tree vlan Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 89: Spanning-Tree Etherchannel Guard Misconfig

    Examples This example shows how to enable the EtherChannel-guard misconfiguration: Switch(config)# spanning-tree etherchannel guard misconfig Related Commands Command Description Displays EtherChannel information for a channel. show etherchannel Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 90: Spanning-Tree Extend System-Id

    This example shows how to enable the extended-system ID: Switch(config)# spanning-tree extend system-id Related Commands Command Description Displays spanning-tree information. show spanning-tree Configures the MST root swtich. spanning-tree mst root Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 91 Layer 2 Commands spanning-tree extend system-id Command Description Configures STP on a per-VLAN basis. spanning-tree vlan Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 92: Spanning-Tree Guard

    When the no spanning-tree guard or theno spanning-tree guard none command is entered, root guard is disabled for all VLANs on the selected interface. If this interface is in the root-inconsistent (blocked) state, it automatically transitions to the listening state. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 93 This example shows how to enable root guard on all the VLANs associated with the specified interface: Switch(config)# interface gigabitethernet1/0/1 Switch(config-if)# spanning-tree guard root Related Commands Command Description Enables loop guard on all ports. spanning-tree loopguard default Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 94: Spanning-Tree Link-Type

    If you designate a port as a shared link, RSTP+ fast transition is forbidden, regardless of the duplex setting. Examples This example shows how to configure the port as a shared link: Switch(config-if)# spanning-tree link-type shared Related Commands Command Description Displays spanning-tree information. show spanning-tree Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 95: Spanning-Tree Loopguard Default

    The individual loop-guard port configuration overrides this command. Examples This example shows how to enable loop guard: Switch(config)# spanning-tree loopguard default Related Commands Command Description Enables root guard or loop guard. spanning-tree guard Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 96: Spanning-Tree Mode

    This example shows how to enable MST mode: Switch(config)# spanning-tree mode mst This example shows how to return to the default mode (PVST+): Switch(config)# no spanning-tree mode Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 97 Layer 2 Commands spanning-tree mode Related Commands Command Description Displays spanning-tree information. show spanning-tree Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 98: Spanning-Tree Mst Configuration

    Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 99 This example shows how to reset the MST configuration to the default settings: Switch(config)# no spanning-tree mst configuration Related Commands Command Description Displays spanning-tree information. show spanning-tree Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 100: Spanning-Tree Mst Cost

    This example shows how to set the path cost for an interface associated with MST instances 2 and 4 to 50: Switch(config)# interface gigabitethernet2/0/1 Switch(config-if)# spanning-tree mst 2,4 cost 250 Related Commands Command Description Displays spanning-tree information. show spanning-tree Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 101: Spanning-Tree Mst Forward-Time

    Sets the interval between messages that the spanning tree receives spanning-tree mst max-age from the root switch. Specifies the number of hops allowed before a BDPU is discarded. spanning-tree mst max-hops Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 102: Spanning-Tree Mst Hello-Time

    Sets the interval between messages that the spanning tree receives spanning-tree mst max-age from the root switch. Specifies the number of hops allowed before a BDPU is discarded. spanning-tree mst max-hops Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 103: Spanning-Tree Mst Max-Age

    Sets the interval between hello BPDUs sent by the root switch. spanning-tree mst hello-time Specifies the number of hops allowed before a BDPU is spanning-tree mst max-hops discarded. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 104: Spanning-Tree Mst Max-Hops

    Sets the interval between hello BPDUs sent by the root switch. spanning-tree mst hello-time Sets the interval between messages that the spanning tree receives spanning-tree mst max-age from the root switch. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 105: Spanning-Tree Mst Port-Priority

    Switch(config-if)# spanning-tree mst 20,24 port-priority 0 Related Commands Command Description Configures the path cost for MST calculations. spanning-tree mst cost Sets the priority for the specified MST. spanning-tree mst priority Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 106: Spanning-Tree Mst Pre-Standard

    (CIST) runs on this interface. Note If a switch port is connected to a switch running prestandard Cisco IOS software, you must use the spanning-tree mst pre-standard interface configuration command on the port. If you do not configure the port to send only prestandard BPDUs, the Multiple STP (MSTP) performance might diminish.
  • Page 107: Spanning-Tree Mst Priority

    This example shows how to set the spanning tree priority for MST instance 0 to 4096: Switch(config)# spanning-tree mst 0 priority 4096 Related Commands Command Description Enters MST configuration mode. spanning-tree mst configuration Configures the MST root swtich. spanning-tree mst root Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 108: Spanning-Tree Mst Root

    (if the other switches in the network use the default switch priority of 32768 and are therefore unlikely to become the root switch). Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 109 Layer 2 Commands spanning-tree mst root Examples This example shows how to configure the switch as the root switch for instance 10: Switch(config)# spanning-tree mst 10 root primary Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 110: Spanning-Tree Pathcost Method

    This example shows how to set the default path-cost calculation method to long: Switch(config)#spanning-tree pathcost method long This example shows how to set the default path-cost calculation method to short: Switch(config)#spanning-tree pathcost method short Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 111: Spanning-Tree Port-Priority

    The following example shows how to increase the likelihood that a port will be put in the forwarding state if a loop occurs: Switch(config)# interface gigabitethernet2/0/2 Switch(config-if)# spanning-tree vlan 20 port-priority 0 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 112: Spanning-Tree Portfast (Global Configuration)

    BPDU is received on a PortFast-enabled interface, the interface loses its PortFast-operational status and BPDU filtering is disabled. You can override the spanning-tree portfast bpdufilter default command by using the spanning-tree portfast bpdufilter interface command. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 113 This example shows how to globally enable the BDPU guard feature by default: Switch(config)# spanning-tree portfast bpduguard default This example shows how to globally enable the PortFast feature on all nontrunking interfaces: Switch(config)# spanning-tree portfast default Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 114: Spanning-Tree Portfast (Interface Configuration)

    If you configure the spanning-tree portfast default global configuration command, you can disable PortFast on an interface that is not a trunk interface by using the spanning-tree portfast disable interface configuration command. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 115 Enables BPDU filtering on the interface. spanning-tree bpdufilter Enables BPDU guard on the interface. spanning-tree bpduguard Enables bridge protocol data unit (BDPU) filtering on spanning-tree portfast (global configuration) PortFast-enabled interfaces. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 116: Spanning-Tree Transmit Hold-Count

    Rapid Per-VLAN Spanning Tree (PVST+) mode. Decreasing this value might result in slow convergence. We recommend that you used the default setting. Examples This example shows how to specify the transmit hold count 8: Switch(config)# spanning-tree transmit hold-count 8 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 117: Spanning-Tree Uplinkfast

    When spanning tree detects that the root port has failed, UplinkFast immediately changes to an alternate root port, changing the new root port directly to forwarding state. During this time, a topology change notification is sent. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 118 This example shows how to enable UplinkFast and set the maximum rate to 200 packets per second: Switch(config)# spanning-tree uplinkfast max-update-rate 200 Related Commands Command Description Displays spanning-tree information. show spanning-tree Configures STP on a per-VLAN basis. spanning-tree vlan Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 119: Spanning-Tree Vlan

    (Optional) Specifies the maximum number of switches between any two points of attachment of end stations. The range is 2 through 7. Command Default Spanning tree is enabled on all VLANs. Command Modes Global configuration Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 120 The following example shows how to configure the switch as the secondary root switch for VLAN 10 with a network diameter of 4: Switch(config)# spanning-tree vlan 10 root secondary diameter 4 Related Commands Command Description Displays spanning-tree information. show spanning-tree Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 121: Switchport Access Vlan

    This example shows how to change a switched port interface that is operating in access mode to operate in VLAN 2 instead of the default VLAN: Switch(config-if)# switchport access vlan 2 Related Commands Command Description Configures the VLAN membership mode of a port. switchport mode Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 122: Switchport Mode

    When you enter access mode, the interface changes to permanent nontrunking mode and negotiates to convert the link into a nontrunk link even if the neighboring interface does not agree to the change. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 123 This example shows how set the port to dynamic desirable mode: Switch(config)# interface gigabitethernet2/0/1 Switch(config-if)# switchport mode dynamic desirable This example shows how to configure a port for trunk mode: Switch(config)# interface gigabitethernet2/0/1 Switch(config-if)# switchport mode trunk Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 124 Layer 2 Commands switchport mode Related Commands Command Description Configures a port as a static-access. switchport access vlan Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 125: Switchport Nonegotiate

    This example shows how to cause a port to refrain from negotiating trunking mode and to act as a trunk or access port (depending on the mode set): Switch(config)# interface gigabitethernet2/0/1 Switch(config-if)# switchport nonegotiate Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 126 You can verify your setting by entering the show interfaces interface-id switchport privileged EXEC command. Related Commands Command Description Configures the VLAN membership mode of a port. switchport mode Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 127: Udld

    For information about normal and aggressive modes, see the Catalyst 2960-X Switch Layer 2 Configuration GuideCatalyst 2960-XR Switch Layer 2 Configuration Guide. If you change the message time between probe packets, you are making a trade-off between the detection speed and the CPU load.
  • Page 128 Enables UDLD on an individual interface or prevents a fiber-optic interface from udld port being enabled by the udld global configuration command. Resets all interfaces shut down by UDLD and permits traffic to pass through udld reset again. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 129: Udld Port

    You can use these commands to reset an interface shut down by UDLD: • The udld reset privileged EXEC command resets all interfaces shut down by UDLD. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 130 Enables aggressive or normal mode in UDLD or sets the configurable message udld timer time. Resets all interfaces shut down by UDLD and permits traffic to pass through udld reset again. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 131: Udld Reset

    Enables aggressive or normal mode in UDLD or sets the configurable message udld timer time. Enables UDLD on an individual interface or prevents a fiber-optic interface from udld port being enabled by the udld global configuration command. Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 132 Layer 2 Commands udld reset Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01...
  • Page 133 Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX OL-29043 -01 IN-1...
  • Page 134 Index udld port command udld reset command udld command Catalyst 2960-X Switch Layer 2 Command Reference, Cisco IOS Release 15.0(2)EX IN-2 OL-29043 -01...

Table of Contents