next up previous contents
Next: The Net-SNMP CLI Up: MIBs & OIDs Previous: MIB-II   Contents

Adding MIBs to Net-SNMP

Additional MIBs can be added to your Net-SNMP installation by simply copying them into the $(PREFIX)/share/snmp/mibs directory. MIBs should be (re)named to follow the convention (MIB_NAME).txt for clarity. You can find the MIBs proper name on the first uncommented line of the MIB (eg: Name-MIB DEFINITIONS ::= BEGIN).

For example, if you downloaded MIB for the JetDirect Management Card found on HP LaserJet printers it might have been named something like "hp-jetdirect.mib". The header of the MIB looks like the following:

-- (C)  COPYRIGHT HEWLETT-PACKARD COMPANY 1997.
-- LaserJet 5Si Printer Model Specific MIB.
--
LaserJet5Si-MIB DEFINITIONS ::= BEGIN

This MIB should be renamed to "LaserJet5Si-MIB.txt" and copied into the Net-SNMP mibs/ directory.

By following this convention it assures greater clarity when utilizing the various MIBs and a consistency with all other installed MIBs.

MIBs can be specified by a command line tool using the -m argument or the MIBS environmental variable for libsnmp applications including the PERL module. MIBs can be referenced locally by supplying a proper path (ie: -m "./MY_MIB.txt") or globally by supplying the MIB name without the .txt suffix (ie: -m "MY_MIB") if it's located in the Net-SNMP MIBs directory.


next up previous contents
Next: The Net-SNMP CLI Up: MIBs & OIDs Previous: MIB-II   Contents
2004-11-23