Exporting MIB Variables Using the IP Flow Information Export (IPFIX) Protocol
Extracted elements (30)
A separate mibObjectSyntax Information Element is required rather than extending the existing informationElementDataType subregistry because the SYNTAX clause of a textual convention can contain almost any name, making enumeration impractical.
IPFIX is used as a push mechanism instead of SNMP polling to avoid synchronization problems: SNMP data retrieved separately from Data Records cannot be temporally correlated, and the time lag between IPFIX counters and SNMP counters can be significant when polled by a generic NMS.
Rather than extending the IPFIX standard to allow extended Field Specifiers (which would require a new, potentially non-backward-compatible IPFIX version), this document uses standard IPFIX Options Templates to export MIB metadata alongside mibObjectValue Information Elements.
A templateId is only locally unique within a combination of an Observation Domain and Transport Session; each MIB Field Options Data Record can therefore only refer to templateIds within the same Observation Domain and session.
Exporting a value of a MIB object defined in a particular MIB module does not imply that the SNMP process on the device supports that MIB module; the Metering or Exporting Process may capture or create data that matches the MIB object definition without running SNMP.
The E bit (enterprise bit) of mibObjectValue and mibObjectIdentifier Information Elements is always set to 0, even when the MIB object being exported was defined in an enterprise-specific MIB module; the enterprise origin is conveyed by the OID value itself.
Data Records containing mibObjectValue IEs MUST NOT be exported if their corresponding Data Template or MIB Field Options Template has been withdrawn; MIB Field Options Template IDs MUST NOT be reused while they are required by any existing Data Templates.
If a Template is replaced with a new one, a new MIB Field Options Data Record MUST be sent referencing the new Template ID, and a new Template ID MUST be used whenever the field ordering in a Template changes.
If exporting a MIB OID value that is not in the default SNMP context, the mibContextEngineID and mibContextName fields MUST be included in the MIB Field Options Template and associated Data Records, or in the same Template as the mibObjectValue field.
If multiple MIB Field Options Data Records referring to the same mibObjectValue IE are received, the latest MUST be used, consistent with standard IPFIX Template behavior.
The Collecting Process MUST store all received MIB Field Options Data information for the duration of each Transport Session, because it will need this metadata to fully decode each mibObjectValue Information Element.
The export order within an IPFIX Message MUST be: (1) Data Template for mibObjectValue IEs (Set ID 2), (2) MIB Field Options Template (Set ID 3), (3) MIB Field Options Data Records (Set ID ≥ 256), (4) MIB Object Value Data Records (Set ID ≥ 256).
The MIB Field Options Template and MIB Field Options Data Records MUST be exported in the same IPFIX Message as any Template that uses a mibObjectValue Information Element.
When exporting over SCTP, the MIB Field Options Data Records MUST be exported reliably and in the same SCTP stream as their associated Templates per RFC 6526; in constrained environments the MIB Field Options and Data Templates MAY be sent in separate SCTP messages provided order is maintained.
When using mibObjectValueRow or mibObjectValueTable, all INDEX fields defined in the INDEX clause of the conceptual row MUST be present as Scope Fields in the same order as the INDEX clause; the full OID of the SEQUENCE entry (not the SEQUENCE OF table) MUST be exported.
Eleven mibObjectValue Information Elements are defined, one per SMIv2 SYNTAX type: mibObjectValueInteger, mibObjectValueOctetString, mibObjectValueOID, mibObjectValueBits, mibObjectValueIPAddress, mibObjectValueCounter, mibObjectValueGauge, mibObjectValueTimeTicks, mibObjectValueUnsigned, mibObjectValueRow, and mibObjectValueTable.
Four IPFIX Sets are used together to export a Flow containing mibObjectValue IEs: (1) a Template Set including the mibObjectValue IE, (2) a MIB Field Options Template Set, (3) a MIB Field Options Data Set containing metadata per MIB object, and (4) a Data Set with the actual MIB-sourced values.
mibIndexIndicator is a MIB Field Options IE whose bits indicate which fields in the same Data Record provide the INDEX values for an individually exported columnar object; index fields MUST appear in the same order as specified in the INDEX clause of the conceptual row.
mibObjectValueRow is an IPFIX Structured Data subTemplateList IE used to export a complete or partial conceptual row; the referenced Options Template MUST use the INDEX clause fields as Scope Fields in the same order as the INDEX clause, and the full OID of the SEQUENCE entry (not the table) MUST be exported.
mibObjectValueTable is an IPFIX Structured Data subTemplateList IE identical to mibObjectValueRow except the subTemplateList may contain zero or more entries, allowing a complete conceptual table to be exported as a single field within a Data Record.
The MIB Field Options Template is an IPFIX Options Template with three required fields: scope fields templateId and informationElementIndex (which together uniquely identify one mibObjectValue IE in a Template), plus mibObjectIdentifier carrying the BER-encoded OID.
The MIB Type Options Template optionally exports static type metadata from the MIB module definition: mibObjectIdentifier (recommended as scope), mibObjectName, mibObjectDescription, mibObjectSyntax, and mibModuleName, to aid Collectors without access to the MIB module.
Eleven new MIB Object Value Information Elements are registered (Section 11.2.1): mibObjectValueInteger, mibObjectValueOctetString, mibObjectValueOID, mibObjectValueBits, mibObjectValueIPAddress, mibObjectValueCounter, mibObjectValueGauge, mibObjectValueTimeTicks, mibObjectValueUnsigned, mibObjectValueTable, and mibObjectValueRow.
Four new MIB Type Information Elements are registered (Section 11.2.3): mibObjectName, mibObjectDescription, mibObjectSyntax, and mibModuleName, intended to convey static MIB module metadata to Collectors that lack access to the MIB module.
Six new MIB Field Options Information Elements are registered (Section 11.2.2): mibObjectIdentifier, mibSubIdentifier, mibIndexIndicator, mibCaptureTimeSemantics, mibContextEngineID, and mibContextName.
Two new IPFIX semantics are registered: snmpCounter (Section 11.1.1), for SMIv2 Counter32 and Counter64 types, and snmpGauge (Section 11.1.2), for SMIv2 Gauge32 types, to distinguish these from generic unsigned IPFIX fields.
The security considerations of the IPFIX protocol (RFC 7011) apply to this specification; MIB variable values exported via IPFIX may contain sensitive management data, and implementers should use IPFIX's existing confidentiality and integrity mechanisms to protect MIB Field Options Data Records and the mibObjectValue Data Records they annotate.
The MIB Field Options Data Record contains one entry per mibObjectValue IE: a 2-octet templateId, a 2-octet informationElementIndex, and a variable-length mibObjectIdentifier prefixed by a VLEN byte per RFC 7011 Section 7.
The mibObjectIdentifier field carries an SNMP Object Identifier encoded in ASN.1/BER (X.690) format within an octetArray; variable-length encoding (field length = 65535) is RECOMMENDED so that OIDs of different lengths can be exported efficiently and the MIB Field Options Template can be reused.
The SMIv2 SYNTAX is mapped to mibObjectValue IEs as follows: INTEGER/Integer32 → mibObjectValueInteger; OCTET STRING and Opaque → mibObjectValueOctetString; Counter32 and Counter64 → mibObjectValueCounter; Gauge32 → mibObjectValueGauge; SEQUENCE → mibObjectValueRow; SEQUENCE OF → mibObjectValueTable.