Installing net-snmp MIBs on Ubuntu and Debian

Simple Network Management Protocol (SNMP) is an Internet-standard protocol for managing devices on IP networks. net-snmp is the main SNMP implementation for Linux and BSD platforms. On Ubuntu or Debian net-snmp tools are installed as follows:

$ sudo apt-get install snmp

You can also install snmpd package. This package contains the SNMP agent.

Installing MIBs

For licensing reasons, net-snmp package installs only a small number of MIBs in /usr/share/mibs directory. A large number of standard MIBs can be installed using snmp-mibs-downloader package:

$ sudo apt-get install snmp-mibs-downloader
$ sudo download-mibs

To have the new MIBs recognized by net-snmp, edit /etc/snmp/snmp.conf file as follows:

$ cat /etc/snmp/snmp.conf
mibs +ALL

You can use snmptranslate to check the MIBs have been properly installed by printing the MIB tree:

$ snmptranslate -Tp
            |  |
            |  +--mib-2(1)
            |     |
            |     +--system(1)
            |     |  |
            |     |  +-- -R-- String    sysDescr(1)
            |     |  |        Textual Convention: DisplayString
            |     |  |        Size: 0..255

Adding additional MIBs

To install additional MIBs you would need to create first a local ~/.snmp/mibs directory:

$ cd ~
$ mkdir -p .snmp/mibs

Drop any additional MIB files you might have in this directory. To install CISCO MIBs, download v2.tar.gz file from (the file is located in pub/mibs/v2/), and move all the *.my files in the archive in ~/.snmp/mibs directory.

Installing a MIB browser

qtmib is a MIB browser program, that allows you to connect to any SNMP-enabled device and browse the MIBs. The graphical user interface is build using QT4 library. The program comes with a large number of MIBs pre-installed, anything from Cisco’s and Juniper’s to HP’s and Dell’s. You can also install your own MIBs by copying them into ~/.config/qtmib/mibs directory.

For Ubuntu users, the development team makes available a deb package. Download and install it as:

$ sudo dpkg -i qmib_X.Y.Z_1_amd64.ubuntu.deb

Start the program from the command line as qtmib or from your desktop environment menus. Once started, go into File/Preferences and configure the IP address and community string. Retrieve the data from your device, and click Translate to translate the OIDs in the result window.

qtmib MIB Browser

qtmib MIB Browser

Related Posts

15 thoughts on “Installing net-snmp MIBs on Ubuntu and Debian

  1. Pingback: Installing net-snmp MIBs on Ubuntu and Debian | Hallow Demon

  2. Pingback: Links 3/12/2013: Applications and Instructionals | Techrights

  3. Vinicius

    I’ve just like to add those two links that complement your post. The first one is about using download-mibs to fetch Cisco Mibs automatically. The second one is about fixing some errors with mibs that have issues on Ubuntu/Debian. With your post and the other two I was able to fix my environment.

    Thank you for your post. It was the starting point of the solution.

  4. Pingback: Interface Web Ftp Ubuntu | Technology Documents

  5. Pingback: How To Install Nagios Core 4.1.1 in Debian Jessie Part 3 – La Plata Linux Blog

  6. Pingback: Debian How To Install Snmp | Teethzo3

  7. Pingback: Create Zabbix Host Items from MIB – LUKKY.US

  8. Pingback: | オールトの雲

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s