Checks in Detail

 

The checks are based on the Imports, macro constructs, and some miscellaneous specifications of the MIB file. All the checks are grouped with the parent checks.

Normal Checks

 

OBJECT_IDENTIFIER_CONSTRUCT

CHECK_SECOND_SUBOID

In the OID construct the second suboid should be a name or nameNumber.

CHECK_ATLEAST_TWO_SUBOID

The OBJECT IDENTIFIERS should have atleast two sub-identifiers.

CHECK_FIRST_SUBOID

In the OBJECT IDENTIFIER construct, the first sub-identifier should be any one of the  following.

 

Value Name

0

ccitt

1

iso

2

joint-iso-ccitt

 

CHECK_LAST_SUBOID

In the OID construct, the label of the last sub-oid should be same as the descriptor.

CHECK_LONG_SUBOID

In the OID construct, the numbered suboid value should not exceed 4294967295.

 

CHECK_DEFAULT

CHECK_RESERVED_WORDS

The following are reserved keywords which must not be used as descriptors or module names:

ABSENT ACCESS AGENT-CAPABILITIES ANY APPLICATION AUGMENTS BEGIN BIT BITS BOOLEAN BY CHOICE COMPONENT COMPONENTS CONTACT-INFO CREATION-REQUIRES Counter32 Counter64 DEFAULT DEFINED DEFINITIONS DEFVAL DESCRIPTION DISPLAY-HINT END ENUMERATED ENTERPRISE EXPLICIT EXPORTS EXTERNAL FALSE FROM GROUP Gauge32 IDENTIFIER IMPLICIT IMPLIED IMPORTS INCLUDES INDEX INTEGER Integer32 IpAddress LAST-UPDATED MANDATORY-GROUPS MAX MAX-ACCESS MIN MIN-ACCESS MINUS-INFINITY MODULE MODULE-COMPLIANCE MODULE-IDENTITY

NOTIFICATION-GROUP NOTIFICATION-TYPE NOTIFICATIONS NULL OBJECT OBJECT-GROUP OBJECT-IDENTITY OBJECT-TYPE OBJECTS OCTET OF OPTIONAL ORGANIZATION Opaque PLUS-INFINITY PRESENT PRIVATE PRODUCT-RELEASE REAL REFERENCE REVISION SEQUENCE SET SIZE STATUS  STRING SUPPORTS SYNTAX TAGS TEXTUAL-CONVENTION TRAP-TYPE TRUE TimeTicks UNITS UNIVERSAL Unsigned32 VARIABLES VARIATION WITH WRITE-SYNTAX  

CHECK_PROPER_FIELDS

In the SEQUENCE construct, each sequence member should be separated by a comma and there should not be a comma at the end of last sequence member.

In the GROUPS construct, the SYNTAX, WRITE-SYNTAX, MIN-ACCESS clauses are not allowed.

CHECK_MULTIPLE_OCCURRENCE_OF_NODE

The descriptor should be unique and mnemonic.

VALIDATE_TC_NAME

The identifier for the TEXTUAL-CONVENTION should start with uppercase letter.

CHECK_MULTIPLE_OCCURRENCE_OF_ENUM_LABEL

The labels used in the enumeration list should be unique.

CHECK_ROW_OBJID

The table entry must present immediately beneath the corresponding table object. i.e., The table entry object should be the child of the table object with sub identifier as "1".

CHECK_TABLE_OBJECT

The table entry should be defined as a child of the corresponding table object.

VALIDATE_MODULE_NAME

An ASN.1 module name should begin with an upper-case letter and continues with zero or more letters, digits, or hyphens, except that a hyphen can not be the last character, nor can there be two  consecutive hyphens.

 

Serious Checks

 

IMPORTS_CONSTRUCT

CHECK_INVALID_IMPORTS_VALUES

The following must not be included in an IMPORTS statement.

  • Named types defined by ASN.1 namely INTEGER, OCTET STRING, OBJECT IDENTIFIER, SEQUENCE, SEQUENCE OF.

  • The BITS construct.

CHECK_EXPORT_CONSTRUCT

The EXPORTS statement is not allowed in an SMIv2 MIB. All the items defined in a module is automatically imported.

CHECK_CONSTRUCT_IN_IMPORTS

If any of the following datatypes and macros are defined in this document, they must be imported using the IMPORTS statement.

Counter32, Counter64, Gauge32, Integer32, IpAddress, MODULE-IDENTITY, NOTIFICATION-TYPE, Opaque, OBJECT-TYPE, OBJECT-IDENTITY, TimeTicks, Unsigned32

INVALID_IMPORTS_IN_V2

In an SMIv2 MIB, if the IMPORTS section contains RFC1155-SMI, it should  be replaced by SNMPv2-SMI.

 

MODULE_IDENTITY_CONSTRUCT

CHECK_MODULE_IDENTITY_INVOCATION

There must be only one MODULE-IDENTITY macro defined in the MIB.

CHECK_MODULE_IDENTITY_OCCURRENCE

The MODULE-IDENTITY macro must be defined immediately after the IMPORTS section.

REVERSE_CHRONOLOGICAL_ORDER

The REVISION  clause should be defined in the revers chronological order. i.e. the latest revision should occur first.

CHECK_UTC_TIME

The UTCTime format is YYMMDDHHMMZ or YYYYMMDDHHMMZ. It should contain 11 or 13 characters.

 

where YY   - last two digits of year (only years between 1900-1999)  

YYYY - last four digits of the year (any year)  

MM   - month (01 through 12)  

DD   - day of month (01 through 31)  

HH   - hours (00 through 23)  

MM   - minutes (00 through 59)  

Z    - denotes GMT (the ASCII character Z)  

 

For example, "9502192015Z" and "199502192015Z" represent 8:15pm GMT on 19 February 1995.  

Years after 1999 must use the four digit year format. Years 1900-1999 may use the two or four digit format."  

CHECK_LUPDATED_REVISION_UTC_TIME

The UTC Time value mentioned in the LAST-UPDATED field should be same as the UTC Time value in the first of the REVISION field.

 

OBJECT_TYPE_CONSTRUCT

OBJECT_TYPE_CONSTRUCT

The following are the checks that fall under OBJECT_TYPE_CONSTRUCT.

CHECK_DEFVAL, CHECK_TABLE_CONSTRUCT, CHECK_SYNTAX, CHECK_ACCESS, CHECK_STATUS

These are parent checks, which in turn include many checks.

 

TRAP_TYPE_CONSTRUCT

CHECK_TRAP_NUMBER

The trap number should range between 0..2148473647.

CHECK_GENERIC_TRAP_NUMBER

If the trap is generic, the trap number should be between 0 to 6.

CHECK_ENTERPRISE_VALUE

If the enterprise value is other than snmp, the value should be registered under enterprise OID (.1.3.6.1.4.1).

 

NOTIFICATION_TYPE_CONSTRUCT

CHECK_NT_OBJECTS_ACCESS

For the NOTIFICATION-TYPE macro, the objects should not have an MAX-ACCESS value of 'not-accessible'.

 

TEXTUAL_CONVENTION_CONSTRUCT

CHECK_OCCURRENCE_OF_DISPLAY_HINT

The DISPLAY-HINT clause must not be present if the Textual Convention is defined with any of the following syntax. OBJECT IDENTIFIER, IpAddress, Counter32, Counter64 or any enumerated syntax (BITS or INTEGER).  

CHECK_DISPLAY_HINT_FORMAT

The standard format for DISPLAY-HINT is as follows.

 

INTEGER Format:  

<intDisplayHint> = "d" ["-" number]|<singleChar>  

<singleChar>  = o|x|b  

 

OCTET STRING Format:  

<octetDisplayHint> = <octDisplaySpec>

<octDisplaySpec> = number <displayFormat> [<sepChar>] | "*" number <displayFormat> [<sepChar> [<repTermChar>]]  

<displayFormat> = "d" | "b" | "o" | "x"

number - unsigned integer  

<sepChar> - separator character, any character except "*" and decimal digit  

<repTermChar> - repeat terminator character: any character other than "*" and decimal digit.

CHECK_TC_AS_SYNTAX

The SYNTAX clause of a Textual Convention can not refer to a previously defined Textual Convention.

The syntax could be any one of the following SNMP datatypes with possible sub-typing:

INTEGER, OCTET STRING, OBJECT IDENTIFIER, Integer32, IpAddress, Counter32, Gauge32, Unsigned32, TimeTicks, Opaque, and Counter64.

 

Critical Checks

 

AGENT_CAPABILITIES_CONSTRUCT

CHECK_CREATION_REQUIRES

The CREATION-REQUIRES clause must not be present unless the object named in the correspondings VARIATION clause is a conceptual row.

CHECK_ACCESS_FOR_CREATION_REQUIRES

All objects which are named in the CREATION-REQUIRES clause must have an access level of "read-create".

 

OBJECT_GROUP_CONSTRUCT

CHECK_OBJECTS_IN_THIS_MODULE

The objects defined in the OBJECT-GROUP macro should be defined in the same module where this OBJECT-GROUP is defined.

CHECK_OBJECTS_ACCESS

The MAX-ACCESS value of the objects defined in the OBJECTS clause must be one of the following.

accessible-for-notify  

read-only  

read-write  

read-create  

CHECK_INVALID_OBJECTS

The objects defined in the OBJECTS clause should not start with upper case.

 

MODULE_COMPLIANCE_CONSTRUCT

CHECK_MIN_ACCESS_CONSTRUCT

A MIN-ACCESS clause should not be present for

1. columnar objects

2. objects with syntax as Counter32 or Counter64.

CHECK_MANDATORY_GROUPS

A group named in a GROUP clause must not be the one defined in the corresponding MANDATORY-GROUPS clause.

CHECK_MIN_MAX_ACCESS

The access value specified in the MIN-ACCESS clause must not be greater than is specified in the MAX-ACCESS clause of the OBJECT-TYPE macro.

CHECK_OBJECTS_IN_MC

In the MODULE-COMPLIANCE construct, if the MODULE clause doesn't contain any moduleName, the objects should be defined in this module.

 

CHECK_IDENTIFIERS

CHECK_HYPHEN_IN_IDENTIFIERS

The hyphen are not allowed for an ASN.1 identifier (except for use by information modules converted from SMIv1 which did allow hyphens).

CHECK_NO_OF_CHARACTERS_EXCEEDS_64

The descriptor should not exceed 64 characters in length.

CHECK_NO_OF_CHARACTERS_EXCEEDS_32

The descriptor should not exceed 32 characters in length.

CHECK_TABLE_NAMING_CONVENTION

The convention for the naming of the table object is:

  • The table name should start with lowercase letter and it should ends with "Table".

  • The SEQUENCE object name should be same as the table name except, the initial lower case letter should be converted into upper case letter. The word "Table" should be replaced with the word "Entry".

  • The table entry name should be same as the SEQUENCE name but the initial upper case letter should be converted into lower case letter.
    For example,  
    table name: ifTable
    SEQUENCE name: IfEntry
    entry name : ifEntry

CHECK_LC_NAME

The descriptors/identifiers for the following macros should not start with upper case letter.

OBJECT-TYPE, NOTIFICATION-TYPE, NOTIFICATION-GROUP, OBJECT-GROUP, MODULE-COMPLIANCE, AGENT-CAPABILITIES TRAP-TYPE, OBJECT-IDENTITY, MODULE-IDENTITY

CHECK_ENUM_LABEL

The labels used in the enumeration list should not start with upper case or number and it should not contain hyphen.

CHECK_TC_CASE

The descriptor for the TEXTUAL-CONVENTION should not consist of all upper case letters.

VALIDATE_SEQUENCE_NAME

The descriptor for the SEQUENCE construct should start with upper case.

 

CHECK_DEFVAL

CHECK_BINARY_DEFVAL

The binary value should contains zeros and ones.  The value should contain eight digits and should be enclosed within single quotes and should end with 'b 'or 'B'.

CHECK_HEX_DEFVAL

The hex defval should contain even number of digits. The value should be enclosed in single quotes and should end with 'h' or 'H'.

CHECK_DEFVAL_FOR_COUNTER_SYNTAX

The DEFVAL clause should not be present for the nodes whith syntax Counter/Counter32 and Counter64.

CHECK_OID_OIDY_DEFVAL

For the nodes with syntax as OBJECT-IDENTIFIER, the value of the DEFVAL clause should be an OBJECT-IDENTITY macro.

CHECK_INVALID_OID_DEFVAL

For the nodes with syntax as OBJECT IDENTIFIER, the DEFVAL clause value should be:

1. defined in this module or imported from any other MIB module.

2. expressed as a single ASN.1 identifier, and not as a collection of sub-identifiers.

VALIDATE_DEFVAL

The value of the DEFVAL clause must correspond to the SYNTAX clause for the object. Also, the default value should not contradict the range/values specified in syntax for a particular variable.

 

CHECK_TABLE_CONSTRUCT

CHECK_SEQUENCE_CONSTRUCT

The number of nodes defined in the SEQUENCE construct should be same as the number of nodes actually defined. Also the syntax defined in the SEQUENCE construct should not contradict with the syntax in the node definition.

CHECK_INDEX_NODE_SYNTAX

The index nodes cannot have the syntax Counter/Counter32 and Counter64.

CHECK_RECURSIVE_AUGMENTS_CONSTRUCT

The node entry defined in the AUGMENTS clause should not contains AUGMENTS clause.

CHECK_COLUMNAR_NODES

The SEQUENCE construct should contain atleast a single node which is not auxillary.

CHECK_OCCURRENCE_OF_INDEX_NODE

The index node should not repeat in the same INDEX clause.

CHECK_OCCURRENCE_OF_ROWSTATUS_NODE

Atleast a single node in the SEQUENCE construct should have RowStatus as syntax.

CHECK_OCCURENCE_OF_IMPLIED_NODE

In the INDEX clause, the IMPLIED keyword should be present only for the last node.

CHECK_IMPLIED_NODE_TYPE

In the INDEX clause,  the IMPLIED keyword should be present only for the node with syntax as OCTET STRING with variable length or OBJECT-IDENTIFIER.

CHECK_ENTRY_IN_AUGMENTS_CONSTRUCT

The node present in the AUGMENTS construct should be a table entry.

CHECK_SEQUENCE_WITH_SUBTYPE

The subtyping information should not be present for the nodes present in the SEQUENCE construct.

CHECK_FOR_SCALAR_INDEX

The index node must not be scalar.

CHECK_INDEX_VALUE

The usage of the following named SMI types in the INDEX clause is allowed only in SMIv1 MIB.

INTEGER

OCTET STRING

OBJECT IDENTIFIER

NetworkAddress

IpAddress

These index values are not supported in SMIv2.

 

CHECK_SYNTAX

CHECK_BITS_VALUE

The BITS value should be contiguous starting from 0 and if not contiguous, the next bit value should be multiple of eight (for e.g. 0,1,2,3,8,9,.).

Although there is no SMI-specified limitation on the number of enumerations there may be implementation and interoperability limitations for sizes in excess of 128 bits.

CHECK_ENUM_IN_INTEGER32

The enumerated value should not be present for the Integer32 type.

CHECK_INVALID_V2_SYNTAX

For any object with an integer-valued SYNTAX clause, in which the corresponding INTEGER does not have a range restriction the object MUST have the value of the SYNTAX clause changed to Integer32, or have an appropriate range specified.

If any object has a SYNTAX clause value of Counter, the object MUST have the value of its SYNTAX clause changed to Counter32.

If any object has a SYNTAX clause value of Gauge, the object MUST have the value of its SYNTAX clause changed to Gauge32, or Unsigned32 where appropriate.

CHECK_NETWORK_ADDRESS

The syntax "NetworkAddress" should not be used in an SMIv2-MIB.

CHECK_FOR_SIZE_CLAUSE_IN_OCTET_STRING

If the OCTET STRING syntax contains subtyping information, the SIZE clause must be present.

CHECK_ZERO_IN_ENUM

The enumerated value start at 1 and must be numbered continuously. If the syntax of the objects defined in the INDEX clause is enumerated Integer, the zero should not be used as an enumerated value.

CHECK_FOR_SIZE_CLAUSE_IN_INTEGER

The SIZE clause should not be present for the INTEGER and Integer32 syntax.

CHECK_RANGE_INTERSECTION

In case of multiple ranges, the range values should not overlap. The range definition (0..100 | 50..150) is invalid.

CHECK_RANGE_DUPLICATION

The range values should be unique. The range values should not duplicate. In the range definition (0..100 | 150 | 200..250 | 150). The value '150' is defined twice.

CHECK_SUBTYPING_FOR_SYNTAX

The sub-typing information should not be present for the following syntax.

OBJECT IDENTIFIER, IpAddress, Counter32, Counter64 and TimeTicks.

CHECK_SIZE_FOR_OCTET_STRING

The size of the OCTET STRING should not exceed 65535.

CHECK_NEGATIVE_VALUE_IN_SIZE

The negative values should not be used in the range definition.

CHECK_MAX_MIN_RANGE

The keyword MAX and MIN should not be used in the range definitions.

CHECK_OPAQUE_SYNTAX

The Opaque type is provided solely for backward-compatibility, and shall not be used for newly-defined object types.

 

CHECK_ACCESS

CHECK_ACCESS_FOR_COUNTER_SYNTAX

If the syntax of the node is Counter/Counter32 or Counter64, the access value should be either 'read-only' or 'accessible-for-notify'.

CHECK_ROWSTATUS_ACCESS

If the syntax of the node is RowStatus, the access value should be read-create.

CHECK_ACCESS_FOR_COLUMNAR_NODES

In a conceptual row, if any of the node has read-create as its access value, no other node in the same row can have the access value as read-write.

CHECK_ACCESS_VALUE

The SMIv1 access value "not-implemented" should not be used in an SMIv2 module.

CHECK_ACCESS_IN_TABLE_AND_ENTRY_NODE

The access value for the table and table entry should be 'not-accessible'.

CHECK_INDEX_NODE_ACCESS

The access value for the index nodes should be 'not-accessible'.

 

CHECK_STATUS

CHECK_STATUS

The STATUS values for the SMIv2 MIB modules are current deprecated obsolete.

 

CHECK_MISCELLANEOUS

CHECK_OID_BETN_MODNAME_DEFINITIONS

The object identifier value should not be placed between the module name and the "DEFINITIONS" keyword."

TEST-MIB { iso org(3) dod(6) internet(1)  private(4) enterprises(1) 2186}

DEFINITIONS ::= BEGIN

This is invalid.  

CHECK_COMMENTS_IN_TEXT

The ASN comments (--) should not be present inside the quoted String.

CHECK_ACCESS_KEYWORD

The SMIV1 keyword ACCESS should not be used in an SMIv2 MIB. It should be replaced by MAX-ACCESS.

CHECK_NUMBER_OF_COLUMNAR_NODES

The conceptual row should contain no more than approximately 20 objects.

CHECK_BRACES_IN_DEFVAL

The DEFVAL value should be present within the braces.

CHECK_EMPTY_DEFVAL

The value in the DEFVAL field should not be empty.

CHECK_FOR_SMIV1_CONSTRUCT

The SMIv1 macros must not be used in SMIv2 information modules.

 



Copyright © 2012, ZOHO Corp. All Rights Reserved.