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