Object and Instance Identifiers (OIDs and IIDs)
Abstract Syntax Notation One (ASN.1) is the language used to define the syntax of object and instance identifiers. Without writing a book about it, this topic is meant to provide you with the basic knowledge you need to use SNMP MibNode objects.
An object identifier (OID) uniquely describes a node within the MIB “tree”. It might be helpful to think of each node as a software class: they are only definitions, and do not indicate the presence of an instance of the class. A basic MIB object (or class), sysDescr, has “1.3.6.1.2.1.1.1” as its OID. If an OID is a “leaf”, however, then it is possible to reference one or more instances of the class. There are two possible kinds of “leaf” OIDs:
- Scalar “leaf” OIDs are only allowed to have one instance of the class, and that instance is referenced by adding a “.0” suffix. So “sysDescr” has an OID of “1.3.6.1.2.1.1.1” and an IID of “1.3.6.1.2.1.1.1.0” because it is a scalar “leaf” OID.
- Table column “leaf” OIDs normally have multiple instances of the class, and each instance is referenced by adding a suffix that indicates the “indexer” to be used to identify the conceptual row. “ifDescr”, for example, has an OID of “1.3.6.1.2.1.2.2.1.2” and IIDs that are formed by adding a very simple indexer to the OID (“1.3.6.1.2.1.2.2.1.2.1”, “1.3.6.1.2.1.2.2.1.2.2”, etc.). Although “ifDescr” uses a simple integer indexer, other tables can use arbitrarily complex indexers as long as they stick with ASN.1.
PowerSNMP provides numerous scalar OIDs for your use in the Dart.PowerSNMP.MibObject namespace. When you parse MIB files and add them into your project, we add these additional classes to the MibObject namespace so you can conveniently reference them. When a MibNode object is used to instantiate a Variable, the OID is reported as the Variable.Id property.
PowerSNMP provides numerous non-scalar OIDs for your use in other namespaces:
- The Dart.PowerSNMP.MibTableColumn namespace includes OIDs that can be used for GetNextMessage and GetBulkMessage requests. These are requests that do not need IIDs as variables, but will return IIDs within the ResponseMessage.Variables collection of the response. If you add a series of objects from the Dart.PowerSNMP.MibTableColumn namespace to the GetNextMessage.Variables collection, then you can effectively retrieve each row of the table being queried.
- The Dart.PowerSNMP.MibTable namespace can also be used for GetNextMessage requests. Since this only provides a single OID, multiple GetNextMessage objects must be sent to walk the table. These are not leaf objects, and cannot have instances associated with them.
- The Dart.PowerSNMP.MibTableEntry namespace provides conceptual definitions of table rows. These objects have limited practical application beyond providing table definition information. These are not leaf objects, and cannot have instances associated with them.
- The Dart.PowerSNMP.MibIdentifier namespace provides definitions of MIB nodes that serve as branch roots and do not have associated IIDs.
- The Dart.PowerSNMP.MibNotification namespace provides definitions of MIB nodes that serve as definitions of notification messages and do not have associated IIDs.
- The Dart.PowerSNMP.MibGroup namespace provides definitions of MIB nodes that serve as definitions of notification and object groups and do not have associated IIDs.
In This Section
- Protocol Overview
- This topic provides an overview of the SNMP Protocol.
- Object and Instance Identifiers (OIDs and IIDs)
- This topic discusses the ASN.1 naming convention as it applies to OIDs and IIDs.
- Get / GetNext / GetBulk Requests
- This topic discusses Get, GetNext and GetBulk request messages.
- Set Request
- This topic discusses Set request messages.
- Inform Request
- This topic discusses Inform Request messages.
- Response
- This topic discusses SNMP Response messages.
- Trap
- This topic discusses Trap messages.
- Notify (Trap v2/3)
- This topic discusses Notify messages.
PowerSNMP SNMP Menublock
Send comments on this topic.
Documentation version 1.2.0.0.
© 2008 Dart Communications. All rights reserved.