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

