Q. Why don't SNMP counters return the same number as CLI show commands?
A. An SNMP object defined as a Counter must abide by RFC1155 leaving cisco.com :
This application-wide type represents a non-negative integer which monotonically increases until it reaches a maximum value, when it wraps around and starts increasing again from zero. This memo specifies a maximum value of 2^32-1 (4294967295 decimal) for counters."
There are no methods to reset an SNMP counter to zero short of reloading the device.
The counter output from a CLI show command can be reset on interfaces since the SNMP restrictions are not present.
The original interface counters defined in MIB-2 are 32-bit counters. For a 10 Mbps interface, a 32-bit counter could theoretically wrap in 57 minutes. Avoiding discontinuities is easy with such a long period. But for 100 Mbps, the minimum theoretical wrap time is 5.7 minutes. For 1 Gbps interfaces, it falls to 34 seconds. Granted these times are for transmission of back-to-back full-sized packets, a theoretical ideal. Even so, the higher the interface speed, the harder it becomes to avoid missing a counter wrap. As a solution to this problem, SNMPv2 SMI defined a new object type -- counter64 -- for 64-bit counters. Therefore, there are several new 64-bit counters defined in the extension interface table (ifxTable) defined in RFC 1573 leaving cisco.com (later superceded by
RFC 2233 leaving cisco.com ). These are from the IF-MIB-V1SMI.my.
Although basic support for 64-bit counters was written into Cisco IOS software in version 11.3, starting from Cisco IOS software release 12.0, only ifHCInOctets (.18.104.22.168.22.214.171.124.1.1.6) and ifHCOutOctets (126.96.36.199.188.8.131.52.1.1.10) have been implemented for ATM LANE LEC sub-interfaces only. For Catalyst workgroup switches, 64-bit counter support has been implemented in version 3.1.
Note: You must use SNMPv2c or SNMPv3 protocol to retrieve any counter64 objects.
We are pleased to announce availability of Beta software for 16.6.3. 16.6.3 will be the second rebuild on the 16.6 release train targeted towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are looking for early feedback from custome...