System information
SNMP Technical Overview
391
specifications are used to describe the MIB objects: Abstract Syntax Notation One
(ASN.1) and Basic Encoding Rules (BER).
Abstract Syntax Notation One (ASN.1)
ASN.1 describes objects in textual MIB descriptions. It describes rules for writing
consistent MIBs that compile without errors, both standard and proprietary. ASN.1
includes basic types such as INTEGER, OCTET STRING, OBJECT, NULL, and
SEQUENCE. For example, the following is a sample of the ASN.1 object sysDescr from
the MIB II System Group:
-—the System group
sysDescr OBJECT-TYPE
SYNTAX OCTET STRING
ACCESS read-only
STATUS mandatory
DESCRIPTION
“A textual description of the entity. This value should include the full name and
version identification of the system's hardware type, software operating-system
[sic], and networking software. It is mandatory that this only contain printable
ASCII characters.”
::= { system 1 }
The sample above shows the singular SNMP object. More precisely, the singular object is
expressed as an OID appended by the 0 address (OID.0). For example, the object sysDescr
in the MIB(1) System Group can be expressed as 1.3.6.1.2.1.1.1.0, signifying that the
object has only one instance. The SNMP Extension OID notation always uses the “.0”
extension for singular objects, to distinguish more clearly between singular and columnar
objects.
In addition to singular objects, ASN.1 also describes the columnar objects: tables or
sequences of objects. A singular SNMP object represents only one value. In the situations
where many data entries exist for a similar type (e.g., the IP routing table), it can be
difficult or impossible to combine these values as singular values (particularly when the
number of the entries is variable). In these situations, data is better represented by list-like
structures or sequences called tables. Each line in a table represents one expression of the
set of objects included in the table. A good example of this is the IP Address Table from
the MIB II:
ipAddrTable OBJECT-TYPE
SYNTAX SEQUENCE OF IpAddrEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
“The table of addressing information
relevant to this entity's IP addresses.”
::= { ip 20 }