snmp management software LoriotProsnmp management software LoriotPro

Administrator Handbook
www.loriotpro.com

TOC

MIB Compiler Tool

Introduction

MIB files contain the description of the object that can be used to manage devices and software. Most of the MIB files are standard and commonly supported by all devices.

However, most of hardware and software have proprietary objects that are not defined in the standard MIB. To handle them hardware constructors and software editors have developed their own MIB. They should be used to perform management over their solution.
To be able to use this objects, it is necessary to retrieve this proprietary MIB files. Proprietary MIB files are available on the device constructor or software editor Web site.

When you have a new MIB file, you should copy it into the /mibs directory and compile it to be able to see it in the MIB tree.

Concept

The following chapter explains the concepts of MIB management within LoriotPro.

When LoriotPro starts, it reads a descriptive file (lmib.txt) and loads in memory all the objects in a kind of DataBase. These objects are then visible in the MIB tree and can be used to make SNMP requests on devices.

The /bin/lmib.txt file is created with the LoriotPro Compiler. The LoriotPro MIB Compiler can add (compile) to the startup database config file any MIB files that are located in the /bin/mibs directory.

Warning: Even if the database contains the entire MIB object, all object attributes are not stored in it. Thus it is still necessary to keep in the /bin/mibs subdirectory all the MIB files used to make the compilation.

If the /bin/lmib.txt file does not exist, LoriotPro creates a new file by reading the /bin/config/mib-database/lmib.lda file.

The lmib.lda file is the default startup database config file provided with LoriotPro. This one is absolutely necessary for using all the LoriotPro Plug-in. This file is a copy of the last generated lmib.txt if you have performed compilation and use afterwards the option 'save to startup datatbase'. In other case it is a copy of the default lmib.txt file provided at installation.

At the end of the startup process, if both files does not exist, LoriotPro reads the /bin/kernel.mib file and create with an on the fly compilation a minimum internal MIB database with the common SNMP objects defined in standard MIBs files issued from the RFC (Request for Comments). The kernel.mib file describes the MIB tree from the root to the MIB2 node and its underneath mandatory objects (system, interface, snmp, ip, tcp...)


List of MIB file definition load from the kernel.mib file

LoriotPro also loads any other MIB files that are listed in the loriotpro.ini file under the [MIB_LOAD] section. MIB file specified here are compiled on the fly when LoriotPro starts.

[MIB_LOAD]
enterprises-number.mib
[end]

By default the entreprise-number.mib is loaded by this way and creates the node "entreprise" in the tree. Well known company nodes are automatically created.

Remark : An error message could appear in the initialisation window when starting LoriotPro because the enterprises-number.mib file is already loaded in by the lmib.txt file.

Finally the lmib.txt file is read and objects are loaded in memory.

Compiler interface

To run the compiler from the main menu select :

MIB>MIB Compiler…


Compiler Tool

The following window is displayed


MIB Compiler compiler window

The window has two list boxes.

The Currently loaded and Compiled MIB files in the database list box contains all the MIB file that are in the current database and loaded in memory.

The Not Compiled and loaded list box contains the MIB file that are in the /mibs directory and not currently in the database.
File containing SNMP objects loaded in memory have the following icon
File containing SNMP objects but not loaded in memory have the following icon


Compiling new MIB

Let us add a new MIB file from Cisco to the list of supported MIB file.

Gathering MIB file from a constructor

The first step consists of downloading from the constructor WEB site the last version of its file definitions. The language used to build a file definition has evolved and two versions are existing. LoriotPro compiles both of them and therefore could handle all proprietary SNMP objects. In our example, both files used for Cisco products could be downloaded.

Ciscov1.tar.gz
Ciscov2.tar.gz

Uncompress them in the bin/mibs directory with your preferred tool.

Generate a list of file definitions.

Once the previous step ended, click on Scan for News MIBs button to force the software to re-initialize the list of MIB that could be available for a new compilation.

Select Yes.

After little time, the list is displayed and the new files are visible but still not compiled and loaded in memory.


Liste de fichier de MIB Cisco

At this point, you could either:

- compile all MIB file listed in the list box by clicking on Compile All MIBs
- performs a compilation of selected files by clicking on Compile MIBs selection
- compile a single file

For a selective compilation, press the CTRL key and click on the file that you want to compile. When finished, click on the ‘Compile MIBs Selection’ button.


Performing a selective compilation

A single file could be compiled. Browse the directory where your file is loacted and select it then click on the Compile this MIB File button.

The compilation could take several minutes on a slow PC. The LoriotPro compiler is very performing and if the processor speed is higher than 500 Mhz, all the MIB files would be compiled in few minutes.

L'image n'est pas bonne.


Compilation confirmation window

During the compilation process, the current compiled file and the number of new compiled objects is displayed in the lower status bar.

Saving database file

The startup configuration file /lmib.txt is managed from the menu.

When you do a compilation the MIB object are all stored in the memory and are are fully usable until you close LoriotPro. Th role of the lmib.txt is to reload these objects in memory at the next restart that why it is necessary to save them after the compilation process. Answering NO means that the modification will be lost at the next restart of Loriotpro.

When you have done a new compilation it is necessary to save the new configuration to this database config file.

This config will be used the next time that you start LoriotPro.

Remark: If you want you could load in memory the new MIB objects and save it to the the startup database lmib.txt afterwhile. The menu allows you to specify the database to load at startup.

To save the current compilation, open the menu Database and select the Save to Startup database.

Other option allows you to:

Save to Startup database: This option saves your current compilation into the /bin/lmib.txt file and into the /bin/config/mib-database/lmib.lda file. The previous lmib.lda file is renamed lmib-bak.lda. With the lmib-bak.lda you could restore your previous configuration. Use the Change Startup database for restoring the bak file.

Save As - Save the current compilation into a Database config file. This file will not be loadded at the next Startup. With this option you could manage multiple startup configuration files. This option is used conjointly with the Change startup database option. Files are located in the /bin/config/mib-database subdirectory.

Reset To Default - The startup config file lmib.txt will be cleared and re-initialized to its initial default configuration. All the additional MIB file compiled since the LoriotPro installation will be lost. This option is necessary for removing all proprietary MIB file from the list. The default file is created with the lmib.dat file. The lmib.dat file contains all the minimum MIB files that are required for LoriotPro and its Plug-in. Do not delete, move or change it.

Change Startup Database - Allow you to select another configuration file at startup. Files are located in the /bin/config/mib-database subdirectory. This operation copies the .lda file into the lmib.txt file located in the /bin directory.

Reset Internal SNMP OID tree - It could be necessary in specific case to reset the tree. If you do not see object after a compilation better check the log file for errors. MIB files frequently use Import files, if these one are not present in the MIB directory, after the compilation MIB objects are not visible in the MIB tree.

Select Yes or No. If you answer YES and you want to cancel your action later on, you can restore the lmib.txt backup file and replace the newly created one, after restarting LoriotPro.

After compiling, the result of the compilation is displayed showing the performed tasks. Look at the file to see if object import is successful. Any error in the MIB file structure, duplicate name of missing father node is reported.

Example of information text

Start: Load and Analyse MIB file : ---------------------------------- mibs/CISCO-6400-CHASSIS-MIB-V1SMI.my at Tue Feb 19 18:16:11 2002
 Found MIB Definitions [CISCO-6400-CHASSIS-MIB]
 Import MIB [SNMPv2-SMI-v1] registered
 Import MIB [SNMPv2-SMI-v1] allready Loaded from (SNMPv2-SMI-V1SMI.my) for mibs/CISCO-6400-CHASSIS-MIB-V1SMI.my
 Import MIB [SNMPv2-TC-v1] registered
 Import MIB [SNMPv2-TC-v1] allready Loaded from (SNMPv2-TC-V1SMI.my) for mibs/CISCO-6400-CHASSIS-MIB-V1SMI.my
 Import MIB [IF-MIB] registered
 Import MIB [IF-MIB] allready Loaded from (rfc2863.mib) for mibs/CISCO-6400-CHASSIS-MIB-V1SMI.my
Total : Node [11944/11852] Node Error [1] Node Warning [14] Token Registered [269] 2 s Tue Feb 19 18:16:13 2002


The MIB file should now appears with the icon in the upper list box

Example of use of new SNMP object

When you use the compiler, the MIB tree with SNMP objects is updated and the new objects are immediately available for use in the various LoriotPro tools.


The updated MIB Tree.

Remark: During the compilation, the SNMP objects from trap version 1 type and founded in the file definitions are inserted in the MIB tree and get a specific icon.


V1Trap in the 'MIB Tree'

The software creates a trap.txt  file in the /bin directory with all version 1 trap type.

This file is used by the Event Manager to perform an association between the trap ObjectID and a dedicated number.

Extract of file :  trap.txt

atmsoftpvctraps.1 atmsoftpvccallfailurestrap
cisco6400chassismibnotificationprefix.1 cisco6400chassisfailurenotification
x25.1 x25restart
x25.2 x25reset
snmp.5 egpneighborloss
dot1dbridge.1 newroot
dot1dbridge.2 topologychange
rmon.1 risingalarm
rmon.2 fallingalarm
docsdevtrapconformance.1 docsdevcminittlvunknowntrap
docsdevtrapconformance.2 docsdevcmdynservreqfailtrap
docsdevtrapconformance.3 docsdevcmdynservrspfailtrap
docsdevtrapconformance.4 docsdevcmdynservackfailtrap
docsdevtrapconformance.5 docsdevcmbpiinittrap
docsdevtrapconformance.6 docsdevcmbpkmtrap
docsdevtrapconformance.7 docsdevcmdynamicsatrap
docsdevtrapconformance.8 docsdevcmdhcpfailtrap
docsdevtrapconformance.9 docsdevcmswupgradeinittrap
docsdevtrapconformance.10 docsdevcmswupgradefailtrap
docsdevtrapconformance.11 docsdevcmswupgradesuccesstrap
docsdevtrapconformance.12 docsdevcmswupgradecvcfailtrap
docsdevtrapconformance.13 docsdevcmtodfailtrap
docsdevtrapconformance.14 docsdevcmdccreqfailtrap

In this file the version 1 trap names are encoded :

docsdevtrapconformance.14 docsdevcmdccreqfailtrap

In our example above the trap  docsdevcmdccreqfailtrap is a specific trap with assigned number 14 and OID  docsdevtrapconformance.

 Warning : The trap.txt  file is created in append mode. If you perform several consecutive compilations, you have to edit it and suppress redundant entries. In the below example bold lines have to be suppressed.

Extrait du fichier :  trap.txt

x25.1 x25restart
x25.2 x25reset
dot1dbridge.1 newroot
dot1dbridge.2 topologychange
rmon.1 risingalarm
rmon.2 fallingalarm
llecointe.1 loriotidsprobetrap
x25.1 x25restart
x25.2 x25reset
dot1dbridge.1 newroot
dot1dbridge.2 topologychange
rmon.1 risingalarm

Common Compilation errors

The common compilation errors are listed below. These error are visible in the log file that is displayed after a compilation.

Search the following line for finding the statistics about the compilation

Total : Node [13025/13024] Node Error [1] Node Warning [0] Token Registered [268] 1 s Tue Jan 13 14:02:35 2004

The Node error should give you 0 else you probably have at least one of the following message before.

Node Father not found for NODE xxxx
The missing father node is a common error message. When you get it you should find the MIB file that contains the father object required for compiling one of your MIB file. A MIB file generally describes a node (branch) of the MIB tree. A node could be compiled if its father node is describe in another MIB file.

Warning OBJECT IDENTIFIER [object] Already Registered for MIB File xxx
This warning message informs you that the compiler has tried to add an object that is already defined in another MIB file. It will not be added a second time.

Error PARSE for object->INTEGER delete sequence
The object parser has found an error in the definition of an object. Verify that the ASN1 standard is respected.


www.loriotpro.com
Copyright © 2004 LUTEUS SARL. All rights reserved. This documentation is copyrighted by LUTEUS SARL. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying or otherwise, without the prior express written permission of LUTEUS SARL