Follow the steps given below to load a MIB file.
Click the Load MIB Module button or select File --> Load MIB from the menu. Alternatively, you can use the shortcut combination Ctrl + O. This displays the Load a Mib File dialog box as shown below.
In the Load a Mib File dialog box, select the MIB file from the mibs folder.
There are other options for loading the MIB file. Click the Recent tab to load the recently loaded MIB files. The Recent section of the Load a MIB File dialog box is shown below.
Select the check box next to the MIB that is to be loaded and click Open to load the MIB file.
Note: The Load All MIBs option in the File menu loads all the recently loaded MIBs.
Let us have a detailed overview on the various options available in the MIB Settings section of the Load a MIB File dialog box.
MIB Loading Options
The various options available for loading MIBs are:
The following image depicts the Mib Settings tab in the Load MIB dialog box.
Load MIBs Directly
The MIB file is usually read and parsed into MIB modules and displayed in the MIB tree. In this case, when you load a MIB file, it is parsed and then loaded. This is time consuming because parsing is done every time a MIB file is loaded.
Load MIBs from Compiled Files
The next option is loading of the MIB files as compiled files. The main advantage here is that the loading time is reduced. This ultimately leads to the improvement in performance. To store the MIB information in a formatted structure, the following two new file types are made available.
cmi - This file type contains MIB information, such as MibNode, MibModule, naming hierarchy, etc.
cds - This file type contains the description and reference of the MIB nodes.
When the option Load MIBs from Compiled File is selected, the MibBrowser loads the MIB from the cmi and cds files. If these files are not present, MibBrowser parses the MIB file, writes the output in the cmi and cds files, and loads the MIB file. For example, if you load the RFC1213-MIB, the MIB file is parsed and stored in the compiled MIB files as RFC1213-MIB.cmi and RFC1213-MIB.cds provided RFC1213-MIB is the module name of the RFC1213-MIB file.
When this MIB file is loaded again, the MIB is loaded from the cmi and cds files and no parsing is done. The advantage of using this option is, we need not parse the MIB each time we load, thus optimizing the load time and improving the performance. While loading the compiled MIBs, you need to load only the cmi file. The cmi file has a reference to the cds files. Therefore, the cds file need not be loaded directly.
Loading MIBs from a Database
The third option is loading of the MIB files from a database. The MIB files can be stored in any RDBMS such as MySQL or Oracle. Applications can load these MIB files directly from the database. This feature is particularly useful when the MIB files to be loaded are more in number.
The MibBrowser uses JDBC (Java Database Connectivity) for the database support. Applications should use a valid JDBC driver of the respective databases to enable the database support.
Selecting the option Load MIBs from Database enables the text fields in the JDBCParams section. On initializing the necessary database parameters in this section, the database support can be provided for loading MIBs. The required JDBCParams are
Drivername - name of the database driver.
URL - URL pointing to the database filename.
UserName - name of the user.
Password - password for the user.
After selecting this loading option, select the required MIB file to be loaded from the Open tab of the Load a MIB File dialog box. If the selected MIB file is already present in the database, the MIB file is read, parsed, and loaded from the database. If the MIB file does not exist in the database, MibBrowser parses the MIB file, writes the output to the database, and then loads the MIB file.
Note:The recently loaded MIBs can be loaded automatically at startup by selecting the option, 'Load recently loaded Mibs at startup'.
Instructions for Using MySql Database for Loading MIBs
Having tested the loading of MIB files from the MySQL database, you would have understood that the following database parameters have to be configured in the application.
driver name - org.gjt.mm.mysql.Driver
url - JDBC: mysql://<machine name>/<database name>
username - a valid user name
password - password for the above user
The jar file mysql_comp.jar has to be included in the CLASSPATH. If the jar is not in the CLASSPATH, the following exception is thrown.
Instructions for Using Oracle Database for Loading MIBs
The loading of MIB files from the Oracle database has been tested. The following database parameters are to be configured in the application.
driver name - org.jdbc.driver.OracleDriver
url - jdbc:oracle:thin:@<machine name>:1521:<database name>
username - a valid user name
password - password for the user
The oracle driver has to be included in the CLASSPATH. If the jar is not present in the CLASSPATH, the following exception is thrown.
For other databases, use the equivalent parameters.
A few MIB files 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 that are to be loaded into the "mibs" directory.
Note: Apparently, MIBs are always parsed before loading when the following operations are performed: