Connected: An Internet Encyclopedia
RFC 1905 - 4.2.2.1. Example of Table Traversal

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1905
Up: 4. Protocol Specification
Up: 4.2. PDU Processing
Up: 4.2.2. The GetNextRequest-PDU
Prev: 4.2.2. The GetNextRequest-PDU
Next: 4.2.3. The GetBulkRequest-PDU

### 4.2.2.1. Example of Table Traversal

An important use of the GetNextRequest-PDU is the traversal of conceptual tables of information within a MIB. The semantics of this type of request, together with the method of identifying individual instances of objects in the MIB, provides access to related objects in the MIB as if they enjoyed a tabular organization.

In the protocol exchange sketched below, a SNMPv2 application retrieves the media-dependent physical address and the address- mapping type for each entry in the IP net-to-media Address Translation Table [7] of a particular network element. It also retrieves the value of sysUpTime [9], at which the mappings existed. Suppose that the agent's IP net-to-media table has three entries:

      Interface-Number  Network-Address  Physical-Address  Type

             1            10.0.0.51     00:00:10:01:23:45  static
             1             9.2.3.4      00:00:10:54:32:10  dynamic
             2            10.0.0.15     00:00:10:98:76:54  dynamic

The SNMPv2 entity acting in a manager role begins by sending a GetNextRequest-PDU containing the indicated OBJECT IDENTIFIER values as the requested variable names:

        GetNextRequest ( sysUpTime,
                         ipNetToMediaPhysAddress,
                         ipNetToMediaType )

The SNMPv2 entity acting in an agent role responds with a Response- PDU:

        Response (( sysUpTime.0 =  "123456" ),
                  ( ipNetToMediaPhysAddress.1.9.2.3.4 =
                                             "000010543210" ),
                  ( ipNetToMediaType.1.9.2.3.4 =  "dynamic" ))

The SNMPv2 entity acting in a manager role continues with:

        GetNextRequest ( sysUpTime,
                         ipNetToMediaPhysAddress.1.9.2.3.4,
                         ipNetToMediaType.1.9.2.3.4 )

The SNMPv2 entity acting in an agent role responds with:

        Response (( sysUpTime.0 =  "123461" ),
                  ( ipNetToMediaPhysAddress.1.10.0.0.51 =
                                              "000010012345" ),
                  ( ipNetToMediaType.1.10.0.0.51 =  "static" ))

The SNMPv2 entity acting in a manager role continues with:

        GetNextRequest ( sysUpTime,
                         ipNetToMediaPhysAddress.1.10.0.0.51,
                         ipNetToMediaType.1.10.0.0.51 )

The SNMPv2 entity acting in an agent role responds with:

        Response (( sysUpTime.0 =  "123466" ),
                  ( ipNetToMediaPhysAddress.2.10.0.0.15 =
                                               "000010987654" ),
                  ( ipNetToMediaType.2.10.0.0.15 =  "dynamic" ))

The SNMPv2 entity acting in a manager role continues with:

        GetNextRequest ( sysUpTime,
                         ipNetToMediaPhysAddress.2.10.0.0.15,
                         ipNetToMediaType.2.10.0.0.15 )

As there are no further entries in the table, the SNMPv2 entity acting in an agent role responds with the variables that are next in the lexicographical ordering of the accessible object names, for example:

        Response (( sysUpTime.0 =  "123471" ),
                  ( ipNetToMediaNetAddress.1.9.2.3.4 =
                                                   "9.2.3.4" ),
                  ( ipRoutingDiscards.0 =  "2" ))

This response signals the end of the table to the SNMPv2 entity acting in a manager role.

Next: 4.2.3. The GetBulkRequest-PDU

Connected: An Internet Encyclopedia
RFC 1905 - 4.2.2.1. Example of Table Traversal