MIB

Also known as: Management Information Base

On this page 7

A MIB (Management Information Base) is a formal, hierarchical definition of the managed objects that a network device exposes, such as interface counters, CPU load or routing table entries. In network monitoring, the MIB is the shared vocabulary between an SNMP manager and an SNMP agent: it tells both sides which object identifiers exist, what data type each holds and whether it can be read or written.

A MIB is a specification, not a database file on the device. The agent implements the objects in software and returns live values, while the manager loads MIB modules written in a formal language so that it can translate numeric identifiers into readable names and interpret the values correctly.

How a MIB organizes managed objects

Every object in a MIB is identified by an object identifier (OID), a dotted sequence of integers that marks a path through a global naming tree. For example, 1.3.6.1.2.1.1.3.0 is sysUpTime.0, the time since the device’s management system last restarted.

The tree is administered hierarchically. The branch 1.3.6.1.2.1, called mib-2, holds standard objects defined by the IETF, while 1.3.6.1.4.1, the enterprises branch, gives each vendor a registered private enterprise number for its own objects. This delegation lets thousands of organizations define objects without collisions.

Objects come in two forms. Scalar objects have a single instance, addressed with the suffix .0. Tabular objects sit in conceptual tables such as ifTable, where each row is selected by an index like the interface number, so ifInOctets.3 is the inbound byte counter of interface 3.

The table below shows important branches of the OID tree.

OID prefixNameContents
1.3.6.1.2.1mib-2Standard IETF objects
1.3.6.1.2.1.1systemName, description, uptime, contact
1.3.6.1.2.1.2interfacesOriginal interface table
1.3.6.1.2.1.31ifMIB64-bit counters and interface names
1.3.6.1.4.1enterprisesVendor-specific objects
1.3.6.1.6.3snmpModulesSNMP engine and security objects
Key branches of the OID tree

The SMI language and object definitions

MIB modules are written in the Structure of Management Information (SMI), a restricted subset of ASN.1. The current version, SMIv2, is defined in RFC 2578, while the older SMIv1 survives in legacy vendor modules.

Each OBJECT-TYPE definition states the object’s syntax, its MAX-ACCESS level, its STATUS such as current or deprecated, and a DESCRIPTION that defines its semantics in prose. The description is often the most important part, because it explains units, wrap behavior and edge cases that the type alone cannot express.

The following table lists common SMIv2 data types and how a monitoring system should treat them.

TypeMeaningMonitoring treatment
Counter32Monotonic 32-bit counterCompute rate; handle wrap at 2^32
Counter64Monotonic 64-bit counterCompute rate; required for fast links
Gauge32Value that rises and fallsGraph directly
TimeTicksHundredths of a secondConvert to time units
INTEGER enumerationNamed statesMap numbers to labels
OCTET STRINGText or binary dataDecode per textual convention
Common SMIv2 data types

A frequent pitfall concerns 32-bit counter wrap. On a 10 Gbit/s interface, ifInOctets can wrap in under four seconds at line rate, so pollers must use the 64-bit ifHCInOctets from IF-MIB for any link of 1 Gbit/s or faster.

Standard and vendor MIB modules

MIB modules fall into standard modules published as RFCs and enterprise modules published by vendors. Monitoring platforms such as LibreNMS and PRTG Network Monitor ship large MIB collections and map vendor objects to common metrics.

The table below lists widely used modules and the questions they answer.

ModuleOriginTypical use
SNMPv2-MIBIETFSystem identity and uptime
IF-MIBIETFInterface status, traffic and errors
IP-MIBIETFIP statistics and address tables
HOST-RESOURCES-MIBIETFCPU, memory, storage on servers
ENTITY-MIBIETFPhysical inventory and serial numbers
Vendor enterprise MIBsManufacturersTemperatures, fans, proprietary features
Widely used MIB modules

How managers and agents use the MIB

The SNMP agent on a device implements a subset of MIB objects and answers GET, GETNEXT and GETBULK requests with current values. The manager compiles MIB modules so it can display ifOperStatus rather than a raw numeric OID, validate types and walk tables efficiently.

MIB definitions also describe SNMP trap and notification content through NOTIFICATION-TYPE macros, such as linkDown and linkUp in IF-MIB. Without the matching module loaded, a trap receiver shows only numeric OIDs, which makes alerts hard to read.

  • Load the exact module revisions the device firmware implements.
  • Resolve import dependencies between modules before compiling.
  • Prefer GETBULK with SNMPv2c or SNMPv3 for walking large tables.
  • Grant read-only access unless write operations are truly required.
  • Check sysObjectID to identify the device model and choose the right vendor modules.
  • Track ifCounterDiscontinuityTime to detect counter resets after reboots or line card swaps.

Limitations and common mistakes

The MIB approach is mature but rigid. Agents may implement objects partially or incorrectly, vendor modules can contain syntax errors that break compilers, and polling intervals of one to five minutes hide short bursts that streaming telemetry or flow data would reveal.

Common mistakes include confusing the MIB with the agent’s data, polling deprecated objects, ignoring counter discontinuities after a reboot, and exposing writable objects through weak SNMPv1 community strings. Another error is assuming that an object listed in a module is supported; the agent’s capability statements or a test walk show what the firmware actually returns. Modern networks increasingly complement MIB-based polling with YANG-modeled telemetry, though SNMP and its MIBs remain the most widely supported monitoring interface.

Understanding it simply

A MIB is like a dictionary and a map for a network device. It lists everything a monitoring tool may ask about, such as how much traffic passed through a port or how hot the device is, and it gives each item a precise numbered address.

The device itself keeps the actual numbers. The MIB only explains what each number means and where to find it, so that monitoring software from any vendor can ask the right question and understand the answer.

Applied in practice

A network engineer at a regional hospital adds 60 new access switches to the existing monitoring platform. Traffic graphs for the 10 Gbit/s uplinks show impossible drops to zero several times per hour during busy periods, which makes capacity planning for the imaging department unreliable.

The engineer checks the polled OIDs and finds that the template uses the 32-bit `ifInOctets` counter, which wraps faster than the five-minute polling interval. The template is changed to the 64-bit `ifHCInOctets` and `ifHCOutOctets` objects from IF-MIB.

The engineer also loads the switch vendor’s enterprise MIB module so that temperature and power supply objects appear with readable names. After the change, uplink graphs show accurate utilization near 70 percent at peak, and the team uses the new power supply objects to alert on failed redundant units.