Networking / Beginners

Representing Managed Objects

The Structure of Management Information (SMI) is specified in RFC 2578. It describes a subset of the Abstract Syntax Notation One (ASN.1) that may be used to define MIB modules and to encode MIB objects when they are passed from one node to another in management requests. ASN.1 was devised by the Open Standards Organization (OSI) and provides a text-based, macro language that may be used to define data structures in a form that is both intelligible to humans and machine readable. At the same time, ASN.1 also provides a set of rules for encoding data when they are passed on the wire between network nodes called the Basic Encoding Rules (BER). These rules provide for a very efficient (that is, requiring the smallest number of bytes) way to pass data along with their data types, but are somewhat complicated by flexibility of ASN.1 to handle complex and nested data structures-a feature not required for MIB modules.

The SMI lays out a minimal subset of data types and constructs from ASN.1 and extends these concepts to support the specific requirements of MIB modules. Table below shows these data types. They form the basis of more complex data types or textual conventions that can be defined within MIB modules. Textual conventions usually define interpretations to place on an object of a specific type. For example, the MPLS Textual Conventions MIB module defines MplsBitRate as an integer number of thousands of bits per second with a special meaning assigned to zero. Any other MIB module may import this textual convention and is thereby saved the effort of redefining it and also benefits from a consistent definition of bit rates. The SMI also defines some important macros used to embed useful information (e.g., status of the object, a description, and display hints) and to define common concepts such as MIB objects and modules.

The Eleven Basic Data Types Defined in the SMI
Data TypeMeaning
INTEGERSigned 32-bit integer.
OCTET STRINGA series of bytes, each greater than or equal to 0 and less than or equal to 255.
OBJECT IDENTIFIERAn OID that can be displayed in dot notation.
Integer32The same as INTEGER except that it is guaranteed to never need more than 32 bits for a two's complement representation.
Unsigned32Unsigned 32-bit integer.
Counter32A 32-bit integer used to count events (such as the number of packets received). When the value of an object of this type reaches 4,294,967,295, it wraps to 0.
Gauge32A counter that can go up or down to register the number of instances of some object. Unlike Counter32 it cannot increment beyond 4,294,967
Counter64A 64-bit version of Counter32. This is particularly useful when counting things that are very fast (e.g., bytes on a high-capacity link), and the SMI mandates that Counter64 be used for any counter that may wrap more frequently than once an hour.
TimeTicksAn unsigned 32-bit integer counting hundredths of seconds and wrapping to 0.
OpaqueAn OCTET STRING wrapper of any arbitrary ASN.1 construct.
IpAddressA sequence of 4 bytes containing an IPv4 address. Note: This data type is deprecated and new MIB modules use Unsigned32 for the same purpose.
[Previous] [Contents] [Next]