Network Working Group                            Editor of this version:
Request for Comments: 3416                                    R. Presuhn
STD: 62                                               BMC Software, Inc.
Obsoletes: 1905                             Authors of previous version:
Category: Standards Track                                        J. Case
                                                     SNMP Research, Inc.
                                                           K. McCloghrie
                                                     Cisco Systems, Inc.
                                                                 M. Rose
                                            Dover Beach Consulting, Inc.
                                                           S. Waldbusser
                                          International Network Services
                                                           December 2002
        
Network Working Group                            Editor of this version:
Request for Comments: 3416                                    R. Presuhn
STD: 62                                               BMC Software, Inc.
Obsoletes: 1905                             Authors of previous version:
Category: Standards Track                                        J. Case
                                                     SNMP Research, Inc.
                                                           K. McCloghrie
                                                     Cisco Systems, Inc.
                                                                 M. Rose
                                            Dover Beach Consulting, Inc.
                                                           S. Waldbusser
                                          International Network Services
                                                           December 2002
        

Version 2 of the Protocol Operations for the Simple Network Management Protocol (SNMP)

简单网络管理协议(SNMP)的协议操作版本2

Status of this Memo

本备忘录的状况

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2002). All Rights Reserved.

版权所有(C)互联网协会(2002年)。版权所有。

Abstract

摘要

This document defines version 2 of the protocol operations for the Simple Network Management Protocol (SNMP). It defines the syntax and elements of procedure for sending, receiving, and processing SNMP PDUs. This document obsoletes RFC 1905.

本文档定义了简单网络管理协议(SNMP)的协议操作版本2。它定义了用于发送、接收和处理SNMP PDU的语法和过程元素。本文件废除了RFC 1905。

Table of Contents

目录

   1. Introduction ................................................    3
   2. Overview ....................................................    4
   2.1. Management Information ....................................    4
   2.2. Retransmission of Requests ................................    4
   2.3. Message Sizes .............................................    4
   2.4. Transport Mappings ........................................    5
   2.5. SMIv2 Data Type Mappings ..................................    6
   3. Definitions .................................................    6
   4. Protocol Specification ......................................    9
   4.1. Common Constructs .........................................    9
   4.2. PDU Processing ............................................   10
   4.2.1. The GetRequest-PDU ......................................   10
   4.2.2. The GetNextRequest-PDU ..................................   11
   4.2.2.1. Example of Table Traversal ............................   12
   4.2.3. The GetBulkRequest-PDU ..................................   14
   4.2.3.1. Another Example of Table Traversal ....................   17
   4.2.4. The Response-PDU ........................................   18
   4.2.5. The SetRequest-PDU ......................................   19
   4.2.6. The SNMPv2-Trap-PDU .....................................   22
   4.2.7. The InformRequest-PDU ...................................   23
   5. Notice on Intellectual Property .............................   24
   6. Acknowledgments .............................................   24
   7. Security Considerations .....................................   26
   8. References ..................................................   26
   8.1. Normative References ......................................   26
   8.2. Informative References ....................................   27
   9. Changes from RFC 1905 .......................................   28
   10. Editor's Address ...........................................   30
   11. Full Copyright Statement ...................................   31
        
   1. Introduction ................................................    3
   2. Overview ....................................................    4
   2.1. Management Information ....................................    4
   2.2. Retransmission of Requests ................................    4
   2.3. Message Sizes .............................................    4
   2.4. Transport Mappings ........................................    5
   2.5. SMIv2 Data Type Mappings ..................................    6
   3. Definitions .................................................    6
   4. Protocol Specification ......................................    9
   4.1. Common Constructs .........................................    9
   4.2. PDU Processing ............................................   10
   4.2.1. The GetRequest-PDU ......................................   10
   4.2.2. The GetNextRequest-PDU ..................................   11
   4.2.2.1. Example of Table Traversal ............................   12
   4.2.3. The GetBulkRequest-PDU ..................................   14
   4.2.3.1. Another Example of Table Traversal ....................   17
   4.2.4. The Response-PDU ........................................   18
   4.2.5. The SetRequest-PDU ......................................   19
   4.2.6. The SNMPv2-Trap-PDU .....................................   22
   4.2.7. The InformRequest-PDU ...................................   23
   5. Notice on Intellectual Property .............................   24
   6. Acknowledgments .............................................   24
   7. Security Considerations .....................................   26
   8. References ..................................................   26
   8.1. Normative References ......................................   26
   8.2. Informative References ....................................   27
   9. Changes from RFC 1905 .......................................   28
   10. Editor's Address ...........................................   30
   11. Full Copyright Statement ...................................   31
        
1. Introduction
1. 介绍

The SNMP Management Framework at the time of this writing consists of five major components:

撰写本文时的SNMP管理框架由五个主要组件组成:

- An overall architecture, described in STD 62, RFC 3411 [RFC3411].

- STD 62、RFC 3411[RFC3411]中描述的总体架构。

- Mechanisms for describing and naming objects and events for the purpose of management. The first version of this Structure of Management Information (SMI) is called SMIv1 and described in STD 16, RFC 1155 [RFC1155], STD 16, RFC 1212 [RFC1212] and RFC 1215 [RFC1215]. The second version, called SMIv2, is described in STD 58, RFC 2578 [RFC2578], STD 58, RFC 2579 [RFC2579] and STD 58, RFC 2580 [RFC2580].

- 为管理目的描述和命名对象和事件的机制。这种管理信息结构(SMI)的第一个版本称为SMIv1,并在STD 16、RFC 1155[RFC1155]、STD 16、RFC 1212[RFC1212]和RFC 1215[RFC1215]中进行了描述。第二个版本称为SMIv2,在STD 58、RFC 2578[RFC2578]、STD 58、RFC 2579[RFC2579]和STD 58、RFC 2580[RFC2580]中进行了描述。

- Message protocols for transferring management information. The first version of the SNMP message protocol is called SNMPv1 and described in STD 15, RFC 1157 [RFC1157]. A second version of the SNMP message protocol, which is not an Internet standards track protocol, is called SNMPv2c and described in RFC 1901 [RFC1901] and STD 62, RFC 3417 [RFC3417]. The third version of the message protocol is called SNMPv3 and described in STD 62, RFC 3417 [RFC3417], RFC 3412 [RFC3412] and RFC 3414 [RFC3414].

- 用于传输管理信息的消息协议。SNMP消息协议的第一个版本称为SNMPv1,在STD 15 RFC 1157[RFC1157]中进行了描述。SNMP消息协议的第二个版本不是互联网标准跟踪协议,称为SNMPv2c,并在RFC 1901[RFC1901]和STD 62、RFC 3417[RFC3417]中进行了描述。消息协议的第三个版本称为SNMPv3,在STD 62、RFC 3417[RFC3417]、RFC 3412[RFC3412]和RFC 3414[RFC3414]中进行了描述。

- Protocol operations for accessing management information. The first set of protocol operations and associated PDU formats is described in STD 15, RFC 1157 [RFC1157]. A second set of protocol operations and associated PDU formats is described in this document.

- 访问管理信息的协议操作。STD 15、RFC 1157[RFC1157]中描述了第一组协议操作和相关PDU格式。本文档描述了第二组协议操作和相关PDU格式。

- A set of fundamental applications described in STD 62, RFC 3413 [RFC3413] and the view-based access control mechanism described in STD 62, RFC 3415 [RFC3415].

- STD 62、RFC 3413[RFC3413]中描述的一组基本应用程序和STD 62、RFC 3415[RFC3415]中描述的基于视图的访问控制机制。

A more detailed introduction to the SNMP Management Framework at the time of this writing can be found in RFC 3410 [RFC3410].

在撰写本文时,可以在RFC 3410[RFC3410]中找到SNMP管理框架的更详细介绍。

Managed objects are accessed via a virtual information store, termed the Management Information Base or MIB. Objects in the MIB are defined using the mechanisms defined in the SMI.

托管对象通过虚拟信息存储(称为管理信息库或MIB)进行访问。MIB中的对象是使用SMI中定义的机制定义的。

This document, Version 2 of the Protocol Operations for the Simple Network Management Protocol, defines the operations of the protocol with respect to the sending and receiving of PDUs to be carried by the message protocol.

本文件《简单网络管理协议的协议操作》第2版定义了与发送和接收由消息协议承载的PDU有关的协议操作。

2. Overview
2. 概述

SNMP entities supporting command generator or notification receiver applications (traditionally called "managers") communicate with SNMP entities supporting command responder or notification originator applications (traditionally called "agents"). The purpose of this protocol is the transport of management information and operations.

支持命令生成器或通知接收方应用程序(传统上称为“管理器”)的SNMP实体与支持命令响应者或通知发起人应用程序(传统上称为“代理”)的SNMP实体通信。本协议的目的是传输管理信息和操作。

2.1. Management Information
2.1. 管理信息

The term "variable" refers to an instance of a non-aggregate object type defined according to the conventions set forth in the SMI [RFC2578] or the textual conventions based on the SMI [RFC2579]. The term "variable binding" normally refers to the pairing of the name of a variable and its associated value. However, if certain kinds of exceptional conditions occur during processing of a retrieval request, a variable binding will pair a name and an indication of that exception.

术语“变量”是指根据SMI[RFC2578]中规定的约定或基于SMI[RFC2579]的文本约定定义的非聚合对象类型的实例。术语“变量绑定”通常指变量名称与其关联值的配对。但是,如果在处理检索请求期间发生某些类型的异常情况,则变量绑定会将名称与该异常的指示配对。

A variable-binding list is a simple list of variable bindings.

变量绑定列表是变量绑定的简单列表。

The name of a variable is an OBJECT IDENTIFIER which is the concatenation of the OBJECT IDENTIFIER of the corresponding object-type together with an OBJECT IDENTIFIER fragment identifying the instance. The OBJECT IDENTIFIER of the corresponding object-type is called the OBJECT IDENTIFIER prefix of the variable.

变量的名称是对象标识符,它是对应对象类型的对象标识符与标识实例的对象标识符片段的串联。相应对象类型的对象标识符称为变量的对象标识符前缀。

2.2. Retransmission of Requests
2.2. 请求的重新传输

For all types of request in this protocol, the receiver is required under normal circumstances, to generate and transmit a response to the originator of the request. Whether or not a request should be retransmitted if no corresponding response is received in an appropriate time interval, is at the discretion of the application originating the request. This will normally depend on the urgency of the request. However, such an application needs to act responsibly in respect to the frequency and duration of re-transmissions. See BCP 41 [RFC2914] for discussion of relevant congestion control principles.

对于本协议中的所有类型的请求,在正常情况下要求接收方生成响应并发送给请求的发起人。如果在适当的时间间隔内未收到相应的响应,则是否应重新传输请求,由发起请求的应用程序自行决定。这通常取决于请求的紧迫性。然而,这样的应用程序需要在重新传输的频率和持续时间方面负责任地采取行动。有关拥塞控制原则的讨论,请参见BCP 41[RFC2914]。

2.3. Message Sizes
2.3. 消息大小

The maximum size of an SNMP message is limited to the minimum of:

SNMP消息的最大大小限制为以下最小值:

(1) the maximum message size which the destination SNMP entity can accept; and,

(1) 目标SNMP实体可以接受的最大消息大小;和

(2) the maximum message size which the source SNMP entity can generate.

(2) 源SNMP实体可以生成的最大消息大小。

The former may be known on a per-recipient basis; and in the absence of such knowledge, is indicated by transport domain used when sending the message. The latter is imposed by implementation-specific local constraints.

前者可能以每个接收者为基础而为人所知;在缺乏此类知识的情况下,由发送消息时使用的传输域表示。后者是由特定于实施的局部约束所施加的。

Each transport mapping for the SNMP indicates the minimum message size which a SNMP implementation must be able to produce or consume. Although implementations are encouraged to support larger values whenever possible, a conformant implementation must never generate messages larger than allowed by the receiving SNMP entity.

SNMP的每个传输映射都指示SNMP实现必须能够产生或使用的最小消息大小。尽管鼓励实现尽可能支持更大的值,但一致性实现绝不能生成大于接收SNMP实体允许的消息。

One of the aims of the GetBulkRequest-PDU, specified in this protocol, is to minimize the number of protocol exchanges required to retrieve a large amount of management information. As such, this PDU type allows an SNMP entity supporting command generator applications to request that the response be as large as possible given the constraints on message sizes. These constraints include the limits on the size of messages which the SNMP entity supporting command responder applications can generate, and the SNMP entity supporting command generator applications can receive.

此协议中指定的GetBulkRequest PDU的目标之一是最小化检索大量管理信息所需的协议交换次数。因此,这种PDU类型允许支持命令生成器应用程序的SNMP实体在消息大小受限的情况下请求尽可能大的响应。这些约束包括支持命令响应程序应用程序的SNMP实体可以生成的消息大小限制,以及支持命令生成器应用程序的SNMP实体可以接收的消息大小限制。

However, it is possible that such maximum sized messages may be larger than the Path MTU of the path across the network traversed by the messages. In this situation, such messages are subject to fragmentation. Fragmentation is generally considered to be harmful [FRAG], since among other problems, it leads to a decrease in the reliability of the transfer of the messages. Thus, an SNMP entity which sends a GetBulkRequest-PDU must take care to set its parameters accordingly, so as to reduce the risk of fragmentation. In particular, under conditions of network stress, only small values should be used for max-repetitions.

然而,这种最大大小的消息可能大于消息所穿过的网络上的路径的路径MTU。在这种情况下,这类消息会出现碎片。碎片通常被认为是有害的[FRAG],因为在其他问题中,它会导致消息传输的可靠性降低。因此,发送GetBulkRequest PDU的SNMP实体必须注意相应地设置其参数,以降低碎片风险。特别是,在网络压力条件下,最大重复次数只能使用较小的值。

2.4. Transport Mappings
2.4. 传输映射

It is important to note that the exchange of SNMP messages requires only an unreliable datagram service, with every message being entirely and independently contained in a single transport datagram. Specific transport mappings and encoding rules are specified elsewhere [RFC3417]. However, the preferred mapping is the use of the User Datagram Protocol [RFC768].

需要注意的是,SNMP消息的交换只需要不可靠的数据报服务,每个消息都完全独立地包含在单个传输数据报中。特定的传输映射和编码规则在别处指定[RFC3417]。然而,首选映射是使用用户数据报协议[RFC768]。

2.5. SMIv2 Data Type Mappings
2.5. SMIv2数据类型映射

The SMIv2 [RFC2578] defines 11 base types (INTEGER, OCTET STRING, OBJECT IDENTIFIER, Integer32, IpAddress, Counter32, Gauge32, Unsigned32, TimeTicks, Opaque, Counter64) and the BITS construct. The SMIv2 base types are mapped to the corresponding selection type in the SimpleSyntax and ApplicationSyntax choices of the ASN.1 SNMP protocol definition. Note that the INTEGER and Integer32 SMIv2 base types are mapped to the integer-value selection type of the SimpleSyntax choice. Similarly, the Gauge32 and Unsigned32 SMIv2 base types are mapped to the unsigned-integer-value selection type of the ApplicationSyntax choice.

SMIv2[RFC2578]定义了11种基本类型(整数、八位字符串、对象标识符、整数32、IpAddress、计数器32、量规32、无符号32、时钟信号、不透明、计数器64)和位结构。SMIv2基本类型映射到ASN.1 SNMP协议定义的SimpleSyntax和ApplicationSyntax选项中相应的选择类型。请注意,INTEGER和Integer32 SMIv2基类型映射到SimpleSyntax选项的整数值选择类型。类似地,Gauge32和Unsigned32 SMIv2基类型映射到ApplicationSyntax选项的无符号整数值选择类型。

The SMIv2 BITS construct is mapped to the string-value selection type of the SimpleSyntax choice. A BITS value is encoded as an OCTET STRING, in which all the named bits in (the definition of) the bitstring, commencing with the first bit and proceeding to the last bit, are placed in bits 8 (high order bit) to 1 (low order bit) of the first octet, followed by bits 8 to 1 of each subsequent octet in turn, followed by as many bits as are needed of the final subsequent octet, commencing with bit 8. Remaining bits, if any, of the final octet are set to zero on generation and ignored on receipt.

SMIv2位构造映射到SimpleSyntax选项的字符串值选择类型。将位值编码为八位字节字符串,其中从第一位开始到最后一位的位字符串(定义)中的所有命名位依次置于第一个八位字节的位8(高阶位)到1(低阶位)中,然后依次置于每个后续八位字节的位8到1中,然后是从第8位开始的最后一个后续八位字节所需的位数。最后八位字节的剩余位(如果有)在生成时设置为零,在接收时忽略。

3. Definitions
3. 定义

The PDU syntax is defined using ASN.1 notation [ASN1].

PDU语法是使用ASN.1符号[ASN1]定义的。

   SNMPv2-PDU DEFINITIONS ::= BEGIN
        
   SNMPv2-PDU DEFINITIONS ::= BEGIN
        
   ObjectName ::= OBJECT IDENTIFIER
        
   ObjectName ::= OBJECT IDENTIFIER
        
   ObjectSyntax ::= CHOICE {
         simple           SimpleSyntax,
         application-wide ApplicationSyntax }
        
   ObjectSyntax ::= CHOICE {
         simple           SimpleSyntax,
         application-wide ApplicationSyntax }
        
   SimpleSyntax ::= CHOICE {
         integer-value   INTEGER (-2147483648..2147483647),
         string-value    OCTET STRING (SIZE (0..65535)),
         objectID-value  OBJECT IDENTIFIER }
        
   SimpleSyntax ::= CHOICE {
         integer-value   INTEGER (-2147483648..2147483647),
         string-value    OCTET STRING (SIZE (0..65535)),
         objectID-value  OBJECT IDENTIFIER }
        
   ApplicationSyntax ::= CHOICE {
         ipAddress-value        IpAddress,
         counter-value          Counter32,
         timeticks-value        TimeTicks,
         arbitrary-value        Opaque,
         big-counter-value      Counter64,
         unsigned-integer-value Unsigned32 }
        
   ApplicationSyntax ::= CHOICE {
         ipAddress-value        IpAddress,
         counter-value          Counter32,
         timeticks-value        TimeTicks,
         arbitrary-value        Opaque,
         big-counter-value      Counter64,
         unsigned-integer-value Unsigned32 }
        
   IpAddress ::= [APPLICATION 0] IMPLICIT OCTET STRING (SIZE (4))
        
   IpAddress ::= [APPLICATION 0] IMPLICIT OCTET STRING (SIZE (4))
        
   Counter32 ::= [APPLICATION 1] IMPLICIT INTEGER (0..4294967295)
        
   Counter32 ::= [APPLICATION 1] IMPLICIT INTEGER (0..4294967295)
        
   Unsigned32 ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295)
        
   Unsigned32 ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295)
        
   Gauge32 ::= Unsigned32
        
   Gauge32 ::= Unsigned32
        
   TimeTicks ::= [APPLICATION 3] IMPLICIT INTEGER (0..4294967295)
        
   TimeTicks ::= [APPLICATION 3] IMPLICIT INTEGER (0..4294967295)
        
   Opaque ::= [APPLICATION 4] IMPLICIT OCTET STRING
        
   Opaque ::= [APPLICATION 4] IMPLICIT OCTET STRING
        
   Counter64 ::= [APPLICATION 6]
                 IMPLICIT INTEGER (0..18446744073709551615)
        
   Counter64 ::= [APPLICATION 6]
                 IMPLICIT INTEGER (0..18446744073709551615)
        

-- protocol data units

--协议数据单元

   PDUs ::= CHOICE {
        get-request      GetRequest-PDU,
        get-next-request GetNextRequest-PDU,
        get-bulk-request GetBulkRequest-PDU,
        response         Response-PDU,
        set-request      SetRequest-PDU,
        inform-request   InformRequest-PDU,
        snmpV2-trap      SNMPv2-Trap-PDU,
        report           Report-PDU }
        
   PDUs ::= CHOICE {
        get-request      GetRequest-PDU,
        get-next-request GetNextRequest-PDU,
        get-bulk-request GetBulkRequest-PDU,
        response         Response-PDU,
        set-request      SetRequest-PDU,
        inform-request   InformRequest-PDU,
        snmpV2-trap      SNMPv2-Trap-PDU,
        report           Report-PDU }
        

-- PDUs

--PDU

   GetRequest-PDU ::= [0] IMPLICIT PDU
        
   GetRequest-PDU ::= [0] IMPLICIT PDU
        
   GetNextRequest-PDU ::= [1] IMPLICIT PDU
        
   GetNextRequest-PDU ::= [1] IMPLICIT PDU
        
   Response-PDU ::= [2] IMPLICIT PDU
        
   Response-PDU ::= [2] IMPLICIT PDU
        
   SetRequest-PDU ::= [3] IMPLICIT PDU
        
   SetRequest-PDU ::= [3] IMPLICIT PDU
        

-- [4] is obsolete

--[4]已过时

   GetBulkRequest-PDU ::= [5] IMPLICIT BulkPDU
        
   GetBulkRequest-PDU ::= [5] IMPLICIT BulkPDU
        
   InformRequest-PDU ::= [6] IMPLICIT PDU
        
   InformRequest-PDU ::= [6] IMPLICIT PDU
        
   SNMPv2-Trap-PDU ::= [7] IMPLICIT PDU
        
   SNMPv2-Trap-PDU ::= [7] IMPLICIT PDU
        
   --   Usage and precise semantics of Report-PDU are not defined
   --   in this document.  Any SNMP administrative framework making
   --   use of this PDU must define its usage and semantics.
        
   --   Usage and precise semantics of Report-PDU are not defined
   --   in this document.  Any SNMP administrative framework making
   --   use of this PDU must define its usage and semantics.
        
   Report-PDU ::= [8] IMPLICIT PDU
        
   Report-PDU ::= [8] IMPLICIT PDU
        
   max-bindings INTEGER ::= 2147483647
        
   max-bindings INTEGER ::= 2147483647
        
   PDU ::= SEQUENCE {
           request-id INTEGER (-214783648..214783647),
        
   PDU ::= SEQUENCE {
           request-id INTEGER (-214783648..214783647),
        

error-status -- sometimes ignored INTEGER { noError(0), tooBig(1), noSuchName(2), -- for proxy compatibility badValue(3), -- for proxy compatibility readOnly(4), -- for proxy compatibility genErr(5), noAccess(6), wrongType(7), wrongLength(8), wrongEncoding(9), wrongValue(10), noCreation(11), inconsistentValue(12), resourceUnavailable(13), commitFailed(14), undoFailed(15), authorizationError(16), notWritable(17), inconsistentName(18) },

错误状态--有时忽略整数{noError(0)、tooBig(1)、NoSochName(2),--用于代理兼容性badValue(3),--用于代理兼容性readOnly(4),--用于代理兼容性genErr(5)、noAccess(6)、错误类型(7)、错误长度(8)、错误编码(9)、错误值(10)、noCreation(11)、不一致值(12)、resourceUnavailable(13),提交失败(14),撤消失败(15),授权错误(16),不可写(17),名称不一致(18)},

error-index -- sometimes ignored INTEGER (0..max-bindings),

错误索引--有时忽略整数(0..max绑定),

variable-bindings -- values are sometimes ignored VarBindList }

变量绑定--值有时被忽略VarBindList}

   BulkPDU ::=                         -- must be identical in
       SEQUENCE {                      -- structure to PDU
           request-id      INTEGER (-214783648..214783647),
           non-repeaters   INTEGER (0..max-bindings),
           max-repetitions INTEGER (0..max-bindings),
        
   BulkPDU ::=                         -- must be identical in
       SEQUENCE {                      -- structure to PDU
           request-id      INTEGER (-214783648..214783647),
           non-repeaters   INTEGER (0..max-bindings),
           max-repetitions INTEGER (0..max-bindings),
        

variable-bindings -- values are ignored VarBindList }

变量绑定--忽略值VarBindList}

-- variable binding

--变量绑定

   VarBind ::= SEQUENCE {
           name ObjectName,
        
   VarBind ::= SEQUENCE {
           name ObjectName,
        

CHOICE { value ObjectSyntax, unSpecified NULL, -- in retrieval requests

检索请求中的选项{value ObjectSyntax,未指定NULL,--

                                       -- exceptions in responses
               noSuchObject   [0] IMPLICIT NULL,
               noSuchInstance [1] IMPLICIT NULL,
               endOfMibView   [2] IMPLICIT NULL
           }
       }
        
                                       -- exceptions in responses
               noSuchObject   [0] IMPLICIT NULL,
               noSuchInstance [1] IMPLICIT NULL,
               endOfMibView   [2] IMPLICIT NULL
           }
       }
        

-- variable-binding list

--变量绑定列表

   VarBindList ::= SEQUENCE (SIZE (0..max-bindings)) OF VarBind
        
   VarBindList ::= SEQUENCE (SIZE (0..max-bindings)) OF VarBind
        

END

终止

4. Protocol Specification
4. 协议规范
4.1. Common Constructs
4.1. 常见结构

The value of the request-id field in a Response-PDU takes the value of the request-id field in the request PDU to which it is a response. By use of the request-id value, an application can distinguish the (potentially multiple) outstanding requests, and thereby correlate incoming responses with outstanding requests. In cases where an unreliable datagram service is used, the request-id also provides a simple means of identifying messages duplicated by the network. Use of the same request-id on a retransmission of a request allows the response to either the original transmission or the retransmission to satisfy the request. However, in order to calculate the round trip time for transmission and processing of a request-response transaction, the application needs to use a different request-id value on a retransmitted request. The latter strategy is recommended for use in the majority of situations.

响应PDU中请求id字段的值取作为响应的请求PDU中请求id字段的值。通过使用请求id值,应用程序可以区分(可能有多个)未完成的请求,从而将传入响应与未完成的请求关联起来。在使用不可靠数据报服务的情况下,请求id还提供了一种识别网络复制的消息的简单方法。在请求的重传上使用相同的请求id允许对原始传输或重传的响应来满足请求。然而,为了计算请求-响应事务的传输和处理的往返时间,应用程序需要在重新传输的请求上使用不同的请求id值。建议在大多数情况下使用后一种策略。

A non-zero value of the error-status field in a Response-PDU is used to indicate that an error occurred to prevent the processing of the request. In these cases, a non-zero value of the Response-PDU's error-index field provides additional information by identifying which variable binding in the list caused the error. A variable binding is identified by its index value. The first variable binding in a variable-binding list is index one, the second is index two, etc.

响应PDU中错误状态字段的非零值用于指示发生错误以阻止处理请求。在这些情况下,响应PDU的错误索引字段的非零值通过标识列表中导致错误的变量绑定来提供附加信息。变量绑定由其索引值标识。变量绑定列表中的第一个变量绑定是索引1,第二个是索引2,以此类推。

SNMP limits OBJECT IDENTIFIER values to a maximum of 128 sub-identifiers, where each sub-identifier has a maximum value of 2**32-1.

SNMP将对象标识符的值限制为最多128个子标识符,其中每个子标识符的最大值为2**32-1。

4.2. PDU Processing
4.2. PDU处理

In the elements of procedure below, any field of a PDU which is not referenced by the relevant procedure is ignored by the receiving SNMP entity. However, all components of a PDU, including those whose values are ignored by the receiving SNMP entity, must have valid ASN.1 syntax and encoding. For example, some PDUs (e.g., the GetRequest-PDU) are concerned only with the name of a variable and not its value. In this case, the value portion of the variable binding is ignored by the receiving SNMP entity. The unSpecified value is defined for use as the value portion of such bindings.

在下面的过程元素中,接收SNMP实体将忽略相关过程未引用的PDU的任何字段。但是,PDU的所有组件(包括其值被接收SNMP实体忽略的组件)必须具有有效的ASN.1语法和编码。例如,某些PDU(例如GetRequest PDU)只关注变量的名称,而不关注其值。在这种情况下,接收SNMP实体将忽略变量绑定的值部分。未指定的值定义为用作此类绑定的值部分。

On generating a management communication, the message "wrapper" to encapsulate the PDU is generated according to the "Elements of Procedure" of the administrative framework in use. The definition of "max-bindings" imposes an upper bound on the number of variable bindings. In practice, the size of a message is also limited by constraints on the maximum message size. A compliant implementation must support as many variable bindings in a PDU or BulkPDU as fit into the overall maximum message size limit of the SNMP engine, but no more than 2147483647 variable bindings.

在生成管理通信时,根据正在使用的管理框架的“过程元素”生成用于封装PDU的消息“包装器”。“最大绑定”的定义对变量绑定的数量施加了上限。实际上,消息的大小也受到最大消息大小的限制。兼容实现必须支持PDU或BulkPDU中尽可能多的变量绑定,以满足SNMP引擎的总体最大消息大小限制,但不超过2147483647个变量绑定。

On receiving a management communication, the "Elements of Procedure" of the administrative framework in use is followed, and if those procedures indicate that the operation contained within the message is to be performed locally, then those procedures also indicate the MIB view which is visible to the operation.

收到管理通信后,遵循使用中的管理框架的“程序元素”,如果这些程序指示消息中包含的操作将在本地执行,则这些程序还指示操作可见的MIB视图。

4.2.1. The GetRequest-PDU
4.2.1. getRequestPDU

A GetRequest-PDU is generated and transmitted at the request of an application.

应应用程序的请求生成并传输GetRequest PDU。

Upon receipt of a GetRequest-PDU, the receiving SNMP entity processes each variable binding in the variable-binding list to produce a Response-PDU. All fields of the Response-PDU have the same values as the corresponding fields of the received request except as indicated below. Each variable binding is processed as follows:

收到GetRequest PDU后,接收SNMP实体处理变量绑定列表中的每个变量绑定,以生成响应PDU。响应PDU的所有字段的值与接收到的请求的相应字段的值相同,以下所示除外。每个变量绑定的处理如下:

(1) If the variable binding's name exactly matches the name of a variable accessible by this request, then the variable binding's value field is set to the value of the named variable.

(1) 如果变量绑定的名称与此请求可访问的变量的名称完全匹配,则变量绑定的值字段将设置为命名变量的值。

(2) Otherwise, if the variable binding's name does not have an OBJECT IDENTIFIER prefix which exactly matches the OBJECT IDENTIFIER prefix of any (potential) variable accessible by this request, then its value field is set to "noSuchObject".

(2) 否则,如果变量绑定的名称没有与此请求可访问的任何(潜在)变量的对象标识符前缀完全匹配的对象标识符前缀,则其值字段设置为“noSuchObject”。

(3) Otherwise, the variable binding's value field is set to "noSuchInstance".

(3) 否则,变量绑定的值字段将设置为“noSuchInstance”。

If the processing of any variable binding fails for a reason other than listed above, then the Response-PDU is re-formatted with the same values in its request-id and variable-bindings fields as the received GetRequest-PDU, with the value of its error-status field set to "genErr", and the value of its error-index field is set to the index of the failed variable binding.

如果任何变量绑定的处理因上述原因以外的原因而失败,则响应PDU将在其请求id和变量绑定字段中使用与接收的GetRequest PDU相同的值重新格式化,其错误状态字段的值设置为“genErr”,其错误索引字段的值设置为失败变量绑定的索引。

Otherwise, the value of the Response-PDU's error-status field is set to "noError", and the value of its error-index field is zero.

否则,响应PDU的错误状态字段的值设置为“noError”,其错误索引字段的值为零。

The generated Response-PDU is then encapsulated into a message. If the size of the resultant message is less than or equal to both a local constraint and the maximum message size of the originator, it is transmitted to the originator of the GetRequest-PDU.

然后将生成的响应PDU封装到消息中。如果结果消息的大小小于或等于本地约束和发起者的最大消息大小,则将其传输给GetRequest PDU的发起者。

Otherwise, an alternate Response-PDU is generated. This alternate Response-PDU is formatted with the same value in its request-id field as the received GetRequest-PDU, with the value of its error-status field set to "tooBig", the value of its error-index field set to zero, and an empty variable-bindings field. This alternate Response-PDU is then encapsulated into a message. If the size of the resultant message is less than or equal to both a local constraint and the maximum message size of the originator, it is transmitted to the originator of the GetRequest-PDU. Otherwise, the snmpSilentDrops [RFC3418] counter is incremented and the resultant message is discarded.

否则,将生成备用响应PDU。此备用响应PDU的请求id字段中的值与接收到的GetRequest PDU中的值相同,错误状态字段的值设置为“tooBig”,错误索引字段的值设置为零,变量绑定字段为空。然后将此备用响应PDU封装到消息中。如果结果消息的大小小于或等于本地约束和发起者的最大消息大小,则将其传输给GetRequest PDU的发起者。否则,snmpSilentDrops[RFC3418]计数器将递增,并丢弃结果消息。

4.2.2. The GetNextRequest-PDU
4.2.2. GetNextRequest PDU

A GetNextRequest-PDU is generated and transmitted at the request of an application.

应应用程序的请求生成并传输GetNextRequest PDU。

Upon receipt of a GetNextRequest-PDU, the receiving SNMP entity processes each variable binding in the variable-binding list to produce a Response-PDU. All fields of the Response-PDU have the same values as the corresponding fields of the received request except as indicated below. Each variable binding is processed as follows:

收到GetNextRequest PDU后,接收SNMP实体处理变量绑定列表中的每个变量绑定,以生成响应PDU。响应PDU的所有字段的值与接收到的请求的相应字段的值相同,以下所示除外。每个变量绑定的处理如下:

(1) The variable is located which is in the lexicographically ordered list of the names of all variables which are

(1) 该变量位于按字典顺序排列的所有变量名称列表中

accessible by this request and whose name is the first lexicographic successor of the variable binding's name in the incoming GetNextRequest-PDU. The corresponding variable binding's name and value fields in the Response-PDU are set to the name and value of the located variable.

此请求可访问,并且其名称是传入GetNextRequest PDU中变量绑定名称的第一个词典继承者。响应PDU中相应变量绑定的名称和值字段设置为所定位变量的名称和值。

(2) If the requested variable binding's name does not lexicographically precede the name of any variable accessible by this request, i.e., there is no lexicographic successor, then the corresponding variable binding produced in the Response-PDU has its value field set to "endOfMibView", and its name field set to the variable binding's name in the request.

(2) 如果请求的变量绑定的名称在字典上没有先于此请求可访问的任何变量的名称,即没有字典后续,则响应PDU中生成的相应变量绑定的值字段设置为“endOfMibView”,其名称字段设置为请求中变量绑定的名称。

If the processing of any variable binding fails for a reason other than listed above, then the Response-PDU is re-formatted with the same values in its request-id and variable-bindings fields as the received GetNextRequest-PDU, with the value of its error-status field set to "genErr", and the value of its error-index field is set to the index of the failed variable binding.

如果任何变量绑定的处理因上述原因以外的原因而失败,则响应PDU将在其请求id和变量绑定字段中使用与接收的GetNextRequest PDU相同的值重新格式化,其错误状态字段的值设置为“genErr”,其错误索引字段的值设置为失败变量绑定的索引。

Otherwise, the value of the Response-PDU's error-status field is set to "noError", and the value of its error-index field is zero.

否则,响应PDU的错误状态字段的值设置为“noError”,其错误索引字段的值为零。

The generated Response-PDU is then encapsulated into a message. If the size of the resultant message is less than or equal to both a local constraint and the maximum message size of the originator, it is transmitted to the originator of the GetNextRequest-PDU.

然后将生成的响应PDU封装到消息中。如果结果消息的大小小于或等于本地约束和发起者的最大消息大小,则将其传输给GetNextRequest PDU的发起者。

Otherwise, an alternate Response-PDU is generated. This alternate Response-PDU is formatted with the same values in its request-id field as the received GetNextRequest-PDU, with the value of its error-status field set to "tooBig", the value of its error-index field set to zero, and an empty variable-bindings field. This alternate Response-PDU is then encapsulated into a message. If the size of the resultant message is less than or equal to both a local constraint and the maximum message size of the originator, it is transmitted to the originator of the GetNextRequest-PDU. Otherwise, the snmpSilentDrops [RFC3418] counter is incremented and the resultant message is discarded.

否则,将生成备用响应PDU。此备用响应PDU的请求id字段中的值与接收到的GetNextRequest PDU中的值相同,错误状态字段的值设置为“tooBig”,错误索引字段的值设置为零,变量绑定字段为空。然后将此备用响应PDU封装到消息中。如果结果消息的大小小于或等于本地约束和发起者的最大消息大小,则将其传输给GetNextRequest PDU的发起者。否则,snmpSilentDrops[RFC3418]计数器将递增,并丢弃结果消息。

4.2.2.1. Example of Table Traversal
4.2.2.1. 表遍历示例

An important use of the GetNextRequest-PDU is the traversal of conceptual tables of information within a MIB. The semantics of this type of request, together with the method of identifying individual instances of objects in the MIB, provides access to related objects in the MIB as if they enjoyed a tabular organization.

GetNextRequestPDU的一个重要用途是遍历MIB中的概念信息表。这种类型请求的语义,以及标识MIB中对象的单个实例的方法,提供了对MIB中相关对象的访问,就好像它们使用表格组织一样。

In the protocol exchange sketched below, an application retrieves the media-dependent physical address and the address-mapping type for each entry in the IP net-to-media Address Translation Table [RFC1213] of a particular network element. It also retrieves the value of sysUpTime [RFC3418], at which the mappings existed. Suppose that the command responder's IP net-to-media table has three entries:

在下面概述的协议交换中,应用程序检索特定网元的IP网络到媒体地址转换表[RFC1213]中每个条目的媒体相关物理地址和地址映射类型。它还检索存在映射的sysUpTime[RFC3418]的值。假设命令响应程序的IP网络到媒体表有三个条目:

Interface-Number Network-Address Physical-Address Type

接口号网络地址物理地址类型

      1            10.0.0.51     00:00:10:01:23:45  static
      1             9.2.3.4      00:00:10:54:32:10  dynamic
      2            10.0.0.15     00:00:10:98:76:54  dynamic
        
      1            10.0.0.51     00:00:10:01:23:45  static
      1             9.2.3.4      00:00:10:54:32:10  dynamic
      2            10.0.0.15     00:00:10:98:76:54  dynamic
        

The SNMP entity supporting a command generator application begins by sending a GetNextRequest-PDU containing the indicated OBJECT IDENTIFIER values as the requested variable names:

支持命令生成器应用程序的SNMP实体首先发送一个GetNextRequest PDU,其中包含指定的对象标识符值作为请求的变量名:

GetNextRequest ( sysUpTime, ipNetToMediaPhysAddress, ipNetToMediaType )

GetNextRequest(系统正常运行时间、ipNetToMediaPhysAddress、ipNetToMediaType)

The SNMP entity supporting a command responder application responds with a Response-PDU:

支持命令响应程序应用程序的SNMP实体使用响应PDU进行响应:

Response (( sysUpTime.0 = "123456" ), ( ipNetToMediaPhysAddress.1.9.2.3.4 = "000010543210" ), ( ipNetToMediaType.1.9.2.3.4 = "dynamic" ))

响应((sysUpTime.0=“123456”),(ipNetToMediaType.1.9.2.3.4=“000010543210”),(ipNetToMediaType.1.9.2.3.4=“动态”))

The SNMP entity supporting the command generator application continues with:

支持命令生成器应用程序的SNMP实体继续执行以下操作:

GetNextRequest ( sysUpTime, ipNetToMediaPhysAddress.1.9.2.3.4, ipNetToMediaType.1.9.2.3.4 )

GetNextRequest(系统正常运行时间,ipNetToMediaPhysAddress.1.9.2.3.4,ipNetToMediaType.1.9.2.3.4)

The SNMP entity supporting the command responder application responds with:

支持命令响应程序应用程序的SNMP实体响应为:

Response (( sysUpTime.0 = "123461" ), ( ipNetToMediaPhysAddress.1.10.0.0.51 = "000010012345" ), ( ipNetToMediaType.1.10.0.0.51 = "static" ))

响应((sysUpTime.0=“123461”),(ipNetToMediaType.1.10.0.0.51=“00001012345”),(ipNetToMediaType.1.10.0.0.51=“静态”))

The SNMP entity supporting the command generator application continues with:

支持命令生成器应用程序的SNMP实体继续执行以下操作:

GetNextRequest ( sysUpTime, ipNetToMediaPhysAddress.1.10.0.0.51, ipNetToMediaType.1.10.0.0.51 )

GetNextRequest(系统正常运行时间,ipNetToMediaPhysAddress.1.10.0.0.51,ipNetToMediaType.1.10.0.0.51)

The SNMP entity supporting the command responder application responds with:

支持命令响应程序应用程序的SNMP实体响应为:

Response (( sysUpTime.0 = "123466" ), ( ipNetToMediaPhysAddress.2.10.0.0.15 = "000010987654" ), ( ipNetToMediaType.2.10.0.0.15 = "dynamic" ))

响应((sysUpTime.0=“123466”),(ipNetToMediaType.2.10.0.0.15=“000010987654”),(ipNetToMediaType.2.10.0.0.15=“动态”))

The SNMP entity supporting the command generator application continues with:

支持命令生成器应用程序的SNMP实体继续执行以下操作:

GetNextRequest ( sysUpTime, ipNetToMediaPhysAddress.2.10.0.0.15, ipNetToMediaType.2.10.0.0.15 )

GetNextRequest(系统正常运行时间、ipNetToMediaPhysAddress.2.10.0.0.15、ipNetToMediaType.2.10.0.0.15)

As there are no further entries in the table, the SNMP entity supporting the command responder application responds with the variables that are next in the lexicographical ordering of the accessible object names, for example:

由于表中没有其他条目,支持命令响应程序应用程序的SNMP实体将使用可访问对象名称的字典顺序中的下一个变量进行响应,例如:

Response (( sysUpTime.0 = "123471" ), ( ipNetToMediaNetAddress.1.9.2.3.4 = "9.2.3.4" ), ( ipRoutingDiscards.0 = "2" ))

响应((sysUpTime.0=“123471”),(IPNetToMeDianeAddress.1.9.2.3.4=“9.2.3.4”),(ipRoutingDiscards.0=“2”))

Note how, having reached the end of the column for ipNetToMediaPhysAddress, the second variable binding from the command responder application has now "wrapped" to the first row in the next column. Furthermore, note how, having reached the end of the ipNetToMediaTable for the third variable binding, the command responder application has responded with the next available object, which is outside that table. This response signals the end of the table to the command generator application.

请注意,到达ipNetToMediaPhysAddress列的末尾后,来自命令响应程序应用程序的第二个变量绑定现在已“包装”到下一列的第一行。此外,请注意,在到达第三个变量绑定的ipNetToMediaTable末尾后,命令响应程序应用程序如何使用下一个可用对象进行响应,该对象位于该表之外。此响应向命令生成器应用程序发出表格结束的信号。

4.2.3. The GetBulkRequest-PDU
4.2.3. getBulkRequestPDU

A GetBulkRequest-PDU is generated and transmitted at the request of an application. The purpose of the GetBulkRequest-PDU is to request the transfer of a potentially large amount of data, including, but not limited to, the efficient and rapid retrieval of large tables.

应应用程序的请求,生成并传输GetBulkRequest PDU。GetBulkRequest PDU的目的是请求传输潜在的大量数据,包括但不限于高效、快速地检索大型表。

Upon receipt of a GetBulkRequest-PDU, the receiving SNMP entity processes each variable binding in the variable-binding list to produce a Response-PDU with its request-id field having the same value as in the request.

收到GetBulkRequest PDU后,接收SNMP实体处理变量绑定列表中的每个变量绑定,以生成一个响应PDU,其请求id字段的值与请求中的值相同。

For the GetBulkRequest-PDU type, the successful processing of each variable binding in the request generates zero or more variable bindings in the Response-PDU. That is, the one-to-one mapping between the variable bindings of the GetRequest-PDU, GetNextRequest-

对于GetBulkRequest PDU类型,成功处理请求中的每个变量绑定会在响应PDU中生成零个或多个变量绑定。即getRequestPDU、GetNextRequest的变量绑定之间的一对一映射-

PDU, and SetRequest-PDU types and the resultant Response-PDUs does not apply for the mapping between the variable bindings of a GetBulkRequest-PDU and the resultant Response-PDU.

PDU和SetRequest PDU类型以及结果响应PDU不适用于GetBulkRequest PDU和结果响应PDU的变量绑定之间的映射。

The values of the non-repeaters and max-repetitions fields in the request specify the processing requested. One variable binding in the Response-PDU is requested for the first N variable bindings in the request and M variable bindings are requested for each of the R remaining variable bindings in the request. Consequently, the total number of requested variable bindings communicated by the request is given by N + (M * R), where N is the minimum of: a) the value of the non-repeaters field in the request, and b) the number of variable bindings in the request; M is the value of the max-repetitions field in the request; and R is the maximum of: a) number of variable bindings in the request - N, and b) zero.

请求中“非中继器”和“最大重复次数”字段的值指定请求的处理。对于请求中的前N个变量绑定,请求响应PDU中的一个变量绑定;对于请求中剩余的R个变量绑定,请求M个变量绑定。因此,由请求传送的请求变量绑定的总数由N+(M*R)给出,其中N是以下各项中的最小值:a)请求中非中继器字段的值,b)请求中变量绑定的数量;M是请求中最大重复次数字段的值;R是最大值:a)请求中的变量绑定数-N,b)零。

The receiving SNMP entity produces a Response-PDU with up to the total number of requested variable bindings communicated by the request. The request-id shall have the same value as the received GetBulkRequest-PDU.

接收SNMP实体生成一个响应PDU,该PDU最多包含请求所传递的请求变量绑定总数。请求id的值应与收到的GetBulkRequest PDU的值相同。

If N is greater than zero, the first through the (N)-th variable bindings of the Response-PDU are each produced as follows:

如果N大于零,则响应PDU的第一个到第(N)个变量绑定如下所示:

(1) The variable is located which is in the lexicographically ordered list of the names of all variables which are accessible by this request and whose name is the first lexicographic successor of the variable binding's name in the incoming GetBulkRequest-PDU. The corresponding variable binding's name and value fields in the Response-PDU are set to the name and value of the located variable.

(1) 该变量位于该请求可访问的所有变量名称的字典顺序列表中,其名称是传入GetBulkRequest PDU中变量绑定名称的第一个字典顺序继承者。响应PDU中相应变量绑定的名称和值字段设置为所定位变量的名称和值。

(2) If the requested variable binding's name does not lexicographically precede the name of any variable accessible by this request, i.e., there is no lexicographic successor, then the corresponding variable binding produced in the Response-PDU has its value field set to "endOfMibView", and its name field set to the variable binding's name in the request.

(2) 如果请求的变量绑定的名称在字典上没有先于此请求可访问的任何变量的名称,即没有字典后续,则响应PDU中生成的相应变量绑定的值字段设置为“endOfMibView”,其名称字段设置为请求中变量绑定的名称。

If M and R are non-zero, the (N + 1)-th and subsequent variable bindings of the Response-PDU are each produced in a similar manner. For each iteration i, such that i is greater than zero and less than or equal to M, and for each repeated variable, r, such that r is greater than zero and less than or equal to R, the (N + ( (i-1) * R ) + r)-th variable binding of the Response-PDU is produced as follows:

如果M和R不为零,则响应PDU的(N+1)-th和后续变量绑定都以类似的方式生成。对于每个迭代i,使得i大于零且小于或等于M,并且对于每个重复变量r,使得r大于零且小于或等于r,响应PDU的(N+((i-1)*r)+r)-th变量绑定产生如下:

(1) The variable which is in the lexicographically ordered list of the names of all variables which are accessible by this request and whose name is the (i)-th lexicographic successor of the (N + r)-th variable binding's name in the incoming GetBulkRequest-PDU is located and the variable binding's name and value fields are set to the name and value of the located variable.

(1) 此请求可访问的所有变量名称的字典顺序列表中的变量,其名称是(N+r)的第(i)个字典顺序继承者-在传入的GetBulkRequest PDU中找到变量绑定的名称,并且将变量绑定的名称和值字段设置为所定位变量的名称和值。

(2) If there is no (i)-th lexicographic successor, then the corresponding variable binding produced in the Response-PDU has its value field set to "endOfMibView", and its name field set to either the last lexicographic successor, or if there are no lexicographic successors, to the (N + r)-th variable binding's name in the request.

(2) 如果没有第(i)个词典后续,则响应PDU中生成的相应变量绑定的值字段设置为“endOfMibView”,其名称字段设置为最后一个词典后续,或者如果没有词典后续,则设置为请求中第(N+r)个变量绑定的名称。

While the maximum number of variable bindings in the Response-PDU is bounded by N + (M * R), the response may be generated with a lesser number of variable bindings (possibly zero) for either of three reasons.

虽然响应PDU中变量绑定的最大数量以N+(M*R)为界,但出于以下三个原因之一,可以使用较少数量的变量绑定(可能为零)生成响应。

(1) If the size of the message encapsulating the Response-PDU containing the requested number of variable bindings would be greater than either a local constraint or the maximum message size of the originator, then the response is generated with a lesser number of variable bindings. This lesser number is the ordered set of variable bindings with some of the variable bindings at the end of the set removed, such that the size of the message encapsulating the Response-PDU is approximately equal to but no greater than either a local constraint or the maximum message size of the originator. Note that the number of variable bindings removed has no relationship to the values of N, M, or R.

(1) 如果封装包含请求数量的变量绑定的响应PDU的消息的大小大于本地约束或发起者的最大消息大小,则使用较少数量的变量绑定生成响应。这个较小的数量是有序的变量绑定集,其中一些变量绑定在该集的末尾被删除,因此封装响应PDU的消息的大小大约等于但不大于本地约束或发起者的最大消息大小。请注意,移除的变量绑定的数量与N、M或R的值没有关系。

(2) The response may also be generated with a lesser number of variable bindings if for some value of iteration i, such that i is greater than zero and less than or equal to M, that all of the generated variable bindings have the value field set to "endOfMibView". In this case, the variable bindings may be truncated after the (N + (i * R))-th variable binding.

(2) 如果对于迭代i的某些值(例如i大于零且小于或等于M),所有生成的变量绑定的值字段都设置为“endOfMibView”,则也可以使用较少数量的变量绑定生成响应。在这种情况下,变量绑定可能会在第(N+(i*R))个变量绑定之后被截断。

(3) In the event that the processing of a request with many repetitions requires a significantly greater amount of processing time than a normal request, then a command responder application may terminate the request with less than the full number of repetitions, providing at least one repetition is completed.

(3) 如果处理多次重复的请求所需的处理时间远远大于正常请求,则命令响应程序应用程序可终止重复次数少于完整次数的请求,前提是至少完成一次重复。

If the processing of any variable binding fails for a reason other than listed above, then the Response-PDU is re-formatted with the same values in its request-id and variable-bindings fields as the received GetBulkRequest-PDU, with the value of its error-status field set to "genErr", and the value of its error-index field is set to the index of the variable binding in the original request which corresponds to the failed variable binding.

如果任何变量绑定的处理因上述原因以外的原因而失败,则响应PDU将在其请求id和变量绑定字段中使用与接收的GetBulkRequest PDU相同的值重新格式化,其错误状态字段的值设置为“genErr”,其错误索引字段的值设置为原始请求中变量绑定的索引,该索引对应于失败的变量绑定。

Otherwise, the value of the Response-PDU's error-status field is set to "noError", and the value of its error-index field to zero.

否则,响应PDU的错误状态字段的值设置为“noError”,其错误索引字段的值设置为零。

The generated Response-PDU (possibly with an empty variable-bindings field) is then encapsulated into a message. If the size of the resultant message is less than or equal to both a local constraint and the maximum message size of the originator, it is transmitted to the originator of the GetBulkRequest-PDU. Otherwise, the snmpSilentDrops [RFC3418] counter is incremented and the resultant message is discarded.

生成的响应PDU(可能带有空的变量绑定字段)随后被封装到消息中。如果结果消息的大小小于或等于本地约束和发起者的最大消息大小,则将其传输给GetBulkRequest PDU的发起者。否则,snmpSilentDrops[RFC3418]计数器将递增,并丢弃结果消息。

4.2.3.1. Another Example of Table Traversal
4.2.3.1. 表遍历的另一个示例

This example demonstrates how the GetBulkRequest-PDU can be used as an alternative to the GetNextRequest-PDU. The same traversal of the IP net-to-media table as shown in Section 4.2.2.1 is achieved with fewer exchanges.

此示例演示如何将GetBulkRequest PDU用作GetNextRequest PDU的替代品。第4.2.2.1节所示的IP网络到媒体表的相同遍历是通过较少的交换实现的。

The SNMP entity supporting the command generator application begins by sending a GetBulkRequest-PDU with the modest max-repetitions value of 2, and containing the indicated OBJECT IDENTIFIER values as the requested variable names:

支持命令生成器应用程序的SNMP实体首先发送一个GetBulkRequest PDU,最大重复次数值为2,并包含指示的对象标识符值作为请求的变量名:

GetBulkRequest [ non-repeaters = 1, max-repetitions = 2 ] ( sysUpTime, ipNetToMediaPhysAddress, ipNetToMediaType )

GetBulkRequest[非中继器=1,最大重复次数=2](系统正常运行时间,ipNetToMediaPhysAddress,ipNetToMediaType)

The SNMP entity supporting the command responder application responds with a Response-PDU:

支持命令响应程序应用程序的SNMP实体使用响应PDU进行响应:

Response (( sysUpTime.0 = "123456" ), ( ipNetToMediaPhysAddress.1.9.2.3.4 = "000010543210" ), ( ipNetToMediaType.1.9.2.3.4 = "dynamic" ), ( ipNetToMediaPhysAddress.1.10.0.0.51 = "000010012345" ), ( ipNetToMediaType.1.10.0.0.51 = "static" ))

响应((sysUpTime.0=“123456”),(ipnettomediataddress.1.9.2.3.4=“000010543210”),(ipnettomediatatype.1.9.2.3.4=“动态”),(ipnettomediataddress.1.10.0.0.51=“000010012345”),(ipnettomediatatype.1.10.0.0.51=“静态”))

The SNMP entity supporting the command generator application continues with:

支持命令生成器应用程序的SNMP实体继续执行以下操作:

GetBulkRequest [ non-repeaters = 1, max-repetitions = 2 ] ( sysUpTime, ipNetToMediaPhysAddress.1.10.0.0.51, ipNetToMediaType.1.10.0.0.51 )

GetBulkRequest[非中继器=1,最大重复次数=2](系统正常运行时间,ipNetToMediaPhysAddress.1.10.0.0.51,ipNetToMediaType.1.10.0.0.51)

The SNMP entity supporting the command responder application responds with:

支持命令响应程序应用程序的SNMP实体响应为:

Response (( sysUpTime.0 = "123466" ), ( ipNetToMediaPhysAddress.2.10.0.0.15 = "000010987654" ), ( ipNetToMediaType.2.10.0.0.15 = "dynamic" ), ( ipNetToMediaNetAddress.1.9.2.3.4 = "9.2.3.4" ), ( ipRoutingDiscards.0 = "2" ))

响应((sysUpTime.0=“123466”),(IPNetToMedDiageAddress.2.10.0.0.15=“000010987654”),(ipNetToMediaType.2.10.0.0.15=“动态”),(IPNetToMedDianeAddress.1.9.2.3.4=“9.2.3.4”),(ipRoutingDiscards.0=“2”))

Note how, as in the first example, the variable bindings in the response indicate that the end of the table has been reached. The fourth variable binding does so by returning information from the next available column; the fifth variable binding does so by returning information from the first available object lexicographically following the table. This response signals the end of the table to the command generator application.

请注意,与第一个示例一样,响应中的变量绑定指示已到达表的末尾。第四个变量绑定是通过从下一个可用列返回信息来实现的;第五个变量绑定是通过从表后面的第一个可用对象按字典顺序返回信息来实现的。此响应向命令生成器应用程序发出表格结束的信号。

4.2.4. The Response-PDU
4.2.4. PDU的响应

The Response-PDU is generated by an SNMP entity only upon receipt of a GetRequest-PDU, GetNextRequest-PDU, GetBulkRequest-PDU, SetRequest-PDU, or InformRequest-PDU, as described elsewhere in this document.

响应PDU仅在收到GetRequest PDU、GetNextRequest PDU、GetBulkRequest PDU、SetRequest PDU或InformRequest PDU时由SNMP实体生成,如本文档其他部分所述。

If the error-status field of the Response-PDU is non-zero, the value fields of the variable bindings in the variable binding list are ignored.

如果响应PDU的错误状态字段为非零,则忽略变量绑定列表中变量绑定的值字段。

If both the error-status field and the error-index field of the Response-PDU are non-zero, then the value of the error-index field is the index of the variable binding (in the variable-binding list of the corresponding request) for which the request failed. The first variable binding in a request's variable-binding list is index one, the second is index two, etc.

如果响应PDU的错误状态字段和错误索引字段均为非零,则错误索引字段的值是请求失败的变量绑定的索引(在相应请求的变量绑定列表中)。请求的变量绑定列表中的第一个变量绑定是索引1,第二个是索引2,以此类推。

A compliant SNMP entity supporting a command generator application must be able to properly receive and handle a Response-PDU with an error-status field equal to "noSuchName", "badValue", or "readOnly". (See sections 1.3 and 4.3 of [RFC2576].)

支持命令生成器应用程序的兼容SNMP实体必须能够正确接收和处理错误状态字段为“noSuchName”、“badValue”或“readOnly”的响应PDU。(见[RFC2576]第1.3节和第4.3节)

Upon receipt of a Response-PDU, the receiving SNMP entity presents its contents to the application which generated the request with the same request-id value. For more details, see [RFC3412].

收到响应PDU后,接收SNMP实体将其内容呈现给生成具有相同请求id值的请求的应用程序。有关更多详细信息,请参阅[RFC3412]。

4.2.5. The SetRequest-PDU
4.2.5. 设置请求PDU

A SetRequest-PDU is generated and transmitted at the request of an application.

应应用程序的请求,生成并传输SetRequest PDU。

Upon receipt of a SetRequest-PDU, the receiving SNMP entity determines the size of a message encapsulating a Response-PDU having the same values in its request-id and variable-bindings fields as the received SetRequest-PDU, and the largest possible sizes of the error-status and error-index fields. If the determined message size is greater than either a local constraint or the maximum message size of the originator, then an alternate Response-PDU is generated, transmitted to the originator of the SetRequest-PDU, and processing of the SetRequest-PDU terminates immediately thereafter. This alternate Response-PDU is formatted with the same values in its request-id field as the received SetRequest-PDU, with the value of its error-status field set to "tooBig", the value of its error-index field set to zero, and an empty variable-bindings field. This alternate Response-PDU is then encapsulated into a message. If the size of the resultant message is less than or equal to both a local constraint and the maximum message size of the originator, it is transmitted to the originator of the SetRequest-PDU. Otherwise, the snmpSilentDrops [RFC3418] counter is incremented and the resultant message is discarded. Regardless, processing of the SetRequest-PDU terminates.

接收到SetRequest PDU后,接收SNMP实体确定封装响应PDU的消息大小,该响应PDU的请求id和变量绑定字段中的值与接收到的SetRequest PDU相同,错误状态和错误索引字段的最大可能大小。如果确定的消息大小大于本地约束或发起者的最大消息大小,则生成备用响应PDU,并将其传输给SetRequest PDU的发起者,并且SetRequest PDU的处理随后立即终止。此备用响应PDU的请求id字段中的值与接收到的SetRequest PDU中的值相同,错误状态字段的值设置为“tooBig”,错误索引字段的值设置为零,变量绑定字段为空。然后将此备用响应PDU封装到消息中。如果结果消息的大小小于或等于本地约束和发端人的最大消息大小,则将其传输给SetRequest PDU的发端人。否则,snmpSilentDrops[RFC3418]计数器将递增,并丢弃结果消息。无论如何,SetRequest PDU的处理将终止。

Otherwise, the receiving SNMP entity processes each variable binding in the variable-binding list to produce a Response-PDU. All fields of the Response-PDU have the same values as the corresponding fields of the received request except as indicated below.

否则,接收SNMP实体将处理变量绑定列表中的每个变量绑定,以生成响应PDU。响应PDU的所有字段的值与接收到的请求的相应字段的值相同,以下所示除外。

The variable bindings are conceptually processed as a two phase operation. In the first phase, each variable binding is validated; if all validations are successful, then each variable is altered in the second phase. Of course, implementors are at liberty to implement either the first, or second, or both, of these conceptual phases as multiple implementation phases. Indeed, such multiple implementation phases may be necessary in some cases to ensure consistency.

变量绑定在概念上是作为两阶段操作处理的。在第一阶段,验证每个变量绑定;如果所有验证都成功,则在第二阶段中更改每个变量。当然,实现者可以自由地将这些概念阶段中的第一个、第二个或两者都作为多个实现阶段来实现。事实上,在某些情况下,这种多个实施阶段可能是确保一致性所必需的。

The following validations are performed in the first phase on each variable binding until they are all successful, or until one fails:

在第一阶段对每个变量绑定执行以下验证,直到它们全部成功或其中一个失败:

(1) If the variable binding's name specifies an existing or non-existent variable to which this request is/would be denied access because it is/would not be in the appropriate MIB view, then the value of the Response-PDU's error-status field is set to "noAccess", and the value of its error-index field is set to the index of the failed variable binding.

(1) 如果变量绑定的名称指定了一个现有或不存在的变量,该请求将被拒绝访问,因为它不在适当的MIB视图中,那么响应PDU的错误状态字段的值将设置为“noAccess”,其错误索引字段的值设置为失败变量绑定的索引。

(2) Otherwise, if there are no variables which share the same OBJECT IDENTIFIER prefix as the variable binding's name, and which are able to be created or modified no matter what new value is specified, then the value of the Response-PDU's error-status field is set to "notWritable", and the value of its error-index field is set to the index of the failed variable binding.

(2) 否则,如果没有变量与变量绑定的名称共享相同的对象标识符前缀,并且无论指定什么新值都可以创建或修改,则响应PDU的错误状态字段的值设置为“notWritable”,其错误索引字段的值设置为失败变量绑定的索引。

(3) Otherwise, if the variable binding's value field specifies, according to the ASN.1 language, a type which is inconsistent with that required for all variables which share the same OBJECT IDENTIFIER prefix as the variable binding's name, then the value of the Response-PDU's error-status field is set to "wrongType", and the value of its error-index field is set to the index of the failed variable binding.

(3) 否则,如果变量绑定的值字段根据ASN.1语言指定的类型与所有与变量绑定名称共享相同对象标识符前缀的变量所需的类型不一致,则响应PDU的错误状态字段的值设置为“错误类型”,其错误索引字段的值设置为失败变量绑定的索引。

(4) Otherwise, if the variable binding's value field specifies, according to the ASN.1 language, a length which is inconsistent with that required for all variables which share the same OBJECT IDENTIFIER prefix as the variable binding's name, then the value of the Response-PDU's error-status field is set to "wrongLength", and the value of its error-index field is set to the index of the failed variable binding.

(4) 否则,如果变量绑定的值字段根据ASN.1语言指定的长度与所有与变量绑定名称共享相同对象标识符前缀的变量所需的长度不一致,则响应PDU的错误状态字段的值设置为“错误长度”,其错误索引字段的值设置为失败变量绑定的索引。

(5) Otherwise, if the variable binding's value field contains an ASN.1 encoding which is inconsistent with that field's ASN.1 tag, then the value of the Response-PDU's error-status field is set to "wrongEncoding", and the value of its error-index field is set to the index of the failed variable binding. (Note that not all implementation strategies will generate this error.)

(5) 否则,如果变量绑定的值字段包含与该字段的ASN.1标记不一致的ASN.1编码,则响应PDU的错误状态字段的值设置为“错误编码”,其错误索引字段的值设置为失败变量绑定的索引。(请注意,并非所有实施策略都会产生此错误。)

(6) Otherwise, if the variable binding's value field specifies a value which could under no circumstances be assigned to the variable, then the value of the Response-PDU's error-status field is set to "wrongValue", and the value of its error-index field is set to the index of the failed variable binding.

(6) 否则,如果变量绑定的值字段指定了在任何情况下都不能分配给变量的值,则响应PDU的错误状态字段的值设置为“错误值”,其错误索引字段的值设置为失败变量绑定的索引。

(7) Otherwise, if the variable binding's name specifies a variable which does not exist and could not ever be created (even though some variables sharing the same OBJECT IDENTIFIER prefix might under some circumstances be able to be created), then the value of the Response-PDU's error-status field is set to "noCreation", and the value of its error-index field is set to the index of the failed variable binding.

(7) 否则,如果变量绑定的名称指定了一个不存在且无法创建的变量(即使某些共享相同对象标识符前缀的变量在某些情况下可能可以创建),则响应PDU的错误状态字段的值设置为“noCreation”,其错误索引字段的值设置为失败变量绑定的索引。

(8) Otherwise, if the variable binding's name specifies a variable which does not exist but can not be created under the present circumstances (even though it could be created under other circumstances), then the value of the Response-PDU's error-status field is set to "inconsistentName", and the value of its error-index field is set to the index of the failed variable binding.

(8) 否则,如果变量绑定的名称指定了一个不存在但在当前情况下无法创建的变量(即使它可以在其他情况下创建),则响应PDU的错误状态字段的值设置为“不一致名称”,其错误索引字段的值设置为失败变量绑定的索引。

(9) Otherwise, if the variable binding's name specifies a variable which exists but can not be modified no matter what new value is specified, then the value of the Response-PDU's error-status field is set to "notWritable", and the value of its error-index field is set to the index of the failed variable binding.

(9) 否则,如果变量绑定的名称指定了一个存在但无论指定了什么新值都无法修改的变量,则响应PDU的错误状态字段的值将设置为“notWritable”,其错误索引字段的值将设置为失败的变量绑定的索引。

(10) Otherwise, if the variable binding's value field specifies a value that could under other circumstances be held by the variable, but is presently inconsistent or otherwise unable to be assigned to the variable, then the value of the Response-PDU's error-status field is set to "inconsistentValue", and the value of its error-index field is set to the index of the failed variable binding.

(10) 否则,如果变量绑定的值字段指定了一个值,该值在其他情况下可能由变量持有,但当前不一致或无法分配给变量,则响应PDU的错误状态字段的值设置为“不一致值”,其错误索引字段的值设置为失败变量绑定的索引。

(11) When, during the above steps, the assignment of the value specified by the variable binding's value field to the specified variable requires the allocation of a resource which is presently unavailable, then the value of the Response-PDU's error-status field is set to "resourceUnavailable", and the value of its error-index field is set to the index of the failed variable binding.

(11) 在上述步骤中,如果将变量绑定的值字段指定的值分配给指定变量需要分配当前不可用的资源,则响应PDU的错误状态字段的值设置为“resourceUnavailable”,其错误索引字段的值设置为失败变量绑定的索引。

(12) If the processing of the variable binding fails for a reason other than listed above, then the value of the Response-PDU's error-status field is set to "genErr", and the value of its error-index field is set to the index of the failed variable binding.

(12) 如果变量绑定处理因上述原因以外的原因失败,则响应PDU的错误状态字段的值设置为“genErr”,其错误索引字段的值设置为失败变量绑定的索引。

(13) Otherwise, the validation of the variable binding succeeds.

(13) 否则,变量绑定的验证将成功。

At the end of the first phase, if the validation of all variable bindings succeeded, then the value of the Response-PDU's error-status field is set to "noError" and the value of its error-index field is zero, and processing continues as follows.

在第一阶段结束时,如果所有变量绑定的验证都成功,则响应PDU的错误状态字段的值将设置为“noError”,其错误索引字段的值为零,处理将按如下方式继续。

For each variable binding in the request, the named variable is created if necessary, and the specified value is assigned to it. Each of these variable assignments occurs as if simultaneously with respect to all other assignments specified in the same request. However, if the same variable is named more than once in a single request, with different associated values, then the actual assignment made to that variable is implementation-specific.

对于请求中的每个变量绑定,如果需要,将创建命名变量,并为其分配指定的值。这些变量分配中的每一个都会与同一请求中指定的所有其他分配同时发生。但是,如果同一个变量在一个请求中被多次命名,并且具有不同的关联值,那么对该变量的实际分配是特定于实现的。

If any of these assignments fail (even after all the previous validations), then all other assignments are undone, and the Response-PDU is modified to have the value of its error-status field set to "commitFailed", and the value of its error-index field set to the index of the failed variable binding.

如果这些分配中的任何一个失败(即使在之前的所有验证之后),那么所有其他分配都将撤消,并且响应PDU将被修改为将其错误状态字段的值设置为“commitFailed”,并将其错误索引字段的值设置为失败变量绑定的索引。

If and only if it is not possible to undo all the assignments, then the Response-PDU is modified to have the value of its error-status field set to "undoFailed", and the value of its error-index field is set to zero. Note that implementations are strongly encouraged to take all possible measures to avoid use of either "commitFailed" or "undoFailed" - these two error-status codes are not to be taken as license to take the easy way out in an implementation.

如果且仅当无法撤消所有分配时,响应PDU将被修改为将其错误状态字段的值设置为“undoFailed”,并将其错误索引字段的值设置为零。请注意,强烈鼓励实现采取所有可能的措施,以避免使用“commitFailed”或“undoFailed”——这两个错误状态代码不应被视为在实现中轻松解决问题的许可证。

Finally, the generated Response-PDU is encapsulated into a message, and transmitted to the originator of the SetRequest-PDU.

最后,生成的响应PDU被封装到消息中,并传输给SetRequest PDU的发起人。

4.2.6. The SNMPv2-Trap-PDU
4.2.6. SNMPv2陷阱PDU

An SNMPv2-Trap-PDU is generated and transmitted by an SNMP entity on behalf of a notification originator application. The SNMPv2-Trap-PDU is often used to notify a notification receiver application at a logically remote SNMP entity that an event has occurred or that a condition is present. There is no confirmation associated with this notification delivery mechanism.

SNMPv2陷阱PDU由SNMP实体代表通知发起人应用程序生成和传输。SNMPv2陷阱PDU通常用于通知逻辑远程SNMP实体上的通知接收器应用程序已发生事件或存在条件。没有与此通知传递机制关联的确认。

The destination(s) to which an SNMPv2-Trap-PDU is sent is determined in an implementation-dependent fashion by the SNMP entity. The first two variable bindings in the variable binding list of an SNMPv2- Trap-PDU are sysUpTime.0 [RFC3418] and snmpTrapOID.0 [RFC3418] respectively. If the OBJECTS clause is present in the invocation of the corresponding NOTIFICATION-TYPE macro, then each corresponding variable, as instantiated by this notification, is copied, in order,

SNMPv2陷阱PDU发送到的目的地由SNMP实体以依赖于实现的方式确定。SNMPv2-Trap PDU的变量绑定列表中的前两个变量绑定分别是sysUpTime.0[RFC3418]和snmpTrapOID.0[RFC3418]。如果OBJECTS子句出现在相应NOTIFICATION-TYPE宏的调用中,则此通知实例化的每个相应变量都会按顺序复制,

to the variable-bindings field. If any additional variables are being included (at the option of the generating SNMP entity), then each is copied to the variable-bindings field.

到变量绑定字段。如果包含任何其他变量(根据生成SNMP实体的选项),则每个变量都会复制到变量绑定字段。

4.2.7. The InformRequest-PDU
4.2.7. InformRequest PDU

An InformRequest-PDU is generated and transmitted by an SNMP entity on behalf of a notification originator application. The InformRequest-PDU is often used to notify a notification receiver application that an event has occurred or that a condition is present. This is a confirmed notification delivery mechanism, although there is, of course, no guarantee of delivery.

InformRequest PDU由SNMP实体代表通知发起人应用程序生成和传输。InformRequest PDU通常用于通知通知接收方应用程序已发生事件或存在条件。这是一种经过确认的通知传递机制,当然,尽管没有对传递的保证。

The destination(s) to which an InformRequest-PDU is sent is specified by the notification originator application. The first two variable bindings in the variable binding list of an InformRequest-PDU are sysUpTime.0 [RFC3418] and snmpTrapOID.0 [RFC3418] respectively. If the OBJECTS clause is present in the invocation of the corresponding NOTIFICATION-TYPE macro, then each corresponding variable, as instantiated by this notification, is copied, in order, to the variable-bindings field. If any additional variables are being included (at the option of the generating SNMP entity), then each is copied to the variable-bindings field.

InformRequest PDU发送到的目标由通知发起人应用程序指定。InformRequest PDU的变量绑定列表中的前两个变量绑定分别是sysUpTime.0[RFC3418]和snmpTrapOID.0[RFC3418]。如果OBJECTS子句出现在相应NOTIFICATION-TYPE宏的调用中,则此通知实例化的每个相应变量都会按顺序复制到variable bindings字段。如果包含任何其他变量(根据生成SNMP实体的选项),则每个变量都会复制到变量绑定字段。

Upon receipt of an InformRequest-PDU, the receiving SNMP entity determines the size of a message encapsulating a Response-PDU with the same values in its request-id, error-status, error-index and variable-bindings fields as the received InformRequest-PDU. If the determined message size is greater than either a local constraint or the maximum message size of the originator, then an alternate Response-PDU is generated, transmitted to the originator of the InformRequest-PDU, and processing of the InformRequest-PDU terminates immediately thereafter. This alternate Response-PDU is formatted with the same values in its request-id field as the received InformRequest-PDU, with the value of its error-status field set to "tooBig", the value of its error-index field set to zero, and an empty variable-bindings field. This alternate Response-PDU is then encapsulated into a message. If the size of the resultant message is less than or equal to both a local constraint and the maximum message size of the originator, it is transmitted to the originator of the InformRequest-PDU. Otherwise, the snmpSilentDrops [RFC3418] counter is incremented and the resultant message is discarded. Regardless, processing of the InformRequest-PDU terminates.

接收到InformRequest PDU后,接收SNMP实体将确定封装响应PDU的消息大小,该响应PDU的请求id、错误状态、错误索引和变量绑定字段中的值与接收到的InformRequest PDU中的值相同。如果确定的消息大小大于本地约束或发起者的最大消息大小,则生成备用响应PDU,并将其传输给InformRequest PDU的发起者,InformRequest PDU的处理随后立即终止。此备用响应PDU的请求id字段中的值与接收到的InformRequest PDU中的值相同,错误状态字段的值设置为“tooBig”,错误索引字段的值设置为零,变量绑定字段为空。然后将此备用响应PDU封装到消息中。如果结果消息的大小小于或等于本地约束和发起者的最大消息大小,则将其传输给InformRequest PDU的发起者。否则,snmpSilentDrops[RFC3418]计数器将递增,并丢弃结果消息。无论如何,InformRequest PDU的处理将终止。

Otherwise, the receiving SNMP entity:

否则,接收SNMP实体:

(1) presents its contents to the appropriate application;

(1) 将其内容呈现给适当的应用程序;

(2) generates a Response-PDU with the same values in its request-id and variable-bindings fields as the received InformRequest-PDU, with the value of its error-status field set to "noError" and the value of its error-index field set to zero; and

(2) 生成一个响应PDU,其请求id和变量绑定字段中的值与接收到的InformRequest PDU中的值相同,错误状态字段的值设置为“noError”,错误索引字段的值设置为零;和

(3) transmits the generated Response-PDU to the originator of the InformRequest-PDU.

(3) 将生成的响应PDU发送给InformRequest PDU的发起人。

5. Notice on Intellectual Property
5. 关于知识产权的通知

The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification can be obtained from the IETF Secretariat.

IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何努力来确定任何此类权利。有关IETF在标准跟踪和标准相关文件中权利的程序信息,请参见BCP-11。可从IETF秘书处获得可供发布的权利声明副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果。

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director.

IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涉及实施本标准所需技术的专有权利。请将信息发送给IETF执行董事。

6. Acknowledgments
6. 致谢

This document is the product of the SNMPv3 Working Group. Some special thanks are in order to the following Working Group members:

本文件是SNMPv3工作组的产品。特别感谢以下工作组成员:

Randy Bush Jeffrey D. Case Mike Daniele Rob Frye Lauren Heintz Keith McCloghrie Russ Mundy David T. Perkins Randy Presuhn Aleksey Romanov Juergen Schoenwaelder Bert Wijnen

Randy Bush Jeffrey D.Case Mike Daniele Rob Frye Lauren Heintz Keith McCloghrie Russ Mundy David T.Perkins Randy Presuhn Aleksey Romanov Juergen Schoenwaelder Bert Wijnen

This version of the document, edited by Randy Presuhn, was initially based on the work of a design team whose members were:

该版本的文件由Randy Presohn编辑,最初基于一个设计团队的工作,其成员为:

Jeffrey D. Case Keith McCloghrie David T. Perkins Randy Presuhn Juergen Schoenwaelder

杰弗里·D·凯斯·基思·麦克洛赫里·大卫·T·珀金斯·兰迪·普雷森·尤尔根·舍恩瓦埃尔德

The previous versions of this document, edited by Keith McCloghrie, was the result of significant work by four major contributors:

本文件的前几个版本由Keith McCloghrie编辑,是四位主要贡献者的重要工作成果:

Jeffrey D. Case Keith McCloghrie Marshall T. Rose Steven Waldbusser

杰弗里·D·凯斯·基思·麦克洛赫里·马歇尔T·罗斯·史蒂文·瓦尔德布瑟

Additionally, the contributions of the SNMPv2 Working Group to the previous versions are also acknowledged. In particular, a special thanks is extended for the contributions of:

此外,SNMPv2工作组对先前版本的贡献也得到了认可。特别感谢以下各方的贡献:

Alexander I. Alten Dave Arneson Uri Blumenthal Doug Book Kim Curran Jim Galvin Maria Greene Iain Hanson Dave Harrington Nguyen Hien Jeff Johnson Michael Kornegay Deirdre Kostick David Levi Daniel Mahoney Bob Natale Brian O'Keefe Andrew Pearson Dave Perkins Randy Presuhn Aleksey Romanov Shawn Routhier Jon Saperia Juergen Schoenwaelder Bob Stewart

亚历山大一世。阿尔滕·戴夫·阿内森·乌里·布鲁门塔尔·道格的书金·柯伦·吉姆·高尔文·玛丽亚·格林·伊恩·汉森·戴夫·哈灵顿·阮希恩杰夫·约翰逊·迈克尔·科内盖·德尔德雷·科斯蒂克·大卫·列维·丹尼尔·马奥尼·鲍伯·纳塔莱·布莱恩·奥基夫·安德鲁·皮尔森·戴夫·帕金斯·兰迪·普雷森·阿列克西·罗曼诺夫·肖恩·劳希尔·乔恩·萨佩里亚·朱尔根·斯沃

Kaj Tesink Glenn Waters Bert Wijnen

卡伊·特辛克·格伦·沃特斯·伯特·维恩

7. Security Considerations
7. 安全考虑

The protocol defined in this document by itself does not provide a secure environment. Even if the network itself is secure (for example by using IPSec), there is no control as to who on the secure network is allowed access to management information.

本文档中定义的协议本身不提供安全环境。即使网络本身是安全的(例如通过使用IPSec),也无法控制安全网络上的谁可以访问管理信息。

It is recommended that the implementors consider the security features as provided by the SNMPv3 framework. Specifically, the use of the User-based Security Model STD 62, RFC 3414 [RFC3414] and the View-based Access Control Model STD 62, RFC 3415 [RFC3415] is recommended.

建议执行者考虑SNMPv3框架提供的安全特性。具体而言,建议使用基于用户的安全模型STD 62、RFC 3414[RFC3414]和基于视图的访问控制模型STD 62、RFC 3415[RFC3415]。

It is then a customer/user responsibility to ensure that the SNMP entity is properly configured so that:

然后,客户/用户有责任确保SNMP实体已正确配置,以便:

- only those principals (users) having legitimate rights can access or modify the values of any MIB objects supported by that entity;

- 只有拥有合法权限的主体(用户)才能访问或修改该实体支持的任何MIB对象的值;

- the occurrence of particular events on the entity will be communicated appropriately;

- 将适当传达实体发生的特定事件;

- the entity responds appropriately and with due credence to events and information that have been communicated to it.

- 被审计单位对已向其传达的事件和信息作出适当的反应,并具有应有的可信度。

8. References
8. 工具书类
8.1. Normative References
8.1. 规范性引用文件

[RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980.

[RFC768]Postel,J.,“用户数据报协议”,STD 6,RFC 768,1980年8月。

[RFC2578] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case, J., Rose, M. and S. Waldbusser, "Structure of Management Information Version 2 (SMIv2)", STD 58, RFC 2578, April 1999.

[RFC2578]McCloghrie,K.,Perkins,D.,Schoenwaeld,J.,Case,J.,Rose,M.和S.Waldbusser,“管理信息的结构版本2(SMIv2)”,STD 58,RFC 2578,1999年4月。

[RFC2579] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case, J., Rose, M. and S. Waldbusser, "Textual Conventions for SMIv2", STD 58, RFC 2579, April 1999.

[RFC2579]McCloghrie,K.,Perkins,D.,Schoenwaeld,J.,Case,J.,Rose,M.和S.Waldbusser,“SMIv2的文本约定”,STD 58,RFC 2579,1999年4月。

[RFC2580] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case, J., Rose, M. and S. Waldbusser, "Conformance Statements for SMIv2", STD 58, RFC 2580, April 1999.

[RFC2580]McCloghrie,K.,Perkins,D.,Schoenwaeld,J.,Case,J.,Rose,M.和S.Waldbusser,“SMIv2的一致性声明”,STD 58,RFC 25801999年4月。

[RFC3411] Harrington, D., Presuhn, R. and B. Wijnen, "An Architecture for Describing Simple Network Management Protocol (SNMP) Management Frameworks", STD 62, RFC 3411, December 2002.

[RFC3411]Harrington,D.,Presohn,R.和B.Wijnen,“描述简单网络管理协议(SNMP)管理框架的体系结构”,STD 62,RFC 3411,2002年12月。

[RFC3412] Case, J., Harrington, D., Presuhn, R. and B. Wijnen, "Message Processing and Dispatching for the Simple Network Management Protocol (SNMP)", STD 62, RFC 3412, December 2002.

[RFC3412]Case,J.,Harrington,D.,Presohn,R.和B.Wijnen,“简单网络管理协议(SNMP)的消息处理和调度”,STD 62,RFC 3412,2002年12月。

[RFC3413] Levi, D., Meyer, P. and B. Stewart, "Simple Network Management Protocol (SNMP) Applications", STD 62, RFC 3413, December 2002.

[RFC3413]Levi,D.,Meyer,P.和B.Stewart,“简单网络管理协议(SNMP)应用”,STD 62,RFC 3413,2002年12月。

[RFC3414] Blumenthal, U. and B. Wijnen, "The User-Based Security Model (USM) for Version 3 of the Simple Network Management Protocol (SNMPv3)", STD 62, RFC 3414, December 2002.

[RFC3414]Blumenthal,U.和B.Wijnen,“简单网络管理协议(SNMPv3)第3版基于用户的安全模型(USM)”,STD 62,RFC 3414,2002年12月。

[RFC3415] Wijnen, B., Presuhn, R. and K. McCloghrie, "View-based Access Control Model (VACM) for the Simple Network Management Protocol (SNMP)", STD 62, RFC 3415, December 2002.

[RFC3415]Wijnen,B.,Presohn,R.和K.McCloghrie,“用于简单网络管理协议(SNMP)的基于视图的访问控制模型(VACM)”,STD 62,RFC 3415,2002年12月。

[RFC3417] Presuhn, R., Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Transport Mappings for the Simple Network Management Protocol", STD 62, RFC 3417, December 2002.

[RFC3417]Presohn,R.,Case,J.,McCloghrie,K.,Rose,M.和S.Waldbusser,“简单网络管理协议的传输映射”,STD 62,RFC 34172002年12月。

[RFC3418] Presuhn, R., Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Management Information Base (MIB) for the Simple Network Management Protocol (SNMP)", STD 62, RFC 3418, December 2002.

[RFC3418]Presohn,R.,Case,J.,McCloghrie,K.,Rose,M.和S.Waldbusser,“简单网络管理协议(SNMP)的管理信息库(MIB)”,STD 62,RFC 3418,2002年12月。

[ASN1] Information processing systems - Open Systems Interconnection - Specification of Abstract Syntax Notation One (ASN.1), International Organization for Standardization. International Standard 8824, December 1987.

[ASN1]信息处理系统.开放系统互连.抽象语法符号1规范(ASN.1),国际标准化组织。国际标准88241987年12月。

8.2. Informative References
8.2. 资料性引用

[FRAG] Kent, C. and J. Mogul, "Fragmentation Considered Harmful," Proceedings, ACM SIGCOMM '87, Stowe, VT, August 1987.

[FRAG]Kent,C.和J.Mogul,“碎片被认为是有害的”,会议记录,ACM SIGCOMM'87,佛蒙特州斯托,1987年8月。

[RFC1155] Rose, M. and K. McCloghrie, "Structure and Identification of Management Information for TCP/IP-based Internets", STD 16, RFC 1155, May 1990.

[RFC1155]Rose,M.和K.McCloghrie,“基于TCP/IP的互联网管理信息的结构和识别”,STD 16,RFC 1155,1990年5月。

[RFC1157] Case, J., Fedor, M., Schoffstall, M. and J. Davin, "Simple Network Management Protocol", STD 15, RFC 1157, May 1990.

[RFC1157]Case,J.,Fedor,M.,Schoffstall,M.和J.Davin,“简单网络管理协议”,STD 15,RFC 1157,1990年5月。

[RFC1212] Rose, M. and K. McCloghrie, "Concise MIB Definitions", STD 16, RFC 1212, March 1991.

[RFC1212]Rose,M.和K.McCloghrie,“简明MIB定义”,STD 16,RFC 1212,1991年3月。

[RFC1213] McCloghrie, K. and M. Rose, Editors, "Management Information Base for Network Management of TCP/IP-based internets: MIB-II", STD 17, RFC 1213, March 1991.

[RFC1213]McCloghrie,K.和M.Rose,编辑,“基于TCP/IP的互联网网络管理的管理信息库:MIB-II”,STD 17,RFC 1213,1991年3月。

[RFC1215] Rose, M., "A Convention for Defining Traps for use with the SNMP", RFC 1215, March 1991.

[RFC1215]Rose,M.,“定义用于SNMP的陷阱的约定”,RFC1215,1991年3月。

[RFC1901] Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Introduction to Community-based SNMPv2", RFC 1901, January 1996.

[RFC1901]Case,J.,McCloghrie,K.,Rose,M.和S.Waldbusser,“基于社区的SNMPv2简介”,RFC 19011996年1月。

[RFC2576] Frye, R., Levi, D., Routhier, S. and B. Wijnen, "Coexistence between Version 1, Version 2, and Version 3 of the Internet-Standard Network Management Framework", RFC 2576, March 2000.

[RFC2576]Frye,R.,Levi,D.,Routhier,S.和B.Wijnen,“互联网标准网络管理框架第1版、第2版和第3版之间的共存”,RFC 25762000年3月。

[RFC2863] McCloghrie, K. and F. Kastenholz, "The Interfaces Group MIB", RFC 2863, June 2000.

[RFC2863]McCloghrie,K.和F.Kastenholz,“接口组MIB”,RFC 28632000年6月。

[RFC2914] Floyd, S., "Congestion Control Principles", BCP 41, RFC 2914, September 2000.

[RFC2914]Floyd,S.,“拥塞控制原则”,BCP 41,RFC 2914,2000年9月。

[RFC3410] Case, J., Mundy, R., Partain, D. and B. Stewart, "Introduction and Applicability Statements for Internet-Standard Management Framework", RFC 3410, December 2002.

[RFC3410]Case,J.,Mundy,R.,Partain,D.和B.Stewart,“互联网标准管理框架的介绍和适用性声明”,RFC 34102002年12月。

9. Changes from RFC 1905
9. RFC1905的变更

These are the changes from RFC 1905:

以下是RFC 1905的变更:

- Corrected spelling error in copyright statement;

- 更正版权声明中的拼写错误;

- Updated copyright date;

- 更新版权日期;

- Updated with new editor's name and contact information;

- 更新了新编辑的姓名和联系方式;

- Added notice on intellectual property;

- 增加了关于知识产权的通知;

- Cosmetic fixes to layout and typography;

- 布局和排版的装饰性修复;

- Added table of contents;

- 增加了目录;

- Title changed;

- 职称变更;

- Updated document headers and footers;

- 更新文件页眉和页脚;

- Deleted the old clause 2.3, entitled "Access to Management Information";

- 删除了旧的第2.3条,标题为“访问管理信息”;

- Changed the way in which request-id was defined, though with the same ultimate syntax and semantics, to avoid coupling with SMI. This does not affect the protocol in any way;

- 更改了请求id的定义方式,尽管使用了相同的最终语法和语义,以避免与SMI耦合。这不会以任何方式影响协议;

- Replaced the word "exception" with the word "error" in the old clause 4.1. This does not affect the protocol in any way;

- 将原第4.1条中的“例外”一词替换为“错误”。这不会以任何方式影响协议;

- Deleted the first two paragraphs of the old clause 4.2;

- 删除原第4.2条的前两段;

- Clarified the maximum number of variable bindings that an implementation must support in a PDU. This does not affect the protocol in any way;

- 阐明了PDU中实现必须支持的最大变量绑定数。这不会以任何方式影响协议;

- Replaced occurrences of "SNMPv2 application" with "application";

- 将出现的“SNMPv2应用程序”替换为“应用程序”;

- Deleted three sentences in old clause 4.2.3 describing the handling of an impossible situation. This does not affect the protocol in any way;

- 删除旧条款4.2.3中描述不可能情况处理的三句话。这不会以任何方式影响协议;

- Clarified the use of the SNMPv2-Trap-Pdu in the old clause 4.2.6. This does not affect the protocol in any way;

- 澄清了旧条款4.2.6中SNMPv2陷阱Pdu的使用。这不会以任何方式影响协议;

- Aligned description of the use of the InformRequest-Pdu in old clause 4.2.7 with the architecture. This does not affect the protocol in any way;

- 将旧条款4.2.7中InformRequest Pdu的使用说明与体系结构保持一致。这不会以任何方式影响协议;

- Updated references;

- 更新参考文献;

- Re-wrote introduction clause;

- 重写介绍条款;

- Replaced manager/agent/SNMPv2 entity terminology with terminology from RFC 2571. This does not affect the protocol in any way;

- 用RFC 2571中的术语替换了manager/agent/SNMPv2实体术语。这不会以任何方式影响协议;

- Eliminated IMPORTS from the SMI, replaced with equivalent in-line ASN.1. This does not affect the protocol in any way;

- 取消了SMI的进口,代之以同等的在线ASN.1。这不会以任何方式影响协议;

- Added notes calling attention to two different manifestations of reaching the end of a table in the table walk examples;

- 在桌面行走示例中,添加了提醒注意到达桌子末端的两种不同表现形式的注释;

- Added content to security considerations clause;

- 在安全考虑条款中增加内容;

- Updated ASN.1 comment on use of Report-PDU. This does not affect the protocol in any way;

- 更新了ASN.1关于报告PDU使用的评论。这不会以任何方式影响协议;

- Updated acknowledgments section;

- 更新确认部分;

- Included information on handling of BITS;

- 包括有关BIT处理的信息;

- Deleted spurious comma in ASN.1 definition of PDUs;

- 删除ASN.1 PDU定义中的假逗号;

- Added abstract;

- 增加摘要;

- Made handling of additional variable bindings in informs consistent with that for traps. This was a correction of an editorial oversight, and reflects implementation practice;

- 使通知中附加变量绑定的处理与陷阱一致。这是对编辑疏忽的纠正,反映了执行实践;

- Added reference to RFC 2914.

- 增加了对RFC 2914的参考。

10. Editor's Address
10. 编辑地址

Randy Presuhn BMC Software, Inc. 2141 North First Street San Jose, CA 95131 USA

美国加利福尼亚州圣何塞北第一街2141号Randy Presohn BMC软件公司,邮编95131

   Phone: +1 408 546 1006
   EMail: randy_presuhn@bmc.com
        
   Phone: +1 408 546 1006
   EMail: randy_presuhn@bmc.com
        
11. Full Copyright Statement
11. 完整版权声明

Copyright (C) The Internet Society (2002). All Rights Reserved.

版权所有(C)互联网协会(2002年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。