Connected: An Internet Encyclopedia
RFC 1157 - 4.1.3.1. Example of Table Traversal

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1157
Up: 4. Protocol Specification
Up: 4.1. Elements of Procedure
Up: 4.1.3. The GetNextRequest-PDU
Prev: 4.1.3. The GetNextRequest-PDU
Next: 4.1.4. The GetResponse-PDU

### 4.1.3.1. Example of Table Traversal

One important use of the GetNextRequest-PDU is the traversal of conceptual tables of information within the MIB. The semantics of this type of SNMP message, together with the protocol-specific mechanisms for identifying individual instances of object types in the MIB, affords access to related objects in the MIB as if they enjoyed a tabular organization.

By the SNMP exchange sketched below, an SNMP application entity might extract the destination address and next hop gateway for each entry in the routing table of a particular network element. Suppose that this routing table has three entries:

             Destination                     NextHop         Metric

             10.0.0.99                       89.1.1.42       5
             9.1.2.3                         99.0.0.3        3
             10.0.0.51                       89.1.1.42       5

The management station sends to the SNMP agent a GetNextRequest-PDU containing the indicated OBJECT IDENTIFIER values as the requested variable names:

       GetNextRequest ( ipRouteDest, ipRouteNextHop, ipRouteMetric1 )

The SNMP agent responds with a GetResponse-PDU:

                     GetResponse (( ipRouteDest.9.1.2.3 =  "9.1.2.3" ),
                             ( ipRouteNextHop.9.1.2.3 = "99.0.0.3" ),
                             ( ipRouteMetric1.9.1.2.3 = 3 ))

The management station continues with:

                     GetNextRequest ( ipRouteDest.9.1.2.3,
                             ipRouteNextHop.9.1.2.3,
                             ipRouteMetric1.9.1.2.3 )

The SNMP agent responds:

                     GetResponse (( ipRouteDest.10.0.0.51 = "10.0.0.51" ),
                             ( ipRouteNextHop.10.0.0.51 = "89.1.1.42" ),
                             ( ipRouteMetric1.10.0.0.51 = 5 ))

The management station continues with:

                     GetNextRequest ( ipRouteDest.10.0.0.51,
                             ipRouteNextHop.10.0.0.51,
                             ipRouteMetric1.10.0.0.51 )

The SNMP agent responds:

                     GetResponse (( ipRouteDest.10.0.0.99 = "10.0.0.99" ),
                             ( ipRouteNextHop.10.0.0.99 = "89.1.1.42" ),
                             ( ipRouteMetric1.10.0.0.99 = 5 ))

The management station continues with:

                     GetNextRequest ( ipRouteDest.10.0.0.99,
                             ipRouteNextHop.10.0.0.99,
                             ipRouteMetric1.10.0.0.99 )

As there are no further entries in the table, the SNMP agent returns those objects that are next in the lexicographical ordering of the known object names. This response signals the end of the routing table to the management station.

Next: 4.1.4. The GetResponse-PDU

Connected: An Internet Encyclopedia
RFC 1157 - 4.1.3.1. Example of Table Traversal