MIB Smithy

  1. Up to Table of Contents

Object Identifier Values

In basic terms, an OID value consists of two or more integers (called subidentifiers) separated by a dot ("."). Due to the Basic Encoding Rules (the part of ASN.1 that defines how values are encoded for transmission "on the wire"), the first subidentifier must be 0, 1 or 2. The second subidentifier must be between 0 and 39 if the first subidentifier is 0 or 1. Otherwise, the only further restrictions imposed by SNMP are that (1) there is a limit of 128 subidentifiers in an OID value, and (2) that each subidentifier is restricted to the range 0..4294967295.

In the SMI/MIB module language, OID values can either be "assigned" or "registered", depending on the type of record or macro used to define the OID. "Registered" OIDs are OIDs that are unique to a particular definition, such that no two records may register the same OID. All of the SMI macros register OIDs. The ASN.1 Value Assignment form (descriptor OBJECT IDENTIFIER ::= { ... }) is only an assignment. Assignments do not necessarily uniquely identify anything, and can in fact have the same value as a registered OID (although many compilers don't support this).

MIB Smithy recognizes many forms for object identifiers, owing to the several ways in which they can be specified in the SMI language. OID values may be relative, where the first part of the OID value is the same as Value Reference specifying a starting point or prefix in the OID tree (typically specified as a lowercase identifier) and followed by one or more integer subidentifiers, or absolute, where every integer subidentifier is present all the way up to one of the three roots 0, 1 or 2.

Further, each subidentifier (in both absolute and relative forms) can be a simple numeric value or a name-and-number value, where the integer subidentifier is given in parentheses following a lowercase identifier (as in org(3)). The following examples of OID values are all equivalent:

  • system.1
  • SNMPv2-MIB:system.1
  • SNMPv2-MIB:mib-2.system(1).1
  • iso.org(3).
  • iso(1).org(3).

When saving or previewing a MIB module, MIB Smithy will format OID values using whichever form was entered during creation. Some properties, such as a Conformance Group Name, provide a simple entry box where normally a single identifier is expected but OID values can be used (with caution due to compatibility issues such usage creates). Most OID values, such as those assigned to an OBJECT-TYPE, provide a multi-part form and filters to make changes easy, as shown below.

OID Property

Figure - Object Identifier Value Property

The entire OID value can, at your discretion, be entered into the Subidentifier(s) field. However, the Module Filter and Parent Identifier comboboxes can be used to quickly select a desired parent. The Parent Identifier combobox will list all records that have OID values that can be used as parents for the record, subject to the Module Filter selection, which can be used to filter the Parent Identifier list to only those records that are in the selected module. Checking the "Include module reference in value" option will preserve the selected module name when saving or previewing the module (as in ... ::= { SNMPv2-MIB.system 1 } ). This can be used in cases where a module references two or more external (imported) records having the same name. This feature of the SMI language is not widely supported so it should not be used unless absolutely necessary.

It is important to note that the identifier in the name-and-number form does not define any assignment: it is only for the reader's benefit or for reference when an OID value is specified with multiple than one subidentifiers. Further, any records that define OID values also allow simple Value Reference forms (a lowercase identifier or ucidentifier:lcidentifier form). One should be aware, if assigning a simple Value Reference form to a record's OID property, that many compilers can't handle such forms where multiple subidentifiers and { braces } are expected.
  1. Up to Table of Contents