Assuming that there are L variables in the getbulkrequest PDU variable binding table, the "non-duplicate" field has the value N, and the "maximum successor" value is M, then the R=L-N variable should return up to M-dictionary successors. Getbulkrequest
A major improvement in SNMPv2 is the Getbulkrequest PDU. The purpose of this PDU is to minimize the number of protocol exchanges that are made when querying for large amounts of management information. The Getbulkrequest PDU allows the SNMPV2 manager to request an answer as large as possible under given conditions.
The getbulkrequest operation utilizes the same selection principle as the getnextrequest, that is, the next object is always selected sequentially. The difference is that with getbulkrequest, you can select multiple successor objects.
The basic work of getbulkrequest operations is as follows: Getbulkrequest a list of (N+R) variable names in the variable binding field. For the first n variable names, the query is the same as getnextrequest. That is, for each variable name in the manifest, return its next variable name and its value, and if there are no successors, return the original variable name and a Endofmibview value. The Getbulkrequest PDU has two other fields, Non-repeaters and max-repetitions, that are not in the PDU. The Non-repeaters field indicates the number of variables that return only one subsequent variable. The Max-repetitions field indicates the maximum number of subsequent variables that other variables should return. To illustrate the algorithm, we define: L = number of variable names in the variable bound field
N = variable that returns only one successor variable array
R = variable array that returns multiple successor variables
M = The maximum number of subsequent variables returned
The following relationships exist between the above variables:
N = MAX [MIN (Non-reperters, L), 0]
M = MAX [max-repetitions,0]
R = L-n
If n is greater than 0, the first n variables are answered as getnextrequest. If R is greater than 0 and M is greater than 0, the corresponding R variable is returned, which returns the M-successor variable. That is, for each variable: • Obtain the value of the successor variable of the given variable;
• Obtain the value of the next subsequent variable;
• Repeat the previous step until you get the M object instance.
If there is no successor variable at a point in the above procedure, the Endofmibview value is returned, the last successor is returned at the variable name, and the variable name in the request is returned if there are no successors. Using this rule, the number of name-value pairs that can be produced is n+ (MXR). The order of the following (MXR) in the answering PDU can be described as:
For I: = 1 to M do
for r: = 1 to R do
Retrieve i-th successor of (N+R)-th variable
That is, the returned successor variable is one row, not the first to return all the successor variables, and then all subsequent variables of the second variable, and so on. The getbulkrequest operation unlocks one of the main limitations of SNMP, which is the inability to retrieve large chunks of data efficiently. In addition, leveraging this functionality reduces the size of the management application. Management applications themselves do not need to care about the details of the requests assembled together. There is no need to perform an experimental procedure to confirm the optimal number of name-value pairs in the request PDU. Also, even if the request from Getbulkrequest is too large, the agent will return as much data as possible instead of simply returning an TOOBIG error message. To get the missing data, the manager simply sends the request back without having to convert the original request into a small request sequence.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.