reset Commands
reset commands are used to clear statistics. These commands help you quickly locate faults.
Overview
reset commands include:
- Commands used for resetting
- Commands used for clearing statistics
This section involves the reset commands clearing statistics.
reset Commands Clearing Packet Statistics
reset counters interface and reset ip statistics are often used to clear packet statistics displayed in the display interface and display ip interface command output.
- The display interface command provides counters to collect statistics on sent and received Layer 2 packets. The reset counters interface command resets these counters.
- The display ip interface command provides counters to collect statistics on sent and received Layer 3 packets. The reset ip statistics command resets these counters.
Using reset Commands
Context
When you use the ping command to test link connectivity, you also need to run the display interface or display ip interface command to check whether packets are correctly sent and received on interfaces and whether a CRC error occurs. Then you can locate the interface where the fault occurs.
The display interface or display ip interface command output shows packet statistics generated after the device starts or the counter is reset; therefore, the packet statistics may contain unnecessary information that interferes with fault location.
To collect packet statistics accurately, perform the following operations:
Procedure
- Run the reset counters interface or reset ip statistics command to clear existing packet statistics.
- Run the ping command to enable router interfaces to send and receive packets.
- Run the display interface or display ip interface command to view the statistics.
Example
For example, after you run the display interface gigabitEthernet 0/0/1 command, the following statistics are displayed:
Input: 736 packets, 344842 bytes Unicast: 0, Multicast: 714 Broadcast: 22, Jumbo: 0 Discard: 0, Total Error: 0 CRC: 0, Giants: 0 Jabbers: 0, Throttles: 0 Runts: 0, Symbols: 0 Ignoreds: 0, Frames: 0 Output: 2911 packets, 514228 bytes Unicast: 0, Multicast: 2910 Broadcast: 1, Jumbo: 0 Discard: 0, Total Error: 0 Collisions: 0, ExcessiveCollisions: 0 Late Collisions: 0, Deferreds: 0
If the value of Total Error is not 0, there is an error in packet sending and receiving.
To check when the error occurs, run the reset counters interface gigabitEthernet 0/0/1 command to clear existing statistics, use the ping command to send ping packets, and run the display interface gigabitEthernet 0/0/1 command to view new statistics. If the Total Error value is still not 0, the error may need to be rectified.