Home > Network Management > Understanding SNMP MIBs and OIDs

Understanding SNMP MIBs and OIDs

July 22nd, 2009

MIB stands for Management Information Base and is a collection of information organised into a hierarchy. These are accessed using a protocol such as SNMP. There are two types of MIBs: scalar and tabular. Scalar objects define a single object instance whereas tabular objects define multiple related object instances grouped in MIB tables.

MIBs are a collection of definitions which define the properties of the managed object within the device to be managed (such as a router, switch, etc.) Each managed device keeps a database of values for each of the definitions written in the MIB. As such, it is not actually database but implementation dependant. Each vendor of SNMP equipment has an exclusive section of the MIB tree structure under their control.


OIDs or Object Identifiers uniquely identify manged objects in a MIB hierarchy. This can be depicted as a tree, the levels of which are assigned by different organisations. Top level MIB object IDs (OIDs) belong to different standard organizations. Vendors define private branches including managed objects for their own products.

Here is a sample structure of an OID:

Iso (1).org(3).dod(6).internet(1).private(4).transition(868).products(2).chassis(4).card(1).slotCps(2)­


Cisco MIBs

download from ftp://ftp.cisco.com/pub/mibs/

Install the mibs required into your mibs directory and edit your snmp.conf file to include those files.

You will now be able to perform a query using one of the MIBs:

snmpget -OvU -c community thedomain.com .ciscoMemoryPoolUsed.1

This query will return the amount of memory used on the router queried. Also if there is a missing dependency, another mib that is referenced, it will tell you what mib is missing.

For example:
On a Cisco 2620 router, these are the mibs required to get cpu and memory values:


Your snmp.conf file has these entries:

mibfile /usr/local/snmp/share/snmp/mibs/CISCO-SMI.mib
mibfile /usr/local/snmp/share/snmp/mibs/CISCO-PROCESS-MIB.mib
mibfile /usr/local/snmp/share/snmp/mibs/CISCO-MEMORY-POOL-MIB.my
Here is the portion of the mib file that deals with the snmp query above.

ciscoMemoryPoolUsed OBJECT-TYPE
SYNTAX Gauge32
UNITS “bytes”
MAX-ACCESS read-only
STATUS current
“Indicates the number of bytes from the memory pool
that are currently in use by applications on the
managed device.”
::= { ciscoMemoryPoolEntry 5 }

As you can see, ciscoMemoryPoolUsed, it gives you the human readable name of the value your looking for and a nice concise definition of the value. It also allows you to just look for “.ciscoMemoryPoolUsed.” rather than . foo foo.[number]

Note that occasionally a number is required to be appended to the OID, which may reference an interface or maybe a processor in a multi-cpu system.

Cisco also has a oid lookup tool if you prefer to just use numerical oid’s.

MIB USEAGE IS NOT MANDATORY – they are intended to make SNMP easier to use.  You can use just the numeric OID in an snmpwalk or snmpget.  Refer to Cisco OID Lookup Tool

Categories: Network Management Tags:
Comments are closed.