Accessing the CLI on a Switch Stack Accessing the CLI Through a Console Connection or Through Telnet Layer 2/3 Commands C H A P T E R 3 channel-group channel-protocol Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
A vertical line, called a pipe, indicates a choice within a set of keywords or arguments. [x | y] Optional alternative keywords are grouped in brackets and separated by vertical bars. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 6
Use the statement number provided at the end of each warning to locate its translation in the translated safety warnings that accompanied this device. Statement 1071 SAVE THESE INSTRUCTIONS Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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/c/en/us/td/docs/general/whatsnew/whatsnew.html...
Page 8
Preface Obtaining Documentation and Submitting a Service Request Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
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. Enter a question mark (?) at the system prompt to obtain a list of commands available for each command mode.
Page 10
Interface While in global Use this mode to Switch(config-if)# configuration configuration configure parameters mode, enter the for the Ethernet interface command ports. (with a specific interface). Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
However, some commands are enabled by default and have variables set to certain default values. In these cases, the default command enables the command and sets variables to their default values. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
You can enter a question mark (?) at the system prompt to display a list of commands available for each command mode. You can also obtain a list of associated keywords and arguments for any command. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 13
? Lists the associated arguments for a keyword. Example: Switch(config)# cdp holdtime ? <10-255> Length of time (in sec) that receiver must keep this packet Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
The arrow keys function only on ANSI-compatible terminals such as VT100s. SUMMARY STEPS 1. Ctrl-P or use the up arrow key 2. Ctrl-N or use the down arrow key 3. show history Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Enabling and Disabling Editing Features Although enhanced editing mode is automatically enabled, you can disable it and reenable it. SUMMARY STEPS 1. terminal editing 2. terminal no editing Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 16
Switch# terminal editing Step 2 terminal no editing Disables the enhanced editing mode for the current terminal session in privileged EXEC mode. Example: Switch# terminal no editing Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
You do not have to use the interface port-channel command in global configuration mode to manually create a port-channel interface. If you create the port-channel Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 24
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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 25
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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 27
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
You can verify that the information was deleted by entering the show pagp privileged EXEC command. Related Commands Command Description Enables debugging of PAgP. debug pagp Displays Port Aggregation Protocol (PAgP) channel-group information. show pagp Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
This example shows how to clear spanning-tree counters for all interfaces: Switch# clear spanning-tree counters Related Commands Command Description Restarts the protocol migration process on the interface. clear spanning-tree detected-protocols Enables debugging of spanning-tree activities. debug spanning-tree Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 32
Layer 2/3 Commands clear spanning-tree detected-protocols Related Commands Command Description Restarts the protocol migration process on the interface. clear spanning-tree detected-protocols Enables debugging of spanning-tree activities. debug spanning-tree Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
To enable debugging on the standby switch without first starting a session on the active switch, use the remote command switch-number LINE command in privileged EXEC mode. Examples This example shows how to display all EtherChannel debug messages: Switch# debug etherchannel all Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 34
This example shows how to display debug messages related to EtherChannel events: Switch# debug etherchannel event Related Commands Command Description Displays EtherChannel information for a channel. show etherchannel Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
To enable debugging on the standby switch without first starting a session on the active switch, use the remote command switch-number LINE command in privileged EXEC mode. Examples This example shows how to display all PAgP debug messages: Switch# debug pagp all Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 37
Layer 2/3 Commands debug pagp This example shows how to display debug messages related to PAgP events: Switch# debug pagp event Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Displays service expansion shelf (SES) related event debug messages. vlans Displays VLAN creation and deletion event debug messages. Command Default Debugging is disabled. Command Modes Privileged EXEC Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 39
LINE command in privileged EXEC mode. Examples This example shows how to display debug messages related to the creation and deletion of VLANs: Switch# debug platform pm vlans Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
EXEC command. Then enter the debug command at the command-line prompt of the stack member. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Displays switch shim command debug messages. This shim is the software module that is the interface between the generic Spanning Tree Protocol (STP) code and the platform-specific code of various switch platforms. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 42
This example shows how to display all spanning-tree debug messages: Switch# debug spanning-tree all Related Commands Command Description Clears spanning-tree counters. clear spanning-tree counters Restarts the protocol migration process on the interface. clear spanning-tree detected-protocols Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Do not assign bridge groups on the physical ports in a channel group used as a Layer 3 port channel Caution interface because it creates loops. You must also disable spanning tree. Follow these guidelines when you use the interface port-channel command: Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 44
Layer 2/3 Commands interface port-channel • 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. • Do not configure a port that is an active member of an EtherChannel as an IEEE 802.1x port. If IEEE 802.1x is enabled on a not-yet active port of an EtherChannel, the port does not join the EtherChannel.
Specifies the minimum number of LACP ports that must be in the link-up port-channel min-links state and bundled in the EtherChannel in order for the port channel to become active. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 47
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 49
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 51
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 53
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Specifies load distribution based on the source host IP address and TCP/UDP src-mixed-ip-port (Layer 4) port number. Specifies load distribution based on the TCP/UDP (Layer 4) port number. src-port Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 55
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
(Optional) Specifies load distribution based on the TCP/UDP (Layer 4) port number. Command Default The default is src-mac. Command Modes Global configuration Command History Release Modification Cisco IOS XE 3.3SE This command was introduced. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 57
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 extended load-distribution method: Switch(config)# port-channel load-balance extended dst-ip dst-mac src-ip Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
This example shows how to specify a minimum of three active LACP ports before port channel 2 becomes active: Switch(config)# interface port-channel 2 Switch(config-if)# port-channel min-links 3 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 59
Layer 2/3 Commands port-channel min-links Related Commands Command Description Specifies the maximum number of LACP ports allowed in a port lacp max-bundle channel. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
This is an example of output from the show etherchannel channel-group-number detail command: Switch> show etherchannel 1 detail Group state = L2 Ports: 2 Maxports = 16 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 61
Age of the Port-channel = 01d:20h:24m:50s Logical slot/port = 10/1 Number of ports = 2 Logical slot/port = 10/1 Number of ports = 2 Port state = Port-channel Ag-Inuse Protocol = LACP Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 62
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 64
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: Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 65
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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 66
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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 67
Clears the LACP channel-group information. clear lacp Configures the port priority for the Link Aggregation Control Protocol lacp port-priority (LACP). Configures the LACP system priority. lacp system-priority Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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 so. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
The range is from 1 to 4095. interface-id (Optional) ID of the interface and port number. Valid interfaces include physical ports, VLANs, and port channels. neighbors (Optional) Displays neighbor information only. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 73
Otherwise, the enable operational setting depends on the global enable setting. Port enable operational state Operational state that shows whether UDLD is actually running on this port. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 74
Neighbor echo 1 port The port number ID of the neighbor from which the echo originated. Message interval The rate, in seconds, at which the neighbor is sending advertisement messages. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 75
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Layer 2 port. Then you can enter the switchport access vlan and switchport mode commands. The switchport command is not used on platforms that do not support Cisco-routed ports. All physical ports on such platforms are assumed to be Layer 2-switched interfaces.
Page 77
Layer 2/3 Commands switchport Examples This example shows how to cause an interface to cease operating as a Layer 2 port and become a Cisco-routed port: Switch(config-if)# no switchport This example shows how to cause the port interface to cease operating as a Cisco-routed port and convert to...
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
A configuration that uses the access,or trunk keywords takes effect only when you configure the port in the appropriate mode by using the switchport mode command. The static-access and trunk configuration are saved, but only one configuration is active at a time. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 80
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 81
Layer 2/3 Commands switchport mode Related Commands Command Description Configures a port as a static-access port. switchport access vlan Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 83
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 Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
You can use these commands to reset an interface shut down by UDLD: • The udld reset privileged EXEC command to reset all interfaces shut down by UDLD. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 85
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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...
Page 87
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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-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. Layer 2/3 Command Reference, Cisco IOS XE Release 3.6E (Catalyst 3650 Switch) OL-32639-01...