networking

Kept in this browser · My desk

Stands for: management information base

A management information base: the formal, tree-shaped catalogue of the objects an SNMP agent can report or set, each with a name, a type, an access level and a numeric object identifier.

A MIB is written as ASN.1 modules in the SMI's notation (OBJECT-TYPE, SYNTAX, MAX-ACCESS, STATUS, DESCRIPTION) and hung on a global tree of numbers: standard modules under mib-2 (1.3.6.1.2.1), vendors' own under enterprises (1.3.6.1.4.1). A manager compiles the modules so it can show names instead of numbers; the agent implements some of them. Scalars are read with .0 appended, table cells with the row index. The MIB defines what can be asked; SNMP is how it is asked.

What it is. A management information base is not a database on the device but a set of definitions: for every value a managed device can expose, the MIB states its name, its type on the wire, whether it can be read, written or only sent in notifications, whether the definition is current, and what it means. RFC 1155, by Marshall Rose and Keith McCloghrie in May 1990, laid down the tree under which all of it hangs: the internet node is { iso org(3) dod(6) 1 }, so every SNMP object starts 1.3.6.1, with four initial children, directory, mgmt, experimental and private. Standard MIBs live under mgmt, at 1.3.6.1.2.1 (mib-2); private ones under private.enterprises, 1.3.6.1.4.1, where each organization registered with IANA owns a number. RFC 1155's own example gave a fictional "Flintstones, Inc." the node 1.3.6.1.4.1.42 and its "Fred Router" 1.3.6.1.4.1.42.1.1.

How it is written. Since RFC 2578 (SMIv2, April 1999, Internet Standard 58) every object is an OBJECT-TYPE: SYNTAX gives the type, either a base ASN.1 type or one of SNMP's application types (IpAddress, Counter32, Gauge32 or Unsigned32, TimeTicks, Opaque, Counter64, tagged 0 to 4 and 6 in the application class); MAX-ACCESS is not-accessible, accessible-for-notify, read-only, read-write or read-create; STATUS is current, deprecated or obsolete; and the closing ::= { parent n } places it in the tree. sysDescr, for example, is a read-only DisplayString of up to 255 characters at { system 1 }, which resolves to 1.3.6.1.2.1.1.1 (RFC 3418).

Instances. The OID of an object type names the type, not a value. A scalar has one instance, named by appending 0: sysDescr.0. A column of a table has one instance per row, named by appending the row's index as defined in the INDEX clause: in the Interfaces Group MIB (RFC 2863) ifDescr is { ifEntry 2 } and the description of the interface with ifIndex 5 is 1.3.6.1.2.1.2.2.1.2.5. Walking a table with GetNext therefore visits a column top to bottom before moving to the next column, in lexicographic order of the numbers.

History. The first standard MIB came with SNMPv1 as RFC 1156; RFC 2578 still records both names at the same node, mib from RFC 1156 and mib-2 from RFC 1213. MIB-II, RFC 1213 of March 1991, organized the core into groups that are still the backbone of monitoring: system, interfaces, at, ip, icmp, tcp, udp, egp, transmission and snmp. The MIB-II pieces were later split into separate modules (RFC 3418 for the SNMP group and system, RFC 2863 for interfaces), and hundreds of other modules followed, for bridges, routing protocols, power supplies and almost every feature, plus each vendor's private tree.

In practice. A monitoring system needs the vendor's MIB files to turn 1.3.6.1.4.1.9.x.y into a name; without them it sees numbers. Most operational value comes from a small set: the system group, IF-MIB counters (including the 64-bit ifHCInOctets, required on fast interfaces), entity and sensor MIBs, and a few vendor objects for CPU and memory. The 2002 IAB workshop recorded both sides of the experience: IF-MIB is "implemented on most networking devices", but standard MIBs "often lack writable MIB objects", so configuration through SNMP never took hold and the field moved to NETCONF and YANG for that (RFC 3535).

What goes wrong. Missing or mismatched MIB files make a poller show raw OIDs or misread a type. 32-bit counters wrap on fast links and give nonsense rates unless the poller handles the wrap or uses Counter64. Implementations can be partial or buggy; RFC 3535 quotes operators saying that SNMP access "sometimes crashes systems or returns wrong data". And because a MIB view decides what a user may read, a generous view exposes far more than monitoring needs: the 2017 Cisco SNMP vulnerabilities were reachable through specific MIBs, and the workaround was to exclude them from every view.

Neighbours. The protocol that carries MIB values is SNMP; each name is an object identifier; who may see which part of the tree is decided by VACM views; the modern counterpart for configuration and streaming is a YANG data model, carried by NETCONF or streaming telemetry.

Also known as: management information base, mib module, mib-2, mib-ii

← Back to M Back to the glossary