Contact Us
+1.831.460.7010

pdf icon small Printable Version

A common area of confusion among SNMP MIB designers is the use of BITS.

Putting BITS in the IMPORTs clause of a MIB is illegal. The MIB compiler included with SilverCreek, the SNMP Test Suite from InterWorking Labs, will reject a MIB that has BITS in the IMPORTs, because it is wrong per RFC 2578. Other MIB compilers for other types of products, such as simulators, are very permissive; these MIB compilers will allow this error and many other errors to slide by in order to manage or simulate very badly written MIBs.

BITS is not a TEXTUAL-CONVENTION. The standard TEXTUAL-CONVENTION types are defined in RFC 1903. Both RFC 1902 and 1903 define BITS, but as part of the OBJECT-TYPE and TEXTUAL-CONVENTION macros:

 
OBJECT-TYPE MACRO ::=
BEGIN
.
.
.
type(ObjectSyntax)
| "BITS" "{" Kibbles "}"
.
.
.
END

(from RFC 1902)

TEXTUAL-CONVENTION MACRO ::=
BEGIN
.
.
.
Syntax ::=
type(ObjectSyntax)
| "BITS" "{" Kibbles "}"
.
.
.
END

(from RFC 1903)

Hence, BITS is an implicit part of the OBJECT-TYPE and TEXTUAL-CONVENTION macros. For BITS to be considered a TEXTUAL-CONVENTION (and thus need to be imported), BITS would need to have been defined along the lines of:

BITS ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"This would be BITS as a TEXTUAL-CONVENTION"
SYNTAX OCTET STRING

Such a definition does not exist.

The BITS clause is intended to add semantic clarity to the notion of assigning meaning to bits in an OCTET STRING.

Please see Section 3.2 of RFC 2578 "Structure of Management Information Version 2" that states:

However, the following must not be included in an IMPORTS statement:
- named types defined by ASN.1 itself, specifically: INTEGER, OCTET STRING, OBJECT IDENTIFIER, SEQUENCE, SEQUENCE OF type,
- the BITS construct.

Not sure what you need?