SNMP Manager Programmer's Guide

Constructing and Interpreting Packets
SNMP Manager Programmer’s Guide134249
5-5
Variable Bindings
Variable Bindings
A variable binding is a pair of values describing a MIB object: the object’s instance
identifier and its value. The value is null in Get and GetNext requests, has a manager-
assigned value in Set requests, and has an agent- or subagent-assigned value in response
packets. Trap packets may or may not have variable bindings associated with them.
Variable bindings always appear at the end of packets, organized into a list as Figure 5-4
indicates.
This subsection provides an overview of instance identifiers and their role in retrieving
MIB objects in serial fashion, known as lexicographic order. It then describes how
variable bindings are associated with packets.
Instance Identifiers
The instance identifier unambiguously identifies every object in the SNMP object
hierarchy. Instance identifiers consist of an object’s OID plus a suffix of one or more
additional digits identifying the object’s instance.
Objects that are not organized into tables have only one instance. The SNMP
convention for referring to these objects is to use a suffix of zero:
oid.0
When you omit a suffix from the OID of any MIB object that is a variable binding in a
Manager Services packet, 0 is assumed.
Objects that appear in tables can have multiple instances. Individual instances of tabular
objects are differentiated by using a suffix that provides the index value of the entry in
which the object appears:
oid.entry-index-value
Figure 5-4. Variable Bindings
503
value-1 value-n
instance-id-1 instance-id-n