Managing NerveCenter - Troubleshooting NerveCenter - Troubleshooting ASN.1 files -
Using Trace Counters to Troubleshoot NerveCenter      Controlling NerveCenter from the Command Line

Troubleshooting ASN.1 files

Many mibcomp error messages are caused by problems with ASN.1 MIB files. This section describes how to make sure your ASN.1 files can be processed correctly by the mibcomp utility and how to correct common ASN.1 errors. If you receive mibcomp error messages, check your ASN.1 files for the following possible problems:

Use of characters

Blank spaces, carriage returns (^M), and line feeds (^J) are considered white space, used only as separators.

The following are the only characters you can use in ASN.1:


   abcdefghijklmnopqrstuvwxyz
   ABCDEFGHIJKLMNOPQRSTUVWXYZ
   0123456789
   :=,{}<>.()[]-'";|

Except in a comment, you cannot use the following characters:


   !@#$%^&*_+\~`?/

Note the following exceptions:

Period, underscore, and hyphen

The only nonalphanumeric character you can use in a type or value is the hyphen (-). Do not use a period (.) or an underscore (_).

Two consecutive hyphens (--) begin comments. Two consecutive hyphens or the end of a line can end comments. When you end a comment with a second pair of hyphens, mibcomp tries to convert the material between the second pair of hyphens and the end of the line. For example, given the following line:


   -- This is a comment -- This is not a comment.

The mibcomp utility tries to convert "This is not a comment." Don't use two consecutive hyphens in an object name.

Capitalization

Key words and predefined types must contain only uppercase letters and must not be reserved character sequences. Reserved character sequences are listed below:

Reserved character sequences

ABSENT

DEFINED

INTEGER

REAL

ANY

DEFINITIONS

MAX

SEQUENCE

APPLICATION

END

MIN

SET

BEGIN

ENUMERATED

MINUS-INFINITY

SIZE

BIT

EXPLICIT

NULL

STRING

BOOLEAN

EXPORTS

OBJECT

TAGS

BY

EXTERNAL

OCTET

TRUE

CHOICE

FALSE

OF

UNIVERSAL

COMPONENT

FROM

OPTIONAL

WITH

COMPONENTS

IDENTIFIER

PLUS-INFINITY

correct

IMPLICIT

PRESENT

DEFAULT

INCLUDES

PRIVATE

Type references and type declarations must begin with an uppercase letter.

Enumeration names, value names, and object identifiers must begin with a lowercase letter.

Table construction

If a table isn't being displayed properly, it might be missing an INDEX clause or a SEQUENCE definition.

An INDEX clause looks like this:


   INDEX(instance)
::= (parent)

A SEQUENCE definition for each table in the ASN.1 file is necessary for compliance with RFC1212. For example, a MIB might have:


   commonB OBJECT IDENTIFIER ::= { rr2board 1 }
boardIndex OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The slot number of this board."
::= { commonB 1 }

   .
.
.
etc.

This prevents the mibcomp utility from producing usable output because it cannot detect that boardIndex is an attribute of a tabular object. One way to fix this is to add extra material between commonB and the first attribute, as follows:


   commonB OBJECT IDENTIFIER ::= { rr2board 1 }
   -- -- Modified for 1212 compliance --
   commonB OBJECT-TYPE
SYNTAX CommonB
ACCESS read-write
STATUS mandatory
INDEX { boardIndex }
:= { rr2board 1 }

   CommonB ::= SEQUENCE {
boardIndex
INTEGER,
boardName
OCTET STRING,
boardType
INTEGER,
boardTotalPorts
INTEGER,
boardStatus
INTEGER,
boardPortsOn
INTEGER }

   boardIndex OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The slot number of this board."
::= { commonB 1 }

    .
.
etc.

Do not nest tables. Nesting can happen indirectly -- for example, when a type that contains a table is referenced in a table without the connection being obvious. To avoid nesting, you can use an index from one table to index another.

Duplicate type definitions

If the mibcomp utility encounters duplicate type definitions, it uses the first definition it encounters and then displays the following message:


   Warning(file.asn1:about line n):
Duplicate type defined: TypeName

It then continues processing without pausing for you to respond. Make sure the type definitions are all the same, or rename the types and use mibcomp again.

Object identifier format

The only object identifier format mibcomp accepts is:


   {objname integer}

Any other format results in the error message:


   Illegal Object Identifier Value

If your MIB contains an object identifier like:


   open OBJECT IDENTIFIER ::= { osi 1 2}

you could change it to an acceptable object identifier by splitting the definition as follows:


   open OBJECT IDENTIFIER ::= { osi 1}
   open OBJECT IDENTIFIER ::= { osi 2}

Ignored IMPORT definitions

The mibcomp utility ignores the IMPORT definition.

For example,


   MIB-A: x = 1
   MIB-B: x = 2
   MIB-C: import x from MIB-B

In MIB-C, the utility takes x as 2 rather than as 1 if MIB-A is parsed first. Before parsing, check for IMPORT clauses and copy the IMPORT definitions directly into the MIBs containing them.


Using Trace Counters to Troubleshoot NerveCenter Controlling NerveCenter from the Command Line
29 July 2003