SNMP agents have two commands, GETRESPONSE and TRAP, which function as follows:
A managed device is a network node that contains an SNMP agent and resides on a managed network. Managed devices collect and store management information and make this information available to network management systems (NMSs) using SNMP.
Managed devices, sometimes called network elements, can be routers and access servers, switches and bridges, hubs, computer hosts, or printers. Figure 9-4 shows the relationship between an NMS, Agents, and MIBs.
The Management Information Base
The MIB is an established database of the hardware settings, variables, memory tables or records stored within files. These records are called data elements.
Data elements contain the information concerning the status, configuration, and statistical information base used to define the functionality and operational capacity of each managed device. This information is referred to as a MIB (Management Information Base). Each data element is referred to as a managed object. These managed objects are comprised of a name, one or more attributes, and a set of operations that can be performed on the managed object.
MIBs and Object Identifiers
A MIB can be depicted as an abstract tree with an unnamed root. Individual data items make up the leaves of the tree. Object identifiers (OIDs) uniquely identify or name MIB objects in the tree. Object IDs are like telephone numbers; they are organized hierarchically with specific digits assigned by different organizations.
The object ID structure of an SNMP MIB defines three main branches: Consultative Committee for International Telegraph and Telephone (CCITT), International Organization for Standardization (ISO), and joint ISO/CCITT. Much of the current MIB activity occurs in the portion of the ISO branch defined by object identifier 188.8.131.52 and dedicated to the Internet community.
The current Internet-standard MIB, MIB-II, is defined in RFC 1213 and contains 171 objects. These objects are grouped by protocol (including TCP, IP, User Datagram Protocol (UDP), SNMP, and others) and other categories, including system and interfaces.
The MIB tree is extensible by virtue of experimental and private branches. Vendors can define their own private branches to include instances of their own products. For example, Ciscos private MIB is represented by the object identifier 184.108.40.206.4.1.9. It includes objects such as HOSTCONFIGADDR, which is identified, by object ID (OID) 220.127.116.11.18.104.22.168.2.1.51. The HOSTCONFIGADDR object specifies the address of the host that provided the host configuration file for a specific Cisco device.
The basic MIB structure, including MIB-II (object ID = 22.214.171.124.2.1) and the Cisco private MIB (object ID = 126.96.36.199.4.1.9), is shown in Figure 9-5. A more detailed version of Ciscos MIB is illustrated in Figure 9-6 later in the chapter.
Structure of Management Information (SMI) Definitions
The SMI specifies that all managed objects should have a name, a syntax, and an encoding. The name is the object ID, which was discussed in the preceding section. The syntax defines the objects data type (for example, integer or string). Subsets of ASN.1 definitions are used for the SMI syntax. The encoding describes how the information associated with the managed object is formatted as a series of data items for transmission on the network. Another ISO specification called the Basic Encoding Rules (BERs), details SMI encodings.
SMI data types are divided into three categories: simple types, application-wide types, and simply constructed types.