Recent from talks
Nothing was collected or created yet.
Management information base
View on WikipediaThis article needs additional citations for verification. (February 2009) |
A management information base (MIB) is a database used for managing the entities in a communication network. Most often associated with the Simple Network Management Protocol (SNMP), the term is also used more generically in contexts such as in OSI/ISO Network management model. While intended to refer to the complete collection of management information available on an entity, it is often used to refer to a particular subset, more correctly referred to as MIB-module.
Objects in the MIB are defined using a subset of Abstract Syntax Notation One (ASN.1) called "Structure of Management Information Version 2 (SMIv2)" RFC 2578. The software that performs the parsing is a MIB compiler.
The database is hierarchical (tree-structured) and each entry is addressed through an object identifier (OID). Internet documentation RFCs discuss MIBs, notably RFC 1155, "Structure and Identification of Management Information for TCP/IP based internets", and its two companions, RFC 1213, "Management Information Base for Network Management of TCP/IP-based internets", and RFC 1157, "A Simple Network Management Protocol".
ASN.1
[edit]Abstract Syntax Notation One (ASN.1) is a standard and flexible notation that describes data structures for representing, encoding, transmitting, and decoding data. It provides a set of formal rules for describing the structure of objects that are independent of machine-specific encoding techniques and is a precise, formal notation that removes ambiguities.
ASN.1 is a joint ISO and ITU-T standard, originally defined in 1984 as part of CCITT X.409:1984. ASN.1 moved to its own standard, X.208, in 1988 due to its broader applicability. The substantially revised 1995 version is covered by the X.680 standards series.[1]
An adapted subset of ASN.1, Structure of Management Information (SMI), is specified for use in SNMP to define sets of related MIB objects; these sets are termed MIB modules.
MIB hierarchy
[edit]The MIB hierarchy can be depicted as a tree with a nameless root, the levels of which are assigned by different organizations. The top-level MIB OIDs belong to different standards organizations, while lower-level object IDs are allocated by associated organizations. This model permits management across all layers of the OSI reference model, extending into applications such as databases, email, and the Java reference model, as MIBs can be defined for all such area-specific information and operations.
A managed object (sometimes called a MIB object or object) is one of any number of specific characteristics of a managed device. Managed objects are made up of one or more object instances, which are essentially variables. An OID uniquely identifies a managed object in the MIB hierarchy.
Two types of managed objects exist:
- Scalar objects define a single object instance.
- Tabular objects define multiple related object instances that are grouped in MIB tables.
An example of a managed object is atInput, which is a scalar object that contains a single object instance, the integer value that indicates the total number of input AppleTalk packets on a router interface.
SNMPv1 and SMI-specific data types
[edit]The first version of the Structure of Management Information (SMIv1) specifies the use of a number of SMI-specific data types, which are divided into two categories: simple data types and application-wide data types.
Simple data types
[edit]Three simple data types are defined in the SNMPv1 SMI:
- The integer data type is a signed integer in the range of −231 to 231−1.
- Octet strings are ordered sequences of 0 to 65,535 octets.
- Object IDs represent object identifiers that are allocated according to the rules specified in ASN.1.
Application-wide data types
[edit]The following application-wide data types exist in the SNMPv1 SMI:
- Network addresses represent addresses from a particular protocol family. SMIv1 supports only 32-bit (IPv4) addresses. SMIv2 uses Octet Strings to represent addresses generically, and thus are usable in SMIv1 too. SMIv1 had an explicit IPv4 address datatype.
- Counters are non-negative integers that increase until they reach a maximum value and then roll over to zero. SNMPv1 specifies a counter size of 32 bits.
- Gauges are non-negative integers that can increase or decrease between specified minimum and maximum values. Whenever the system property represented by the gauge is outside of that range, the value of the gauge itself will vary no further than the respective maximum or minimum, as specified in RFC 2578.
- Time ticks represent time since some event, measured in hundredths of a second.
- Opaques represent an arbitrary encoding that is used to pass arbitrary information strings that do not conform to the strict data typing used by the SMI.
- Integers represent signed integer-valued information. This data type redefines the integer data type, which has arbitrary precision in ASN.1 but bounded precision in the SMI.
- Unsigned integers represent unsigned integer-valued information, which is useful when values are always non-negative. This data type redefines the integer data type, which has arbitrary precision in ASN.1 but bounded precision in the SMI.
SNMPv1 MIB tables
[edit]The SNMPv1 SMI defines highly structured tables that are used to group the instances of a tabular object (that is, an object that contains multiple variables). Tables are composed of zero or more rows, which are indexed in a way that allows an SNMP manager to retrieve or alter an entire row with a single Get, GetNext, or Set command.
SMIv2
[edit]The second version of the SMI (SMIv2) is described in RFC 2578 and RFC 2579. It enhances and adds to the SMIv1-specific data types, such as including bit strings, network addresses, and counters. Bit strings are defined only in SMIv2 and comprise zero or more named bits that specify a value. Network addresses represent an address from a particular protocol family. Counters are non-negative integers that increase until they reach a maximum value and then return to zero. In SMIv1, a 32-bit counter size is specified. In SMIv2, 32-bit and 64-bit counters are defined.
SMIv2 also specifies information modules, which specify a group of related definitions. Three types of SMI information modules exist: MIB modules, compliance statements, and capability statements.
- MIB modules contain definitions of interrelated managed objects.
- Compliance statements provide a systematic way to describe a group of managed objects that must be implemented for conformance to a standard.
- Capability statements are used to indicate the precise level of support that an agent claims with respect to a MIB group. An NMS can adjust its behavior toward agents according to the capabilities statements associated with each agent.
Updating MIB modules
[edit]MIB modules are occasionally updated to add new functionality, remove ambiguities and fix defects. These changes are made in conformance to section 10 of RFC 2578 and section 5 of RFC 2579. An example of a MIB module that has been updated many times is the important set of objects that was originally defined in RFC 1213, also known as "MIB-II". This MIB module has since been split up and can be found in MIB modules such as RFC 4293 "Management Information Base for the Internet Protocol (IP)", RFC 4022 "Management Information Base for the Transmission Control Protocol (TCP)", RFC 4113 "Management Information Base for the User Datagram Protocol (UDP)", RFC 2863 "The Interfaces Group MIB" and RFC 3418 "Management Information Base (MIB) for the Simple Network Management Protocol (SNMP)".
Example
[edit]Example of MIB for SNMP RFC 3418
└── SNMPv2-MIB(.1.3.6.1.2.1)
└── system(.1)
├── sysDescr (.1)
├── sysObjectID (.2)
├── sysUpTime (.3)
├── sysName (.5)
├── sysContact (.4)
├── sysLocation (.6)
├── sysServices (.7)
├── sysORLastChange (.8)
└── sysORTable (.9)
└── sysOREntry (.1)
├── sysORIndex (.1)
├── sysORID (.2)
├── sysORDescr (.3)
└── sysORUpTime (.4)
To call the value of sysName one would use:
# snmpwalk 10.32.13.36 -v2c -c public sysName
SNMPv2-MIB::sysName.0 = STRING: SOME_HOSTNAME
- or
# snmpwalk 10.32.13.36 -v2c -c public .1.3.6.1.2.1.1.5
SNMPv2-MIB::sysName.0 = STRING: SOME_HOSTNAME
- or
# snmpwalk 10.32.13.36 -v2c -c public .1.3.6.1.2.1.1.5.0
SNMPv2-MIB::sysName.0 = STRING: SOME_HOSTNAME
Index
[edit]There are a large number of MIBs defined by standards organizations like the IETF, private enterprises and other entities.
IETF maintained
[edit]There are 318 RFCs in the first 5000 RFCs from the IETF that contain MIBs. This list is a mere fraction of the MIBs that have been written:
- SNMP - SMI: RFC 1155 — Defines the Structure of Management Information (SMI)
- MIB-I: RFC 1156 — Historically used with CMOT, not to be used with SNMP
- SNMPv2-SMI: RFC 2578 — Structure of Management Information Version 2 (SMIv2)
- MIB-II: RFC 1213 — Management Information Base for Network Management of TCP/IP-based internets
- SNMPv2-MIB: RFC 3418 — Management Information Base (MIB) for the Simple Network Management Protocol (SNMP)
- TCP-MIB: RFC 4022 — Management Information Base for the Transmission Control Protocol (TCP)
- UDP-MIB: RFC 4113 — Management Information Base for the User Datagram Protocol (UDP)
- IP-MIB: RFC 4293 — Management Information Base for the Internet Protocol (IP)
- IF-MIB: RFC 2863 — The Interfaces Group MIB
- ENTITY-MIB: RFC 4133 — Entity MIB (Version 3)
- ENTITY-STATE-MIB: RFC 4268 — Entity State MIB
- ALARM-MIB: RFC 3877 — Alarm Management Information Base (MIB)
- Fibre Channel
- FC-MGMT-MIB: RFC 4044 Fibre Channel Management MIB
- FIBRE-CHANNEL-FE-MIB: RFC 2837 Definitions of Managed Objects for the Fabric Element in Fibre Channel Standard
- HPR-IP-MIB: RFC 2584 — Definitions of Managed Objects for APPN/HPR in IP Networks
IEEE maintained
[edit]The IETF and IEEE have agreed to move MIBs relating to IEEE work (for example Ethernet and bridging) to their respective IEEE workgroup. This is in process and a few items are complete.
- Network bridge
- IEEE 802.1ap-2008[2] consolidated the IEEE and IETF RFCs related to bridging networks into eight related MIBs.
- Management Information Base (MIB) Modules / IEEE 802.1
References
[edit]- ^ Recommendation X.680, ITU
- ^ MIBs, IEEE 802
External links
[edit]- ByteSphere's MIB Database, a free online MIB repository for thousands of SNMP MIBs.
- SimpleWeb MIBs Archived 2012-06-19 at the Wayback Machine
- MIB index, ICIR.
- MIB Compilers and Loading MIBs, Cisco.
- ipMonitor's SNMP Center Archived 2013-01-03 at archive.today
- MIB Depot Archived 2008-12-23 at the Wayback Machine — extensive list of MIBs
- PEN (Private Enterprise Number) registry
- PEN request authority
MIB browsers
[edit]- SnmpB: A graphical open source MIB browser for Windows, OSX and Linux.
- mbrowse: A graphical SNMP MIB browser for Linux, based upon GTK+ and Net-SNMP.
- BlackOwl MIB Browser: A graphical MIB browser for Windows and Linux which can extract MIBs from RFCs and display graphs.
- SMI-Mib Browser: A graphical MIB browser (as of 2010-05-18, this project is no longer under active development).
- MBJ: A graphical MIB browser, written in Java
- JMibBrowser: A graphical MIB browser, written in Java. It can send SNMP requests and dynamically load MIB data.
- JManager: An open-source SNMP manager, written in Java. Capable of importing MIBs, support for IPv6.
- qtmib: An open source graphical MIB browser written in C++. It is built as a front-end for Net-SNMP.
- iReasoning MIB Browser: A graphical MIB browser, written in Java. Load MIB files and issue SNMP requests, available on Windows, OS X and Linux.
- tkmib: A graphical MIB browser, using Tk/perl. Included with Net-SNMP.
Management information base
View on GrokipediaOverview
Definition and Purpose
A Management Information Base (MIB) is a virtual information store containing a collection of managed objects that represent various aspects of a managed network device, such as its configuration, status, and performance metrics, organized in a hierarchical structure for access via management protocols.[6] These objects provide a standardized way to describe the data and semantics of device attributes, enabling managers to query and manipulate them remotely.[6] The primary purpose of an MIB is to facilitate centralized monitoring, configuration, and control of network elements by defining the structure, meaning, and access methods for the managed objects it contains.[7] This allows network administrators to perform tasks like detecting faults, adjusting settings, tracking usage, measuring performance, and ensuring security across interconnected devices.[7] SNMP serves as the primary protocol for querying and setting these MIB objects, supporting operations such as get, set, and trap notifications.[6] The concept of the MIB originated in the 1980s through efforts by the Internet Engineering Task Force (IETF) to standardize network management for TCP/IP-based internets, with its first formalization in RFC 1065, which defined the initial structure and identification scheme for management information. This early work laid the groundwork for subsequent evolutions, including MIB-II in RFC 1213, enhancing the framework for broader applicability.[4] Key benefits of the MIB include promoting interoperability among devices from diverse vendors by enforcing a common data model, which reduces integration challenges in heterogeneous networks.[7] It also aligns with the FCAPS model—encompassing fault, configuration, accounting, performance, and security management—providing a unified approach to these essential network management functions.[7]Role in Network Management
The Management Information Base (MIB) serves as the foundational schema for the Simple Network Management Protocol (SNMP), defining the structure and semantics of managed objects that enable network managers to retrieve and modify device states through operations such as get, set, traps, and informs.[6] In SNMP, MIBs organize data into a hierarchical tree of object identifiers (OIDs), allowing agents on network devices to expose information like system descriptions and packet counters for querying via GetRequest-PDU and GetNextRequest-PDU, while SetRequest-PDU facilitates configuration changes.[1] Trap-PDU and InformRequest-PDU, in turn, use MIB-defined notifications to asynchronously report events, such as authentication failures or system restarts, ensuring efficient asynchronous communication between agents and managers.[6] This integration supports the core SNMP architecture, where MIBs act as a virtual database accessible over IP networks to monitor and control diverse devices.[8] In practical network management, MIBs enable key use cases including monitoring device status, configuring operational parameters, and generating threshold-based alerts. For instance, managers can poll MIB objects to track interface errors or utilization rates, such as querying the ifInErrors counter to detect packet drops on network links.[1] Configuration tasks leverage set operations on MIB variables, like assigning IP addresses to interfaces via the ipAdEntIfIndex table, allowing remote adjustments without physical access.[1] Alerts are triggered through trap generation when predefined thresholds are exceeded, such as linkDown notifications for interface failures, which include contextual details like the affected ifIndex to expedite troubleshooting.[1] These capabilities promote proactive management, reducing downtime in large-scale IP networks by providing standardized access to device-specific data.[8] Standard MIBs, published as IETF RFCs under the internet management subtree (OID 1.3.6.1.2), promote cross-vendor interoperability by enforcing uniform definitions for common objects, enabling seamless monitoring across heterogeneous devices from different manufacturers.[9] Vendor-specific or private MIBs, registered under the enterprises subtree (OID 1.3.6.1.4.1), extend this framework to handle proprietary features, such as custom hardware diagnostics unique to a vendor's equipment, while still adhering to core SMI conventions for compatibility.[9] This dual structure balances standardization with innovation, ensuring that essential network functions remain portable while allowing tailored enhancements.[9]Standards Foundation
ASN.1 Encoding
Abstract Syntax Notation One (ASN.1) is an International Standard defined in ITU-T Recommendation X.680 that provides a notation for the functional specification and definition of data types, values, and encoding rules, enabling the description of data structures independently of any specific programming language or hardware implementation.[10] This standard organizes definitions into modules, which group related types and values, supports a variety of built-in types such as INTEGER and OCTET STRING, and allows for the creation of complex structured types like sequences and choices.[10] ASN.1 ensures interoperability by abstracting the syntax from the concrete representation, facilitating cross-platform data exchange in protocols and applications.[10] In Management Information Bases (MIBs) for the Simple Network Management Protocol (SNMP), ASN.1 serves as the foundational language for specifying the syntax of managed objects and the structure of protocol data units (PDUs).[1] It defines object types, such as INTEGER for numeric values and OCTET STRING for binary or textual data, ensuring consistent representation of network management information across diverse systems.[1] For serialization, SNMP employs the Basic Encoding Rules (BER) of ASN.1 to encode messages in a definite-length form, with a preference for primitive (non-constructed) encodings where possible to optimize transmission efficiency.[1] The Distinguished Encoding Rules (DER), a variant of BER providing unambiguous canonical output, may also be referenced in related contexts but is not the primary rule for SNMP messaging.[11] Key constructs in ASN.1 include modules, which encapsulate sets of type and value definitions to promote modularity and reusability in specifications.[12] Tags, composed of a class (e.g., universal, application, private, or context-specific) and a number, uniquely identify types and fields within structures, preventing ambiguity during decoding.[12] In SNMP versions 1 and 2, implicit tagging overrides the underlying type's tag to produce more compact encodings, while explicit tagging wraps the content with an additional tag for clarity, as specified in the subset of ASN.1 used by the Structure of Management Information (SMI).[1] These mechanisms ensure that variable bindings in SNMP PDUs, which pair object names with values, are distinctly encoded regardless of the implementation.[11] SNMP's SMI uses a subset of the 1988 edition of ASN.1, which supports the frameworks for both SNMPv1 and SNMPv2. While ASN.1 has seen later revisions (e.g., 1997), SNMP retains the 1988 subset for compatibility.[11] SNMPv3 retains this core ASN.1 notation and BER encoding for compatibility but extends the message format to include security contexts, such as authentication and privacy parameters, processed within the architecture's security subsystem.[13] This progression maintains backward compatibility while addressing evolving requirements for secure network management.[13] The Object Identifier (OID), an ASN.1 type, briefly underpins the hierarchical naming in MIBs but is detailed elsewhere.[11]Structure of Management Information (SMI)
The Structure of Management Information (SMI) is a collection of Internet Engineering Task Force (IETF) standards that establish the rules for naming, syntax, and encoding of objects in Management Information Bases (MIBs) used with the Simple Network Management Protocol (SNMP). These standards leverage Abstract Syntax Notation One (ASN.1) as the underlying notation for defining managed objects in a platform-independent way. SMI ensures consistency in how network management data is structured and represented across diverse devices and systems.[2][9] SMI version 1 (SMIv1), specified in RFC 1155 and published in May 1990, forms the foundational ruleset for SNMPv1 and SNMPv2c MIBs. It outlines the structure of MIB modules, the definition of managed objects (including scalars and simple tables), and the format for notifications such as traps. However, SMIv1 imposes constraints, such as the lack of support for bitwise operations, which limits its ability to efficiently represent certain data like flag fields without workarounds. These basic rules enabled early network management but highlighted needs for greater expressiveness as networks grew more complex.[2] SMI version 2 (SMIv2), introduced in April 1999 via RFC 2578 (core structure), RFC 2579 (textual conventions), and RFC 2580 (conformance statements), supersedes SMIv1 with significant refinements while preserving core concepts. Key enhancements include the TEXTUAL-CONVENTION macro, which allows the creation of reusable, semantically rich subtypes for common data patterns, thereby improving modularity and readability in MIB definitions. SMIv2 also refines syntax options, such as the addition of the BITS type for compact representation of bit strings, and enhances internationalization by supporting broader character encoding options beyond ASCII. These updates address SMIv1's rigidity, enabling more precise and extensible object definitions without breaking existing implementations.[9][14] SMIv2 has been the preferred standard for new MIB development since its standardization in 1999, with full IETF compliance requirements solidified in RFC 3410 (December 2002), which designates it as the Internet Standard for management information. By RFC 4181 (September 2005), SMIv2 became mandatory for all new IETF standards-track MIB modules, while SMIv1 was marked as "Not Recommended" and unacceptable for fresh specifications. This policy ensures uniformity and forward compatibility, with SMIv2 designed to be backward compatible with SMIv1 modules, allowing legacy MIBs to interoperate seamlessly in mixed environments.[8][15]Core Components
Object Identifier Hierarchy
The Object Identifier (OID) in a Management Information Base (MIB) is a sequence of non-negative integers that forms a hierarchical namespace for uniquely identifying managed objects globally.[9] This structure adheres to the international standards defined in ITU-T X.660 and ISO/IEC 8824, where each OID is an ordered list of up to 128 sub-identifiers, with each sub-identifier ranging from 0 to 2^32 - 1 (4294967295).[9] In practice, MIB OIDs are typically limited to 2 to 10 sub-identifiers to maintain manageability and readability.[9] The OID tree is rooted at the top level with arcs assigned to international standards organizations: 0 for ITU-T (ccitt), 1 for ISO (iso), and 2 for joint ISO/ITU-T (joint-iso-ccitt).[9] The Internet branch, central to MIBs, begins at {iso 3 6 1}, denoted as 1.3.6.1 (internet).[9] From this root, key branches delineate categories of managed objects: the mgmt subtree (1.3.6.1.2) for IETF standards-track MIB modules, such as mib-2 at 1.3.6.1.2.1; the experimental subtree (1.3.6.1.3) for provisional IETF designs; and the private subtree (1.3.6.1.4) for non-standard definitions, with the enterprises arc (1.3.6.1.4.1) reserved for vendor-specific MIB extensions.[9] Each node in the tree represents an arc with a descriptive name, forming a path that organizes objects logically from general to specific.[9] Objects within the MIB are assigned OIDs using the OBJECT IDENTIFIER macro in the Structure of Management Information (SMI), which defines a unique descriptor (a mnemonic string, up to 64 characters, starting with a lowercase letter) and its corresponding numeric value.[9] These assignments ensure immutability once registered, preventing conflicts in the global namespace.[9] Uniqueness is maintained through registries administered by the Internet Assigned Numbers Authority (IANA), which tracks allocations under the SMI numbers and private enterprise numbers to resolve and allocate OIDs systematically.[16] [17] For example, the OID for the system description object (sysDescr) follows the path iso.org.dod.internet.mgmt.mib-2.system.sysDescr, represented numerically as 1.3.6.1.2.1.1.1.0.[9] In SNMP operations, these OIDs serve as the primary means to access and reference specific MIB objects.[9]Data Types and Syntax
In the Structure of Management Information (SMI), data types define the syntax and semantics for objects within a Management Information Base (MIB), ensuring consistent encoding and interpretation across network management systems. These types are derived from ASN.1 primitives but tailored for SNMP operations, emphasizing simplicity and interoperability.[2][9] SMIv1, as defined in RFC 1155, specifies a limited set of primitive types: INTEGER for signed integer values in the range -2^31 to 2^31 - 1; OCTET STRING for arbitrary sequences of zero to 65,535 octets representing binary or textual data; OBJECT IDENTIFIER for hierarchical name assignments with up to 128 sub-identifiers each up to 2^32 - 1; and NULL as a placeholder with no value. Additionally, SMIv1 introduces application-wide types to handle network-specific data: IpAddress as a 4-octet OCTET STRING in network byte order; Counter as an unsigned INTEGER from 0 to 2^32 - 1 that wraps upon reaching its maximum; Gauge as an unsigned INTEGER from 0 to 2^32 - 1 that can increase or decrease and latches at its maximum; TimeTicks as an unsigned INTEGER from 0 to 2^32 - 1 counting hundredths of a second since some epoch; and Opaque as an OCTET STRING for arbitrary ASN.1 constructs. These types prioritize basic, non-decreasing counters and gauges to support monitoring without complex computations.[2] SMIv2, outlined in RFC 2578, refines and expands these to address limitations in SMIv1 while maintaining backward compatibility. It renames and distinguishes INTEGER as Integer32 (range -2^31 to 2^31 - 1) and adds Unsigned32 as an unsigned counterpart (0 to 2^32 - 1) for general-purpose integers. New application types include BITS for enumerating named flags as a non-negative integer with contiguous bit positions starting from 0, and Counter64 extending counters to 0 to 2^64 - 1 for high-speed interfaces where Counter32 wraps too quickly (less than once per hour). Gauge is refined to Gauge32 with the same range as Unsigned32. Enumerated values, a subtype of Integer32, allow symbolic names for discrete states, with values recommended to start from 1 to avoid conflicts with default or unspecified conditions.[18] Furthermore, RFC 2579 introduces the TEXTUAL-CONVENTION macro to create reusable type aliases with refined semantics, such as MacAddress as an OCTET STRING of exactly 6 octets representing an IEEE 802 MAC address in canonical order, complete with a DISPLAY-HINT of "1x:" for hexadecimal formatting.[9][19] Syntax rules in both versions impose constraints to ensure predictable behavior and limit complexity, excluding floating-point numbers, arrays beyond SEQUENCE OF, or other advanced ASN.1 constructs to maintain encoding efficiency in resource-constrained environments. For instance, Counter32 and Counter64 are restricted to non-negative values that wrap at their maximum (2^32 - 1 and 2^64 - 1, respectively) without default values (DEFVAL), and their maximum access is read-only or notify-only to prevent manipulation. OCTET STRING sizes are capped at 65,535 octets, though practical limits are often 255 octets for performance. TimeTicks, measuring time in hundredths of a second modulo 2^32, supports display hints in textual conventions for human-readable formats like days-hours:minutes:seconds.tenths, aiding interpretation in management applications. BITS and enumerated subtypes must use contiguous, non-negative integers starting from 1 for named values.[2][9][19] Usage guidelines enforce object accessibility and lifecycle management: every MIB object must specify an ACCESS clause (read-only, read-create, read-write, accessible-for-notify, or not-accessible in SMIv2) to control SNMP operations, and a STATUS clause (current, deprecated, or obsolete) to indicate maturity and deprecation paths. These rules, absent in SMIv1's simpler "ACCESS" (read-only or read-write), promote secure and evolvable MIB designs without introducing types that could complicate ASN.1 Basic Encoding Rules (BER) serialization.[9]Tables and Row Instances
In the Structure of Management Information (SMI), conceptual tables within a Management Information Base (MIB) are defined to represent collections of related data in a relational manner, allowing for the organization of multiple rows of information such as network interface statistics or system resources. A table is specified using the OBJECT-TYPE macro with a SYNTAX clause of SEQUENCE OF followed by an entry type, where the entry type is a SEQUENCE containing the columnar objects that form the table's columns. The ENTRY macro is then used to define each conceptual row, encapsulating the SEQUENCE of scalar objects that represent the row's attributes, thereby providing a structured way to model tabular data without implying physical storage.[20] Row identification in MIB tables relies on the INDEX clause, which must be included in the ENTRY macro definition for base conceptual rows to specify the objects whose values uniquely identify each row instance. For example, in the Interfaces Group MIB (IF-MIB), the ifIndex object serves as the index for the ifTable, ensuring that each row corresponds to a distinct network interface. In SMI version 2 (SMIv2), multi-column indexes are supported through the INDEX clause listing multiple objects, while extensions to existing tables—such as adding new columns without altering the base index—utilize the AUGMENTS clause to reference the base row's INDEX semantics, maintaining compatibility and avoiding redefinition of row keys.[21][22] Instances of table rows are accessed by extending the Object Identifier (OID) of the entry with sub-identifiers derived from the index values, forming a complete OID path that locates specific data elements. For instance, the OID for ifInOctets in the first row (index 1) of ifTable is 1.3.6.1.2.1.2.2.1.10.1, constructed by appending the column sub-identifier (10) to the ifEntry OID, followed by the index value (1). This mechanism supports sparse tables, where not all possible index combinations need to exist, and rows can be dynamically created or deleted using the RowStatus textual convention in SMIv2, which defines states like active(1), notInService(2), and createAndGo(4) to manage lifecycle through SNMP Set operations.[21][23][24][25] Access to table data in practice occurs via SNMP operations, where the Get-Next request enables traversal of rows and columns in lexicographic order, facilitating efficient "walks" through large tables without prior knowledge of all indices. Notifications, such as traps, can signal row status changes (e.g., creation or deletion) using the RowStatus convention, allowing managers to react to dynamic updates in the managed device's configuration. Columns within these rows leverage SMI-defined data types, such as Integer32 or OctetString, to ensure consistent encoding and interpretation across implementations.[26][24]MIB Development and Maintenance
Defining MIB Modules
A Management Information Base (MIB) module is defined using the Structure of Management Information Version 2 (SMIv2), which specifies an adapted subset of Abstract Syntax Notation One (ASN.1) for describing management information.[9] The process of creating a new MIB module begins with establishing its formal structure to ensure interoperability and compliance with SNMP standards. This involves authoring the module in a textual format that can be compiled and validated, typically for extending network management capabilities in devices or protocols.[9] The module structure commences with a DEFINITIONS clause, followed by imports from foundational RFCs such as SNMPv2-SMI (RFC 2578), which provides essential macros and types like MODULE-IDENTITY and OBJECT-TYPE.[9] For instance, the header might read:<ModuleName> DEFINITIONS ::= BEGIN IMPORTS MODULE-IDENTITY, OBJECT-TYPE, ... FROM SNMPv2-SMI;, ensuring all necessary symbols are explicitly imported to avoid ambiguity.[9] The module then includes a mandatory MODULE-IDENTITY invocation, which declares the module's identity, last-updated timestamp, organization details, contact information, and a description of its purpose, along with any revisions.[9] Objects within the module are defined using the OBJECT-TYPE macro, while notifications are grouped using the NOTIFICATION-TYPE macro.[9]
Object definitions via the OBJECT-TYPE macro specify the SYNTAX clause using a TypeName from SMIv2-defined types, such as Integer32 or OCTET STRING, to denote the data type and any constraints.[9] The MAX-ACCESS clause sets permissions like read-only or read-create, indicating how the object can be accessed in SNMP operations.[9] A mandatory DESCRIPTION clause provides a textual explanation of the object's semantics and usage, while an optional REFERENCE clause cites external documents for further details.[9] Similarly, NOTIFICATION-TYPE defines event notifications by listing relevant OBJECTs, STATUS (current, deprecated, or obsolete), and DESCRIPTION, enabling structured alerts in network management.[9]
Best practices emphasize using descriptive, mnemonic names for modules (e.g., in the form XXX-MIB) and objects, limited to 64 characters, with lowercase letters and no hyphens for clarity and consistency.[15] Units of measurement, such as "milliseconds" for a counter, should be specified in the DESCRIPTION clause to aid interpretation, rather than altering the SYNTAX.[15] Deprecation is handled by setting the STATUS clause to "deprecated" or "obsolete" in object definitions, accompanied by an explanatory DESCRIPTION of the reason and any recommended replacements, without altering existing object identifiers (OIDs).[15] For standardization, new modules undergo IETF review through the Internet-Draft process, culminating in RFC publication, where designated experts verify SMIv2 compliance and overall quality.[15]
To ensure validity, authors employ tools like smilint, part of the libsmi library, which checks MIB modules for syntax errors, semantic issues, and SMI compliance.[27] Enterprise-specific OIDs, necessary for private MIB extensions, are assigned under the private enterprises subtree (1.3.6.1.4.1) via the Internet Assigned Numbers Authority (IANA), which maintains the registry of Private Enterprise Numbers (PENs) to prevent collisions.[28]
Updating and Extending Modules
Updating and extending Management Information Base (MIB) modules follows strict protocols to ensure backward compatibility with existing network management systems, primarily outlined in the Structure of Management Information version 2 (SMIv2).[9] Revisions to a MIB module are achieved by publishing a new version that obsoletes the previous one, incorporating a REVISION clause to document changes such as the addition of new objects or corrections to existing definitions.[15] Each revision must include an updated LAST-UPDATED clause, which specifies the date and time of the most recent modification in UTC format, ensuring that managers can identify the module's version.[9] To deprecate outdated objects without removing them, the STATUS clause is set to "deprecated" (indicating the object is still supported but not recommended) or "obsolete" (indicating it may be removed in future revisions), allowing implementers to phase out legacy features gracefully.[9] Extensions to MIB modules enable the incorporation of new functionality while preserving the integrity of standard structures. The AUGMENTS clause is used to extend existing tables by adding new columns that correspond one-to-one with rows in a base table, such as appending vendor-specific metrics to a standard interface table without altering its original schema.[9] For private extensions, vendors define custom objects under the enterprises subtree (OID 1.3.6.1.4.1), allowing enterprise-specific augmentations that do not conflict with IETF standards. These mechanisms support modular growth, where new modules can reference and build upon established ones. Compatibility rules are enforced to prevent disruptions in deployed systems. Existing objects, including those marked as obsolete, must not be removed from the MIB module; instead, they remain for historical support.[15] Semantic changes, such as altering the meaning or behavior of an object, require assigning new Object Identifiers (OIDs) to avoid ambiguity, while syntactic changes like adding a DEFVAL clause are permitted if they do not affect interoperability.[9] Errata for published MIB modules, including clarifications or minor fixes, are tracked through the RFC Editor's errata system, which maintains verified corrections without necessitating full revisions. A notable example of versioning is the evolution from MIB-II, defined in RFC 1213 (published in 1991), to the Interfaces Group MIB in RFC 2863 (published in 2000), which extended the ifTable with enhancements such as 64-bit counters and support for additional interface types while deprecating incompatible elements from the original.[29] This update, maintained in IETF repositories, illustrates how revisions address emerging network technologies without breaking SNMPv1 or SNMPv2 implementations.[29]Practical Applications
Example MIB Structure
To illustrate the structure of a Management Information Base (MIB) module, consider the hypothetical Example-MIB for monitoring the temperature of a network device. This module, defined using the Structure of Management Information version 2 (SMIv2), includes a scalar object to represent the current temperature and a table to store historical temperature readings, demonstrating common elements such as imports, object types, and indexing.[11] The following is an excerpt of the ASN.1/SMI syntax for the Example-MIB:EXAMPLE-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Integer32, enterprises
FROM SNMPv2-SMI
RowStatus
FROM SNMPv2-TC;
exampleMIB MODULE-IDENTITY
LAST-UPDATED "202511100000Z"
ORGANIZATION "Example Organization"
CONTACT-INFO "[email protected]"
DESCRIPTION
"This MIB module provides objects for monitoring device
temperature."
::= { enterprises 9999 }
-- Scalar object for current temperature
tempCurrent OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The current temperature reading of the device in degrees
Celsius."
::= { exampleMIB 1 }
-- Table for historical temperature data
tempHistoryTable OBJECT-TYPE
SYNTAX SEQUENCE OF TempHistoryEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table of historical temperature readings, indexed by time."
::= { exampleMIB 2 }
tempHistoryEntry OBJECT-TYPE
SYNTAX TempHistoryEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry representing a historical temperature reading."
INDEX { tempTime }
::= { tempHistoryTable 1 }
TempHistoryEntry ::= SEQUENCE {
tempTime Integer32,
tempValue Integer32,
tempStatus RowStatus
}
tempTime OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The timestamp of the temperature reading, in seconds since
[epoch](/page/Epoch)."
::= { tempHistoryEntry 1 }
tempValue OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The historical temperature reading in degrees Celsius."
::= { tempHistoryEntry 2 }
tempStatus OBJECT-TYPE
SYNTAX RowStatus
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The status of this table row."
::= { tempHistoryEntry 3 }
END
EXAMPLE-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Integer32, enterprises
FROM SNMPv2-SMI
RowStatus
FROM SNMPv2-TC;
exampleMIB MODULE-IDENTITY
LAST-UPDATED "202511100000Z"
ORGANIZATION "Example Organization"
CONTACT-INFO "[email protected]"
DESCRIPTION
"This MIB module provides objects for monitoring device
temperature."
::= { enterprises 9999 }
-- Scalar object for current temperature
tempCurrent OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The current temperature reading of the device in degrees
Celsius."
::= { exampleMIB 1 }
-- Table for historical temperature data
tempHistoryTable OBJECT-TYPE
SYNTAX SEQUENCE OF TempHistoryEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table of historical temperature readings, indexed by time."
::= { exampleMIB 2 }
tempHistoryEntry OBJECT-TYPE
SYNTAX TempHistoryEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry representing a historical temperature reading."
INDEX { tempTime }
::= { tempHistoryTable 1 }
TempHistoryEntry ::= SEQUENCE {
tempTime Integer32,
tempValue Integer32,
tempStatus RowStatus
}
tempTime OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The timestamp of the temperature reading, in seconds since
[epoch](/page/Epoch)."
::= { tempHistoryEntry 1 }
tempValue OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The historical temperature reading in degrees Celsius."
::= { tempHistoryEntry 2 }
tempStatus OBJECT-TYPE
SYNTAX RowStatus
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The status of this table row."
::= { tempHistoryEntry 3 }
END
OBJECT-TYPE and base types like Integer32.[11] The MODULE-IDENTITY macro assigns metadata to the module and places it under the enterprises subtree of the global object identifier (OID) tree, specifically at OID 1.3.6.1.4.1.9999 for a fictional private enterprise number 9999.[9] The scalar tempCurrent uses Integer32 as its syntax for a simple integer value, with read-only access to prevent modification, and includes a descriptive clause for clarity.[11] In contrast, the tempHistoryTable employs a SEQUENCE OF to define rows, with the INDEX clause on tempTime enabling unique identification of entries via non-ambiguous indexing, allowing multiple historical records without overlap.[11]
Upon compilation by an ASN.1 compiler or MIB tool, the OIDs are fully resolved within the global tree: for instance, tempCurrent becomes 1.3.6.1.4.1.9999.1, while a table entry like the first historical reading at timestamp 1 would be 1.3.6.1.4.1.9999.2.1.1.2 (for tempValue).[11] This enables SNMP managers to issue queries, such as a GET request for .1.3.6.1.4.1.9999.1 to retrieve the current temperature or a GETNEXT traversal starting at .1.3.6.1.4.1.9999.2 to walk the history table.
