What is the difference between SNMP GETBULK and GET operations

12,660

Typically you should use GET request if you deal with scalar OIDs or exact table objects instances.

Otherwise you should be using GETNEXT or even GETBULK if the agent supports SNMPv2C.

Typically you should use GETNEXT to get selected columns of the table or entire table. In this case you'll need to recursively execute GET-NEXT request until results are out of the tree branch scope.

If the agent is SNMPv2C enabled you should use GETBULK. It is an optimization of GETNEXT request. So basically you don't have to execute several GET-NEXT requests to get a number of instances. Instead you can just send single GETBULK request and set Max-Repetitions parameter to 10 and you'll get next 10 consequent variables starting from the OID specified in request.

Share:
12,660
Mdukes00
Author by

Mdukes00

Updated on June 08, 2022

Comments

  • Mdukes00
    Mdukes00 almost 2 years

    Background

    I am trying to create a project of an SNMP web site to get information on network devices. I have used the SNMP Library created by LeXtudio - sharpsnmp.

    The problem

    I have created two methods one using the Getbulk and one with Get. Both take in a list of OID's. Both work as attended with out problems. The only problem I am having is on network devices very far way. It takes exactly the same time for each of them. right at 2 minutes. I feel like this is a very long wait time. Although on devices that are close it is very fast and under 5 seconds.

    The question

    I am wondering does the Getbulk not ask for all the information at once and then comes back with all the information. Or does it ask for each of the OID's in the list one at a time. The same as the Get?

    Is there a way to make one call to get all the information I need with one call to the device or is only that I can make repeated calls to the device?

    Do I have other options?