Extensions to the SMI in Version 2

SMIv2 extends the SMI object tree by adding the snmpV2 branch to the internet subtree, adding several new datatypes and making a number of other changes. Figure 2-3 shows how the snmpV2 objects fit into the bigger picture; the OID for this new branch is 1.3.6.1.6.3.1.1, or iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects. SMIv2 also defines some new datatypes, which are summarized in Table 2-2.

SMIv2 registration tree for SNMPv2

Figure 2-3. SMIv2 registration tree for SNMPv2

Table 2-2. New datatypes for SMIv2

Datatype

Description

Integer32

Same as an INTEGER.

Counter32

Same as a Counter.

Gauge32

Same as a Gauge.

Unsigned32

Represents decimal values in the range of 0 to 232 - 1, inclusive.

Counter64

Similar to Counter32, but its maximum value is 18,446,744,073,709,551,615. Counter64 is ideal for situations in which a Counter32 may wrap back to 0 in a short amount of time.

BITS

An enumeration of nonnegative named bits.

The definition of an object in SMIv2 has changed slightly from SMIv1. There are some new optional fields, giving you more control over how an object is accessed, allowing you to augment a table by adding more columns, and letting you give better descriptions. Here's the syntax of an object definition for SMIv2 . The changed parts are in bold:

<name> OBJECT-TYPE
    SYNTAX <datatype>
    UnitsParts <Optional, see below>
            MAX-ACCESS <See below> ...

Get Essential SNMP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.