5 Contact Remote SNMP Agent and Query All Its Object Instances
5.3 Retrieving All Object Instance Values with SNMP Walk Operation
5.3.1 Performing SNMP Walk Operation
1. Contact an SNMP agent as described in the Contacting Remote SNMP Agent section.
2. In the MIB tree, click the node from which you wish to start the SNMP Walk operation.
Note that you can select either:
The root node of the MIB tree (the first node in the MIB tree called the MIB Tree node, Figure 22). MIB Browser will 'walk' the whole MIB tree and return all values implemented in the queried SNMP agent.
A root node of any MIB sub tree (e.g., system). MIB Browser will perform the SNMP Walk operation on the whole sub tree (e.g., system sub tree).
A columnar object (e.g., ifInOctets). MIB Browser will repeatedly send SNMP GetNext requests to retrieve all instance values of the selected columnar object.
A scalar object (e.g., sysUpTime). MIB Browser will query only the selected scalar object and display its instance value.
Figure 22: Terminology used for MIB tree objects and nodes
3. From the main menu, select the SNMP ⏐ Walk command or click the Walk Remote SNMP Agent toolbar button.
4. The program queries the desired object instances in the SNMP agent and displays its values in the Query Results panel.
If, while performing the SNMP Walk operation, MIB Browser comes across an OID that is not defined by any of the loaded MIB modules, it prompts you with the Search Compiled MIB Modules To Resolve OID dialog box (Figure 23).
=
Walk Remote SNMP Agent
Figure 23: Search Compiled MIB Modules To Resolve OID dialog box To continue with the SNMP Walk operation, select one of the options:
Yes To All - MIB Browser will resolve all OIDs in the current walk and load all MIB modules that resolve these OIDs.
Yes - MIB Browser will search for and load a MIB module that will resolve the current OID.
No - MIB Browser will skip the resolving of the current OID and continue with the operation.
No To All - MIB Browser will not load any additional MIB modules, i.e., it will not resolve the current OID, as well as any other OIDs not defined in the already loaded MIB modules that MIB Browser may come across in the current walk.
Tip: If you want MIB Browser to automatically search for compiled MIB modules and resolve OIDs without prompting you, uncheck the Prompt before searching for MIB modules checkbox in the MIB Browser Preferences dialog box in the MIB Tree and MIB Modules Preferences panel.
If you want the program to perform the SNMP Walk operation on the whole MIB tree from any selected object, check the Until No-Such or End-Of-MIB-View checkbox in the MIB Browser Preferences dialog box.
1. Use the View ⏐ MIB Browser Preferences command to open the MIB Browser Preferences dialog box. When it opens, select the Query Results preferences to display the Query Results Preferences panel.
2. In the Query Results Preferences panel, check the Until No-Such or End-Of Mib-View checkbox.
Example:
How to query all object instances of the system sub tree in an SNMP agent by using the SNMP Walk operation?
Contact the SNMP agent by using the SNMP ⏐ Contact command. In the MIB tree, click the root node of the system sub tree. Use the SNMP ⏐ Walk command or right-click the system node and select the Walk pop-up command. MIB Browser performs the SNMP Walk operation on the system sub tree. The remote SNMP agent returns the values of all system sub tree object instances and MIB Browser displays them in the Query Results panel (Figure 24).
Figure 24: Results of the SNMP Walk operation on the system sub tree
SNMP Walk Operation with SNMP GetBulk Requests
MIB Browser can be configured to use SNMP GetBulk requests instead of GetNext requests when traversing an SNMP agent's MIB tree. When using SNMP GetNext requests, MIB Browser receives in response to each request
only one object instance with its value. On the other hand, when using SNMP GetBulk requests, MIB Browser can receive in response to each request one or more (e.g., 100) object instances with corresponding values. In this way the use of SNMP GetBulk requests minimizes network interactions and time when retrieving a large amount of management information.
To perform SNMP Walk operation with SNMP GetBulk requests:
3. Contact the desired SNMP agent as described in the Contacting Remote SNMP Agent section.
4. To configure MIB Browser to use the SNMP GetBulk operation, open the SNMP Protocol Preferences dialog box by using the View ⏐ SNMP Protocol Preferences command.
5. In the opened SNMP Protocol Preferences dialog box, select either the SNMPv2c or the SNMPv3 radio button (the SNMPv1 protocol does not support SNMP GetBulk operation).
Figure 25: Specifying SNMP GetBulk settings
6. In the Get-Bulk settings frame check the Use Get-Bulk checkbox (Figure 25).
Note: The SNMP GetBulk operation is supported only in the SNMPv2c and SNMPv3 protocol.
7. In the Non repeaters input line, set the number of non-repeaters to zero (0), and into the Max repetitions input line, enter the desired maximum number of object instances that will be returned in the SNMP GetBulk response.
Note: When you use the SNMP GetBulk operation in the main window, the 'non-repeaters' value has to be set to zero (0). Otherwise the program returns only one instance regardless of the 'max-repetitions' value.
To learn more about the use of SNMP GetBulk operation, see the SNMP GetBulk usage example.
8. Click OK to close the SNMP Protocol Preferences dialog box. MIB Browser automatically contacts the SNMP agent and applies the new settings.
9. Select a node in the MIB tree from which you wish to perform the SNMP Walk operation (for more details see the step 2 in the Performing SNMP Walk Operation section).
10. From the main menu, select the SNMP ⏐ Walk command or click the Walk Remote SNMP Agent toolbar button.
11. MIB Browser traverses the selected part of the MIB tree by issuing successive SNMP GetBulk requests to the SNMP agent. It displays the retrieved object instances with values in the Query Results panel.
=
Walk Remote SNMP Agent