Clearing and Resetting Interfaces and Counters
Table 6: Clear Commands for Interfaces
Purpose
Command
Clears interface counters.
clear counters
[
interface-id
]
Resets the hardware logic on an interface.
clear interface interface-id
Resets the hardware logic on an asynchronous serial
line.
clear line
[
number
|
console 0
|
vty number
]
The
clear counters
privileged EXEC command does not clear counters retrieved by using Simple Network
Management Protocol (SNMP), but only those seen with the
show interface
privileged EXEC command.
Note
Configuration Examples for Interface Characteristics
Adding a Description to an Interface: Example
Switch#
configure terminal
Enter configuration commands, one per line. End with CNTRL/Z.
Switch(config)#
interface gigabitethernet1/0/2
Switch(config-if)#
description Connects to Marketing
Switch(config-if)#
end
Switch#
show interfaces gigabitethernet1/0/2 description
Interface Status
Protocol Description
Gi1/0/2
admin down
down
Connects to Marketing
Configuring a Range of Interfaces: Examples
This example shows how to use the
interface range
global configuration command to set the speed to 100
Mb/s on ports 1 to 4 on switch 1:
Switch#
configure terminal
Switch(config)#
interface range gigabitethernet1/0/1 - 4
Switch(config-if-range)#
speed 100
This example shows how to use a comma to add different interface type strings to the range to enable Gigabit
Ethernet ports 1 to 3 and 10-Gigabit Ethernet ports 1 and 2 to receive flow-control pause frames:
Switch#
configure terminal
Switch(config)#
interface range gigabitethernet1/0/1 - 3 , tengigabitethernet1/0/1 - 2
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
39
Configuration Examples for Interface Characteristics
Summary of Contents for Catalyst 2960 Series
Page 96: ......
Page 196: ......
Page 250: ......
Page 292: ......
Page 488: ......
Page 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Page 590: ......
Page 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Page 620: ......
Page 750: ......
Page 1604: ......
Page 1740: ......
Page 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Page 2106: ......
Page 2118: ......
Page 2164: ......