Table of Contents

Switch clear Commands

Switch clear Commands

This chapter describes the clear commands used in the Catalyst 5000 series switch command-line interface (CLI). For a summary of the available switch CLI commands, refer to the "Switch Command Quick Reference" chapter. For more information about using the switch CLI, refer to the "Switch Command-Line Interface" chapter.

Other commands are described elsewhere in this publication:

Switch CLI:

ATM module CLI:

clear alias

Use the clear alias privileged command to clear the shorthand versions of commands.

clear alias {name | all}
Syntax Description
name Identifies the alternate identifier of the command.
all Identifies every alternate identifier previously created.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to erase the alias called arpdel:

Console> (enable) clear alias arpdel
Command alias deleted.
Console> (enable) clear alias all
Command alias table cleared. (1)
Console> (enable)

The (1) indicates the number of command aliases cleared.

Related Commands

set alias
show alias

clear arp

Use the clear arp privileged command to delete a specific entry or all entries from the Address Resolution Protocol (ARP) table.

clear arp {ip_address | all}
Syntax Description
ip_address Specific IP address in the ARP table to be cleared. An IP alias or host name that can be resolved through the Domain Name System (DNS) can be specified instead of an IP address.
all Keyword that specifies every IP address in the ARP table.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to remove IP address 198.133.219.209 from the ARP table and how to remove all entries from the ARP table:

Console> (enable) clear arp 198.133.219.209
ARP entry deleted.
Console> (enable) clear arp all
ARP table cleared. (1)
Console> (enable)

The (1) indicates the number of entries cleared.

Related Commands

set arp
show arp

clear banner motd

Use the clear banner motd privileged command to clear the message of the day banner.

clear banner motd
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to clear the message of the day banner:

Console> (enable) clear banner motd
MOTD banner cleared
Console> (enable)
Related Command

set banner motd

clear cam

Use the clear cam privileged command to delete a specific entry or all entries from the Media Access Control (MAC) Address Resolution Protocol (ARP) table (called the content-addressable memory [CAM] table in this command).

clear cam {mac_addr | dynamic | static | permanent} [vlan]
Syntax Description
mac_addr Identifies one or more MAC addresses.
dynamic Clears the dynamic CAM entries from the CAM table.
static Clears the static CAM entries from the CAM table.
permanent Clears the permanent CAM entries from the CAM table.
vlan Identifies the number of the VLAN.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Examples

The following example shows how to remove MAC address 00-40-0b-a0-03-fa from the CAM table:

Console> (enable) clear cam 00-40-0b-a0-03-fa
CAM table entry cleared.

The following example shows how to clear dynamic entries from the CAM table:

Console> (enable) clear cam dynamic
Dynamic CAM entries cleared.
Console> (enable) 
Related Commands

set cam
show cam

clear cgmp statistics

Use the clear cgmp statistics privileged command to clear Cisco Group Management Protocol (CGMP) statistical information.

clear cgmp statistics
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to clear CGMP statistical information:

Console> (enable) clear cgmp statistics
CGMP statistics cleared.
Console> (enable) 
Related Command

show cgmp statistics

clear config

Use the clear config privileged command to clear the system or module configuration information stored in nonvolatile RAM (NVRAM).

clear config {mod_num | rmon | all}
Syntax Description
mod_num Number of the module.
rmon Keyword that clears all RMON configurations, including the historyControlTable, the alarmTable, the eventTable, and the ringStation ControlTable.
all Keyword that specifies all modules and system information, including the IP address.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

When using a Route Switch Module (RSM), clear config clears the portion of the RSM configuration kept by the Catalyst 5000 series switch supervisor engine. The portion of the configuration kept by the RSM must be cleared at the router level (router> prompt).

Examples

The following example shows how to delete the configuration information stored in NVRAM on module 2:

Console> (enable) clear config 2
This command will clear module 2 configuration.
Do you want to continue (y/n) [n]? y
..............................
Module 2 configuration cleared.
Console> (enable)

The following example shows how to delete the configuration information stored in NVRAM on module 1 (the supervisor module):

Console> (enable) clear config 1
This command will clear module 1 configuration.
Do you want to continue (y/n) [n]? y
......
Module 1 configuration cleared.
host%

The following example shows how to delete the configuration information for the entire Catalyst 5000 series switch:

Console> (enable) clear config all
This command will clear all configuration in NVRAM.
Do you want to continue (y/n) [n]? y
...........................................
Connection closed by foreign host
host%
Related Commands

configure
show config

clear counters

Use the clear counters privileged command to clear MAC and port counters.

clear counters
Syntax Description

This command has no keywords or arguments.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

This command does not clear counters for the ATM module.

Example

The following example shows how to reset MAC and port counters to zero:

Console> (enable) clear counters
MAC and Port counters cleared.
Console> (enable)
Related Commands

clear help
show mac
show port

clear help

Use the clear help privileged command to list the clear commands with brief descriptions of their functions.

clear help
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to list all of the clear commands in privileged command mode:

Console> (enable) clear help
Clear commands:
----------------------------------------------------------------------
clear alias         Clear aliases of commands
clear arp           Clear ARP table entries
clear banner        Clear Message Of The Day banner
clear cam           Clear CAM table entries
clear cgmp          Clear CGMP statistics
clear config        Clear configuration and reset system
clear counters      Clear MAC and Port counters
clear help          Show this message
clear ip            Clear IP, use 'clear ip help' for more info
clear log           Clear log information
clear logging       Clear system logging information
clear multicast     Clear multicast router port
clear ntp           Clear NTP servers and timezone
clear port          Clear port broadcast suppression
clear snmp          Clear SNMP trap receiver address
clear spantree      Clear spantree port vlan priority
clear tacacs        Clear TACACS server host/key
clear timezone      Clear timezone
clear trunk         Clear trunk ports
clear vlan          Clear a VLAN
clear vmps          Clear VMPS information
clear vtp           Clear VTP statistics
Console> (enable)
Related Command

set help

clear ip alias

Use the clear ip alias privileged command to clear IP aliases set using the set ip alias command.

clear ip alias {name | all}
Syntax Description
name Identifies a specific alias for an IP address to delete.
all Specifies that all previously set aliases of IP addresses be deleted.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to delete a previously defined IP alias named babar:

Console> (enable) clear ip alias babar
IP alias deleted.
Console> (enable)
Related Commands

set ip alias
show ip alias

clear ip dns domain

Use the clear ip dns domain privileged command to clear the default DNS domain name.

clear ip dns domain
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following examples show how to clear the default DNS domain name:

Console> (enable) clear ip dns domain
Default DNS domain name cleared.
Console> (enable)
Related Commands

set ip dns domain
show ip dns

clear ip dns server

Use the clear ip dns server privileged command to remove a DNS server from the DNS server listing.

clear ip dns server {ip_addr | all}
Syntax Description
ip_addr IP address of the DNS server you want to remove. An IP alias or a host name that can be resolved through DNS can also be used.
all Keyword that specifies all the IP addresses in the DNS server listing.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to remove the DNS server at IP address 198.92.30.32 from the DNS server listing:

Console> (enable) clear ip dns server 198.92.30.32
198.92.30.32 cleared from DNS table.
Console> (enable)
Related Commands

set ip dns server
show ip dns

clear ip permit

Use the clear ip permit privileged command to remove entries from the IP permit list.

clear ip permit {ip_address | all} [mask]
Syntax Description
ip_address IP address to be cleared. An IP alias or a host name that can be resolved through DNS can also be used.
all Keyword that specifies all entries in the IP permit list.
mask (Optional) Specifies the subnet mask of the specified IP address.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guidelines

This command removes a specified IP address and mask, or all IP addresses and masks from the permit list.

The clear ip permit all command clears the permit list, but does not change the state of the IP permit feature. A warning is displayed if all IP addresses are cleared from the permit list and the feature is enabled. If a mask other than the default (255.255.255.255) has been configured, you must provide both the address and mask to clear a specific entry.

Example

The following example shows the usage of the clear ip permit command:

Console> (enable) clear ip permit 172.100.101.102
172.100.101.102 cleared from IP permit list.
Console> (enable) clear ip permit 172.160.128.0 255.255.192.0
172.160.128.0 with mask 255.255.192.0 cleared from IP permit list.
Console> (enable) clear ip permit all
IP permit list cleared.
WARNING!! IP permit list is still enabled.
Console> (enable)
Related Commands

set ip permit
show ip permit
show snmp

clear ip route

Use the clear ip route privileged command to delete IP routing table entries.

clear ip route {destination gateway | all}
Syntax Description
destination IP address of the host or network. An IP alias or a host name that can be resolved through DNS can also be used.
gateway IP address or alias of the gateway router.
all Keyword that specifies every entry in the IP routing table.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to delete the route table entries using the clear ip route command:

Console> (enable) clear ip route 134.12.3.0 elvis
Route deleted.
Console> (enable) clear ip route all
All routes deleted.
Console> (enable)
Related Commands

set ip route
show ip route

clear log

Use the clear log privileged command to delete system error log entries.

clear log [mod_num]
Syntax Description
mod_num (Optional) Specifies the number of the specific module for which you want to erase the system error log.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

If you do not specify a module number, the system error log for the entire system is erased.

Example

The following example shows how to clear the system error log:

Console> (enable) clear log
System error log cleared.
Console> (enable) 
Related Command

show log

clear logging buffer

Use the clear logging buffer privileged command to clear the system logging buffer.

clear logging buffer
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to clear the system logging buffer:

Console <enable> clear logging buffer
System logging buffer cleared.
Console> (enable)
Related Command

show logging buffer

clear logging server

Use the clear logging server privileged command to delete a syslog server from the system log server table.

clear logging server ip_addr
Syntax Description
ip_addr IP address of the syslog server to be deleted.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to delete a syslog server from the configuration:

Console <enable> clear logging server 171.69.192.207
System log server 171.69.192.207 removed from system log server table.
Console> (enable) 
Related Commands

set logging server
show logging

clear multicast router

Use the clear multicast router privileged command to clear multicast router ports from the multicast router port list.

clear multicast router {mod_num/port_num | all}
Syntax Description
mod _num Number of the module.
port_num Number of the port on the module.
all Keyword that specifies all multicast router ports.
Default

The default configuration has no multicast router ports configured.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to clear multicast router port 1 on module 3:

Console> (enable) clear multicast router 3/1
Port 3/1 cleared from multicast router port list.
Console> (enable)
Related Commands

set multicast router
show multicast router

clear ntp server

Use the clear ntp server privileged command to remove one or more servers from the Network Time Protocol (NTP) server table.

clear ntp server {ip_addr | all}
Syntax Description
ip_addr IP address of the server to remove from the server table.
all Keyword that specifies all server addresses in the server table.
Default

The default configuration has no NTP servers configured.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to use the clear ntp server command to remove NTP servers from the server table:

Console> (enable) clear ntp server 172.20.22.191
NTP server 172.20.22.191 removed.
Console> (enable) clear ntp server all
All NTP servers cleared.
Console> (enable)
Related Commands

set ntp server
show ntp

clear port broadcast

Use the clear port broadcast privileged command to disable broadcast/multicast suppression on one or more ports.

clear port broadcast mod_num/port_num
Syntax Description
mod_num Number of the module.
port_num Number of the port on the module.
Default

The default configuration has broadcast/multicast suppression cleared (that is, unlimited broadcast/multicast traffic allowed).

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to disable broadcast/multicast suppression:

Console> (enable) clear port broadcast 2/1
Broadcast traffic unlimited on ports 2/1.
Console> (enable)
Related Commands

set port broadcast
show port

clear snmp trap

Use the clear snmp trap privileged command to clear an entry from the Simple Network Management Protocol (SNMP) trap receiver table.

clear snmp trap {rcvr_address | all}
Syntax Description
rcvr_address IP address or IP alias of the trap receiver (the SNMP management station) to clear.
all Keyword that specifies every entry in the SNMP trap receiver table.
Default

The default configuration has no entries in the SNMP trap receiver table.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to clear an entry from the SNMP trap receiver table:

Console> (enable) clear snmp trap 192.122.173.82
SNMP trap receiver deleted.
Console> (enable)
Related Commands

set snmp trap
show snmp
test snmp trap

clear spantree portvlanpri

Use the clear spantree portvlanpri privileged command to reset the spanning-tree port VLAN priority.

clear spantree portvlanpri mod_num/port_num vlans
Syntax Description
mod_num Number of the module.
port_num Number of the port on the module.
vlans One or more VLANs.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to reset the spanning-tree port VLAN priority:

Console> (enable) clear spantree portvlanpri 1/2 23-40
Port 1/2 vlans 3,6-20,23-1000 using portpri 32
Port 1/2 vlans 1-2,4-5,21-22 using portpri 30
Related Commands

set spantree portvlanpri
show spantree

clear tacacs key

Use the clear tacacs key privileged command to remove the key setting used for Terminal Access Controller Access Control System Plus (TACACS+) authentication and encryption.

clear tacacs key
Syntax Description

This command has no arguments or keywords.

Default

This default key value is null.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to clear the key setting used for authentication and encryption:

Console> (enable) clear tacacs key
TACACS server key cleared.
Console> (enable) 
Related Commands

set tacacs key
show tacacs

clear tacacs server

Use the clear tacacs server privileged command to remove a host from the list of TACACS+ servers.

clear tacacs server ip_addr
Syntax Description
ip_addr IP address of the server to be removed from the list of TACACS+ servers.
Default

There is no default setting for this command.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to remove a server from the list of TACACS+ servers:

Console> (enable) clear tacacs server 170.1.2.20
170.1.2.20 cleared from TACACS table
Console> (enable)
Related Commands

set tacacs server
show tacacs

clear timezone

Use the clear timezone privileged command to return the time zone to its default, Coordinated Universal Time (UTC).

clear timezone
Syntax Description

This command has no arguments or keywords.

Default

By default, the time zone is set to UTC.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

The clear timezone command only functions when NTP is running. If you set the time manually and NTP is disengaged, the clear timezone command has no effect.

Example

The following example shows how to clear the time zone:

Console> (enable) clear timezone
Timezone name and offset cleared.
Console> (enable)
Related Command

set timezone

clear trunk

Use the clear trunk privileged command to reset trunk ports to bridge ports or to clear partial information in the trunk table.

clear trunk mod_num/port_num [vlans]
Syntax Description
mod_num Number of the module.
port_num Number of the port on the module.
vlans (Optional) One or more VLANs.
Default

If VLANs are specified, they are removed from the list of allowed VLANs on the trunk. If you do not specify a VLAN range, the mode is set to auto for Dynamic Interswitch Link (DISL) trunk ports and off for other trunk ports. Refer to the set trunk command for more information about auto and off modes.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

If VLANs are specified, only the specified VLANs are cleared from the trunk port table. Default VLANs cannot be cleared on the trunk.

Example

The following example shows how to clear the trunk for module 1, port 2:

Console> (enable) clear trunk 1/2 2-4
Vlan(s) 2-4 cleared from port 1/2.
Console> (enable) clear trunk 1/2
Port 1/2 mode set to auto.
Console> (enable)
Related Commands

set trunk
show trunk

clear vlan

Use the clear vlan privileged command to delete an existing VLAN from a management domain.

clear vlan vlan_num
Syntax Description
vlan_num Number of the VLAN (range is 2 to 1000).
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

When a VLAN is cleared, all ports assigned to that VLAN become inactive. However, the VLAN assignments of the ports are retained until the ports are moved to another VLAN. If the cleared VLAN is reactivated, all ports still configured on that VLAN are also reactivated.

Example

The following example shows how to clear an existing VLAN from a management domain:

Console> (enable) clear vlan 4
This command will de-activate all ports on vlan 4
in the entire management domain
Do you want to continue(y/n) [n]? y
VTP: VLAN 4 deletion successful
Related Commands

set vlan
show vlan

clear vmps server

Use the clear vmps server privileged command to delete a VLAN Membership Policy Server (VMPS) server from the VMPS table.

clear vmps server ip_addr
Syntax Description
ip_addr IP address of the VMPS server to be deleted.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to clear a VMPS server from the VMPS table:

Console> (enable) clear vmps server 172.0.0.1
VMPS domain server 172.0.0.1 cleared from VMPS table.
Console> (enable) clear vmps server 182.0.0.1
VMPS domain server 182.0.0.1 not in VMPS table.
Related Commands

reconfirm vmps
set vmps server
show vmps server

clear vmps statistics

Use the clear vmps statistics privileged command to delete existing VMPS statistics.

clear vmps statistics
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to delete existing VMPS statistics:

Console> (enable) clear vmps statistics
Console> (enable)
Related Command

show vmps

clear vtp pruneeligible

Use the clear vtp pruneeligible privileged command to turn off the VLAN's pruning eligibility.

clear vtp pruneeligible vlan_num
Syntax Description
vlan_num VLANs for which to turn off pruning eligibility.
Default

The pruning function is disabled by default.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to turn off pruning eligibility for a number of VLANs:

Console> (enable) clear vtp pruneeligible 2,3,6-8,100-200
Vlans 1-3,6-8,100-200 will not be pruned on this device.
Console> (enable)
Related Commands

set vtp
set vtp pruneeligible

clear vtp statistics

Use the clear vtp statistics privileged command to delete the VLAN Trunk Protocol (VTP) statistics.

clear vtp statistics
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to clear the VTP statistics:

Console> (enable) clear vtp statistics
vtp statistics cleared.
Console> (enable)
Related Commands

set vtp
show vtp domain
show vtp help


Copyright 1989-1997 © Cisco Systems Inc.