The following table describes the ways you can access objects in a MIB:
|
Access method |
Description |
|---|---|
|
Single |
Contains a single value. Getting the value for an instance of this object type requires adding a 0 to the end of the OID. For example, if the OID to a single object type is p, then use p.0 to get its value. |
|
Indexed table |
The column is the type of item and the row (index) is the instance of that item type. The OID of the start of the table is p, and p.column.index describes a field, where index specifies the row. |
|
Doubly indexed table |
Uses two indices to specify a row. The column is the type of item and the row is defined by two indices that further define the meaning of that row. The OID of the start of the table is p. p.column.index1.index2 specifies a field, where the get-next command finds the next object in the current MIB that has a value. The get-next command returns the value of the object and its OID. If the current object is in a table, it returns the next column, which is the last digit in the OID. These actions represent reading the table from top to bottom, then left to right. For example, the Trunk MIB has an indexed table called the Current table, in which each row is the index of the interface and each column represents a statistic. If you use the get command to retrieve errored seconds (ESs) for interface 1, then each time you use the get-next command this retrieves ESs for the next interface. When get-next has retrieved ESs for interface 5, the next get-next command retrieves severely errored seconds (SESs) for interface 1, as shown in the following illustration:
The OID to a field in a doubly indexed table is p.column.index1.index2. The field is grouped by index1, and the particular field in that group is specified by using get for the ES for the first time interval of the third interface. Using 0b get-next retrieves ES for the next time interval, as shown in the following illustration:
When get-next has retrieved ES for all intervals of interface 3, the next get-next command will either retrieve the ES for the first interval of the next interface (if there is one), or the SES for the first interval of interface 3. For more information, refer to Current table and Interval table. |