Management Information Base (MIB) is a text file that contains the information received from an agent about a network device. In MIB, all management information is logically organized in a tree structure, as shown in Figure 6-7-5:
Each node in the tree contains a short text string called a label and a number that represents the position of the node. This number is unique and is known as the Object Identifier (OID) of the node.
At the top of the tree structure is the standard node called iso(1). MIB variables are part of iso(1). Under the iso(1) node is the org(3) node, which is used for companies. Under the org(3) node is the dod(6) node that is defined by the Department of Defense. Under the dod(6) node is the internet(1) node, which is used by the Internet community. The internet(1) node has two branches, mgmt(2) and private(4). Under the private(4) node is the enterprise(1) node, which contains the MIB of all private enterprises. Each node under the enterprise(1) node is represented by an OID starting from the root. For example, to represent a company labeled amx with the number 200, the OID is .1.3.6.1.4.1.200
The amx node can have devices and other managed objects. The Internet Activities Board (IAB) maintains unique OIDs for each node up to the enterprise node. Unique OIDs for each node within the enterprise node are maintained by the company to which the node belongs.
Note |
There are some standard MIBs under mgmt nodes that have been approved by IAB. These MIBs have OID numbers beginning from 1.3.6.1.2. |
An MIB module is a text file, which contains names and types of objects on the managed device to be monitored. In SNMP, a variable of a managed device is called an object. You can use the MIB modules to identify names of objects and their OIDs. Listing 6-7-1 shows the MIB of a printer with two objects to manage, the number of pages in the printer and the ink level of the printer:
SAMPLE-MIB DEFINITIONS ::= BEGIN sample_printer MODULE-IDENTITY LAST-UPDATED "200102281839Z" ORGANIZATION "AMX" CONTACT-INFO "judith@java.com" DESCRIPTION "Sample demo of snmp MIB" REVISION "200102281839Z" DESCRIPTION "Some description" ::= { amx 300 } org OBJECT IDENTIFIER ::= { iso 3 } dod OBJECT IDENTIFIER ::= { org 6 } internet OBJECT IDENTIFIER ::= { dod 1 } private OBJECT IDENTIFIER ::= { internet 4 } enterprise OBJECT IDENTIFIER ::= { private 1 } amx OBJECT IDENTIFIER ::= { enterprise 200 } no_of_pages OBJECT-TYPE SYNTAX OCTET STRING MAX-ACCESS read-only STATUS current DESCRIPTION "No. of pages left in the printer" ::= { sample_printer 1 } ink_level OBJECT-TYPE SYNTAX OCTET STRING MAX-ACCESS read-only STATUS current DESCRIPTION "Ink level of the printer" ::= { sample_printer 2 } END
Figure 6-7-6 shows the tree diagram for Listing 6-7-1:
In Figure 6-7-6, the OID for the number of pages to be managed as part of the printer in the string format is:
.iso.org.dod.internet.private.enterprise.ciol.sample_printer.no_of_pages
This OID can be represented in the number format as:
.1.3.6.1.4.1.200.300.1
In Figure 6-7-6, the OID for the ink level to be managed as part of the printer in the string format is:
.iso.org.dod.internet.private.enterprises.ciol.sample_printer.ink_level
This OID can be represented in the number format as:
.1.3.6.1.4.1.200.300.2