Tag Archives: SNMP

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
+--iso(1)
   |
   +--org(3)
      |
      +--dod(6)
         |
         +--internet(1)
            |
            +--directory(1)
            |
            +--mgmt(2)
            |  |
            |  +--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 ftp://ftp.cisco.com (the file is located in pub/mibs/v2/). Move all the *.my files in the archive in ~/.snmp/mibs directory.

Related Posts

SNMP MIB Browser on Ubuntu Workstation

Updated on June 2, 2013

Ubuntu Linux is arguably the most popular Linux distribution today. Well designed and easy-to-use as a desktop, it is also an excellent choice for any kind of server infrastructure in datacenters. In fact, according to W3Tech, Ubuntu server is right now in the third position and growing fast as a webserver.

In a previous article I looked at installing a basic network router using RCP100 on a Ubuntu 12.04 computer. Today, I will take a look at using Ubuntu for some more serious SNMP work.

The main SNMP software package available under Linux is net-snmp. Installation and usage is described in plenty of articles on Internet. The package is very powerful, however it operates strictly on the command line. In the day-to-day work, a GUI based SNMP MIB Browser would be nice.

One such MIB Browser I’ve started using recently is qtmib. It is an open-source (GPL v2 license) program, that allows you to connect to any SNMP v1 and v2c 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.

qtmib is build as a front end for net-snmp tools, and it requires net-snmp package to be installed:

$ sudo apt-get install snmp

For Ubuntu users, the development team makes available a deb package build for AMD64 architecture. Install it as:

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

You can start it 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

qtmib is still under heavy development. I would say it is pretty stable and well integrated with your desktop environment. As far as I know, this is the only open-source graphical MIB Browser available today.

Related Posts