| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SNMP Protocol Table Traversal Using GetNextRequest and GetBulkRequest Messages (Page 2 of 2) SNMPv2/v3 Table Traversal Using GetBulkRequest The GetNextRequest-PDU message is functional, but while it is more elegant than using regular GetRequest-PDU messages, it is not any more efficienteach entry in the table must still be requested one at a time. This means that retrieving the information in a table takes a long time, and also results in a great deal of traffic being generated due to the number of requests and replies that must be sent. To make table traversal easier and more conservative of network resources, SNMPv2 introduced a new message type called GetBulkRequest-PDU. You can probably surmise the idea here from the name. Instead of specifying a particular MIB object to get or to get next, a GetBulkRequest-PDU allows an SNMP manager to send a single request that results in a number of entries in a table being returned in a Response-PDU message. The GetBulkRequest-PDU is designed to allow both regular variable and tables to be retrieved in a single request. The PDU includes a list of objects, just as in a GetRequest-PDU or GetNextRequest-PDU. The list is organized so that regular objects appear first and table objects come afterwards. Two special parameters are included in the request, called Non Repeaters and Max Repetitions. The first of these specifies the number of non-repeating, regular objects to be retrieved; this is the number of regular objects at the start of the object list. The second specifies the number of iterations, or entries, to read for the remaining tabular objects. For example, suppose an SNMP manager wanted to request 4 regular variables and 3 entries from a table. The GetNextRequest-PDU would contain five MIB object specifications, with the table last. The Non Repeaters field would be set to 4, and the Max Repetitions field set to 3. The original method of traversing tables using GetRequest-PDU and GetNextRequest-PDU from SNMPv1 was retained in SNMPv2 and SNMPv3 when they were developed. However, the introduction of the more efficient GetBulkRequest-PDU means that GetNextRequest-PDU is not as important as it was in SNMPv1. Bear in mind, however, that using GetBulkRequest-PDU does require that the requesting entity know how many entries to ask for. So, some trial and error or multiple requests may be required to get a whole table if the number of entries is not known.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. |