On 2010-07-30 16:00, shardul kumar: > Hi All, > > Could any one please let me know why do we need snmpbulk while > snmpwalk(using GETNEXT) > is already available for bulk data transfer. I mean to say if I am able to > retrieve all the rows of a > table using GETNEXT then what is so special in GETBULK ?
Hi Ravi, GETNEXT and GETBULK are packet request/response types in SNMP, the protocol, snmpwalk is an algorithm that uses these packet types. Indeed GETNEXT allows for retrieval of a list of mibvars in a single request, as long as the answer will fit in the corresponding response. Snmpwalk is a simple algorithm to explore an agent's mib, build on top of the GETNEXT PDU. It is typically used to read (large) tables from an agent, and is very convenient when you do not actually know the next index into the table. The snmpwalk algorithm is so simple because the GETNEXT request and response packets actually share the same format. In normal operation, an snmpwalk receives the GETNEXT Response, FLIPs over the type to a Request and sends it back to the agent. It does not actually have to *construct* a new packet. This continues until the agent reaches the end of the mib, or when the requestor decides to stop. Computationally this is relatively simple, but when reading across a long distance, every iteration adds another rtt to the total duration of the process. The GETBULK request/response packets in later versions of the protocol improves this by putting a response/request FLIP-over step of the snmpwalk algorithm into the agent logic. The requestor now only has to include a maxcount with the request, and the agent will fill a response pdu with the next row from the mib, and send it off. The agent then decreases the counter by one, and then proceeds to process the packet as a new request. Once the counter hits zero, the agent stops. This improves the snmpwalk algoritm by eliminating the extra round trips - reducing the total wait time for the full walk. Note that the above is a simplification - for an accurate description of snmpwalk and its bulk equivalent, study the code. Cheers, Henk ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders