The RFC MIB defines a basic dictionary of terms that vendors use to write their own equipment-specific MIBs. So a vendor-created MIB doesn't have to define the entire OID tree. The vendor's MIB file only has to define the unique OIDs that describe the vendor's equipment.

At the beginning of every MIB file is an IMPORTS line that calls out the terms used in the MIB and the RFC MIB that defines those terms.

Let's take another look at the very beginning of the DPS Telecom MIB:


From this IMPORTS line we can read that the DPS MIB is written using three terms defined in other MIBs - DisplayString, OBJECT-TYPE and enterprises - and these terms are defined in the RFC MIBs listed.

All MIB files are written as extensions of the master RFCs. For this reason, you'll sometimes hear people say that there's only one MIB for all SNMP devices, and that individual MIB files are merely subsections of the unified Management Information Base.

That may be true in theory, but in real life, you only need to worry about the equipment you use, the MIBs that support your equipment, and the RFCs that support those MIBs.

How to avoid the most common cause of compile errors

Your SNMP manager can't compile your MIB files correctly unless it also compiles the RFC MIBs that your MIB files refer to. For example, to compile the DPS Telecom MIB, you need to compile RFC1213-MIB, RFC 1212 and RFC1155-SMI. Compile errors are often caused by missing RFC MIBs.
RFC MIBs are publicly available on the Internet, or your vendor can supply the RFC MIBs you need.

So I'm reading the MIB. What information am I looking for?

You don't need to carefully read over every last line of the MIB file. For your purposes, you're only looking for particular items that will tell you what elements of the device you can monitor and control.

A well-written MIB will be divided into sections. Sections will be identified by comment lines. (In MIB notation, comments lines are identified by two hyphens.) So if you find a line that reads something like:

-- TRAP definitions

You know you've found what you're looking for.

There are also text labels that identify the MIB objects you're interested in. For example, in SNMP v1 MIBs, Traps are identified by the text label "TRAP-TYPE." If you know the text labels for the kinds of objects you're looking for, you can scan the MIB in a series of Ctrl-F searches.