The AdventNet MibBrowser is a complete SNMP MibBrowser that can be used to provide MIB Browsing and related functions to users. SNMP MibBrowsers allow the user to view and operate on data available through an SNMP agent on a managed device, e.g. a router.
In order to enable a better view of the data available on the SNMP agent a MIB file is usually provided with the managed device. This MIB file contains a description of the object hierarchy on the managed device, as well as the syntax and access privileges for each variable in the MIB. The AdventNet MibBrowser provides the capability to load and view multiple MIB modules, and traverse the MIB tree to look at the definitions for each the MIB tree.
It allows "GET", "GETNEXT", #ifdef(VERSION2 || VERSION3){"GETBULK"}#endif and "SET" SNMP requests to a particular variable in the MIB of an SNMP managed device. It also has the capability to view multiple real-time graphs of data on the managed device as it changes over time. It also enables viewing SNMP tables.
The AdventNet MibBrowser can be used either as an application or as an applet. The UI is similar in both the cases. The MibBrowser application can be invoked as standalone application and the applet can be viewed through any Java enabled web browser.
Please note that if the applet is NOT loaded from classpath or through the web server, it will not have access to the hard disk in order to load a MIB. In addition, user can only communicate with localhost in order to perform SNMP operations. We cannot communicate with other devices on the network These are all Java security limitations, which will not apply if the applet is loaded from CLASSPATH or through a web server. If the applet is loaded through a web-server across the network, it needs the AdventNet SAS Server in order to connect to any SNMP devices or to load the MIB file.
We will explain the steps involved in loading the MibBrowser Applet, to be usefull for doing SNMP operations :
The primary window of the AdventNet MibBrowser is made up of two frames. The left frame is the MIB Tree in which the MIB files are loaded and the right frame is for setting options and for the result dispaly. The right frame includes fields for
Depending on the option selected in the menu bar the following is also visible:
User can show/hide the Toolbar, Mib Description panel, Muti varbind panel and Result display panel.
The operations allowed with the MibBrowser are available through the series of buttons in Toolbar at the top of the MibBrowser's main window. Click the buttons to get the informations. User can hide the Toolbar by deselecting the ToolBar item in the view menu. Menu Bar is also available for doing all the operations.
File Menu
The following menus are available in the AdventNet MibBrowser.
The following operations can be done using the file menu:
Edit Menu
The following operations can be done using the Edit menu:
View Menu
The following operations can be done using the View menu:
Operations Menu
The following operations can be done using the Operations menu:
Help Menu
The following operations can be done using the Help menu:
To load the MIB files in the MibBrowser use the LOAD MIB image button or select the File--> Load MIB menu item. This brings up a dialog box, which prompts you for the URL of the MIB module file you wish to load.
For MibBrowser used as an applet, the relative URL has to be specified but for the MibBrowser used as an application you can specify the absolute or relative URL. For MibBrowser applet this may not work if you're trying to read a MIB module on some host that's not the applet host because of browser security. In case of applet, Remote Browsing of MIB file is supported through SAServer.
The MibBrowser allows loading of compiled MIB files. The compiled MIB files reduce the loading time leading to performance improvement. To store the compiled file information we have introduced 2 new file types that will be used for storing the MIB information in a formatted structure:
The compiled MIB files reduce the loading time leading to performance improvement. The applications and applets has the option of loading the MIB files directly or as compiled MIB files. The Load MIBs from compiled File option is provided in the dialog box to decide whether to load MIB from compiled MIB's or not. By default, this option is enabled. If this unchecked the user can directly load the mib file as provided.
When Load MIBs from compiled File is enabled the MibBrowser will try to load the .cmi and .cds file if they are present. Otherwise, this will parse the mib file and write the output in .cmi and .cds files and then load the mib file. For example for the RFC1213-MIB the compiled MIB files are RFC1213-MIB.cmi and RFC1213-MIB.cds. The advantage of using this option is, we need not parse the mib each time we load it, thus optimizing the load time.
While loading the compiled MIB's it is enough if we load the .cmi file alone. The .cmi file will have reference to the .cds files. < mib_file_name >.cds file should not be loaded directly.
Important: After loading the MIB file as a compiled MIB file, if you do any changes in the MIB file and load it again it will not get reflected in the loaded MIB file. You have to remove the existing .cmi, .cds files and load the MIB to get the latest changes shown. The option "Overwrite existing compiled MIB files" can be enabled to overcome this. If this option is set to true, the .cmi and .cds files are created each time the MIB is loaded. Enabling this option is recommended only if you have changed the contents of the MIB file. Otherwise, this will unnecessarily increase the load time of the MIB's.
In applets, the option of loading MIB files as compiled mib files has restricted usage. It cannot be used with applets because of restrictions in file creation. So for applets the Load MIBs from compiled File has to be unchecked. But we can load the previously created compiled files (.cmi and .cds ) in the applets. In that case the Load MIBs from compiled File has to be set true.
To convert the normal MIB files to the cmi, cds format the MibToCMI utility can be used. This class is available in the classes/com/adventnet/snmp/utils directory. To use the utility set the classpath to the classes directory and give the following command
java com.adventnet.snmp.utils.MibToCMI < directory name or file name >, < another directory or file >..
The conversion can be done for individual files or for a entire directory of MIB files. If the utility is used across directories the existing cmi, cds files should first be deleted from the directory.
To get an idea of the load time and the performance improvement of the MibParser a comparison table is given below: ( Note - The comparison test is performed in a Linux box - Pentium III, 450 Mhz in JDK 1.1.7 )
MIB FileName | Loading time in 2.2 (sec) | Direct Loading in 3.0 (sec) | FirstTimeLoading in 3.0 (sec) | Subsequent Loading with .cmi and .cds files in 3.0 (sec) | Subsequent Loading without .cds files in 3.0 (sec) |
RFC1213-MIB | 2.20 | 1.47 | 2.15 | 0.65 | 0.41 |
RMON2-MIB | 11.20 | 7.09 | 11.52 | 3.70 | 1.61 |
IF-MIB | 4.58 | 2.67 | 4.67 | 1.24 | 0.58 |
H323 GateKeeper-MIB | 5.34 | 3.30 | 5.57 | 1.56 | 0.72 |
In this table
You can load multiple modules and choose any one of them as the current module at any time. When any MIB module is selected, the root node for that module becomes the current OID.
The loading of MIB modules is via URLs. A few MIB modules are provided in the mibs directory, i.e. RFC1213-MIB, RFC1271-RMON, RFC1155-SMI, RMON2-MIB, TOKEN-RING-RMON-MIB and RFC1315-FRAME. It may be convenient to copy your MIB module files to be loaded into the "mibs" directory.
To unload the loaded MIB select the node of the MIB Tree then click on the UNLOAD MIB image button or select the File --> UnLoad MIB menu item. This will remove the MIB Tree of the MIB unloaded.
The AdventNet MibBrowser can be used for MIB browsing and to view and operate on data available through a SNMP agent. The MibBrowser allows configuration of various options needed for SNMP operations.
To set the various options click on the SETTINGS image button or select the Edit--> Settings menu item. This will bring up a dialog where the following options and its default values are set. The user can modify the default values as per requirements.
Options | Default values | Other options |
Snmp Version | V1 | #ifdef(VERSION2 || VERSION3){V2c}#endif#ifdef(VERSION3){ or V3}#endif |
Snmp Port | 161 | any user defined port |
Time out | 5 sec | any user defined value |
Max repetitions | 50 | any user defined value |
Graph Type | Line Graph | Bar chart |
Trap Port | 162 | any user defined port |
Retries | 0 | any user defined value |
Non-repeaters | 0 | any user defined value |
To set the SNMP V3 parameters click on the V3 SETTINGS tab in the settings dialog box. This will switch to the the screen for setting V3 Parameters. The following values can be set:
Options | Default values | Other options |
Target host | local host | any host with SNMPV3 agent or proxy agent |
Target port | 161 | any user defined port |
User name | null | any user defined value |
Security Level | noAuth noPriv | Auth noPriv and Auth Priv |
Privacy Protocol | CBC-DES (if privacy is chosen in security level) | not available |
Authentication Protocol | MD5 (if authentication is chosen in security level) | SHA |
Authentication password | any user defined value | - |
Privacy password | any user defined value | - |
In the genral settings tab there is an option provided to enable serialization of V3 details. If this is chosen, then the users added will be serialized in the files UserEntry.ser and EngineEntry.ser. The next time when the MibBrowser is started, v3 details will be deserialized if the serialize V3Tables is set to true. }#endif
The MibBrowser allows the user to do the typical SNMP operations such as GET, GET NEXT, #ifdef(VERSION2 || VERSION3){GET BULK}#endif and SET.
To do the GET operation, the user has to load the MIB file, select the desired node and press the "get" icon or choose the Operations ---> Get from the menu bar. To fully specify an object to an SNMP agent, both the Object ID (which defines the type of object) and the instance (the specific object of the given type) need to be provided. From the MIB you get the Object ID, to which an instance needs to be added to completely identify the object of interest. For non-tabular (or scalar) objects this is simply an instance of 0 (e.g. sysDescr.0)(this need not be specified). For tabular objects the instance is defined by the MIB, and is a sequence of one or more variables (e.g. ifInOctets.2 or tcpConnState.179.74.15.126.1192.225.226.126.197.80).
We also need to specify the hostname and community string of the SNMP agent you're talking to in the appropriate field. #ifdef(VERSION3){
If you want to talk to a V3 agent, then you have to choose the Version3 from the choice box in the Settings dialog and also make sure that the v3 parameters are set in V3 Settings Dialog . }#endif
Multi-Varbind Request
Select the Multi-Varbind menu item from the View menu to view the Multi varbind panel. To do a multiple varbind request select the leaf node and append the instance and click on the Add button. It will add the OID given in the Object Identifier field and theValue given in the SetValue field both separated with a colon to the list. If value is not given in the SetValue field then NULL value is appended. You can add multiple number of OIDs and Values like this. Make sure you have enabled the Multi-var check-box before doing a SNMP operation for multiple varbind SNMP request. Otherwise it will do a request for the OID in the Object Identifier field. To do multiple variable SNMP SET you ensure the OID and the Value are given in the textfields proper before adding to the list. Enable the Multi-Var check-box before doing the multiple variable SET.
To delete the varbind(s) from the list select the varbind(s) from the list and click on the Delete button to delete the varbind(s) from the list.
To Edit the varbinds added in the list select a varbind and click on the Editbutton. It will show an OID and the Value of the varbind in the TextFields to edit the OID and the Value. Edit it and press OK button to modify the OID and Value or press the Cancel button to restore the old values.
TrapBrowser is used for receiving the traps. Using this you can view the incoming traps to the specified port. The traps can be sent from any host. The port number and the community name has to be set in the Trap Browser. The trap originator should send the trap to the port no specified in the Trap Browser.
The Trap Browser displays the trap information in a table format.
The trap browser has the following four columns:
All the received traps are displayed in rows. Clicking on any of the column headings pops up a dialog box which contains more additional information on the received trap. Right-clicking on the any of the column headings pops up a menu "Delete the selected Rows", which can be used to delete any of the selected rows. Clicking on the ParserEditor opens up a TrapParser which is used to parse the trap events.
The configuration of the Trap Parsers can be done by following the below mentioned steps:
The trap parser is used to configure and parse the trap events. Since Traps typically contain cryptic information not easily understandable to the users, trap parsers are required to translate or parse traps into understandable information.
Trap Parsers files
Parsing traps is achieved by configuring a list of trap parser files. Only one trap parser file can be applied to a given trap. The match criteria in a parser determines whether a specific trap matches a trap parser. The search for matching trap parsers is done from the trap parsers list starting at the top. Once a matching trap parser is found, an event is generated and no other trap parsers will be used on that trap.
Match Criteria
The match criteria determines whether the trap will be parsed by the given trap parser. All fields must match for the
trap parser to be applied to a trap.
The three fields are:
Enterprise Field:
The enterprise field is the SNMP enterprise identifier in the trap, which is used to uniquely identify traps for a particular application. If you specify this field, the parser will only be applied if the trap enterprise field starts with the enterprise field you specify. The only exception is when the enterprise field is left blank, in which case the trap will be allowed to be parsed.
Generic Type:
Each trap should specify one among the following:
Specific Type:
Each trap has a specific type number. This number must be specified for the trap parser, and only when this matches, the trap parser be applied to a trap. The only exception is when the specific field is left blank or filled with negative value , in which case the trap will be allowed to be parsed
Setting Trap Parser Parameters
The following are some important fields and information on how to configure them for a given trap.
Trap Parser Customization:
In Trap Parser the match criteria can also be customized to parse based on an oid and value or the agent Adress and port number. For example to parse the oid and value:
For example we can try the following:
The command to be given to send the trap using the sendtrap applications is from the agent 192.168.1.1 at port 4001
java sendtrap -p 2001 -c public -m mibs/RFC-1213 192.168.1.1 .1.3.6.1.2.1.1.1.0 192.168.1.1 0 0 1000 .1.3.6.1.2.1.1.1.0 xyz
This will match the Match Criteria of the Trap Parser if it is
generic type : 0 specific trype : 0 enterprise oid : .1.3.1.6.1.2.1.1.1.0 oid : .1.3.6.1.2.1.1.1.0 value : xyz agent : 192.168.1.1 port : 4001
The TrapParser gets trap from any trap originator and parses the trap event.
The AdventNet MibBrowser provides an user-friendly of viewing SNMP Table data. The table data can be viewed in a separate window called SNMP Table Panel. The SNMP Table Panel provides various options for table handling such as adding a row to the existing table, viewing graphs, index editor etc.
The following steps should be taken to view the SNMP table in the SNMP Table Panel:
To view the SNMP Table click on the SNMP TABLE image button or select Snmp Table menu item . This brings up an SnmpTable if the selected OID is a table. In the SnmpTable, clicking on the "Start" button will start getting the columnar objects.
The following options are available in the SNMP Table Panel of the MibBrowser:
Apart from the above options if we right click on the table header (where the column name is displayed) it will display a menu with options
Set Operation using SNMP Table Panel:
Using SNMP table, the SET operation for the table variables becomes easier. To set values for the table variables the following steps needs to be followed:
For creating a new row in a table
If the RowStatus is not present in the table definition then you can only modify the existing row by double clicking the corresponding cell in the table.
The AdventNet MibBrowser enables real-time plotting of SNMP data in a graph. Currently two types of graph are supported - line graph and bar graph. The SNMP data to be polled should be of integer or unsigned integer data type. Typically the values that are plotted will be of type Counter, Gauge or Timeticks.
The following steps should be taken for plotting the SNMP data in the graph:
After selecting the variable from the MibTree, click on the GRAPH image button or select the menu item Line Graph or Bar Graph from the View menu. This brings up an automatically updated graph showing the results of periodically polling the specified agent for the specified OID. By default polling for the graph is done every 5 seconds.
The following options can be configured for the graph:
The "Stop" button can be used to stop the polling of the variable. The "Restart" button can be used to restart the polling. The "Close" button is used to close the graph window.
The MibBrowser can plot multiple graphs showing values for different variables from different hosts . Note that the graphs does not plot the absolute value but only the difference between two values.
Debugging and decoding
The MibBrowser application provides facility to view the debug output of the SNMP operations. To view the debug output the debug window has to be invoked by clicking on the debug icon or by selecting the View --> Debug menu from the menu bar.
As long as this window is opened, debugging is turned on, and debugging output is generated. When this window is closed the debugging is turned off.
The three icons in the debug window provide the following function:
Decoding :
The decoder is used to decode the SNMP debug messages . The decoding can be done in the following ways :
Method - I
Method - II
In both the cases the decode information should only contain the HEX dumps and nothing else. Any other information has to be removed manually.
Copyright 1996-2000 AdventNet, Inc.