Wrapping of High Capacity (HC) Counters – Ethernet and SNMP

ethernetmanagementsnmp

Am I correct that HC SNMP interface counters like ifHCInOctets/ifHCOutOctets or ifHCInUcastPkts/ifHCOutUcastPkts wrap after such a long period that applications using those counters do not need to take this wrapping into account (not including situations where the counters might reset such as a switch reloading).

For example, even if 100GigE interface is fully utilized 24/7, the counter would wrap after 46 years and 9 months:

$ echo "((2^64-1)/(100*10^9/8))/60/60/24/365" | bc -l
46.79539338840576259512
$ 

Best Answer

Need to? Not in a day-to-day sense, but you're going to have some serious unhappy customers if your widget fails to deal with it properly. There are plenty of examples of "shouldn't happen" events programmers ignore that do happen and breaks all kinds of things. (you if you're Tivo, the system crashes/panics/etc.)

(I know, one cannot program for every possibility, but this isn't one of those times. Counter overflows / resets WILL happen; be prepared for it.)