Clear
Use these M4500 CLI commands to clear ARP entries, logs, configuration, passwords, counters, VLANs, IGMP snooping, 802.1X history, RADIUS statistics, and port security entries.
clear arp
This command is used to remove all dynamic ARP entries from the ARP cache.
| Default | None |
| Format | clear arp |
| Mode | Privileged Exec |
clear traplog
This command clears the trap log.
| Default | None |
| Format | clear traplog |
| Mode | Privileged Exec |
clear eventlog
This command is used to clear the event log, which contains error messages from the system.
| Default | None |
| Format | clear eventlog |
| Mode | Privileged Exec |
clear logging buffered
This command is used to clear the message log maintained by the switch. The message log contains system trace information.
| Default | None |
| Format | clear logging buffered |
| Mode | Privileged Exec |
clear config
This command resets the configuration to the factory defaults without powering off the switch. You are prompted to confirm if the IP settings of service port would be kept and if the reset should proceed.
| Default | None |
| Format | clear config |
| Mode | Privileged Exec |
clear pass
This command resets all user passwords to the factory defaults without powering off the switch. You are prompted to confirm that the password reset should proceed.
| Default | None |
| Format | clear pass |
| Mode | Privileged Exec |
clear counters
This command clears the statistics for a specified slot/port, for all the ports, for BHD counter, for loop-detection information, or for an interface on an assigned VLAN based or port channel ID.
| Default | None |
| Format | clear counters [<slot/port> | bhd | port-channel <portchannel-id> | loop-detection | vlan <vlan-id> | all [vrf <vrf-name>]] |
| Mode | Privileged Exec |
clear vlan
This command resets VLAN configuration parameters to the factory defaults.
| Default | None |
| Format | clear vlan |
| Mode | Privileged Exec |
clear igmp snooping
This command clears IGMP snooping entries from the MFDB table.
| Default | None |
| Format | clear igmp snooping |
| Mode | Privileged Exec |
clear ip filter
This command is used to clear all IP filter entries.
| Default | None |
| Format | clear ip filter |
| Mode | Privileged Exec |
clear dot1x authentication-history
This command is used to clear 802.1x authentication history table.
| Default | None |
| Format | clear dot1x authentication-history [<slot/port>] |
| Mode | Privileged Exec |
clear radius statistics
This command is used to clear all RADIUS statistics.
| Default | None |
| Format | clear radius statistics |
| Mode | Privileged Exec |
clear host
This command is used to delete entries from the host name-to-address cache, and it clears the entries from the DNS cache maintained by the software.
The parameter “hostname” means to deletes the cached entry which matches assigned hostname.
| Default | None |
| Format | clear host <all | hostname > |
| Mode | Privileged Exec |
clear port-security dynamic
This command is used to clear an entry of dynamic MAC address in the port security table.
| Default | None |
| Format | clear port-security dynamic [interface {<slot/port> | port-channel <1-64>} | mac-address <mac-address> ] [vlan <1-4093>] |
| Mode | Privileged Exec |
clear ip arp-cache
This command is used to remove dynamic ARP entries which belong to assigned parameter type from ARP cache.
The parameter “gateway” means to clear the dynamic and gateway entries from the ARP cache.
| Default | None |
| Format | clear ip arp-cache [gateway | interface {<slot/port> | vlan <vlan-id>} | vrf <vrf-name> [gateway]] |
| Mode | Privileged Exec |
clear lldp statistics
This command is used to reset LLDP (Link Layer Discovery Protocol) statistics.
| Default | None |
| Format | clear lldp statistics |
| Mode | Privileged Exec |
clear lldp remote-data
This command is used to delete all information from the LLDP (Link Layer Discovery Protocol) remote data table, including MED-related information.
| Default | None |
| Format | clear lldp remote-data |
| Mode | Privileged Exec |
clear ipv6 neighbors
This command is used to clear all entries in IPv6 neighbor table or an entry on a specific interface. Use the <slot/port> parameter to specify the interface.
| Default | None |
| Format | clear ipv6 neighbors [<slot/port> | address <ipv6-address> | vlan <1-4093>] |
| Mode | Privileged Exec |
clear ipv6 statistics
This command is used to clear IPv6 statistics for all interfaces or for a specific interface, including loopback and tunnel interfaces. IPv6 statistics display in the output of the show ipv6 traffic command. If you do not specify an interface, the counters for all IPv6 traffic statistics are reset to zero.
| Default | None |
| Format | clear ipv6 statistics [<slot/port> | loopback <0-63> | tunnel <0-7> | vlan <1-4093>] |
| Mode | Privileged Exec |
clear ipv6 dhcp statistics
This command is used to clear DHCPv6 statistics for all interfaces.
| Default | None |
| Format | clear ipv6 dhcp statistics |
| Mode | Privileged Exec |
clear ipv6 dhcp statistics per interface
This command is used to clear DHCPv6 statistics for a specific interface.
| Default | None |
| Format | clear ipv6 dhcp interface {<slot/port> | vlan <1-4093>} statistics |
| Mode | Privileged Exec |
enable password
This command changes the password that is used to confirm that the user mode can be upgraded to Privileged EXEC mode. You can configure the format of the password in two ways:
- Type the passwd keyword to configure the key in plain text. The text that you type is displayed in asterisk characters. The <password> argument must be in alphanumeric characters with a maximum length of 64 characters.
- Type the passwd 7 keywords to configure the key in encrypted form. The <password> argument must be in hexadecimal digits with a length of 128 characters.
| Default | None |
| Format | [no] enable passwd [7 <password>] |
| Mode | Global Config |
In the following examples, the first example sets the password to “testPassword” in plain text. The second example sets the password to an encrypted string that is fixed at 128 hexadecimal digits.
(M4500-32C) (Config)# enable passwd
Enter new password: ************
Confirm new password: ************
Password Changed!
(M4500-32C) (Config)#
(M4500-32C) (Config)# enable passwd 7
0fdd841c8a524979e5ba47893efcf48b12a08619953e1b6e42cde0931198ca717cb5ff8b4979
5a3497e283990827c5ba1ce32855ced76a505726dfb1ee222c4b
clear cpu-traffic counters
This command clears the CPU traffic counters on all interfaces.
| Default | None |
| Format | clear cpu-traffic counters |
| Mode | Privileged Exec |
Example:
(M4500-32C) #clear cpu-traffic counters
clear cpu-traffic traces
This command clears the CPU traffic traces on all interfaces.
| Default | None |
| Format | clear cpu-traffic traces |
| Mode | Privileged Exec |
Example:
(M4500-32C) #clear cpu-traffic traces
clear default interface
This command sets interface configurations to default.
| Default | None |
| Format | clear default interface {<slot/port> | loopback <0-63> | port-channel <1-64> | vlan <1-4093>} |
| Mode | Privileged Exec |
| Parameter | Description |
|---|---|
| <slot/port> | Enter an interface in slot/port format. |
| loopback | Configuration of Loopback Interface. |
| port-channel | Enter specific port-channel ID. |
| vlan | Configuration of VLAN Interface. |
clear network ipv6 dhcp statistics
This command clears IPv6 DHCP statistics.
| Default | None |
| Format | clear network ipv6 dhcp statistics |
| Mode | Privileged Exec |