📄 rfc1902.txt
字号:
clause value of read-create. By convention, this is termed the status column for the conceptual row.SNMPv2 Working Group Standards Track [Page 20]RFC 1902 SMI for SNMPv2 January 19967.2. Mapping of the UNITS clause This UNITS clause, which need not be present, contains a textual definition of the units associated with that object.7.3. Mapping of the MAX-ACCESS clause The MAX-ACCESS clause, which must be present, defines whether it makes "protocol sense" to read, write and/or create an instance of the object, or to include its value in a notification. This is the maximal level of access for the object. (This maximal level of access is independent of any administrative authorization policy.) The value "read-write" indicates that read and write access make "protocol sense", but create does not. The value "read-create" indicates that read, write and create access make "protocol sense". The value "not-accessible" indicates an auxiliary object (see Section 7.7). The value "accessible-for-notify" indicates an object which is accessible only via a notification (e.g., snmpTrapOID [5]). These values are ordered, from least to greatest: "not-accessible", "accessible-for-notify", "read-only", "read-write", "read-create". If any columnar object in a conceptual row has "read-create" as its maximal level of access, then no other columnar object of the same conceptual row may have a maximal access of "read-write". (Note that "read-create" is a superset of "read-write".)7.4. Mapping of the STATUS clause The STATUS clause, which must be present, indicates whether this definition is current or historic. The values "current", and "obsolete" are self-explanatory. The "deprecated" value indicates that the definition is obsolete, but that an implementor may wish to support that object to foster interoperability with older implementations.7.5. Mapping of the DESCRIPTION clause The DESCRIPTION clause, which must be present, contains a textual definition of that object which provides all semantic definitions necessary for implementation, and should embody any information which would otherwise be communicated in any ASN.1 commentary annotations associated with the object.SNMPv2 Working Group Standards Track [Page 21]RFC 1902 SMI for SNMPv2 January 19967.6. Mapping of the REFERENCE clause The REFERENCE clause, which need not be present, contains a textual cross-reference to an object defined in some other information module. This is useful when de-osifying a MIB module produced by some other organization.7.7. Mapping of the INDEX clause The INDEX clause, which must be present if that object corresponds to a conceptual row (unless an AUGMENTS clause is present instead), and must be absent otherwise, defines instance identification information for the columnar objects subordinate to that object. The instance identification information in an INDEX clause must specify object(s) such that value(s) of those object(s) will unambiguously distinguish a conceptual row. The syntax of those objects indicate how to form the instance-identifier:(1) integer-valued: a single sub-identifier taking the integer value (this works only for non-negative integers);(2) string-valued, fixed-length strings (or variable-length preceded by the IMPLIED keyword): `n' sub-identifiers, where `n' is the length of the string (each octet of the string is encoded in a separate sub-identifier);(3) string-valued, variable-length strings (not preceded by the IMPLIED keyword): `n+1' sub-identifiers, where `n' is the length of the string (the first sub-identifier is `n' itself, following this, each octet of the string is encoded in a separate sub-identifier);(4) object identifier-valued (when preceded by the IMPLIED keyword): `n' sub-identifiers, where `n' is the number of sub-identifiers in the value (each sub-identifier of the value is copied into a separate sub-identifier);(5) object identifier-valued (when not preceded by the IMPLIED keyword): `n+1' sub-identifiers, where `n' is the number of sub- identifiers in the value (the first sub-identifier is `n' itself, following this, each sub-identifier in the value is copied);(6) IpAddress-valued: 4 sub-identifiers, in the familiar a.b.c.d notation. Note that the IMPLIED keyword can only be present for an object having a variable-length syntax (e.g., variable-length strings or object identifier-valued objects), Further, the IMPLIED keyword canSNMPv2 Working Group Standards Track [Page 22]RFC 1902 SMI for SNMPv2 January 1996 only be associated with the last object in the INDEX clause. Finally, the IMPLIED keyword may not be used on a variable-length string object if that string might have a value of zero-length. Instances identified by use of integer-valued objects should be numbered starting from one (i.e., not from zero). The use of zero as a value for an integer-valued index object should be avoided, except in special cases. Objects which are both specified in the INDEX clause of a conceptual row and also columnar objects of the same conceptual row are termed auxiliary objects. The MAX-ACCESS clause for auxiliary objects is "not-accessible", except in the following circumstances:(1) within a MIB module originally written to conform to the SNMPv1 framework, and later converted to conform to the SNMPv2 framework; or(2) a conceptual row must contain at least one columnar object which is not an auxiliary object. In the event that all of a conceptual row's columnar objects are also specified in its INDEX clause, then one of them must be accessible, i.e., have a MAX-ACCESS clause of "read-only". (Note that this situation does not arise for a conceptual row allowing create access, since such a row will have a status column which will not be an auxiliary object.) Note that objects specified in a conceptual row's INDEX clause need not be columnar objects of that conceptual row. In this situation, the DESCRIPTION clause of the conceptual row must include a textual explanation of how the objects which are included in the INDEX clause but not columnar objects of that conceptual row, are used in uniquely identifying instances of the conceptual row's columnar objects.7.8. Mapping of the AUGMENTS clause The AUGMENTS clause, which must not be present unless the object corresponds to a conceptual row, is an alternative to the INDEX clause. Every object corresponding to a conceptual row has either an INDEX clause or an AUGMENTS clause. If an object corresponding to a conceptual row has an INDEX clause, that row is termed a base conceptual row; alternatively, if the object has an AUGMENTS clause, the row is said to be a conceptual row augmentation, where the AUGMENTS clause names the object corresponding to the base conceptual row which is augmented by this conceptual row augmentation. (Thus, a conceptual row augmentation cannot itself be augmented.) Instances of subordinate columnar objects of a conceptual row augmentation are identified according toSNMPv2 Working Group Standards Track [Page 23]RFC 1902 SMI for SNMPv2 January 1996 the INDEX clause of the base conceptual row corresponding to the object named in the AUGMENTS clause. Further, instances of subordinate columnar objects of a conceptual row augmentation exist according to the same semantics as instances of subordinate columnar objects of the base conceptual row being augmented. As such, note that creation of a base conceptual row implies the correspondent creation of any conceptual row augmentations. For example, a MIB designer might wish to define additional columns in an "enterprise-specific" MIB which logically extend a conceptual row in a "standard" MIB. The "standard" MIB definition of the conceptual row would include the INDEX clause and the "enterprise- specific" MIB would contain the definition of a conceptual row using the AUGMENTS clause. On the other hand, it would be incorrect to use the AUGMENTS clause for the relationship between RFC 1573's ifTable and the many media-specific MIBs which extend it for specific media (e.g., the dot3Table in RFC 1650), since not all interfaces are of the same media. Note that a base conceptual row may be augmented by multiple conceptual row augmentations.7.8.1. Relation between INDEX and AUGMENTS clauses When defining instance identification information for a conceptual table:(1) If there is a one-to-one correspondence between the conceptual rows of this table and an existing table, then the AUGMENTS clause should be used.(2) Otherwise, if there is a sparse relationship between the conceptual rows of this table and an existing table, then an INDEX clause should be used which is identical to that in the existing table. For example, the relationship between RFC 1573's ifTable and a media-specific MIB which extends the ifTable for a specific media (e.g., the dot3Table in RFC 1650), is a sparse relationship.(3) Otherwise, if no existing objects have the required syntax and semantics, then auxiliary objects should be defined within the conceptual row for the new table, and those objects should be used within the INDEX clause for the conceptual row.7.9. Mapping of the DEFVAL clause The DEFVAL clause, which need not be present, defines an acceptable default value which may be used at the discretion of a SNMPv2 entity acting in an agent role when an object instance is created.SNMPv2 Working Group Standards Track [Page 24]RFC 1902 SMI for SNMPv2 January 1996 During conceptual row creation, if an instance of a columnar object is not present as one of the operands in the correspondent management protocol set operation, then the value of the DEFVAL clause, if present, indicates an acceptable default value that a SNMPv2 entity acting in an agent role might use. The value of the DEFVAL clause must, of course, correspond to the SYNTAX clause for the object. If the value is an OBJECT IDENTIFIER, then it must be expressed as a single ASN.1 identifier, and not as a collection of sub-identifiers. Note that if an operand to the management protocol set operation is an instance of a read-only object, then the error `notWritable' [6] will be returned. As such, the DEFVAL clause can be used to provide an acceptable default value that a SNMPv2 entity acting in an agent role might use. By way of example, consider the following possible DEFVAL clauses: ObjectSyntax DEFVAL clause ---------------- ------------ Integer32 DEFVAL { 1 } -- same for Gauge32, TimeTicks, Unsigned32 INTEGER DEFVAL { valid } -- enumerated value OCTET STRING DEFVAL { 'ffffffffffff'H } OBJECT IDENTIFIER DEFVAL { sysDescr } BITS DEFVAL { { primary, secondary } } -- enumerated values that are set IpAddress DEFVAL { 'c0210415'H } -- 192.33.4.21 Object types with SYNTAX of Counter32 and Counter64 may not have DEFVAL clauses, since they do not have defined initial values. However, it is recommended that they be initialized to zero.7.10. Mapping of the OBJECT-TYPE value The value of an invocation of the OBJECT-TYPE macro is the name of the object, which is an OBJECT IDENTIFIER, an administratively assigned name. When an OBJECT IDENTIFIER is assigned to an object:(1) If the object corresponds to a conceptual table, then only a single assignment, that for a conceptual row, is present immediately beneath that object. The administratively assigned name for the conceptual row object is derived by appending a sub-identifier of "1" to the administratively assigned name for the conceptual table.SNMPv2 Working Group Standards Track [Page 25]RFC 1902 SMI for SNMPv2 January 1996(2) If the object corresponds to a conceptual row, then at least one assignment, one for each column in the conceptual row, is present beneath that object. The administratively assigned name for each column is derived by appending a unique, positive sub-identifier to the administratively assigned name for the conceptual row.(3) Otherwise, no other OBJECT IDENTIFIERs which are subordinate to the object may be assigned. Note that the final sub-identifier of any administratively assigned name for an object shall be positive. A zero-valued final sub- identifier is reserved for future use. Further note that although conceptual tables and rows are given administratively assigned names, these conceptual objects may not be manipulated in aggregate form by the management protocol.7.11. Usage Example Consider how one might define a conceptual table and its subordinates. (This example uses the RowStatus textual convention defined in [3].)evalSlot OBJECT-TYPE SYNTAX INTEGER MAX-ACCESS read-only STATUS current DESCRIPTION "The index number of the first unassigned entry in the evaluation table. A management station should create new entries in the evaluation table using this algorithm: first, issue a management protocol retrieval operation to determine the value of evalSlot; and, second, issue a management protocol set operation to create an instance of the evalStatus object setting its value to createAndGo(4) or createAndWait(5). If this latter operation succeeds, then the management station may continue modifying the instances corresponding to the newly created conceptual row, without fear of collision with other management stations." ::= { eval 1 }evalTable OBJECT-TYPE SYNTAX SEQUENCE OF EvalEntry MAX-ACCESS not-accessible STATUS current DESCRIPTIONSNMPv2 Working Group Standards Track [Page 26]RFC 1902 SMI for SNMPv2 January 1996 "The (conceptual) evaluation table." ::= { eval 2 }evalEntry OBJECT-TYPE SYNTAX EvalEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "An entry (conceptual row) in the evaluation table." INDEX { evalIndex } ::= { evalTable 1 }EvalEntry ::= SEQUENCE { evalIndex Integer32, evalString DisplayString, evalValue Integer32, evalStatus RowStatus }evalIndex OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS not-accessible STATUS current DESCRIPTION "The auxiliary variable used for identifying instances of
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -