Skip to main content

Bulk Table Retrieval with the SNMP

Empirical evidence has shown that SNMP's powerful get-next operator is effective for table traversal, particularly when the management station is interested in well-defined subsets of a particular table. There has been some concern that bulk table retrieval can not be efficiently accomplished using the powerful get-next operator. Recent experience suggests otherwise.

In the simplest case, using the powerful get-next operator, one can traverse an entire table by retrieving one object at a time. For example, to traverse the entire ipRoutingTable, the management station starts with:

                  get-next (ipRouteDest)

which might return

                  ipRouteDest.0.0.0.0

The management station then continues invoking the powerful get-next operator, using the value provided by the previous response, e.g.,

                  get-next (ipRouteDest.0.0.0.0)

As this sequence continues, each column of the ipRoutingTable can be retrieved, e.g.,

                  get-next (ipRouteDest.192.33.4.0)

which might return

                  ipRouteIfIndex.0.0.0.0

Eventually, a response is returned which is outside the table, e.g.,

                  get-next (ipRouteMask.192.33.4.0)

which might return

                  ipNetToMediaIfIndex.192.33.4.1

So, using this scheme, O(rows x columns) management operations are required to retrieve the entire table.

This approach is obviously sub-optimal as the powerful get-next operator can be given several operands. Thus, the first step is to retrieve an entire row of the table with each operation, e.g.,

              get-next (ipRouteDest, ipRouteIfIndex, ..., ipRouteMask)

which might return

                  ipRouteDest.0.0.0.0
ipRouteIfIndex.0.0.0.0
ipRouteMask.0.0.0.0

The management station can then continue invoking the powerful get-next operator, using the results of the previous operation as the operands to the next operation. Using this scheme O(rows) management operations are required to retrieve the entire table.

Some have suggested that this is a weakness of the SNMP, in that O(rows) serial operations is time-expensive. The problem with such arguments however is that implicit emphasis on the word "serial". In fact, there is nothing to prevent a clever management station from invoking the powerful get-next operation several times, each with different operands, in order to achieve parallelism and pipelining in the network. Note that this approach requires no changes in the SNMP, nor does it add any significant burden to the agent.