Resetting Counters on Cisco Switches

Clear interface counters on a Cisco switch with clear counters to reset a baseline before troubleshooting. Here is how to use it safely and verify errors.

Resetting Counters on Cisco Switches - PingLabz Fundamentals article title card

Interface counters are how you tell whether a link is clean or quietly dropping frames. But counters are cumulative since the last reset, so a switch that has been up for a year shows a year of accumulated errors - useless for telling whether a problem is happening right now. Clearing the counters gives you a fresh baseline, and watching them climb from zero is one of the fastest ways to catch a bad cable, a duplex mismatch, or a flapping neighbor. This guide shows the reset commands and how to read the result, with real output from a Catalyst switch on IOS XE 17.18.

The Commands

Two forms. Clear every interface, or clear one:

Switch# clear counters
Clear "show interface" counters on all interfaces [confirm]

Switch# clear counters GigabitEthernet1/0/3
Clear "show interface" counters on this interface [confirm]

Both prompt for confirmation; press Enter to proceed. Clearing one interface is the right habit when you are chasing a specific link - you keep the history on everything else.

Reading the Before and After

Here is an interface before the reset. Note the counters and the clearing timestamp:

Switch# show interfaces GigabitEthernet1/0/3
GigabitEthernet1/0/3 is up, line protocol is up (connected)
  Hardware is Gigabit Ethernet, address is 5254.0032.62f8 (bia 5254.0032.62f8)
  Description: RADIUS server RAD1
  MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Last clearing of "show interface" counters never
  Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
     0 packets input, 0 bytes, 0 no buffer
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     497 packets output, 41137 bytes, 0 underruns
     0 output errors, 0 collisions, 2 interface resets

Clear it, then look again:

Switch# clear counters GigabitEthernet1/0/3
Clear "show interface" counters on this interface [confirm]

Switch# show interfaces GigabitEthernet1/0/3 | include line protocol|Last clearing|packets input|packets output|input errors|interface resets
GigabitEthernet1/0/3 is up, line protocol is up (connected)
  Last clearing of "show interface" counters 00:00:36
     0 packets input, 0 bytes, 0 no buffer
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets

Two things changed. The packet, byte, error and interface-reset counters all zeroed out, and Last clearing of "show interface" counters flipped from never to a live timer (00:00:36). That timer is how you know when your baseline started - if someone cleared the counters five minutes ago, a low error count does not mean the link is healthy, it means you have only been watching for five minutes.

Counters and Reloads

A common misconception is that interface counters survive a reboot. They do not. Software interface counters live in memory and are not written to NVRAM, so a reload resets them to zero exactly as clear counters does. After a reboot, Last clearing of "show interface" counters reads never and every count starts from zero - which is why "the errors went away after I rebooted" tells you nothing about whether the underlying fault is fixed. If you need historical error data across reboots, you need external monitoring (SNMP or streaming telemetry into a system that stores it), not the on-box counters.

What to Watch After Clearing

Once you have a fresh baseline, the counters worth watching climb are the error indicators, not the packet totals. Rising input errors or CRC point at a physical problem - bad cable, failing SFP, or a duplex mismatch. Climbing interface resets suggest a link that keeps flapping. Total output drops and output-queue drops indicate congestion, where the interface is receiving more than it can forward. A quick way to scan one interface for just the useful lines:

Switch# show interfaces GigabitEthernet1/0/3 | include errors|CRC|resets|drops

Key Takeaways

  • clear counters resets all interfaces; clear counters <interface> resets one and keeps the rest of your history.
  • After clearing, Last clearing of "show interface" counters shows a live timer - always check it so you know how long your baseline has been running.
  • Counters do not survive a reload; a reboot zeros them just like clear counters, so rebooting never proves a fault is fixed.
  • Watch the error counters (input errors, CRC, interface resets, output drops), not the raw packet totals, for the health signal.

More Cisco admin how-tos: How to Check Your Cisco Switch Warranty.

Read next