Debian Missing MIBs for SNMP

Published by Torry Crass on

One thing that can sure spam up your e-mail and log files fast is when snmpd is trying to call MIB files that simply don't exist.  I ran into this problem and after digging around on the internet I still had the problem.  The good news is that I believe I have resolved the problem at this point so I thought I would share.

First, this post assumes that you already have a working knowledge of Debian and the following packages installed.  If you dont, this should be your first step:

  • snmpd
  • snmp-mibs-downloder

Please note that the second, snmp-mibs-downloader is not free so in order to install it you need to modify your /etc/apt/sources.list to include non-free packages

So, a typical message that you might see related to this error is as follows:

No log handling enabled - turning on stderr logging
MIB search path:
Cannot find module (IANAifType-MIB): At line 13 in /usr/share/mibs/ietf/IF-MIB
Did not find 'IANAifType' in module #-1 (/usr/share/mibs/ietf/IF-MIB)
Cannot find module (IANA-RTPROTO-MIB): At line 12 in /usr/share/mibs/ietf/IP-FORWARD-MIB
Did not find 'IANAipRouteProtocol' in module #-1 (/usr/share/mibs/ietf/IP-FORWARD-MIB)
Cannot find module (IANAifType-MIB): At line 20 in /usr/share/mibs/ietf/TUNNEL-MIB
Did not find 'IANAtunnelType' in module #-1 (/usr/share/mibs/ietf/TUNNEL-MIB)

While looking online people will tell you to make sure that you have version 1.1 of the snmp-mibs-downloader package.  Versions prior to this will be missing mibs altogether.  So, say that you have all of these things and you're still getting the error messages above.  Well the solution could be simple!

Run the following command (as root of course):


This will download/update any new or missing MIBs and should resolve most, if not all of your problems shown in the error above.

If you continue to receive errors, they might be something like this:

root@servername:~# snmpwalk -Os -c public -v 1 servername system >/dev/null
Bad operator (INTEGER): At line 73 in /usr/share/mibs/ietf/SNMPv2-PDU
Undefined OBJECT-GROUP (diffServMIBMultiFieldClfrGroup): At line 2195 in /usr/share/mibs/ietf/IPSEC-SPD-MIB
Undefined OBJECT-GROUP (diffServMultiFieldClfrNextFree): At line 2157 in /usr/share/mibs/ietf/IPSEC-SPD-MIB
Undefined OBJECT-GROUP (diffServMIBMultiFieldClfrGroup): At line 2062 in /usr/share/mibs/ietf/IPSEC-SPD-MIB
Unlinked OID in IPATM-IPMC-MIB: marsMIB ::= { mib-2 57 }
Undefined identifier: mib-2 near line 18 of /usr/share/mibs/ietf/IPATM-IPMC-MIB
Expected "::=" (RFC5644): At line 493 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Expected "{" (EOF): At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad object identifier: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad parse of OBJECT-IDENTITY: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB

If you do, then the best way that I was able to find to resovle the errors is by removing the following MIB files

rm /usr/share/mibs/ietf/IPSEC-SPD-MIB
rm /usr/share/mibs/ietf/IPSEC-SPD-MIB
rm /usr/share/mibs/ietf/IPATM-IPMC-MIB
rm /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
rm /usr/share/mibs/ietf/SNMPv2-PDU

WARNING: this involves actually removing files, make sure that you do not need this files before you remove them.  There may be instances where this action could break other things!

After we performed this action we were able to run an snmpwalk without any errors.

1 Comment

Yves · April 18, 2013 at 8:50 am

It worked 



Leave a Reply