To use SNMP effectively, an administrator must become acquainted with the SNMP Management Information Base (MIB), which defines all the values that SNMP is capable of reading or setting.
The SNMP MIB is arranged in a tree-structured fashion, similar in many ways to a disk directory structure of files. The top-level SNMP branch begins with the ISO
internet directory, which contains four main branches:
- The mgmt SNMP branch contains the standard SNMP objects usually supported (at least in part) by all network devices.
- The private SNMP branch contains those extended SNMP objects defined by network equipment vendors
- The experimental and directory SNMP branches, also defined within the internet root directory, are usually devoid of any meaningful data or objects.
The tree structure is an integral part of the SNMP standard. However, the most pertinent parts of the tree are the
leaf objects of the tree that provide actual management data about the device. Generally, SNMP leaf objects can be partitioned into two similar but slightly different types that reflect the organization of the tree structure:
- Discrete MIB Objects
- Discrete SNMP objects contain one piece of management data. The operator has to know only the name of the object and no other information. Discrete objects often represent summary values for a device, particularly useful for scanning information from the network for the purposes of comparing network device performance. These objects are often distinguished from Table objects by adding a '.0' (dot-zero) extension to their names. (If the '.0' extension is omitted from a leaf SNMP object name, it is always implied.)
- Table MIB Objects
- Table SNMP objects contain multiple pieces of management data; they allow parallel arrays of information to be supported. These objects are distinguished from Discrete objects by requiring a '.' (dot) extension to their names that distinguishes the particular value being referenced.
By convention, SNMP objects are always grouped in an Entry directory, within an object with a Table suffix. (The ifDescr object described above resides in the ifEntry directory contained in the ifTable directory.) Several constraints are placed on SNMP objects as follows:
- Each object in the Entry directory of a table must contain the same number of elements as other objects in the same Entry directory, where instance numbers of all entries are the same. Table objects are always regarded as parallel arrays of data.
- When creating a new Entry object, SNMP requires that a value be associated with each table entry in a single SNMP message (single PDU). This means that, to create a row in a table (using an SNMP set command), a value must be specified for each element in the row.
- If a table row can be deleted, SNMP requires that at least one object in the entry has a control element that is documented to perform the table deletion. (This applies only if a row can be deleted, which is not necessarily required of an SNMP table.)
The '.' (dot) extension is sometimes referred to as the instance number of an SNMP object. In the case of Discrete objects, this instance number will be zero. In the case of Table objects, this instance number will be the index into the SNMP table.