Catalyst 2940 Switch Command Reference, Release 12.1(13)AY
Cisco IOS Commands - a through r
Downloads: This chapterpdf (PDF - 933.0KB) The complete bookPDF (PDF - 3.64MB) | Feedback

Cisco IOS Commands

Table Of Contents

Cisco IOS Commands

aaa authentication dot1x

archive download-sw

archive tar

archive upload-sw

boot private-config-file

channel-group

channel-protocol

clear interface

clear lacp

clear mac address-table

clear pagp

clear port-security dynamic

clear port-security sticky

clear setup express

clear spanning-tree counters

clear vmps statistics

clear vtp counters

cluster commander-address

cluster discovery hop-count

cluster enable

cluster holdtime

cluster management-vlan

cluster member

cluster run

cluster standby-group

cluster timer

define interface-range

delete

dot1x default

dot1x max-req

dot1x multiple-hosts

dot1x port-control

dot1x re-authenticate

dot1x re-authentication

dot1x timeout quiet-period

dot1x timeout re-authperiod

dot1x timeout tx-period

duplex

errdisable detect

errdisable recovery

flowcontrol

interface

interface port-channel

interface range

ip address

ip igmp snooping

ip igmp snooping source-only-learning

ip igmp snooping vlan

ip igmp snooping vlan immediate-leave

ip igmp snooping vlan mrouter

ip igmp snooping vlan static

lacp port-priority

lacp system-priority

mac address-table aging-time

mac address-table notification

mac address-table static

mls qos trust

monitor session

mvr

mvr immediate

mvr type

mvr vlan group

pagp learn-method

pagp port-priority

port-channel load-balance

rcommand

rmon collection stats


Cisco IOS Commands


aaa authentication dot1x

Use the aaa authentication dot1x global configuration command to specify one or more authentication, authorization, and accounting (AAA) methods for use on interfaces running IEEE 802.1X. Use the no form of this command to disable authentication.

aaa authentication dot1x {default} method1 [method2...]

no aaa authentication dot1x {default} method1 [method2...]

Syntax Description

default

Use the listed authentication methods that follow this argument as the default list of methods when a user logs in.

method1 [method2...]

At least one of these keywords:

enable—Use the enable password for authentication.

group radius—Use the list of all Remote Authentication Dial-In User Service (RADIUS) servers for authentication.

line—Use the line password for authentication.

local—Use the local username database for authentication.

local-case—Use the case-sensitive local username database for authentication.

none—Use no authentication. The client is automatically authenticated by the switch without using the information supplied by the client.


Defaults

No authentication is performed.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The method argument identifies the list of methods that the authentication algorithm tries in the given sequence to validate the password provided by the client. The only method that is truly 802.1X-compliant is the group radius method, in which the client data is validated against a RADIUS authentication server. The remaining methods enable AAA to authenticate the client by using locally configured data. For example, the local and local-case methods use the username and password that are saved in the IOS configuration file. The enable and line methods use the enable and line passwords for authentication.

If you specify group radius, you must configure the RADIUS server by entering the radius-server host global configuration command.

If you are not using a RADIUS server, you can use the local or local-case methods, which access the local username database to perform authentication. By specifying the enable or line methods, you can supply the clients with a password to provide access to the switch.

Use the show running-config privileged EXEC command to display the configured lists of authentication methods.

Examples

This example shows how to enable AAA and how to create an authentication list for 802.1X. This authentication first tries to contact a RADIUS server. If this action returns an error, the user is allowed access with no authentication.

Switch(config)# aaa new model
Switch(config)# aaa authentication dot1x default group radius none

You can verify your settings by entering the show running-config privileged EXEC command.

Related Commands

Command
Description

aaa new-model

Enables the AAA access control model. For syntax information, refer to Cisco IOS Security Command Reference for Release 12.1 > Authentication, Authorization, and Accounting > Authentication Commands.

show running-config

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


archive download-sw

Use the archive download-sw privileged EXEC command to download a new image to the switch and overwrite or keep the existing image.

archive download-sw {/force-reload | /imageonly | /leave-old-sw | /no-set-boot | /overwrite | /reload | /safe} source-url

Syntax Description

/force-reload

Unconditionally force a system reload after successfully downloading the software image.

/imageonly

Download only the software image but not the HTML files associated with the Cluster Management Suite (CMS). The HTML files for the existing version are deleted only if the existing version is being overwritten or removed.

/leave-old-sw

Keep the old software version after a successful download.

/no-set-boot

Do not alter the setting of the BOOT environment variable to point to the new software image after it is successfully downloaded.

/overwrite

Overwrite the software image in Flash with the downloaded one.

/reload

Reload the system after successfully downloading the image unless the configuration has been changed and not been saved.

/safe

Keep the current software image; do not delete it to make room for the new software image before the new image is downloaded. The current image is deleted after the download.

source-url

The source URL alias for a local or network file system. These options are supported:

The syntax for the local Flash file system:
flash:

The syntax for the File Transfer Protocol (FTP): ftp:[[//username[:password]@location]/directory]/image-name.tar

The syntax for the Remote Copy Protocol (RCP): rcp:[[//username@location]/directory]/image-name.tar

The syntax for the Trivial File Transfer Protocol (TFTP): tftp:[[//location]/directory]/image-name.tar

The image-name.tar is the software image to download and install on the switch.


Defaults

The current software image is not overwritten with the downloaded image.

Both the software image and HTML files are downloaded.

The new image is downloaded to the flash: file system.

The BOOT environment variable is changed to point to the new software image on the flash: file system.

Image names are case sensitive; the image file is provided in tar format.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Use the /overwrite option to overwrite the image on the Flash device with the downloaded one.

If the Flash device has sufficient space to hold two images and you want to overwrite one of these images with the same version, you must specify the /overwrite option.

If you specify the command without the /overwrite option, the download algorithm verifies that the new image is not the same as the one on the switch FLASH device. If the images are the same, the download does not occur. If the images are different, the old image is deleted, and the new one is downloaded.

The /imageonly option removes the HTML files for the existing image if the existing image is being removed or replaced. Only the IOS image (without the HTML files) is downloaded.

Using the /safe or /leave-old-sw option can cause the new image download to fail if there is insufficient Flash space.

If you used the /leave-old-sw option and did not overwrite the old image when you downloaded the new one, you can remove the old image by using the delete privileged EXEC command. For more information, see the "delete" section.

If you leave the existing software in place before downloading the new image, an error results if the existing software prevents the new image from fitting onto Flash memory.

After downloading a new image, enter the reload privileged EXEC command to begin using the new image, or specify the /reload or /force-reload option in the archive download-sw command.

Examples

This example shows how to download a new image from a TFTP server at 172.20.129.10 and overwrite the image on the switch:

Switch# archive download-sw /overwrite tftp://172.20.129.10/test-image.tar 

This example shows how to download only the software image from a TFTP server at 172.20.129.10 to the switch:

Switch# archive download-sw /image-only tftp://172.20.129.10/test-image.tar 

This example shows how to keep the old software version after a successful download:

Switch# archive download-sw /leave-old-sw tftp://172.20.129.10/test-image.tar 

Related Commands

Command
Description

archive tar

Creates a tar file, lists the files in a tar file, or extracts the files from a tar file.

archive upload-sw

Uploads an existing image on the switch to a server.

delete

Deletes a file or directory on the Flash memory device.


archive tar

Use the archive tar privileged EXEC command to create a tar file, list files in a tar file, or extract the files from a tar file.

archive tar {/create destination-url flash:/file-url} | {/table source-url} | {/xtract source-url flash:/file-url}

Syntax Description

/create destination-url flash:/file-url

Create a new tar file on the local or network file system.

For destination-url, specify the destination URL alias for the local or network file system and the name of the tar file to create. These options are supported:

The syntax for the local Flash filesystem:
flash:

The syntax for the File Transfer Protocol (FTP): ftp:[[//username[:password]@location]/directory]/tar-filename.tar

The syntax for the Remote Copy Protocol (RCP) is: rcp:[[//username@location]/directory]/tar-filename.tar

The syntax for the Trivial File Transfer Protocol (TFTP): tftp:[[//location]/directory]/tar-filename.tar

The tar-filename.tar is the tar file to be created.

For flash:/file-url, specify the location on the local Flash file system from which the new tar file is created.

An optional list of files or directories within the source directory can be specified to write to the new tar file. If none are specified, all files and directories at this level are written to the newly created tar file.

/table source-url

Display the contents of an existing tar file to the screen.

For source-url, specify the source URL alias for the local or network file system. These options are supported:

The syntax for the local Flash file system:
flash:

The syntax for the File Transfer Protocol (FTP) ftp:[[//username[:password]@location]/directory]/tar-filename.tar

The syntax for the Remote Copy Protocol (RCP): rcp:[[//username@location]/directory]/tar-filename.tar

The syntax for the Trivial File Transfer Protocol (TFTP): tftp:[[//location]/directory]/tar-filename.tar

The tar-filename.tar is the tar file to display.

/xtract source-url flash:/file-url

Extract files from a tar file to the local or network file system.

For source-url, specify the source URL alias for the local or network file system. These options are supported:

The syntax for the local Flash file system:
flash:

The syntax for the File Transfer Protocol (FTP): ftp:[[//username[:password]@location]/directory]/tar-filename.tar

The syntax for the Remote Copy Protocol (RCP): rcp:[[//username@location]/directory]/tar-filename.tar

The syntax for the Trivial File Transfer Protocol (TFTP): tftp:[[//location]/directory]/tar-filename.tar

The tar-filename.tar is the tar file from which to extract.

For flash:/file-url, specify the location on the local Flash file system into which the tar file is extracted.

An optional list of files or directories within the tar file can be specified for extraction. If none are specified, all files and directories are extracted.


Defaults

None

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Filenames and directory names are case sensitive.

Image names are case sensitive.

Examples

This example shows how to create a tar file. The command writes the contents of the new-configs directory on the local Flash device to a file named saved.tar on the TFTP server at 172.20.10.30:

Switch# archive tar /create tftp:172.20.10.30/saved.tar flash:/new-configs

This example shows how to display the contents of the c2940-tv0-m.tar file that is in Flash memory. The contents of the tar file are displayed on the screen:

Switch# archive tar /table flash:c2940-tv0-m.tar
info (219 bytes)
c2940-tv0-mz-121/ (directory)
c2940-tv0-mz-121/html/ (directory)
c2940-tv0-mz-121/html/foo.html (0 bytes)
c2940-tv0-mz-121/vegas-tv0-mz-121.bin (610856 bytes)
c2940-tv0-mz-121/info (219 bytes)
info.ver (219 bytes)

This example shows how to display only the c2940-tv0-mz-121/html directory and its contents:

Switch# archive tar /table flash:c3550-tv0-m.tar c3550-tv0-mz-121/html
c2940-tv0-mz-121/html/ (directory)
c294-tv0-mz-121/html/foo.html (0 bytes)

This example shows how to extract the contents of a tar file on the TFTP server at 172.20.10.30. This command extracts just the new-configs directory into the root directory on the local Flash file system. The remaining files in the saved.tar file are ignored.

Switch# archive tar /xtract tftp:/172.20.10.30/saved.tar flash:/ new-configs

Related Commands

Command
Description

archive download-sw

Downloads a new image to the switch.

archive upload-sw

Uploads an existing image on the switch to a server.


archive upload-sw

Use the archive upload-sw privileged EXEC command to upload an existing switch image to a server.

archive upload-sw [/version version_string] destination-url

Syntax Description

/version version_string

(Optional) Specify the specify version string of the image to be uploaded.

destination-url

The destination URL alias for a local or network file system. These options are supported:

The syntax for the local Flash file system:
flash:

The syntax for the File Transfer Protocol (FTP): ftp:[[//username[:password]@location]/directory]/image-name.tar

The syntax for the Remote Copy Protocol (RCP): rcp:[[//username@location]/directory]/image-name.tar

The syntax for the Trivial File Transfer Protocol (TFTP): tftp:[[//location]/directory]/image-name.tar

The image-name.tar is the name of software image to be stored on the server.


Defaults

Uploads the currently running image from the flash: file system.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The upload feature is available only if the HTML files associated with the Cluster Management Suite (CMS) have been installed with the existing image.

The files are uploaded in this sequence: info, the IOS image, the HTML files, and info.ver. After these files are uploaded, the software creates the tar file.

Image names are case sensitive.

Examples

This example shows how to upload the currently running image to a TFTP server at 172.20.140.2:

Switch# archive upload-sw tftp://172.20.140.2/test-image.tar 

Related Commands

Command
Description

archive download-sw

Downloads a new image to the switch.

archive tar

Creates a tar file, lists the files in a tar file, or extracts the files from a tar file.


boot private-config-file

Use the boot private-config-file global configuration command to specify the filename that IOS uses to read and write a nonvolatile copy of the private configuration. Use the no form of this command to return to the default setting.

boot private-config-file filename

no boot private-config-file

Syntax Description

filename

The name of the private configuration file.


Defaults

The default configuration file is private-config.text.

Command Modesb

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Only the IOS software can read and write a copy of the private configuration file. You cannot read, write, delete, or display a copy of this file.

Filenames are case sensitive.

Examples

This example shows how to specify the name of the private configuration file as pconfig:

Switch(config)# boot private-config-file pconfig

Related Commands

Command
Description

show boot

Displays the settings of the boot environment variables.


channel-group

Use the channel-group interface configuration command to assign an Ethernet interface to an EtherChannel group. Use the no form of this command to remove an Ethernet interface from an EtherChannel group.

channel-group channel-group-number mode {auto [non-silent] | desirable [non-silent] | on | active | passive}

no channel-group

Syntax Description

channel-group-number

Specify the channel group number. The range is 1 to 6.

mode

Specify the EtherChannel Port Aggregation Protocol (PAgP) or Link Aggregration Control Protocol (LACP). mode of the interface.

active

Unconditionally enable LACP.

Active mode places an interface into a negotiating state in which the interface initiates negotiations with other interfaces by sending LACP packets. A channel is formed with another port group in either the active or passive mode. When active is enabled, silent operation is the default.

auto

Enable PAgP only if a PAgP device is detected.

Auto mode places an interface into a passive negotiating state, in which the interface responds to PAgP packets it receives but does not initiate PAgP packet negotiation. A channel is formed only with another port group in desirable mode. When auto is enabled, silent operation is the default.

desirable

Unconditionally enable PAgP.

Desirable mode places an interface into a negotiating state in which the interface initiates negotiations with other interfaces by sending PAgP packets. A channel is formed with another port group in either the desirable or auto mode. When desirable is enabled, silent operation is the default.

non-silent

(Optional) Used with the auto or desirable keyword when PAgP traffic is expected from the other device.

on

Force the interface to channel without PAgP or LACP.

With the on mode, a usable EtherChannel exists only when an interface group in the on mode is connected to another interface group in the on mode.

passive

Enable LACP only if an LACP device is detected.

Passive mode places an interface into a negotiating state in which the interface responds to LACP packets it receives but does not initiate LACP packet negotiation. A channel is formed only with another port group in active mode. When passive is enabled, silent operation is the default.


Defaults

No channel groups are assigned.

There is no default mode.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

You must specify the mode when entering this command. If the mode is not entered, an Ethernet interface is not assigned to an EtherChannel group, and an error message appears.

You do not have to create a port-channel interface before assigning a physical interface to a channel group. A port-channel interface is created automatically when the channel group gets its first physical interface.

You do not have to disable the IP address that is assigned to a physical interface that is part of a channel group, but we highly recommend that you do so.

You can create port channels by entering the interface port-channel global configuration command or when the channel group gets its first physical interface assignment. The port channels are not created at runtime or dynamically.

Any configuration or attribute changes you make to the port-channel interface are propagated to all interfaces within the same channel group as the port channel (for example, configuration changes are also propagated to the physical interfaces that are not part of the port channel, but are part of the channel group).

With the on mode, a usable PAgP EtherChannel exists only when a port group in on mode is connected to another port group in on mode.

If you do not specify non-silent with the auto or desirable mode, silent is assumed. The silent mode is used when the switch is connected to a device that is not PAgP-capable and seldom, if ever, sends packets. A example of a silent partner is a file server or a packet analyzer that is not generating traffic. In this case, running PAgP on a physical port prevents that port from ever becoming operational; however, it allows PAgP to operate, to attach the interface to a channel group, and to use the interface for transmission. Both ends of the link cannot be set to silent.


Note You cannot enable both PAgP and LACP modes on an EtherChannel group.



Caution You should exercise care when setting the mode to on (manual configuration). All ports configured in the on mode are bundled in the same group and are forced to have similar characteristics. If the group is misconfigured, packet loss or Spanning Tree Protocol (STP) loops might occur.

Examples

This example shows how to add an interface to the EtherChannel group specified as channel group 1:

Switch(config)# interface gigabitethernet0/1
Switch(config-if)# channel-group 1 mode on

This example shows how to set an Etherchannel into PAgP mode:

Switch(config-if)# channel-group 1 mode auto 
Creating a port-channel interface Port-channel 1

This example shows how to set an Etherchannel into LACP mode:

Switch(config-if)# channel-group 1 mode passive 
Creating a port-channel interface Port-channel 1

You can verify your settings by entering the show etherchannel or show running-config privileged EXEC command.

Related Commands

Command
Description

interface port-channel

Accesses or creates the port channel.

port-channel load-balance

Sets the load distribution method among the ports in the EtherChannel.

show etherchannel

Displays EtherChannel information for a channel.

show running-config

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


channel-protocol

Use the channel-protocol interface configuration command to configure an EtherChannel for the Port Aggregation Protocol (PAgP) or Link Aggregation Control Protocol (LACP). Use the no form of this command to disable PAgP or LACP on the EtherChannel.

channel-protocol {lacp | pagp}

no channel-protocol

Syntax Description

lacp

Configure an EtherChannel with the LACP protocol.

pagp

Configure an EtherChannel with the PAgP protocol.


Defaults

No protocol is assigned to the EtherChannel.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Use the channel-protocol command only to restrict a channel to LACP or PAgP.

You must use the channel-group interface command to configure the EtherChannel parameters. The channel-group command can also set the EtherChannel for a channel.


Note You cannot enable both PAgP and LACP modes on an EtherChannel group.



Caution Do not enable Layer 3 addresses on the physical EtherChannel interfaces. To prevent loops, do not assign bridge groups on the physical EtherChannel interfaces.

Examples

This example shows how to set an EtherChannel into PAgP mode:

Switch(config-if)# channel-protocol pagp

This example shows how to set an EtherChannel into LACP mode:

Switch(config-if)# channel-protocol lacp

You can verify your settings by entering the show running-config privileged EXEC command.

Related Commands

Command
Description

show lacp

Display LACP information.

show pagp

Display PAgP information.

show running-config

Displays the current operating configuration. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


clear interface

Use the clear interface privileged EXEC command to clear the hardware logic on an interface or a VLAN.

clear interface {interface-id | vlan vlan-id}

Syntax Description

interface-id

ID of the interface.

vlan-id

VLAN ID. Valid VLAN IDs are from 1 to 1001.


Defaults

No default is defined.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to clear the hardware logic on a Gigabit Ethernet interface:

Switch# clear interface gigabitethernet0/1

This example shows how to clear the hardware logic on a specific VLAN:

Switch# clear interface vlan 5

You can verify that the interface-reset counter for an interface is incremented by entering the show interfaces privileged EXEC command.

clear lacp

Use the clear lacp privileged EXEC command to clear Link Aggregration Control Protocol (LACP) channel-group information.

clear lacp {channel-group-number | counters}

Syntax Description

channel-group-number

Channel group number. The range is 1 to 6.

counters

Clear traffic counters.


Defaults

This command has no default setting.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to clear channel-group information for a specific group:

Switch# clear lacp 4

This example shows how to clear channel-group traffic counters:

Switch# clear lacp counters

You can verify that the information was deleted by entering the show lacp privileged EXEC command.

Related Commands

Command
Description

show lacp

Displays LACP channel-group information.


clear mac address-table

Use the clear mac address-table privileged EXEC command to delete from the MAC address table a specific dynamic address, all dynamic addresses on a particular interface, or all dynamic addresses on a particular VLAN. This command also clears the MAC address notification global counters.

clear mac address-table {dynamic [address mac-addr | interface interface-id | vlan vlan-id] | notification}

Syntax Description

dynamic

Delete all dynamic MAC addresses.

dynamic address mac-addr

(Optional) Delete the specified dynamic MAC address.

dynamic interface interface-id

(Optional) Delete all dynamic MAC addresses on the specified physical port or port channel.

dynamic vlan vlan-id

(Optional) Delete all dynamic MAC addresses for the specified VLAN. Valid IDs are from 1 to 1005.

notification

Clear the notifications in the history table and reset the counters.


Defaults

No default is defined.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to remove a specific dynamic address from the MAC address table:

Switch# clear mac address-table dynamic address 0008.0070.0007

You can verify that the information was deleted by entering the show mac address-table privileged EXEC command.

Related Commands

Command
Description

mac address-table notification

Enables the MAC address notification feature.

show mac address-table

Displays the MAC address table static and dynamic entries.

show mac address-table notification

Displays the MAC address notification settings for all interfaces or the specified interface.

snmp trap mac-notification

Enables the Simple Network Management Protocol (SNMP) MAC address notification trap on a specific interface.


clear pagp

Use the clear pagp privileged EXEC command to clear Port Aggregation Protocol (PAgP) channel-group information.

clear pagp {channel-group-number [counters] | counters}

Syntax Description

channel-group-number

Channel group number. The range is 1 to 6.

counters

Clear traffic counters.


Defaults

This command has no default setting.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to clear channel-group information for a specific group:

Switch# clear pagp 4

This example shows how to clear channel-group traffic counters:

Switch# clear pagp counters

You can verify that the information was deleted by entering the show pagp privileged EXEC command.

Related Commands

Command
Description

show pagp

Displays PAgP channel-group information.


clear port-security dynamic

Use the clear port-security dynamic privileged EXEC command to delete from the MAC address table a specific dynamic secure address or all the dynamic secure addresses on an interface.

clear port-security dynamic [address mac-addr | interface interface-id]

Syntax Description

address mac-addr

(Optional) Delete the specified dynamic secure MAC address.

interface interface-id

(Optional) Delete all the dynamic secure MAC addresses on the specified physical port or port channel.


Defaults

No default is defined.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to remove a specific dynamic secure address from the MAC address table:

Switch# clear port-security dynamic address 0008.0070.0007

This example shows how to remove all the dynamic secure addresses learned on a specific interface:

Switch# clear port-security dynamic interface gigabitethernet0/1

This example shows how to remove all the dynamic secure addresses from the address table:

Switch# clear port-security dynamic

You can verify that the information was deleted by entering the show port-security privileged EXEC command.

Related Commands

Command
Description

show port-security

Displays the port security settings defined for an interface or for the switch.

switchport port-security

Enables port security on an interface.

switchport port-security mac-address mac-address

Configures secure MAC addresses.

switchport port-security maximum value

Configures a maximum number of secure MAC addresses on a secure interface.


clear port-security sticky

Use the clear port-security sticky privileged EXEC command to delete from the secure MAC address table a specific sticky secure address, all the sticky secure addresses on an interface, or all the sticky secure addresses on the switch.

clear port-security sticky [address mac-addr | interface interface-id]

Syntax Description

address mac-addr

(Optional) Delete the specified sticky secure MAC address.

interface interface-id

(Optional) Delete all the sticky secure MAC addresses on the specified physical port.


Defaults

No default is defined.

Command Modes

Privileged EXEC

Usage Guidelines

If you enter the clear port-security sticky privileged EXEC command without keywords, the switch removes all sticky secure MAC addresses from the secure MAC address table.

If you enter the clear port-security sticky address mac-addr command, the switch removes the specified secure MAC address from the secure MAC address table.

If you enter the clear port-security sticky interface interface-id command, the switch removes all sticky secure MAC addresses on an interface from the secure MAC address table.

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to remove a specific sticky secure address from the secure MAC address table:

Switch# clear port-security sticky address 0008.0070.0007

This example shows how to remove all the sticky secure addresses learned on a specific interface:

Switch# clear port-security sticky interface gigabitethernet0/1

This example shows how to remove all the sticky secure addresses from the secure MAC address table:

Switch# clear port-security sticky

You can verify that the information was deleted by entering the show port-security address privileged EXEC command.

Related Commands

Command
Description

show port-security address

Displays the port security settings defined for an interface or for the switch.

switchport port-security

Enables port security on an interface.

switchport port-security mac-address sticky

Enables the interface for sticky learning.

switchport port-security mac-address sticky mac-address

Specifies a sticky secure MAC address

switchport port-security maximum value

Configures a maximum number of secure MAC addresses on a secure interface.


clear setup express

Use the clear setup express privileged EXEC command to exit Express Setup mode without saving the current configuration.

clear setup express

Syntax Description

This command has no arguments or keywords.

Defaults

No default is defined.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

You can use the clear setup express command to exit Express Setup mode. For example, if you activate Express Setup and then decide to connect to the switch through the console port instead of through an Ethernet port, enter the clear setup express command. The switch exits Express Setup mode. The IP address 10.0.0.1 is no longer valid on the switch, and your connection using this IP address is ended.

This command is available only when the switch is in Express Setup mode.

For more information about Express Setup, refer to Chapter 1, "Quick Setup," and Appendix D, "Configuring the Switch with the CLI-Based Setup Program," in the hardware installation guide.

Examples

This example shows how to exit Express Setup mode:

Switch# clear setup express

You can verify that the switch has exited Express Setup mode by entering the show express setup privileged EXEC command.

Related Commands

Command
Description

setup express

Enable Express Setup mode on the switch.

show setup express

Displays if Express Setup mode is active on the switch.


clear spanning-tree counters

Use the clear spanning-tree counters privileged EXEC command to clear the spanning-tree counters.

clear spanning-tree counters [interface interface-id]

Syntax Description

interface interface-id

(Optional) Clear all spanning-tree counters on the specified interface. If interface-id is not specified, spanning-tree counters are cleared for all interfaces.


Defaults

No default is defined.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to clear spanning-tree counters for all interfaces:

Switch# clear spanning-tree counters

Related Commands

Command
Description

show spanning-tree

Displays spanning-tree state information.


clear vmps statistics

Use the clear vmps statistics privileged EXEC command to clear the statistics maintained by the VLAN Query Protocol (VQP) client.

clear vmps statistics

Syntax Description

This command has no arguments or keywords.

Defaults

No default is defined.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to clear VLAN Membership Policy Server (VMPS) statistics:

Switch# clear vmps statistics

You can verify that the information was deleted by entering the show vmps statistics privileged EXEC command.

Related Commands

Command
Description

show vmps statistics

Displays the VQP version, reconfirmation interval, retry count, VMPS IP addresses, and the current and primary servers.


clear vtp counters

Use the clear vtp counters privileged EXEC command to clear the VLAN Trunking Protocol (VTP) and pruning counters.

clear vtp counters

Syntax Description

This command has no arguments or keywords.

Defaults

No default is defined.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to clear the VTP counters:

Switch# clear vtp counters

You can verify that the information was deleted by entering the show vtp counters privileged EXEC command.

Related Commands

Command
Description

show vtp counters

Displays general information about the VTP management domain, status, and counters.


cluster commander-address

You do not need to enter this command. The command switch automatically provides its MAC address to member switches when these switches join the cluster. The member switch adds this information and other cluster information to its running configuration file. Enter the no form of this global configuration command from the member switch console port to remove it from a cluster only during debugging or recovery procedures.

cluster commander-address mac-address [member number name name]

no cluster commander-address

Syntax Description

mac-address

MAC address of the cluster command switch.

member number

(Optional) Number of a configured member switch. The range is from 0 to 15.

name name

(Optional) Name of the configured cluster up to 31 characters.


Defaults

The switch is not a member of any cluster.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

A cluster member can have only one command switch.

The member switch retains the identity of the command switch during a system reload by using the mac-address parameter.

You can enter the no form on a member switch to remove it from the cluster during debugging or recovery procedures. You would normally use this command from the member switch console port only when the member has lost communication with the command switch. With normal switch configuration, we recommend that you remove member switches only by entering the no cluster member n global configuration command on the command switch.

When a standby command-switch becomes active (becomes the command switch), it removes the cluster commander-address line from its configuration.

Examples

This is an example of text from the running configuration of a cluster member:

Switch(config)# show running-config

<output truncated>

cluster commander-address 00e0.9bc0.a500 member 4 name my_cluster

<output truncated>

This example shows how to remove a member from the cluster by using the cluster member console:

Switch# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)# no cluster commander-address

You can verify your settings by entering the show cluster privileged EXEC command.

Related Commands

Command
Description

show cluster

Displays the cluster status and a summary of the cluster to which the switch belongs.

show running-config

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


cluster discovery hop-count

Use the cluster discovery hop-count global configuration command on the command switch to set the hop-count limit for extended discovery of candidate switches. Use the no form of this command to set the hop count to the default value.

cluster discovery hop-count number

no cluster discovery hop-count

Syntax Description

number

Number of hops from the cluster edge that the command switch limits the discovery of candidates. The range is from 1 to 7.


Defaults

The hop count is set to 3.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Enter this command only on the command switch. This command does not operate on member switches.

If the hop count is set to 1, it disables extended discovery. The command switch discovers only candidates that are one hop from the edge of the cluster. The edge of the cluster is the point between the last discovered member switch and the first discovered candidate switch.

Examples

This example shows how to set the hop count limit to 4. This command is entered on the command switch.

Switch(config)# cluster discovery hop-count 4

You can verify your settings by entering the show cluster privileged EXEC command on the command switch.

Related Commands

Command
Description

show cluster

Displays the cluster status and a summary of the cluster to which the switch belongs.

show cluster candidates

Displays a list of candidate switches.


cluster enable

Use the cluster enable global configuration command on a command-capable switch to enable it as the cluster command switch, assign a cluster name, and optionally assign a member number to it. Use the no form of this command to remove all members and make the command switch a candidate switch.

cluster enable name [command-switch-member-number]

no cluster enable

Syntax Description

name

Name of the cluster up to 31 characters. Valid characters include only alphanumerics, dashes, and underscores.

command-switch-member-number

(Optional) Assign a member number to the command switch of the cluster. The range is from 0 to 15.


Defaults

The switch is not a command switch.

No cluster name is defined.

The member number is 0 when this is the command switch.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

This command runs on any command-capable switch that is not part of any cluster. This command fails if a device is already configured as a member of the cluster.

You must name the cluster when you enable the command switch. If the switch is already configured as the command switch, this command changes the cluster name if it is different from the previous name.

Examples

This example shows how to enable the command switch, name the cluster, and set the command switch member number to 4:

Switch(config)# cluster enable Engineering-IDF4 4

You can verify your settings by entering the show cluster privileged EXEC command on the command switch.

Related Commands

Command
Description

show cluster

Displays the cluster status and a summary of the cluster to which the switch belongs.


cluster holdtime

Use the cluster holdtime global configuration command on the command switch to set the duration in seconds before a switch (either the command or member switch) declares the other switch down after not receiving heartbeat messages. Use the no form of this command to set the duration to the default value.

cluster holdtime holdtime-in-secs

no cluster holdtime

Syntax Description

holdtime-in-secs

Duration in seconds before a switch (either a command or member switch) declares the other switch down. The range is from 1 to 300 seconds.


Defaults

The holdtime is 80 seconds.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Use this command with the cluster timer global configuration command only on the command switch. The command switch propagates the values to all its cluster members so that the setting is consistent among all switches in the cluster.

The holdtime is typically set as a multiple of the interval timer (cluster timer). For example, it takes (holdtime-in-secs divided by interval-in-secs) number of heartbeat messages to be missed in a row to declare a switch down.

Examples

This example shows how to change the interval timer and the duration on the command switch:

Switch(config)# cluster timer 3
Switch(config)# cluster holdtime 30

You can verify your settings by entering the show cluster privileged EXEC command.

Related Commands

Command
Description

show cluster

Displays the cluster status and a summary of the cluster to which the switch belongs.


cluster management-vlan

Use the cluster management-vlan global configuration command on the command switch to change the management VLAN for the entire cluster. Use the no form of this command to change the management VLAN to VLAN 1.

cluster management-vlan n

no cluster management-vlan

Syntax Description

n

VLAN ID of the new management VLAN. Valid VLAN IDs are from 1 to 1001.


Defaults

The default management VLAN is VLAN 1.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Enter this command only on the command switch. This command changes the management VLAN of the command switch and member switches. Member switches must have either a trunk connection or connection to the new command-switch management VLAN to maintain communication with the command switch.

This command is not written to the configuration file.

Examples

This example shows how to change the management VLAN to VLAN 5 on the entire cluster:

Switch(config)# cluster management-vlan 5

You can verify your settings by entering the show interfaces vlan vlan-id privileged EXEC command.

Related Commands

Command
Description

show interfaces

Displays the administrative and operational status of a switching (nonrouting) port.


cluster member

Use the cluster member global configuration command on the command switch to add members to a cluster. Use the no form of this command to remove members from the cluster.

cluster member [n] mac-address H.H.H [password enable-password] [vlan vlan-id]

no cluster member n

Syntax Description

n

(Optional) The number that identifies a cluster member. The range is from 0 to 15.

mac-address H.H.H

MAC address of the member switch in hexadecimal format.

password enable-password

(Optional) Enable password of the candidate switch. The password is not required if there is no password on the candidate switch.

vlan vlan-id

(Optional) VLAN ID through which the candidate is added to the cluster by the command switch. The range is 1 to 1001.


Defaults

A newly enabled command switch has no associated cluster members.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Enter this command only on the command switch to add a member to or remove a member from the cluster. If you enter this command on a switch other than the command switch, the switch rejects the command and displays an error message.

You must enter a member number to remove a switch from the cluster. However, you do not need to enter a member number to add a switch to the cluster. The command switch selects the next available member number and assigns it to the switch that is joining the cluster.

You must enter the enable password of the candidate switch for authentication when it joins the cluster. The password is not saved in the running or startup configuration. After a candidate switch becomes a member of the cluster, its password becomes the same as the command-switch password.

If a switch does not have a configured host name, the command switch appends a member number to the command-switch host name and assigns it to the member switch.

If you do not specify a VLAN ID, the command switch automatically chooses a VLAN and adds the candidate to the cluster.

Examples

This example shows how to add a switch as member 2 with MAC address 00E0.1E00.2222 and the password key to a cluster. The command switch adds the candidate to the cluster through VLAN 3.

Switch(config)# cluster member 2 mac-address 00E0.1E00.2222 password key vlan 3

This example shows how to add a switch with MAC address 00E0.1E00.3333 to the cluster. This switch does not have a password. The command switch selects the next available member number and assigns it to the switch joining the cluster:

Switch(config)# cluster member mac-address 00E0.1E00.3333

You can verify your settings by entering the show cluster members privileged EXEC command on the command switch.

Related Commands

Command
Description

show cluster

Displays the cluster status and a summary of the cluster to which the switch belongs.

show cluster candidates

Displays a list of candidate switches.

show cluster members

Displays information about the cluster members.


cluster run

Use the cluster run global configuration command to enable clustering on a switch. Use the no form of this command to disable clustering on a switch.

cluster run

no cluster run

Defaults

Clustering is enabled on all switches.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

When you enter the no cluster run command on a command switch, the command switch is disabled. Clustering is disabled, and the switch cannot become a candidate switch.

When you enter the no cluster run command on a member switch, it is removed from the cluster. Clustering is disabled, and the switch cannot become a candidate switch.

When you enter the no cluster run command on a switch that is not part of a cluster, clustering is disabled on this switch. This switch cannot then become a candidate switch.

Examples

This example shows how to disable clustering on the command switch:

Switch(config)# no cluster run

You can verify that clustering is disabled by entering the show cluster privileged EXEC command.

Related Commands

Command
Description

show cluster

Displays the cluster status and a summary of the cluster to which the switch belongs.


cluster standby-group

Use the cluster standby-group global configuration command to enable command switch redundancy by binding the Hot Standby Router Protocol (HSRP) standby group to the cluster. Use the no form of this command to unbind the cluster from the HSRP standby group.

cluster standby-group HSRP-group-name

no cluster standby-group

Syntax Description

HSRP-group-name

Name of the HSRP group that is bound to the cluster. The group name is limited to 32 characters.


Defaults

The cluster is not bound to any HSRP group.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

You must enter this command only on the command switch. If you enter it on a member switch, an error message appears.

The command switch propagates the cluster-HSRP binding information to all members. Each member switch stores the binding information in its nonvolatile RAM (NVRAM).

The HSRP group name must be a valid standby group; otherwise, the command entry produces an error.

Use the same group name on all members of the HSRP standby group that is to be bound to the cluster. Use the same HSRP group name on all cluster-HSRP capable members for the HSRP group that is to be bound. (When not binding a cluster to an HSRP group, you can use different names on the cluster command and the member switches.)

Examples

This example shows how to bind the HSRP group named my_hsrp to the cluster. This command is entered on the command switch.

Switch(config)# cluster standby-group my_hsrp

This example shows the error message when this command is entered on a command switch and the specified HSRP standby group does not exist:

Switch(config)# cluster standby-group my_hsrp
%ERROR:Standby (my_hsrp) group does not exist

This example shows the error message when this command is entered on a member switch:

Switch(config)# cluster standby-group my_hsrp
%ERROR:This command runs on a cluster command switch

You can verify your settings by entering the show cluster privileged EXEC command.

Related Commands

Command
Description

show cluster

Displays the cluster status and a summary of the cluster to which the switch belongs.

show standby

Displays standby group information.

standby ip

Enables HSRP on the interface.


cluster timer

Use the cluster timer global configuration command on the command switch to set the interval in seconds between heartbeat messages. Use the no form of this command to set the interval to the default value.

cluster timer interval-in-secs

no cluster timer

Syntax Description

interval-in-secs

Interval in seconds between heartbeat messages. The range is from
1 to 300 seconds.


Defaults

The interval is 8 seconds.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Use this command with the cluster holdtime global configuration command only on the command switch. The command switch propagates the values to all its cluster members so that the setting is consistent among all switches in the cluster.

The holdtime is typically set as a multiple of the heartbeat interval timer (cluster timer). For example, it takes (holdtime-in-secs divided by the interval-in-secs) number of heartbeat messages to be missed in a row to declare a switch down.

Examples

This example shows how to change the heartbeat interval timer and the duration on the command switch.

Switch(config)# cluster timer 3
Switch(config)# cluster holdtime 30

You can verify your settings by entering the show cluster privileged EXEC command.

Related Commands

Command
Description

show cluster

Displays the cluster status and a summary of the cluster to which the switch belongs.


define interface-range

Use the define interface-range global configuration command to create an interface-range macro. Use the no form of this command to delete the defined macro.

define interface-range macro-name interface-range

no define interface-range macro-name interface-range

Syntax Description

macro-name

Name of the interface-range macro; up to 32 characters.

interface-range

Interface range; for valid values for interface ranges, see "Usage Guidelines."


Defaults

This command has no default setting.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The macro name is a 32-character maximum character string.

A macro can contain up to five ranges.

When entering the interface-range, use this format:

type {first-interface} - {last-interface}

You must add a space between the first interface number and the hyphen when entering an interface-range. For example, fastethernet 0/1 -2 is a valid range; fastethernet 0/1-2 is not a valid range.

Valid values for type and interface:

vlan vlan-id, where vlan-id is from 1 to 1001.

port-channel port-channel-number, where port-channel-number is from 1 to 6

fastethernet interface-id

VLAN interfaces must have been configured with the interface vlan command. The show running-config privileged EXEC command displays the configured VLAN interfaces. VLAN interfaces not displayed by the show running-config command cannot be used in interface-ranges.

For physical interfaces, the interface-id is defined as a slot/number (where slot is always 0 for the switch), and the range can be entered as type 0/number - number (for example, fastethernet0/1 - 2). You can also enter multiple ranges.

When you define a range, you must enter a space before and after the hyphen (-):

interface range fastethernet0/1 - 2

When you define multiple ranges, you must enter a space before and after the comma (,):

interface range fastethernet0/3 - 7 , fastethernet0/1 - 2

Examples

This example shows how to create a multiple-interface macro:

Switch(config)# define interface-range macro1 fastethernet 0/3 -7 , fastethernet 0/2 

Related Commands

Command
Description

interface range

Executes a command on multiple ports at the same time.

show running-config

Displays the current operating configuration, including defined macros. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


delete

Use the delete privileged EXEC command to delete a file or directory on the Flash memory device.

delete [/force] [/recursive] filesystem:/file-url

Syntax Description

/force

(Optional) Suppress the prompt that confirms the deletion.

/recursive

(Optional) Delete the named directory and all subdirectories and the files contained in it.

filesystem:

Alias for a Flash file system. Use flash: for the system board Flash device.

/file-url

The path (directory) and filename to delete.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(4)EA1

This command was first introduced.


Usage Guidelines

If you use the /force keyword, you are prompted at the beginning of the deletion process to confirm the deletion.

If you use the /recursive keyword without the /force keyword, you are prompted to confirm the deletion of every file.

The prompting behavior depends on the setting of the file prompt global configuration command. By default, the switch prompts for confirmation on destructive file operations. For more information about this command, refer to the Cisco IOS Command Reference for Release 12.1.

Examples

This example shows how to remove the directory that contains the old software image after successfully downloading a new image:

Switch# delete /force /recursive flash:/old-image

You can verify that the directory was removed by entering the dir filesystem: privileged EXEC command.

Related Commands

Command
Description

archive download-sw

Downloads a new image to the switch and overwrites or keeps the existing image.


dot1x default

Use the dot1x default global configuration command to reset the global 802.1X parameters to their default values.

dot1x default

Syntax Description

This command has no arguments or keywords.

Defaults

This command has no default setting.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to reset the global 802.1X parameters:

Switch(config)# dot1x default

You can verify your settings by entering the show dot1x privileged EXEC command.

Related Commands

Command
Description

dot1x max-req

Sets the maximum number of times that the switch sends an Extensible Authentication Protocol (EAP)-request/identity frame before restarting the authentication process.

dot1x re-authentication

Enables periodic re-authentication of the client.

dot1x timeout quiet-period

Sets the number of seconds that the switch remains in the quiet state following a failed authentication exchange.

dot1x timeout re-authperiod

Sets the number of seconds between re-authentication attempts.

dot1x timeout tx-period

Sets the number of seconds that the switch waits for a response to an EAP-request/identity frame from the client before retransmitting the request.

show dot1x

Displays the 802.1X statistics, administrative status, and operational status for the switch or for the specified interface.


dot1x max-req

Use the dot1x max-req global configuration command to set the maximum number of times that the switch sends an Extensible Authentication Protocol (EAP)-request/identity frame (assuming that no response is received) before restarting the authentication process. Use the no form of this command to return to the default setting.

dot1x max-req count

no dot1x max-req

Syntax Description

count

Number of times that the switch sends an EAP-request/identify frame before restarting the authentication process. The range is 1 to 10.


Defaults

The default is 2 times.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

You should change the default value of this command only to adjust for unusual circumstances such as unreliable links or specific behavioral problems with certain clients and authentication servers.

Examples

This example shows how to set the number of times that the switch sends an EAP-request/identity frame to 5 before restarting the authentication process:

Switch(config)# dot1x max-req 5

You can verify your settings by entering the show dot1x privileged EXEC command.

Related Commands

Command
Description

dot1x timeout tx-period

Sets the number of seconds that the switch waits for a response to an EAP-request/identity frame from the client before retransmitting the request.

show dot1x

Displays the 802.1X statistics, administrative status, and operational status for the switch or for the specified interface.


dot1x multiple-hosts

Use the dot1x multiple-hosts interface configuration command to allow multiple hosts (clients) on an 802.1X-authorized port that has the dot1x port-control interface configuration command set to auto. Use the no form of this command to return to the default setting.

dot1x multiple-hosts

no dot1x multiple-hosts

Syntax Description

This command has no arguments or keywords.

Defaults

Multiple hosts are disabled.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Use this command to attach multiple clients to a single 802.1X-enabled port. In this mode, only one of the attached hosts must be successfully authorized for all hosts to be granted network access. If the port becomes unauthorized (re-authentication fails, or an Extensible Authentication Protocol over LAN [EAPOL]-logoff message is received), all attached clients are denied access to the network.

Examples

This example shows how to enable 802.1X on Fast Ethernet interface 0/1 and to allow multiple hosts:

Switch(config)# interface fastethernet0/1
Switch(config-if)# dot1x port-control auto
Switch(config-if)# dot1x multiple-hosts

You can verify your settings by entering the show dot1x [interface interface-id] privileged EXEC command.

Related Commands

Command
Description

dot1x port-control

Enables manual control of the authorization state of the port.

show dot1x

Displays 802.1X statistics, administrative status, and operational status for the switch or for the specified interface.


dot1x port-control

Use the dot1x port-control interface configuration command to enable manual control of the authorization state of the port. Use the no form of this command to return to the default setting.

dot1x port-control {auto | force-authorized | force-unauthorized}

no dot1x port-control

Syntax Description

auto

Enable 802.1X authentication on the interface and cause the port to transition to the authorized or unauthorized state based on the 802.1X authentication exchange between the switch and the client.

force-authorized

Disable 802.1X authentication on the interface and cause the port to transition to the authorized state without any authentication exchange required. The port transmits and receives normal traffic without 802.1X-based authentication of the client.

force-unauthorized

Deny all access through this interface by forcing the port to transition to the unauthorized state, ignoring all attempts by the client to authenticate. The switch cannot provide authentication services to the client through the interface.


Defaults

The authorization state is force-authorized.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The 802.1X protocol is supported on Layer 2 static-access ports.

You can use the auto keyword only if the port is not configured as one of these:

Trunk port—If you try to enable 802.1X on a trunk port, an error message appears, and 802.1X is not enabled. If you try to change the mode of an 802.1X-enabled port to trunk, the port mode is not changed.

Dynamic port—A port in dynamic mode can negotiate with its neighbor to become a trunk port. If you try to enable 802.1X on a dynamic port, an error appears, and 802.1X is not enabled. If you try to change the mode of an 802.1X-enabled port to dynamic, the port mode is not changed.

Dynamic-access port—If you try to enable 802.1X on a dynamic-access (VLAN Query Protocol [VQP]) port, an error appears, and 802.1X is not enabled. If you try to change an 802.1X-enabled port to dynamic VLAN assignment, an error appears, and the VLAN configuration is not changed.

EtherChannel port—Before enabling 802.1X on the port, you must first remove it from the EtherChannel. If you try to enable 802.1X on an EtherChannel or on an active port in an EtherChannel, an error appears, and 802.1X is not enabled. If you enable 802.1X on a not-yet active port of an EtherChannel, the port does not join the EtherChannel.

Switched Port Analyzer (SPAN) destination port—You can enable 802.1X on a port that is a SPAN destination port; however, 802.1X is disabled until the port is removed as a SPAN destination. You can enable 802.1X on a SPAN source port.

To globally disable 802.1X on the switch, you must disable it on each port. There is no global configuration command for this task.

Examples

This example shows how to enable 802.1X on Fast Ethernet interface 0/1:

Switch(config)# interface fastethernet0/1
Switch(config-if)# dot1x port-control auto

You can verify your settings by entering the show dot1x privileged EXEC command and checking the Status column in the 802.1X Port Summary section of the output. An enabled status means the port-control value is set either to auto or to force-unauthorized.

Related Commands

Command
Description

show dot1x

Displays 802.1X statistics, administrative status, and operational status for the switch or for the specified interface.


dot1x re-authenticate

Use the dot1x re-authenticate privileged EXEC command to manually initiate a re-authentication of all 802.1X-enabled ports or the specified 802.1X-enabled port.

dot1x re-authenticate [interface interface-id]

Syntax Description

interface interface-id

(Optional) Slot and port number of the interface to re-authenticate.


Defaults

There is no default setting.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

You can use this command to re-authenticate a client without waiting for the configured number of seconds between re-authentication attempts (re-authperiod) and automatic re-authentication.

Examples

This example shows how to manually re-authenticate the device connected to Fast Ethernet interface 0/1:

Switch# dot1x re-authenticate interface fastethernet0/1
Starting reauthentication on FastEthernet0/1.

You can verify your settings by entering the show dot1x privileged EXEC command.

Related Commands

Command
Description

show dot1x

Displays 802.1X statistics, administrative status, and operational status for the switch or for the specified interface.


dot1x re-authentication

Use the dot1x re-authentication global configuration command to enable periodic re-authentication of the client. Use the no form of this command to return to the default setting.

dot1x re-authentication

no dot1x re-authentication

Syntax Description

This command has no arguments or keywords.

Defaults

Periodic re-authentication is disabled.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

You configure the amount of time between periodic re-authentication attempts by using the dot1x timeout re-authperiod global configuration command.

Examples

This example shows how to disable periodic re-authentication of the client:

Switch(config)# no dot1x re-authentication

This example shows how to enable periodic re-authentication and set the number of seconds between re-authentication attempts to 4000 seconds:

Switch(config)# dot1x re-authentication
Switch(config)# dot1x timeout re-authperiod 4000

You can verify your settings by entering the show dot1x privileged EXEC command.

Related Commands

Command
Description

dot1x timeout re-authperiod

Sets the number of seconds between re-authentication attempts.

show dot1x

Displays 802.1X statistics, administrative status, and operational status for the switch or for the specified interface.


dot1x timeout quiet-period

Use the dot1x timeout quiet-period global configuration command to set the number of seconds that the switch remains in the quiet state following a failed authentication exchange (for example, the client provided an invalid password). Use the no form of this command to return to the default setting.

dot1x timeout quiet-period seconds

no dot1x timeout quiet-period

Syntax Description

seconds

Time in seconds that the switch remains in the quiet state following a failed authentication exchange with the client. The range is 0 to 65535 seconds.


Defaults

The default time is 60 seconds.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

During the quiet period, the switch does not accept or initiate any authentication requests.

You should change the default value of this command only to adjust for unusual circumstances such as unreliable links or specific behavioral problems with certain clients and authentication servers.

If you want to provide a faster response time to the user, enter a smaller number than the default.

Examples

This example shows how to set the quiet time on the switch to 30 seconds:

Switch(config)# dot1x timeout quiet-period 30

You can verify your settings by entering the show dot1x privileged EXEC command.

Related Commands

Command
Description

show dot1x

Displays 802.1X statistics, administrative status, and operational status for the switch or for the specified interface.


dot1x timeout re-authperiod

Use the dot1x timeout re-authperiod global configuration command to set the number of seconds between re-authentication attempts. Use the no form of this command to return to the default setting.

dot1x timeout re-authperiod seconds

no dot1x timeout re-authperiod

Syntax Description

seconds

Number of seconds between re-authentication attempts. The range is 1 to 4294967295.


Defaults

The default is 3600 seconds.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The dot1x timeout re-authperiod global configuration command affects the behavior of the switch only if you have enabled periodic re-authentication by using the dot1x re-authentication global configuration command.

You should change the default value of this command only to adjust for unusual circumstances such as unreliable links or specific behavioral problems with certain clients or authentication servers.

Examples

This example shows how to enable periodic re-authentication and set the number of seconds between re-authentication attempts to 4000 seconds:

Switch(config)# dot1x re-authentication
Switch(config)# dot1x timeout re-authperiod 4000

You can verify your settings by entering the show dot1x privileged EXEC command.

Related Commands

Command
Description

dot1x re-authentication

Enables periodic re-authentication of the client.

show dot1x

Displays 802.1X statistics, administrative status, and operational status for the switch or for the specified interface.


dot1x timeout tx-period

Use the dot1x timeout tx-period global configuration command to set the number of seconds that the switch waits for a response to an Extensible Authentication Protocol (EAP)-request /identity frame from the client before retransmitting the request. Use the no form of this command to return to the default setting.

dot1x timeout tx-period seconds

no dot1x timeout tx-period

Syntax Description

seconds

Time in seconds that the switch should wait for a response to an EAP-request/identity frame from the client before retransmitting the request. The range is 1 to 65535 seconds.


Defaults

The default is 30 seconds.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

You should change the default value of this command only to adjust for unusual circumstances such as unreliable links or specific behavioral problems with certain clients or authentication servers.

Examples

This example shows how to set 60 as the number of seconds that the switch waits for a response to an EAP-request/identity frame from the client before retransmitting the request:

Switch(config)# dot1x timeout tx-period 60

You can verify your settings by entering the show dot1x privileged EXEC command.

Related Commands

Command
Description

dot1x max-req

Sets the maximum number of times that the switch sends an EAP-request/identity frame before restarting the authentication process.

show dot1x

Displays 802.1X statistics, administrative status, and operational status for the switch or for the specified interface.


duplex

Use the duplex interface configuration command to specify the duplex mode of operation for switch ports. Use the no form of this command to return the port to its default value.

duplex {auto | full | half}

no duplex

Syntax Description

auto

Port automatically detects whether it should run in full- or half-duplex mode.

full

Port is in full-duplex mode.

half

Port is in half-duplex mode.


Defaults

For Fast Ethernet and 10/100/1000 ports, the default is auto.

For 100BASE-FX and small form-factor pluggable (SFP) ports, the default is full.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Certain ports, such as FastEthernet or 10/100/1000 ports, can be configured as either full duplex or half duplex. How you apply this command depends on the device to which the switch is attached.

The 100BASE-FX ports do not support the duplex command. These ports only operate in full-duplex mode and at 100 Mbps.

For Fast Ethernet ports, setting the port to auto has the same effect as specifying half if the attached device does not autonegotiate the duplex parameter.

SFP ports operate only at 100 Mbps; you cannot configure the duplex mode on SPF ports. SFP ports with a 1000 BASE-T module installed can only be configured for 1000 Mbps and for full duplex.

If the speed is set to auto, the switch negotiates with the device at the other end of the link for the speed setting and then forces the speed setting to the negotiated value. The duplex setting remains as configured on each end of the link, which could result in a duplex setting mismatch.

If both the speed and duplex are set to specific values, autonegotiation is disabled.


Note For guidelines on setting the switch speed and duplex parameters, refer to the Catalyst 2940 Switch Software Configuration Guide.


Examples

This example shows how to set a Fast Ethernet port to half duplex:

Switch(config)# interface fastethernet0/1
Switch(config-if)# duplex half

This example shows how to set a Gigabit Ethernet port to full duplex:

Switch(config)# interface gigabitethernet0/1
Switch(config-if)# duplex full

You can verify your settings by entering the show running-config privileged EXEC command.

Related Commands

Command
Description

show running-config

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.

speed

Specifies the port speed.


errdisable detect

Use the errdisable detect global configuration command to enable error disable detection. Use the no form of this command to disable this feature.

errdisable detect cause {all | dtp-flap | link-flap | pagp-flap | vmps }

no errdisable detect cause {all | dtp-flap | link-flap | pagp-flap | vmps }

Syntax Description

all

Enable detection for all error disable causes.

dtp-flap

Enable detection for the Dynamic Trunking Protocol (DTP)-flap cause.

link-flap

Enable detection for the link flap cause.

pagp-flap

Enable detection for the Port Aggregation Protocol (PAgP)-flap cause.

vpms

Enable error detection on vmps.



Note Though visible in the command-line help string, the gbic-invalid keyword is not supported.


Defaults

The default is all, enabled for all causes.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

A cause (dtp-flap, link-flap, and pagp-flap) is the reason why the error-disabled state occurred. When a cause is detected on an interface, the interface is placed in error-disabled state, an operational state similar to link-down state. If you do not enable errdisable recovery for the cause, the interface stays in the error-disabled state until you enter the shutdown and no shutdown interface configuration commands. If you enable the recovery for a cause, the interface is brought out of the error-disabled state and allowed to retry the operation again when all the causes have timed out.

You must enter the shutdown and then the no shutdown commands to manually recover an interface from the error-disabled state.

Examples

This example shows how to enable error disable detection for the link-flap error-disable cause:

Switch(config)# errdisable detect cause link-flap

You can verify your settings by entering the show errdisable detect privileged EXEC command.

Related Commands

Command
Description

errdisable recovery

Configures the recovery mechanism variables.

show errdisable detect

Displays errdisable detection status.

show interfaces trunk

Displays interface status or a list of interfaces in error-disabled state.


errdisable recovery

Use the errdisable recovery global configuration command to configure the recover mechanism variables. Use the no form of this command to return to the default setting.

errdisable recovery {cause {all | bpduguard | dtp-flap | link-flap | pagp-flap | psecure-violation | security violation | udld | vpms } | {interval interval}

no errdisable recovery {cause {all | bpduguard | dtp-flap | link-flap | pagp-flap | psecure-violation | security violation | udld | vpms } | {interval interval}

Syntax Description

cause

Enable error disable to recover from a specific cause.

all

Enable the timer to recover from all error-disable causes.

bpduguard

Enable the timer to recover from the bridge protocol data unit (BPDU)-guard error-disable state.

dtp-flap

Enable the timer to recover from the Dynamic Trunking Protocol (DTP)-flap error-disable state.

link-flap

Enable the timer to recover from the link-flap error-disable state.

pagp-flap

Enable the timer to recover from the Port Aggregation Protocol (PAgP)-flap error-disable state.

psecure-violation

Enable the timer to recover from a port security violation disable state.

security violation

 

udld

Enable the timer to recover from the UniDirectional Link Detection (UDLD) error-disable state.

vpms

Enable error detection on vmps.

interval interval

Specify the time to recover from specified error-disable state. The range is 30 to 86400 seconds. The same interval is applied to all causes. The default interval is 300 seconds.

Note The errdisable recovery timer initializes at a random differential from the configured interval value. The difference between the actual timeout value and the configured value can be up to 15 percent of the configured interval.



Note Though visible in the command-line help string, the channel-misconfig and gbic-invalid keywords are not supported.


Defaults

Recovery is disabled for all causes.

The default interval is 300 seconds.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

A cause (bpduguard, dtp-flap, link-flap, pagp-flap, psecure-violation, and udld) is defined as the reason why the error-disabled state occurred. When a cause is detected on an interface, the interface is placed in error-disabled state, an operational state similar to link-down state. If you do not enable errdisable recovery for the cause, the interface stays in error-disabled state until you enter a shutdown and no shutdown interface configuration command. If you enable the recovery for a cause, the interface is brought out of the error-disabled state and allowed to retry the operation again when all the causes have timed out.

Otherwise, you must enter the shutdown then no shutdown commands to manually recover an interface from the error-disabled state.

Examples

This example shows how to enable the recovery timer for the BPDU guard error-disable cause:

Switch(config)# errdisable recovery cause bpduguard

This example shows how to set the timer to 500 seconds:

Switch(config)# errdisable recovery interval 500

You can verify your settings by entering the show errdisable recovery privileged EXEC command.

Related Commands

Command
Description

show errdisable recovery

Displays errdisable recovery timer information.

show interfaces status

Displays interface status.


flowcontrol

Use the flowcontrol interface configuration command to set the receive or send flow-control value for an interface. When flow control send is on for a device and it detects any congestion at its end, it notifies the link partner or the remote device of the congestion by sending a pause frame. When flow control receive is on for the remote device and it receives a pause frame, it stops sending any data packets. This prevents any loss of data packets during the congestion period.

Use the receive off and send off keywords to disable flow control.

flowcontrol {receive | send} {desired | off | on}


Note This flowcontrol command applies only to switch and module ports operating at 1000 Mbps.


Syntax Description

receive

Sets whether the interface can receive flow-control packets from a remote device.

send

Sets whether the interface can send flow-control packets to a remote device.

desired

When used with receive, allows an interface to operate with an attached device that is required to send flow-control packets or with an attached device that is not required to but can send flow-control packets.
When used with send, the interface sends flow-control packets to a remote device if the remote device supports it.

off

When used with receive, turns off an attached device's ability to send flow-control packets to an interface. When used with send, turns off the local port's ability to send flow-control packets to a remote device.

on

When used with receive, allows an interface to operate with an attached device that is required to send flow-control packets or with an attached device that is not required to but can send flow-control packets.
When used with send, the interface sends flow-control packets to a remote device if the remote device supports it.


Defaults

The defaults for 10/100/1000 ports and small form-factor pluggable (SFP) ports are flowcontrol receive off and flowcontrol send desired.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Use the flowcontrol command only on 10/100/1000 ports and SFP ports.

We strongly recommend that you do not configure IEEE 802.3X flowcontrol when quality of service (QoS) is configured on the switch. Before configuring flowcontrol on an interface, make sure to disable QoS on the switch.

Note that when used with receive, the on and desired keywords have the same result.

When you use the flowcontrol command to set a port to control traffic rates during congestion, you are setting flow control on a port to one of these conditions:

receive on and send on: Flow control operates in both directions; pause frames can be sent by both the local device and the remote device to show link congestion.

receive on and send desired: The port can receive pause frames and is able to send pause frames if the attached device supports them.

receive on and send off: The port cannot send pause frames, but can operate with an attached device that is required to or is able to send pause frames; the port is able to receive pause frames.

receive off and send on: The port sends pause frames if the remote device supports them, but cannot receive pause frames from the remote device.

receive off and send desired: The port cannot receive pause frames, but can send pause frames if the attached device supports them.

receive off and send off: Flow control does not operate in either direction. In case of congestion, no indication is given to the link partner, and no pause frames are sent or received by either device.

Table 2-1 shows the flow control resolution achieved on local and remote ports by a combination of settings. The table assumes that for receive, using the desired keyword has the same results as using the on keyword.

Table 2-1 Flow Control Settings and Local and Remote Port Flow Control Resolution 

Flow Control Settings
Flow Control Resolution
Local Device
Remote Device
Local Device
Remote Device

send on/receive on

send on/receive on

send on/receive off

send desired/receive on

send desired/receive off

send off/receive on

send off/receive off

Sends and receives

Does not send or receive

Sends and receives

Does not send or receive

Sends and receives

Does not send or receive

Sends and receives

Does not send or receive

Sends and receives

Does not send or receive

Receives only

Does not send or receive

send on/receive off

send on/receive on

send on/receive off

send desired/receive on

send desired/receive off

send off/receive on

send off/receive off

Does not send or receive

Does not send or receive

Sends only

Does not send or receive

Sends only

Does not send or receive

Does not send or receive

Does not send or receive

Receives only

Does not send or receive

Receives only

Does not send or receive

send desired/receive on

send on/receive on

send on/receive off

send desired/receive on

send desired/receive off

send off/receive on

send off/receive off

Sends and receives

Receives only

Sends and receives

Receives only

Sends and receives

Does not send or receive

Sends and receives

Sends only

Sends and receives

Sends only

Receives only

Does not send or receive

send desired/receive off

send on/receive on

send on/receive off

send desired/receive on

send desired/receive off

send off/receive on

send off/receive off

Does not send or receive

Does not send or receive

Sends only

Does not send or receive

Sends only

Does not send or receive

Does not send or receive

Does not send or receive

Receives only

Does not send or receive

Receives only

Does not send or receive

send off/receive on

send on/receive on

send on/receive off

send desired/receive on

send desired/receive off

send off/receive on

send off/receive off

Receives only

Receives only

Receives only

Receives only

Receives only

Does not send or receive

Sends and receives

Sends only

Sends and receives

Sends only

Receives only

Does not send or receive

send off/receive off

send on/receive on

send on/receive off

send desired/receive on

send desired/receive off

send off/receive on

send off/receive off

Does not send or receive

Does not send or receive

Does not send or receive

Does not send or receive

Does not send or receive

Does not send or receive

Does not send or receive

Does not send or receive

Does not send or receive

Does not send or receive

Does not send or receive

Does not send or receive


Examples

This example shows how to configure the local port to not support any level of flow control by the remote port:

Switch(config-if)# flowcontrol receive off
Switch(config-if)# flowcontrol send off

You can verify your settings by entering the show interfaces counters privileged EXEC command.

Related Commands

Command
Description

show interfaces counters

Displays the interface settings on a switch, including input and output flow control.


interface

Use the interface global configuration command to configure an interface type, create a switch virtual interface to be used as the management VLAN interface, and to enter interface configuration mode.

interface {interface-id | vlan number}

no interface {interface-id | vlan number}

Syntax Description

interface-id

Specify the interface type (Fast Ethernet or Gigabit Ethernet) and number.

vlan number

VLAN number from 1 to 1001 to be used as the management VLAN.


Defaults

The default management VLAN interface is VLAN 1.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

When creating a management VLAN interface, a space between vlan and number is accepted.

Only one management VLAN interface can be active.

You cannot delete the management VLAN 1 interface.

You can use the no shutdown interface configuration command to shut down the active management VLAN interface and to enable a new one.

You can configure the management VLAN interface on static-access and trunk ports.

Examples

This example shows how to enable the switch to configure interface 2:

Switch(config)# interface fastethernet0/2
Switch(config-if)#

This example shows how to change the management VLAN from the default management VLAN to VLAN 3. This series of commands should only be entered from the console. If these commands are entered through a Telnet session, the shutdown command disconnects the session, and there is no way to use IP to access the system.

Switch# configure terminal
Switch(config)# interface vlan 3
Switch(config-if)# ip address 172.20.128.176 255.255.255.0
Switch(config-if)# no shutdown
Switch(config-if)# exit

You can verify your settings by entering the show interfaces and show interfaces vlan vlan-id privileged EXEC commands.

Related Commands

Command
Description

show interfaces

Displays the administrative and operational status of a switching (nonrouting) port.

shutdown

Disables a port and shuts down the management VLAN.


interface port-channel

Use the interface port-channel global configuration command to access or create the port-channel logical interface for Layer 2 interfaces. Use the no form of this command to remove the port channel.

interface port-channel port-channel-number

no interface port-channel port-channel-number

Syntax Description

port-channel-number

Port-channel number. The range is 1 to 6.


Defaults

No port-channel logical interfaces are defined.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

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 only on the physical interface and not on the port-channel interface.

On the port-channel interface, if you do not assign a static MAC address or if you assign a static MAC address and then later remove it, the switch automatically assigns a MAC address to the interface.

Examples

This example shows how to create a port-channel interface with a port-channel number of 5:

Switch(config)# interface port-channel 5

You can verify your settings by entering the show running-config or show etherchannel channel-group-number detail privileged EXEC command.

Related Commands

Command
Description

channel-group

Assigns an Ethernet interface to an EtherChannel group.

show etherchannel

Displays EtherChannel information for a channel.

show running-config

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


interface range

Use the interface range global configuration command to enter interface range configuration mode and to execute a command on multiple ports at the same time. Use the no form of this command to remove an interface range.

interface range {port-range | macro name}

no interface range {port-range | macro name}

Syntax Description

port-range

Port range. For a list of valid values for port-range, see the "Usage Guidelines" section.

macro name

Specify the name of a macro.


Defaults

This command has no default setting.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

From the interface range configuration mode, all interface parameters that you enter are applied to all interfaces within the range.

For VLANs, you can use the interface range command only on existing VLAN interfaces. To display VLAN interfaces, enter the show running-config privileged EXEC command. VLANs not displayed cannot be used in the interface range command. The commands that you enter under the interface range command are applied to all existing VLAN interfaces in the range.

All configuration changes made to an interface range are saved to nonvolatile RAM (NVRAM), but the interface range itself is not saved to NVRAM.

You can enter the interface range in these ways:

Specifying up to five interface ranges

Specifying a previously defined interface-range macro

You can define up to five interface ranges with a single command, with each range separated by a comma (,).

All interfaces in a range must be the same type; that is, all Fast Ethernet ports, all Gigabit Ethernet ports, all EtherChannel ports, or all VLANs.

These are the valid values for port-range type and interface:

vlan vlan-id, where vlan-id is from 1 to 1001.

port-channel port-channel-number, where port-channel-number is from 1 to 6

fastethernet interface-id

For physical interfaces, the interface-id is defined as a slot/number (where slot is always 0 for the switch), and the range is entered as type 0/number - number (for example, fastethernet0/1 - 2). You can also enter multiple ranges.

When you define a range, you must enter a space before and after the hyphen (-):

interface range fastethernet0/1 - 2

When you define multiple ranges, you must enter a space before and after the comma (,):

interface range fastethernet0/3 - 7 , fastethernet0/1 - 2

You cannot specify both a macro and an interface range in the same command.

A single interface can also be specified in port-range. (The command is then similar to the interface interface-id global configuration command.)


Note For more information about configuring interface ranges, refer to the Catalyst 2940 Switch Software Configuration Guide for this release.


Examples

This example shows how to use the interface range command to enter interface range configuration mode and to enter commands for two ports:

Switch(config)# interface range fastethernet0/1 - 2
Switch(config-if-range)#

This example shows how to use a port-range macro macro1 for the same function. The advantage is that you can reuse the macro1 until you delete it.

Switch(config)# define interface-range macro fastethernet0/1 - 2
Switch(config)# interface range macro macro1
Switch(config-if-range)#

Related Commands

Command
Description

show running-config

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


ip address

Use the ip address interface configuration command to set an IP address for a switch. Use the no form of this command to remove an IP address or to disable IP processing.

ip address ip-address subnet-mask

no ip address ip-address subnet-mask

Syntax Description

ip-address

IP address.

subnet-mask

Mask for the associated IP subnet.


Defaults

No IP address is defined for the switch.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

A switch can have one IP address.

The IP address of the switch can be accessed only by nodes connected to ports that belong to the management VLAN. The default for the management VLAN is VLAN 1, but you can configure a different VLAN as the management VLAN.

If you remove the IP address through a Telnet or Secure Shell (SSH) session, your connection to the switch is lost.

If your switch receives its IP address from a Bootstrap Protocol (BOOTP) or a Dynamic Host Configured Protocol (DHCP) server and you remove the switch IP address by using the no ip address command, IP processing is disabled, and the BOOTP or DHCP server cannot reassign the address.

Examples

This example shows how to configure the IP address for the switch on a subnetted network:

Switch(config)# interface vlan 1
Switch(config-if)# ip address 172.20.128.2 255.255.255.0 

You can verify your settings by entering the show running-config privileged EXEC command.

Related Commands

Command
Description

show running-config

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


ip igmp snooping

Use the ip igmp snooping global configuration command to globally enable Internet Group Management Protocol (IGMP) snooping. Use the no form of this command to disable IGMP snooping.

ip igmp snooping

no ip igmp snooping

Syntax Description

This command has no arguments or keywords.

Defaults

IGMP snooping is globally enabled.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

When IGMP snooping is globally enabled, it enables IGMP snooping on all the existing VLAN interfaces. When IGMP snooping is globally disabled, it disables IGMP snooping on all the existing VLAN interfaces.

The configuration is saved in nonvolatile RAM (NVRAM).

Examples

This example shows how to globally enable IGMP snooping:

Switch(config)# ip igmp snooping

This example shows how to globally disable IGMP snooping:

Switch(config)# no ip igmp snooping

You can verify your settings commands by entering the show ip igmp snooping privileged EXEC command.

Related Commands

Command
Description

ip igmp snooping vlan

Enables IGMP snooping on a VLAN interface.

ip igmp snooping vlan immediate-leave

Enables IGMP Immediate-Leave processing.

ip igmp snooping vlan mrouter

Configures a Layer 2 port as a multicast router port.

ip igmp snooping vlan static

Configures a Layer 2 port as a member of a group.

show ip igmp snooping

Displays the IGMP snooping configuration.


ip igmp snooping source-only-learning

Use the ip igmp snooping source-only-learning global configuration command to enable IP multicast-source-only learning on the switch. Use the no form of this command to disable IP multicast-source-only learning.

ip igmp snooping source-only-learning

no ip igmp snooping source-only-learning

Syntax Description

This command has no arguments or keywords.

Defaults

IP multicast-source-only learning is enabled.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

When IP multicast-source-only learning is enabled, the switch learns the IP multicast group from the IP multicast data stream and only forwards traffic to the multicast router ports.


Note We strongly recommend that you do not disable IP multicast-source-only learning. IP multicast-source-only learning should be disabled only if your network is not composed of IP multicast-source-only networks and if disabling this learning method improves the network performance.


Examples

This example shows how to disable source-only learning:

Switch(config)# no ip igmp snooping source-only-learning

This example shows how to enable source-only learning:

Switch(config)# ip igmp snooping source-only-learning

You can verify your settings by entering the show running-config | include source-only-learning privileged EXEC command.

Related Commands

Command
Description

ip igmp snooping

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

show running-config | include source-only-learning

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


ip igmp snooping vlan

Use the ip igmp snooping vlan global configuration command to enable Internet Group Management Protocol (IGMP) snooping on a specific VLAN. Use the no form of this command to disable IGMP snooping on a VLAN interface.

ip igmp snooping vlan vlan-id

no ip igmp snooping vlan vlan-id

Syntax Description

vlan-id

VLAN ID. The range is from 1 to 1001.


Defaults

IGMP snooping is enabled when each VLAN is created.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

This command automatically configures the VLAN if it is not already configured. The configuration is saved in nonvolatile RAM (NVRAM).

Examples

This example shows how to enable IGMP snooping on VLAN 2:

Switch(config)# ip igmp snooping vlan 2

This example shows how to disable IGMP snooping on VLAN 2:

Switch(config)# no ip igmp snooping vlan 2

You can verify your settings by entering the show ip igmp snooping vlan privileged EXEC command.

Related Commands

Command
Description

ip igmp snooping

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

ip igmp snooping vlan immediate-leave

Enables IGMP Immediate-Leave processing.

ip igmp snooping vlan mrouter

Configures a Layer 2 port as a multicast router port.

ip igmp snooping vlan static

Configures a Layer 2 port as a member of a group.

show ip igmp snooping

Displays the IGMP snooping configuration.


ip igmp snooping vlan immediate-leave

Use the ip igmp snooping vlan immediate-leave global configuration command to enable Internet Group Management Protocol (IGMP) Immediate-Leave processing on a VLAN interface. Use the no form of this command to disable Immediate-Leave processing on the VLAN interface.

ip igmp snooping vlan vlan-id immediate-leave

no ip igmp snooping vlan vlan-id immediate-leave

Syntax Description

vlan-id

VLAN ID value. The range is between 1 to 1001.


Defaults

IGMP Immediate-Leave processing is disabled.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Use the Immediate-Leave feature only when there is only one IP multicast receiver present on every port in the VLAN. The Immediate-Leave configuration is saved in nonvolatile RAM (NVRAM).

The Immediate-Leave feature is supported only with IGMP version 2 hosts.

Examples

This example shows how to enable IGMP Immediate-Leave processing on VLAN 1:

Switch(config)# ip igmp snooping vlan 1 immediate-leave

This example shows how to disable IGMP Immediate-Leave processing on VLAN 1:

Switch(config)# no ip igmp snooping vlan 1 immediate-leave

You can verify your settings by entering the show ip igmp snooping vlan privileged EXEC command.

Related Commands

Command
Description

ip igmp snooping

Enables IGMP snooping.

ip igmp snooping vlan mrouter

Configures a Layer 2 port as a multicast router port.

show ip igmp snooping

Displays the IGMP snooping configuration.

ip igmp snooping vlan static

Configures a Layer 2 port as a member of a group.

show mac address-table multicast

Displays the Layer 2 multicast entries for a VLAN.


ip igmp snooping vlan mrouter

Use the ip igmp snooping vlan mrouter global configuration command to add a multicast router port and to configure the multicast router learning method. Use the no form of this command to remove the configuration.

ip igmp snooping vlan vlan-id mrouter {interface interface-id | learn {cgmp | pim-dvmrp}}

no ip igmp snooping vlan vlan-id mrouter {interface interface-id | learn {cgmp | pim-dvmrp}}

Syntax Description

vlan vlan-id

Specify the VLAN ID. The range is from 1 to 1001.

interface interface-id

Specify the interface of the member port that is configured to a static router port.

learn

Specify the multicast router learning method.

cgmp

Set the switch to learn multicast router ports by snooping on Cisco Group Management Protocol (CGMP) packets.

pim-dvmrp

Set the switch to learn multicast router ports by snooping on IGMP queries and Protocol-Independent Multicasting-Distance Vector Multicast Routing Protocol (PIM-DVMRP) packets.


Defaults

The default learning method is pim-dvmrp.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The CGMP learning method is useful for controlling traffic in Cisco router environments.

The configured learning method is saved in nonvolatile RAM (NVRAM).

Static connections to multicast routers are supported only on switch ports.

Examples

This example shows how to configure Fast Ethernet interface 0/6 as a multicast router port:

Switch(config)# ip igmp snooping vlan 1 mrouter interface fastethernet0/6

This example shows how to specify the multicast router learning method as CGMP:

Switch(config)# no ip igmp snooping vlan 1 mrouter learn cgmp

You can verify your settings by entering the show ip igmp snooping mrouter privileged EXEC command.

Related Commands

Command
Description

ip igmp snooping

Globally enables Internet Group Management Protocol (IGMP) snooping.

ip igmp snooping vlan

Enables IGMP snooping on the VLAN interface.

ip igmp snooping vlan immediate-leave

Configures IGMP Immediate-Leave processing.

ip igmp snooping vlan static

Configures a Layer 2 port as a member of a group.

show ip igmp snooping mrouter

Displays the statically and dynamically learned multicast router ports.


ip igmp snooping vlan static

Use the ip igmp snooping vlan vlan-id static global configuration command to add a Layer 2 port as a member of a multicast group. Use the no form of this command to remove the configuration.

ip igmp snooping vlan vlan-id static mac-address interface interface-id

no ip igmp snooping vlan vlan-id static mac-address interface interface-id

Syntax Description

vlan vlan-id

Specify the VLAN ID. The range is 1 to 1001.

static mac-address

Specify the static group MAC address.

interface interface-id

Specify the interface configured to a static router port.


Defaults

None configured.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The command is used to statically configure the IP multicast group member ports.

The static ports and groups are saved in nonvolatile RAM (NVRAM).

Static connections to multicast routers are supported only on switch ports.

Examples

This example shows how to statically configure a host on an interface:

Switch(config)# ip igmp snooping vlan 1 static 0100.5e02.0203 interface fastethernet0/6
Configuring port FastEthernet 0/6 on group 0100.5e02.0203

You can verify your settings by entering the show mac address-table multicast privileged EXEC command.

Related Commands

Command
Description

ip igmp snooping

Enables Internet Group Management Protocol (IGMP) snooping.

ip igmp snooping vlan

Enables IGMP snooping on the VLAN interface.

ip igmp snooping vlan immediate-leave

Configures IGMP Immediate-Leave processing.

ip igmp snooping vlan mrouter

Configures a Layer 2 port as a multicast router port.

show mac address-table multicast

Displays the Layer 2 multicast entries for a VLAN.


lacp port-priority

Use the lacp port-priority interface configuration command to set the port priority for the Link Aggregration Control Protocol (LACP). Use the no form of this command to return to the default setting.

lacp port-priority priority-value

no lacp port-priority

Syntax Description

priority-value

Port priority for LACP. The range is from 1 to 65535.


Defaults

The default priority value is 32768.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

This command only takes effect on EtherChannel interfaces that are already configured for LACP.


Note For more information about configuring LACP on physical interfaces, refer to the "Configuring EtherChannels" chapter in the software configuration guide for this release.


Examples

This example shows set the port priority for LACP:

Switch(config)# lacp port-priority 32764

You can verify your settings by entering the show etherchannel privileged EXEC command.

Related Commands

Command
Description

lacp system-priority

Globally sets the LACP priority.


lacp system-priority

Use the lacp system-priority global configuration command to set the system priority for Link Aggregration Control Protocol (LACP). Use the no form of this command to return to the default setting.

lacp system-priority priority-value

no lacp system-priority

Syntax Description

priority-value

System priority for LACP. The range is from 1 to 65535.


Defaults

The default priority value is 32768.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Although this is a global configuration command, the priority only takes effect on EtherChannels that have physical interfaces with LACP enabled.


Note For more information about configuring LACP on physical interfaces, refer to the "Configuring Etherchannels" chapter in the software configuration guide for this release.


Examples

This example shows set the system priority for LACP:

Switch(config)# lacp system-priority 32764

You can verify your settings by entering the show lacp sys-id privileged EXEC command.

Related Commands

Command
Description

lacp port-priority

Sets the LACP priority for a specific port.


mac address-table aging-time

Use the mac address-table aging-time global configuration command to set the length of time that a dynamic entry remains in the MAC address table after the entry is used or updated. Use the no form of this command to return to the default setting. The aging time applies to all VLANs.

mac address-table aging-time [0 | 10-1000000]

no mac address-table aging-time [0 | 10-1000000]

Syntax Description

0

This value disables aging. Static address entries are never aged or removed from the table.

10-100000

Aging time in seconds. The range is 10 to 1000000 seconds.


Defaults

The default is 300 seconds.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

If hosts do not send continuously, increase the aging time to record the dynamic entries for a longer time. This reduces the possibility of flooding when the hosts send again.

Examples

This example shows how to set the aging time to 200 seconds:

Switch(config)# mac address-table aging-time 200

This example shows how to disable aging in VLAN 1.

Switch(config)# mac address-table aging-time 0

This example shows how to set aging time to 450 seconds for all VLANs for which the user did not specify aging time.

Switch(config)# mac address-table aging-time 450

You can verify your settings by entering the show mac address-table privileged EXEC command.

Related Commands

Command
Description

clear mac address-table

Deletes dynamic entries from the MAC address table.

show mac address-table

Displays the MAC address table.

show mac address-table aging-time

Displays the MAC address table aging time for all VLANs or the specified VLAN.


mac address-table notification

Use the mac address-table notification global configuration command to enable the MAC notification feature and configure the notification-trap interval or history table. Use the no form of this command to disable this feature.

mac address-table notification [history-size size | interval interval]

no mac address-table notification [history-size size | interval interval]

Syntax Description

history-size size

(Optional) Configures the maximum number of entries in the MAC notification history table; valid values are 0 to 500.

interval interval

(Optional) Configures the notification-trap interval in seconds; valid values are from 0 to 2147483647. The switch sends the notification traps when this amount of time has elapsed.


Defaults

The MAC notification feature is disabled.

The default trap-interval value is 1 second.

The default number of entries in the history table is 1.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The MAC address notification feature sends Simple Network Management Protocol (SNMP) traps to the network management system (NMS) whenever a MAC address is added or deleted from the forwarding tables. MAC notifications are generated only for dynamic and secure MAC addresses. Events are not generated for self addresses, multicast addresses, or other static addresses.

When you configure the history-size option, the existing MAC address history table is deleted, and a new table is created.

You enable the MAC address notification feature by using the mac address-table notification command. You must also enable MAC address notification traps on an interface by using the snmp trap mac-notification interface configuration command, and configure the switch to send MAC address traps to the NMS by using the snmp-server enable traps mac-notification global configuration command.

Examples

This example shows how to enable the MAC notification feature:

Switch(config)# mac address-table notification

This example shows how to set the notification-trap interval to 60 seconds:

Switch(config)# mac address-table notification interval 60

This example shows how to set the number of entries in the history table to 32:

Switch(config)# mac address-table notification history-size 32

You can verify your settings by entering the show mac address-table notification privileged EXEC command.

Related Commands

Command
Description

clear mac address-table notification

Clears the MAC address notification global counters.

show mac address-table notification

Displays the MAC address notification settings for all interfaces or the specified interface.

snmp-server enable traps

Sends the SNMP MAC notification traps when the mac-notification keyword is appended.

snmp trap mac-notification

Enables the SNMP MAC notification trap on a specific interface.


mac address-table static

Use the mac address-table static global configuration command to add static addresses to the MAC address table. Use the no form of this command to remove static entries from the MAC address table.

mac address-table static mac-addr vlan vlan-id interface interface-id

no mac address-table static mac-addr vlan vlan-id interface interface-id

Syntax Description

mac-addr

Destination MAC address (unicast or multicast) to add to the address table. Packets with this destination address received in the specified VLAN are forwarded to the specified interface.

vlan vlan-id

Specify the VLAN for which the packet with the specified MAC address is received. Valid VLAN IDs are 1 to 1005.

interface interface-id

Interface to which the received packet is forwarded. Valid interfaces include physical ports and port channels.


Defaults

None configured.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Examples

This example shows how to add the static address 0004.5600.67ab to the MAC address table:

Switch(config)# mac address-table static 0004.5600.67ab vlan 1 interface fastethernet0/2

This example shows how to add the static address c2f3.220a.12f4 to the MAC address table. When a packet is received in VLAN 4 with this MAC address as its destination, the packet is forwarded to the specified interface:

Switch(config)# mac address-table static c2f3.220a.12f4 vlan 4 interface 
gigabitethernet0/1

You can verify your settings by entering the show mac address-table privileged EXEC command.

Related Commands

Command
Description

clear mac address-table

Deletes entries from the MAC address table.

mac address-table aging-time

Sets the length of time that a dynamic entry remains in the MAC address table after the entry is used or updated.

show mac address-table

Displays the MAC address table.

show mac address-table static

Displays static MAC address table entries only.


mls qos trust

Use the mls qos trust interface configuration command to configure the port trust state. Ingress traffic can be trusted, and classification is performed by examining the class of service (CoS) or the Differentiated Services Code Point (DSCP) value. Use the no form of this command to return a port to its untrusted state.

mls qos trust [cos [pass-through dscp] | device cisco-phone]

no mls qos trust [cos [pass-through dscp] | device cisco-phone]

Syntax Description

cos

(Optional) Classify ingress packets with packet CoS values. For untagged packets, the port default CoS value is used.

cos pass-through dscp

(Optional) Configure the interface to classify ingress packets by trusting the CoS value and to send packets without modifying the DSCP value (pass-through mode).

device cisco-phone

(Optional) Classify ingress packets by trusting the value sent from the Cisco IP phone (trusted boundary).



Note Though visible in the command-line help string, the dscp keyword is not supported.


Defaults

The port is not trusted.

Pass-through mode is disabled.

Trusted boundary is disabled.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Packets entering a quality of service (QoS) domain are classified at the edge of the QoS domain. When the packets are classified at the edge, the switch port within the QoS domain can be configured to one of the trusted states because there is no need to classify the packets at every switch within the domain. Use this command to specify whether the port is trusted and which fields of the packet to use to classify traffic.

If CoS is trusted, DSCP is modified according to the COS-to-DSCP map value.

To return a port to the untrusted state, use the no mls qos trust interface configuration command.

The trusted boundary feature prevents security problems if users disconnect their PCs from networked Cisco IP phones and connect them into the switch port to take advantage of trusted CoS settings. You must globally enable the Cisco Discovery Protocol (CDP) on both the switch and on the interface connected to the IP Phone. If the phone is not detected, trusted boundary disables the trust setting on the switch port and prevents misuse of a high-priority queue.

If trusted boundary is enabled and the no mls qos trust command is entered, the port returns to the untrusted state and cannot be configured to trust if it is connected to a Cisco IP Phone.

To disable trusted boundary, use the no mls qos trust device interface configuration command.

Pass-through mode uses the CoS value of incoming packets without modifying the DSCP value and sends the packets from one of the four egress queues. The switch assigns a CoS value of 0 to all incoming packets without modifying the packets. It offers best-effort service to each packet regardless of the packet contents or size and sends it from a single egress queue.

You can enable pass-through mode by using the mls qos trust cos pass-through dscp interface configuration command. To disable pass-through mode, use the no mls qos trust cos pass-through interface configuration command.

Examples

This example shows how to configure a port to be a CoS-trusted port:

Switch(config)# interface gigabitethernet0/1
Switch(config-if)# mls qos trust cos

This example shows how to specify that the Cisco IP phone is a trusted device:

Switch(config)# interface fastethernet0/1
Switch(config-if)# mls qos trust device cisco-phone

This example shows how to configure the interface to trust the CoS of incoming packets and to send them without modifying the DSCP field:

Switch(config)# interface fastethernet0/1
Switch(config-if)# mls qos trust cos pass-through dscp

You can verify your settings by entering the show mls qos interface privileged EXEC command.

Related Commands

Command
Description

show mls qos interface

Displays QoS information.


monitor session

Use the monitor session global configuration command to start a new Switched Port Analyzer (SPAN) session. Use the no form of this command to remove the SPAN session or to remove source or destination interfaces from the SPAN session.

monitor session session_number {destination {interface interface-id [encapsulation {dot1q}] [ingress vlan vlan id] | {source {interface interface-id [, | -] [both | rx | tx ] }}

no monitor session session_number {destination {interface interface-id [encapsulation {dot1q}] [ingress vlan vlan id] | {source {interface interface-id [, | -] [both | rx | tx ] }}

no monitor session {session_number | all | local | remote}

Syntax Description

session_number

Specify the session number identified with the SPAN session.

destination interface interface-id

Specify the destination interface for a local SPAN session. Valid interfaces are physical ports.

encapsulation

(Optional) Specify the encapsulation header for outgoing packets through a destination port. If encapsulation type is not specified, packets are sent in native form. To reconfigure a destination port in native form, enter the command without the encapsulation keyword.

dot1q

Specify the encapsulation type as 802.1Q.

ingress vlan vlan id

(Optional) Specify whether forwarding is enabled for ingress traffic on the destination port. If encapsulation type is not specified, packets are sent in native form.

source interface interface-id

Specify the SPAN source interface type, slot, and port number. Valid interfaces include physical ports and port channels.

,

(Optional) Specify a series of interfaces, or separate a range of interfaces from a previous range. Enter a space after the comma.

-

(Optional) Specify a range of interfaces. Enter a space before and after the hyphen.

both, rx, tx

(Optional) Specify the traffic direction for each source.

all, local, remote

Specify all, local, or remote to clear a SPAN session.



Note Though visible in the command-line help strings, the destination remote vlan, reflector-port, and source remote vlan keywords are not supported.


Defaults

On a source interface, the default is to monitor both received and transmitted traffic.

If encapsulation type is not specified on a destination port, packets are sent in native form with no encapsulation.

Ingress forwarding is disabled on SPAN destination ports.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Traffic that enters or leaves source ports can be monitored by using SPAN. Traffic routed to source ports cannot be monitored.

You can configure (and store in NVRAM) one local SPAN session on a switch. This restriction applies: SPAN source (rx, tx, both): one active session limit.

You can monitor traffic on a single port or on a series or range of ports. You select a series or range of interfaces by using the [, | -] options.

If you specify a series of interfaces, you must enter a space before and after the comma. If you specify a range of interfaces, you must enter a space before and after the hyphen (-).

EtherChannel ports cannot be configured as SPAN or reflector ports. A physical port that is a member of an EtherChannel group can be used as a source or destination port. It cannot participate in the EtherChannel group while it is configured for SPAN.

A port used as a reflector port cannot be a SPAN source or destination port, nor can a port be a reflector port for more than one session at a time.

A port used as a destination port cannot be a SPAN source or reflector port, nor can a port be a destination port for more than one session at a time.

You can enable 802.1X on a port that is a SPAN destination port; however, 802.1X is disabled until the port is removed as a SPAN destination. (If 802.1X is not available on the port, the switch will return an error message.) You can enable 802.1X on a SPAN source port.

If ingress forwarding is enabled, you can use the SPAN destination port to inject traffic from a network security device. For example, if you connect a Cisco Intrusion Detection System (IDS) Sensor Appliance to a destination port, the IDS device can send TCP Reset packets to close down the TCP session of a suspected attacker.

Examples

This example shows how to create SPAN session 1 to monitor both sent and received traffic on source interface 0/1 on destination interface 0/8:

Switch(config)# monitor session 1 source interface fastethernet0/1 both
Switch(config)# monitor session 1 destination interface fastethernet0/8

This example shows how to delete a destination port from an existing SPAN session:

Switch(config)# no monitor session 2 destination fastethernet0/4

This example shows how to configure the destination port for ingress traffic on VLAN 5 by using a security device that does not support 802.1Q encapsulation.

Switch(config)# monitor session 1 destination interface fastethernet0/5 ingress vlan 5

This example shows how to configure the destination port for ingress traffic on VLAN 5 by using a security device that supports 802.1Q encapsulation.

Switch(config)# monitor session 1 destination interface fastethernet0/5 encapsulation 
dot1q ingress vlan 5

This example shows how to disable ingress traffic forwarding on the destination port.

Switch(config)# monitor session 1 destination interface fastethernet0/5 encapsulation 
dot1q

You can verify your settings by entering the show monitor privileged EXEC command.

Related Commands

Command
Description

show monitor

Displays SPAN session information.


mvr

Use the mvr global configuration command without keywords to enable the multicast VLAN registration (MVR) feature on the switch. Use the no form of this command to disable MVR and its options. Use the command with keywords to set the MVR mode for a switch, to configure the MVR IP multicast address, to set the maximum time to wait for a query reply before removing a port from group membership, and to specify the MVR multicast VLAN. Use the no form of this command to return the switch to the default settings.

mvr [group ip-address [count] | mode {compatible | dynamic} | querytime value | vlan vlan-id]

no mvr [group ip-address | mode {compatible | dynamic} | querytime value | vlan vlan-id]

Syntax Description

group ip-address

(Optional) Statically configure an MVR group IP multicast address on the switch.

Use the no form of this command to remove a statically configured IP multicast address or contiguous addresses or, when no IP address is entered, to remove all statically configured MVR IP multicast addresses.

count

(Optional) Configure multiple contiguous MVR group addresses. The range is from 1 to 256. The default is 1.

mode

(Optional) Specify the MVR mode of operation.

The default is compatible mode.

compatible

Set MVR mode to provide compatibility with Catalyst 2900 XL and 3500 XL switches. This mode does not allow dynamic membership joins on source ports.

dynamic

Set MVR mode to allow dynamic MVR membership on source ports.

querytime value

(Optional) Set the maximum time to wait for Internet Group Management Protocol (IGMP) report memberships on a receiver port. This time applies only to receiver-port leave processing. When an IGMP query is sent from a receiver port, the switch waits for the default or configured MVR query time for an IGMP group membership report before removing the port from multicast group membership.

The value is the response time in units of tenths of a second. The default is 5 tenths or one-half second. The range is 1 to 100 tenths of a second.

Use the no form of the command to return to the default setting.

vlan vlan-id

(Optional) Specify the VLAN on which MVR multicast data is expected to be received. This is also the VLAN to which all the source ports belong. The default is VLAN 1. Valid VLAN IDs are 1 to 1001.


Defaults

MVR is disabled.

The default MVR mode is compatible mode.

No IP multicast addresses are configured on the switch.

The default group IP address count is 0.

The default query response time is 5 tenths of or one-half second.

The default multicast VLAN for MVR is VLAN 1.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

A maximum of 256 MVR multicast groups can be configured on a switch.

Use the mvr group command to statically configure all the IP multicast addresses that will take part in MVR. Any multicast data sent to a configured multicast address is sent to all the source ports on the switch and to all receiver ports registered to receive data on that IP multicast address.


Note The mvr group command prevents adding IP multicast addresses that cause address aliasing between MVR multicast groups or with the reserved IP multicast addresses (in the range 224.0.0.xx). Each IP multicast address translates to a multicast 48-bit MAC address. If the IP address being configured translates (aliases) to the same 48-bit MAC address as a previously configured IP multicast address or the reserved MAC multicast addresses, the command fails.


The mvr querytime parameter applies only to receiver ports.

The mvr group and mvr vlan commands only apply to ports configured as receiver ports.

If the switch MVR is interoperating with Catalyst 2900 XL or Catalyst 3500 XL switches, set the multicast mode to compatible.

When in compatible mode, MVR does not support IGMP dynamic joins on MVR source ports.

Examples

This example shows how to enable MVR:

Switch(config)# mvr

This example shows how to disable MVR:

Switch(config)# no mvr

This example shows how to configure 228.1.23.4 as an IP multicast address:

Switch(config)# mvr group 228.1.23.4

This command fails because of address aliasing:

Switch(config)# mvr group 230.1.23.4

Cannot add this IP address - aliases with previously configured IP address 228.1.23.4. 

This example shows how to configure ten contiguous IP multicast groups with multicast addresses from 228.1.23.1 to 228.1.23.10:

Switch(config)# mvr group 228.1.23.1 10

This example shows how to delete the previously configured ten IP multicast addresses:

Switch(config)# no mvr group 228.1.23.1 10

This example shows how to delete all previously configured IP multicast addresses:

Switch(config)# no mvr group

This example shows how to set the maximum query response time as 1 second (10 tenths):

Switch(config)# mvr querytime 10

This example shows how to return the maximum query response time to the default setting of one-half second:

Switch(config)# no mvr querytime

This example shows how to set VLAN 2 as the multicast VLAN:

Switch(config)# mvr vlan 2 

Use the show mvr members privileged EXEC command to display the IP multicast group addresses configured on the switch.

You can verify your settings by entering the show mvr privileged EXEC command.

Related Commands

Command
Description

mvr immediate

Enables the Immediate-Leave feature on an interface.

mvr type

Configures a port as a receiver or source port.

mvr vlan group

Configures a receiver port as a member of an MVR group.

show mvr

Displays MVR global parameters or port parameters.

show mvr interface

Displays the configured MVR interfaces with their type, status, and Immediate-Leave configuration.

show mvr interface interface-id member

Displays all MVR groups of which the interface is a member.

show mvr members

Displays all ports that are members of an MVR multicast group; if the group has no members, its status is shown as Inactive.


mvr immediate

Use the mvr immediate interface configuration command to enable the Immediate-Leave feature on an interface. Use the no form of this command to disable the feature on the interface.

mvr immediate

no mvr immediate

Syntax Description

This command has no keywords or arguments.

Defaults

The Immediate-Leave feature is disabled.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The Immediate-Leave feature applies only to receiver ports. When the Immediate-Leave feature is enabled, a receiver port leaves a multicast group more quickly. When the switch receives an Internet Group Management Protocol (IGMP) leave message from a group on a receiver port, it sends an IGMP query on that port and waits for IGMP group membership reports. If no reports are received in a configured time period, the receiver port is removed from multicast group membership. With the Immediate-Leave feature, an IGMP query is not sent from the receiver port on which the IGMP leave was received. As soon as the leave message is received, the receiver port is removed from multicast group membership, thus speeding up leave latency.

The Immediate-Leave feature should only be enabled on receiver ports to which a single receiver device is connected.

Examples

This example shows how to enable the Immediate-Leave feature on a port:

Switch(config-if)# mvr immediate

This example shows how to disable the Immediate-Leave feature on a port:

Switch(config-if)# no mvr immediate

You can verify your settings by entering the show mvr privileged EXEC command.

Related Commands

Command
Description

mvr

Enables multicast VLAN registration (MVR).

mvr type

Configures a port as a receiver or source port.

mvr vlan group

Configures a receiver port as a member of an MVR group.

show mvr

Displays MVR global parameters or port parameters.


mvr type

Use the mvr type interface configuration command to configure a port as a multicast VLAN registration (MVR) receiver or source port. Use the no form of this command to return the port to the default settings.

mvr type {receiver | source}

no mvr type {receiver | source}

Syntax Description

receiver

Port that receives multicast data and cannot send multicast data to multicast groups.

source

Port that can send and receive multicast data to multicast groups.


Defaults

A port is configured as neither receiver nor source.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

Configure a port as a source port if that port should be able to both send and receive multicast data bound for the configured multicast groups. Multicast data is received on all ports configured as source ports.

Configure a port as a receiver port if that port should only be able to receive multicast data and should not be able to send multicast data to the configured multicast groups. None of the receiver ports receives multicast data unless it sends an Internet Group Management Protocol (IGMP) group join message for a multicast group.

A receiver port configured as a static member of a multicast group remains a member until statically removed from membership.


Note All receiver ports must not be trunk ports and must not belong to the MVR source VLAN.


A port that is not taking part in MVR should not be configured as an MVR receiver port or source port. This port is a normal switch port and is able to send and receive multicast data with normal switch behavior.

Examples

This example shows how to configure a port as an MVR receiver port:

Switch(config)# interface fastethernet0/1
Switch(config-if)# mvr type receiver

This example shows how to configure a port as an MVR source port:

Switch(config)# interface fastethernet0/3
Switch(config-if)# mvr type source

This example shows how to return a port to the default setting:

Switch(config)# interface fastethernet0/5
Switch(config-if)# no mvr type receiver

You can verify your settings by entering the show mvr privileged EXEC command.

Related Commands

Command
Description

mvr

Enables MVR.

mvr immediate

Enables the Immediate-Leave feature on an interface.

mvr vlan group

Configures a receiver port as a member of an MVR group.

show mvr

Displays MVR global parameters or port parameters.


mvr vlan group

Use the mvr vlan group interface configuration command to statically configure a receiver port as a member of a multicast VLAN registration (MVR) group in a particular VLAN. Use the no form of this command to remove the port from the MVR group.

mvr vlan vlan-id group ip-address

no mvr vlan vlan-id group ip-address

Syntax Description

vlan vlan-id

Specify the VLAN ID to which the receiver port belongs. Valid IDs are from 1 to 1005.

group ip-address

Specify the MVR group address for which the interface is statically configured to be a member.


Defaults

A port is configured as neither receiver nor source.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The receiver port belongs to a multicast VLAN.

The group address is configured as a MVR group address.

Examples

This example shows how to configure a static MVR group entry on port 0/1 in VLAN 10:

Switch(config)# interface fastethernet0/1
Switch(config-if)# mvr vlan 10 group 225.1.1.1

This example shows how to remove an entry on port 0/3 in VLAN 10:

Switch(config)# interface fastethernet0/3
Switch(config-if)# no mvr 10 group 255.1.1.2

You can verify your settings by entering the show mvr privileged EXEC command.

Related Commands

Command
Description

mvr

Enables MVR.

mvr immediate

Enables the Immediate-Leave feature on an interface.

mvr type

Configures a port as a receiver or source port.

show mvr

Displays MVR global parameters or port parameters.


pagp learn-method

Use the pagp learn-method interface configuration command to set the source-address learning method of incoming packets received from an EtherChannel port. Use the no form of this command to return to the default setting.

pagp learn-method aggregation-port

no pagp learn-method

Syntax Description

aggregation-port

Specify address learning on the logical port-channel. The switch transmits packets to the source by using any of the interfaces in the EtherChannel. This setting is the default. With aggregate-port learning, it is not important on which physical port the packet arrives.



Note Though visible in the command-line help strings, the physical-port keyword is not supported.


Defaults

The default is aggregation-port (logical port channel).

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The switch supports address learning only on aggregate ports even though the physical-port keyword is provided in the command-line interface (CLI). The pagp learn-method and the pagp port-priority interface configuration commands have no affect on the switch hardware.


Note You should not set the learn method to physical-port because the switch is an aggregate-learning device.


If the link partner to the switch is a physical learner that has the channel-group interface configuration command set to auto or desirable, the switch automatically uses the load-distribution method based on the source MAC address, regardless of the configured load-distribution method.

If the link partner to the switch is a physical learner that has the channel-group interface configuration command set to on, set the load-distribution method based on the source MAC address by using the port-channel load-balance src-mac global configuration command.

Examples

This example shows how to set the learning method to aggregation-port (the default):

Switch(config-if)# pagp learn-method aggregation-port

You can verify your settings by entering the show running-config or show pagp channel-group-number internal privileged EXEC command.

Related Commands

Command
Description

channel-group

Assigns an Ethernet interface to an EtherChannel group.

pagp port-priority

Selects an interface through which all Port Aggregation Protocol (PAgP) traffic through the EtherChannel is sent.

show pagp

Displays PAgP channel-group information.

show running-config

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


pagp port-priority

You do not need to enter this command. It is documented for informational purposes only. Though visible in the command-line help strings, the switch does not support the pagp port-priority command.

Use the pagp port-priority interface configuration command to select an interface through which all Port Aggregation Protocol (PAgP) traffic through the EtherChannel is sent. Use the no form of this command to return to the default value.

pagp port-priority priority

no pagp port-priority

Syntax Description

priority

A priority number ranging from 0 to 255.


Defaults

The default value is 128.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The pagp learn-method and the pagp port-priority interface configuration commands have no affect on the switch hardware.


Note You should not change the port priority because the switch does not support this command.


Related Commands

Command
Description

pagp learn-method

Sets the source-address learning method of incoming packets received from an EtherChannel port.

show pagp

Displays PAgP channel-group information.

show running-config

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


port-channel load-balance

Use the port-channel load-balance global configuration command to set the load distribution method among the ports in the EtherChannel. Use the no form of this command to reset the load distribution to the default.

port-channel load-balance method

no port-channel load-balance

Syntax Description

method

Load distribution method.

These are the method values:

dst-mac—Load distribution using the destination MAC address

src-mac—Load distribution using the source MAC address


Defaults

The default method is src-mac.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

If the link partner to the switch is a physical learner that has the channel-group interface configuration command set to auto or desirable, the switch automatically uses the load-distribution method based on the source MAC address regardless of the configured load-distribution method.

If the link partner to the switch is a physical learner that has the channel-group interface configuration command set to on, set the load-distribution method based on the source MAC address by using the port-channel load-balance src-mac global configuration command.

Examples

This example shows how to set the load-distribution method to dst-mac:

Switch(config)# port-channel load-balance dst-mac

You can verify your settings by entering the show etherchannel privileged EXEC command.

Related Commands

Command
Description

channel-group

Assigns an Ethernet interface to an EtherChannel group.

show etherchannel

Displays EtherChannel information for a channel.

show running-config

Displays the configuration information running on the switch. For syntax information, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS File Management Commands > Configuration File Commands.


rcommand

Use the rcommand user EXEC command to start a Telnet session and to enter commands from the command switch for a member switch. To end the session, enter the exit command.

rcommand {n | commander | mac-address hw-addr}

Syntax Description

n

Provide the number that identifies a cluster member. The range is from 0 to 15.

commander

Provide access to the command switch from a member switch.

mac-address hw-addr

MAC address of the member switch.


Command Modes

User EXEC

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

If the switch is the command switch but the member switch n does not exist, an error message appears. To obtain the switch number, enter the show cluster members privileged EXEC command on the command switch.

You can use this command to access a member switch from the command-switch prompt or to access a command switch from the member-switch prompt.

The Telnet session accesses the member-switch command-line interface (CLI) at the same privilege level as on the command switch. For example, if you enter this command at user level on the cluster command switch, the member switch is accessed at user level. If you use this command on the command switch at privileged level, the command accesses the remote device at privileged level. If you use an intermediate enable-level lower than privileged, access to the member switch is at user level.

This command does not work if the vty lines of the command switch have access-class configurations.

You are not prompted for a password because the member switches inherited the password of the command switch when they joined the cluster.

Examples

This example shows how to start a session with member 3. All subsequent commands are directed to member 3 until you enter the exit command or close the session.

Switch# rcommand 3
Switch-3# show version
Cisco Internet Operating System Software ...
...
Switch-3# exit
Switch#

Related Commandsa

Command
Description

show cluster members

Displays information about the cluster members.


rmon collection stats

Use the rmon collection stats interface configuration command to collect Ethernet group statistics. The Ethernet group statistics include utilization statistics about broadcast and multicast packets and error statistics about Cyclic Redundancy Check (CRC) alignment errors and collisions. Use the no form of this command to return to the default setting.

rmon collection stats index [owner name]

no rmon collection stats index [owner name]

Syntax Description

index

Remote Network Monitoring (RMON) collection control index. The range is 1 to 65535.

owner name

(Optional) Owner of the RMON collection.


Defaults

The RMON statistics collection is disabled.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(13)AY

This command was first introduced.


Usage Guidelines

The RMON statistics collection command is based on hardware counters.

Examples

This example shows how to collect RMON statistics for the owner root on an interface:

Switch(config)# interface fastethernet0/1
Switch(config-if)# rmon collection stats 2 owner root

You can verify your settings by entering the show rmon statistics privileged EXEC command.

Related Commands

Command
Description

show rmon statistics

Displays RMON statistics.

For more information on this command, select Cisco IOS Configuration Fundamentals Command Reference for Release 12.1 > Cisco IOS System Management Commands > RMON Commands.