You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Background

SNMP is a protocol specification which is standardised in the IETF, SNMPv1 does not support 64 bit counters, 64 bit counters were one of the primary drivers behind SNMPv2 and ultimately SNMPv2c.  SNMPv1 was ratified in 1990 with RFC 1155, RFC 1156 and RFC 1157, the MIB definitions were updated in RFC 1213.  SNMPv2c was ratified in 1996, making 2016 is 20th birthday.

Why are 64 bit counters important?

Cisco published a great article on this, SNMP Counters: Frequently Asked Questions.  The RFC 2233 summarises this well:

As the speed of network media increase, the minimum time in which
a 32 bit counter will wrap decreases.  For example, a 10Mbs stream
of back-to-back, full-size packets causes ifInOctets to wrap in
just over 57 minutes; at 100Mbs, the minimum wrap time is 5.7
minutes, and at 1Gbs, the minimum is 34 seconds.  Requiring that
interfaces be polled frequently enough not to miss a counter wrap
is increasingly problematic.

The Problem

Despite this interesting bit of history, some Network Vendors, only support SNMPv1, which isn't a problem, unless you have high speed interfaces, for example 1 gigabit per second, which these vendors to have, funnily enough these same vendors companies have only existed for 10-15 years, so are younger than the standards they should be implementing, yet they implement something which is completely outdated.

So we have NMIS which is Open Source and by the nature of Open Source and of software using IETF protocols and specifications, NMIS is standards based.

Make NMIS work with SNMPv1 using 64 bit counters

How will I know I need to change NMIS?

NMIS will be reporting an error with SNMP, the message is "The Counter64 type is not supported in SNMPv1", this would be seen in the debug output and also in the NMIS Event log.  For example:

19:25:13 checkResult, SNMP ERROR (Ubiquiti-AirFiber1) (1.3.6.1.4.1.41112.1.3.3.1.1) The Counter64 type is not supported in SNMPv1

If you see this you have devices cheating and using an unsupported combination.

What to change

To make NMIS work with non standard combination, you need to modify the SNMP library source code to prevent it from detecting the issue.  NMIS uses the Net::SNMP library and only one file in this library needs to be changed.
Locate Message.pm

 

find /usr/local/ -name Message.pm 

 

Edit Message.pm

 

sub _process_counter64
{
   my ($this, $type) = @_;
   # Verify the SNMP version
   #if ($this->{_version} == SNMP_VERSION_1) {
   #   return $this->_error('The Counter64 type is not supported in SNMPv1');
   #}
   # Decode the length
   return $this->_error() if !defined(my $length = $this->_process_length());
  • No labels