net-snmp
Version:
JavaScript implementation of the Simple Network Management Protocol (SNMP)
1,227 lines (846 loc) • 95.7 kB
Plain Text
Network Working Group J. Case
Request for Comments: 3412 SNMP Research, Inc.
STD: 62 D. Harrington
Obsoletes: 2572 Enterasys Networks
Category: Standards Track R. Presuhn
BMC Software, Inc.
B. Wijnen
Lucent Technologies
December 2002
Message Processing and Dispatching for the
Simple Network Management Protocol (SNMP)
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.
Copyright Notice
Copyright (C) The Internet Society (2002). All Rights Reserved.
Abstract
This document describes the Message Processing and Dispatching for
Simple Network Management Protocol (SNMP) messages within the SNMP
architecture. It defines the procedures for dispatching potentially
multiple versions of SNMP messages to the proper SNMP Message
Processing Models, and for dispatching PDUs to SNMP applications.
This document also describes one Message Processing Model - the
SNMPv3 Message Processing Model. This document obsoletes RFC 2572.
Case, et al. Standards Track [Page 1]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
Table of Contents
1. Introduction ................................................ 3
2. Overview .................................................... 4
2.1. The Dispatcher ............................................ 5
2.2. Message Processing Subsystem .............................. 5
3. Elements of Message Processing and Dispatching .............. 6
3.1. messageProcessingModel .................................... 6
3.2. pduVersion ................................................ 6
3.3. pduType ................................................... 7
3.4. sendPduHandle ............................................. 7
4. Dispatcher Elements of Procedure ............................ 7
4.1. Sending an SNMP Message to the Network .................... 7
4.1.1. Sending a Request or Notification ....................... 8
4.1.2. Sending a Response to the Network ....................... 9
4.2. Receiving an SNMP Message from the Network ................ 11
4.2.1. Message Dispatching of received SNMP Messages ........... 11
4.2.2. PDU Dispatching for Incoming Messages ................... 12
4.2.2.1. Incoming Requests and Notifications ................... 13
4.2.2.2. Incoming Responses .................................... 14
4.3. Application Registration for Handling PDU types ........... 15
4.4. Application Unregistration for Handling PDU Types ......... 16
5. Definitions ................................................. 16
5.1. Definitions for SNMP Message Processing and Dispatching ... 16
6. The SNMPv3 Message Format ................................... 19
6.1. msgVersion ................................................ 20
6.2. msgID ..................................................... 20
6.3. msgMaxSize ................................................ 21
6.4. msgFlags .................................................. 21
6.5. msgSecurityModel .......................................... 24
6.6. msgSecurityParameters ..................................... 24
6.7. scopedPduData ............................................. 24
6.8. scopedPDU ................................................. 24
6.8.1. contextEngineID ......................................... 24
6.8.2. contextName ............................................. 25
6.8.3. data .................................................... 25
7. Elements of Procedure for v3MP .............................. 25
7.1. Prepare an Outgoing SNMP Message .......................... 26
7.2. Prepare Data Elements from an Incoming SNMP Message ....... 32
8. Intellectual Property ....................................... 37
9. Acknowledgements ............................................ 38
10. Security Considerations .................................... 39
11. References ................................................. 40
11.1. Normative References ..................................... 40
11.2. Informative References ................................... 41
12. Editors' Addresses ......................................... 42
13. Full Copyright Statement ................................... 43
Case, et al. Standards Track [Page 2]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
1. Introduction
The Architecture for describing Internet Management Frameworks
[RFC3411] describes that an SNMP engine is composed of:
1) a Dispatcher
2) a Message Processing Subsystem,
3) a Security Subsystem, and
4) an Access Control Subsystem.
Applications make use of the services of these subsystems.
It is important to understand the SNMP architecture and its
terminology to understand where the Message Processing Subsystem and
Dispatcher described in this document fit into the architecture and
interact with other subsystems within the architecture. The reader
is expected to have read and understood the description of the SNMP
architecture, defined in [RFC3411].
The Dispatcher in the SNMP engine sends and receives SNMP messages.
It also dispatches SNMP PDUs to SNMP applications. When an SNMP
message needs to be prepared or when data needs to be extracted from
an SNMP message, the Dispatcher delegates these tasks to a message
version-specific Message Processing Model within the Message
Processing Subsystem.
A Message Processing Model is responsible for processing an SNMP
version-specific message and for coordinating the interaction with
the Security Subsystem to ensure proper security is applied to the
SNMP message being handled.
Interactions between the Dispatcher, the Message Processing
Subsystem, and applications are modeled using abstract data elements
and abstract service interface primitives defined by the SNMP
architecture.
Similarly, interactions between the Message Processing Subsystem and
the Security Subsystem are modeled using abstract data elements and
abstract service interface primitives as defined by the SNMP
architecture.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in BCP 14, RFC 2119.
Case, et al. Standards Track [Page 3]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
2. Overview
The following illustration depicts the Message Processing in relation
to SNMP applications, the Security Subsystem and Transport Mappings.
+-------------------------------------------------------------------+
| SNMP Entity |
| |
| +---------------------------------------------------------------+ |
| | Applications | |
| | +-----------+ +--------------+ | |
| | | Command | | Notification | | |
| | | Generator | | Originator | +-----------+ +--------------+| |
| | +-----------+ +--------------+ | Proxy | | Other || |
| | +-----------+ +--------------+ | Forwarder | |Application(s)|| |
| | | Command | | Notification | +-----------+ +--------------+| |
| | | Responder | | Receiver | | |
| | +-----------+ +--------------+ | |
| +---------------------------------------------------------------+ |
| ^ ^ ^ ^ |
| | | | | |
| v v v v |
| +--------+-------+---------------+-----------+ |
| ^ |
| | +---------------------+ +-----------------+ |
| | | Message Processing | | Security | |
| Dispatcher v | Subsystem | | Subsystem | |
| +------------------+ | +------------+ | | | |
| | PDU Dispatcher | | +->| v1MP * |<--->| +-------------+ | |
| | | | | +------------+ | | | Other | | |
| | | | | +------------+ | | | Security | | |
| | | | +->| v2cMP * |<--->| | Model | | |
| | Message | | | +------------+ | | +-------------+ | |
| | Dispatcher <-------->+ | | | |
| | | | | +------------+ | | +-------------+ | |
| | | | +->| v3MP * |<--->| | User-based | | |
| | Transport | | | +------------+ | | | Security | | |
| | Mapping | | | +------------+ | | | Model | | |
| | (e.g., RFC 3417) | | +->| otherMP * |<--->| +-------------+ | |
| +------------------+ | +------------+ | | | |
| ^ +---------------------+ +-----------------+ |
| | |
+----------|--------------------------------------------------------+
v
+------------------+
| Network | * One or more models may be present.
+------------------+
Case, et al. Standards Track [Page 4]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
2.1. The Dispatcher
The Dispatcher is a key piece of an SNMP engine. There is only one
in an SNMP engine, and its job is to dispatch tasks to the multiple
version-specific Message Processing Models, and to dispatch PDUs to
various applications.
For outgoing messages, an application provides a PDU to be sent, plus
the data needed to prepare and send the message, and the application
specifies which version-specific Message Processing Model will be
used to prepare the message with the desired security processing.
Once the message is prepared, the Dispatcher sends the message.
For incoming messages, the Dispatcher determines the SNMP version of
the incoming message and passes the message to the version-specific
Message Processing Model to extract the components of the message and
to coordinate the processing of security services for the message.
After version-specific processing, the PDU Dispatcher determines
which application, if any, should receive the PDU for processing and
forwards it accordingly.
The Dispatcher, while sending and receiving SNMP messages, collects
statistics about SNMP messages and the behavior of the SNMP engine in
managed objects to make them accessible to remote SNMP entities.
This document defines these managed objects, the MIB module which
contains them, and how these managed objects might be used to provide
useful management.
2.2. Message Processing Subsystem
The SNMP Message Processing Subsystem is the part of an SNMP engine
which interacts with the Dispatcher to handle the version-specific
SNMP messages. It contains one or more Message Processing Models.
This document describes one Message Processing Model, the SNMPv3
Message Processing Model, in Section 6. The SNMPv3 Message
Processing Model is defined in a separate section to show that
multiple (independent) Message Processing Models can exist at the
same time and that such Models can be described in different
documents. The SNMPv3 Message Processing Model can be replaced or
supplemented with other Message Processing Models in the future. Two
Message Processing Models which are expected to be developed in the
future are the SNMPv1 message format [RFC1157] and the SNMPv2c
message format [RFC1901]. Others may be developed as needed.
Case, et al. Standards Track [Page 5]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
3. Elements of Message Processing and Dispatching
See [RFC3411] for the definitions of:
contextEngineID
contextName
scopedPDU
maxSizeResponseScopedPDU
securityModel
securityName
securityLevel
messageProcessingModel
For incoming messages, a version-specific message processing module
provides these values to the Dispatcher. For outgoing messages, an
application provides these values to the Dispatcher.
For some version-specific processing, the values may be extracted
from received messages; for other versions, the values may be
determined by algorithm, or by an implementation-defined mechanism.
The mechanism by which the value is determined is irrelevant to the
Dispatcher.
The following additional or expanded definitions are for use within
the Dispatcher.
3.1. messageProcessingModel
The value of messageProcessingModel identifies a Message Processing
Model. A Message Processing Model describes the version-specific
procedures for extracting data from messages, generating messages,
calling upon a securityModel to apply its security services to
messages, for converting data from a version-specific message format
into a generic format usable by the Dispatcher, and for converting
data from Dispatcher format into a version-specific message format.
3.2. pduVersion
The value of pduVersion represents a specific version of protocol
operation and its associated PDU formats, such as SNMPv1 or SNMPv2
[RFC3416]. The values of pduVersion are specific to the version of
the PDU contained in a message, and the PDUs processed by
applications. The Dispatcher does not use the value of pduVersion
directly.
Case, et al. Standards Track [Page 6]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
An application specifies the pduVersion when it requests the PDU
Dispatcher to send a PDU to another SNMP engine. The Dispatcher
passes the pduVersion to a Message Processing Model, so it knows how
to handle the PDU properly.
For incoming messages, the pduVersion is provided to the Dispatcher
by a version-specific Message Processing module. The PDU Dispatcher
passes the pduVersion to the application so it knows how to handle
the PDU properly. For example, a command responder application needs
to know whether to use [RFC3416] elements of procedure and syntax
instead of those specified for SNMPv1.
3.3. pduType
A value of the pduType represents a specific type of protocol
operation. The values of the pduType are specific to the version of
the PDU contained in a message.
Applications register to support particular pduTypes for particular
contextEngineIDs.
For incoming messages, pduType is provided to the Dispatcher by a
version-specific Message Processing module. It is subsequently used
to dispatch the PDU to the application which registered for the
pduType for the contextEngineID of the associated scopedPDU.
3.4. sendPduHandle
This handle is generated for coordinating the processing of requests
and responses between the SNMP engine and an application. The handle
must be unique across all version-specific Message Processing Models,
and is of local significance only.
4. Dispatcher Elements of Procedure
This section describes the procedures followed by the Dispatcher when
generating and processing SNMP messages.
4.1. Sending an SNMP Message to the Network
This section describes the procedure followed by an SNMP engine
whenever it sends an SNMP message.
Case, et al. Standards Track [Page 7]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
4.1.1. Sending a Request or Notification
The following procedures are followed by the Dispatcher when an
application wants to send an SNMP PDU to another (remote)
application, i.e., to initiate a communication by originating a
message, such as one containing a request or a notification.
1) The application requests this using the abstract service
primitive:
statusInformation = -- sendPduHandle if success
-- errorIndication if failure
sendPdu(
IN transportDomain -- transport domain to be used
IN transportAddress -- destination network address
IN messageProcessingModel -- typically, SNMP version
IN securityModel -- Security Model to use
IN securityName -- on behalf of this principal
IN securityLevel -- Level of Security requested
IN contextEngineID -- data from/at this entity
IN contextName -- data from/in this context
IN pduVersion -- the version of the PDU
IN PDU -- SNMP Protocol Data Unit
IN expectResponse -- TRUE or FALSE
)
2) If the messageProcessingModel value does not represent a Message
Processing Model known to the Dispatcher, then an errorIndication
(implementation-dependent) is returned to the calling application.
No further processing is performed.
3) The Dispatcher generates a sendPduHandle to coordinate subsequent
processing.
Case, et al. Standards Track [Page 8]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
4) The Message Dispatcher sends the request to the version-specific
Message Processing module identified by messageProcessingModel
using the abstract service primitive:
statusInformation = -- success or error indication
prepareOutgoingMessage(
IN transportDomain -- as specified by application
IN transportAddress -- as specified by application
IN messageProcessingModel -- as specified by application
IN securityModel -- as specified by application
IN securityName -- as specified by application
IN securityLevel -- as specified by application
IN contextEngineID -- as specified by application
IN contextName -- as specified by application
IN pduVersion -- as specified by application
IN PDU -- as specified by application
IN expectResponse -- as specified by application
IN sendPduHandle -- as determined in step 3.
OUT destTransportDomain -- destination transport domain
OUT destTransportAddress -- destination transport address
OUT outgoingMessage -- the message to send
OUT outgoingMessageLength -- the message length
)
5) If the statusInformation indicates an error, the errorIndication
is returned to the calling application. No further processing is
performed.
6) If the statusInformation indicates success, the sendPduHandle is
returned to the application, and the outgoingMessage is sent. The
transport used to send the outgoingMessage is returned via
destTransportDomain, and the address to which it was sent is
returned via destTransportAddress.
Outgoing Message Processing is complete.
4.1.2. Sending a Response to the Network
The following procedure is followed when an application wants to
return a response back to the originator of an SNMP Request.
Case, et al. Standards Track [Page 9]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
1) An application can request this using the abstract service
primitive:
result =
returnResponsePdu(
IN messageProcessingModel -- typically, SNMP version
IN securityModel -- Security Model in use
IN securityName -- on behalf of this principal
IN securityLevel -- same as on incoming request
IN contextEngineID -- data from/at this SNMP entity
IN contextName -- data from/in this context
IN pduVersion -- the version of the PDU
IN PDU -- SNMP Protocol Data Unit
IN maxSizeResponseScopedPDU -- maximum size of Response PDU
IN stateReference -- reference to state information
-- as presented with the request
IN statusInformation -- success or errorIndication
) -- (error counter OID and value
-- when errorIndication)
2) The Message Dispatcher sends the request to the appropriate
Message Processing Model indicated by the received value of
messageProcessingModel using the abstract service primitive:
result = -- SUCCESS or errorIndication
prepareResponseMessage(
IN messageProcessingModel -- specified by application
IN securityModel -- specified by application
IN securityName -- specified by application
IN securityLevel -- specified by application
IN contextEngineID -- specified by application
IN contextName -- specified by application
IN pduVersion -- specified by application
IN PDU -- specified by application
IN maxSizeResponseScopedPDU -- specified by application
IN stateReference -- specified by application
IN statusInformation -- specified by application
OUT destTransportDomain -- destination transport domain
OUT destTransportAddress -- destination transport address
OUT outgoingMessage -- the message to send
OUT outgoingMessageLength -- the message length
)
3) If the result is an errorIndication, the errorIndication is
returned to the calling application. No further processing is
performed.
Case, et al. Standards Track [Page 10]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
4) If the result is success, the outgoingMessage is sent. The
transport used to send the outgoingMessage is returned via
destTransportDomain, and the address to which it was sent is
returned via destTransportAddress.
Message Processing is complete.
4.2. Receiving an SNMP Message from the Network
This section describes the procedure followed by an SNMP engine
whenever it receives an SNMP message.
Please note, that for the sake of clarity and to prevent the text
from being even longer and more complicated, some details were
omitted from the steps below. In particular, the elements of
procedure do not always explicitly indicate when state information
needs to be released. The general rule is that if state information
is available when a message is to be "discarded without further
processing", then the state information must also be released at that
same time.
4.2.1. Message Dispatching of received SNMP Messages
1) The snmpInPkts counter [RFC3418] is incremented.
2) The version of the SNMP message is determined in an
implementation-dependent manner. If the packet cannot be
sufficiently parsed to determine the version of the SNMP message,
then the snmpInASNParseErrs [RFC3418] counter is incremented, and
the message is discarded without further processing. If the
version is not supported, then the snmpInBadVersions [RFC3418]
counter is incremented, and the message is discarded without
further processing.
3) The origin transportDomain and origin transportAddress are
determined.
Case, et al. Standards Track [Page 11]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
4) The message is passed to the version-specific Message Processing
Model which returns the abstract data elements required by the
Dispatcher. This is performed using the abstract service
primitive:
result = -- SUCCESS or errorIndication
prepareDataElements(
IN transportDomain -- origin as determined in step 3.
IN transportAddress -- origin as determined in step 3.
IN wholeMsg -- as received from the network
IN wholeMsgLength -- as received from the network
OUT messageProcessingModel -- typically, SNMP version
OUT securityModel -- Security Model specified
OUT securityName -- on behalf of this principal
OUT securityLevel -- Level of Security specified
OUT contextEngineID -- data from/at this entity
OUT contextName -- data from/in this context
OUT pduVersion -- the version of the PDU
OUT PDU -- SNMP Protocol Data Unit
OUT pduType -- SNMP PDU type
OUT sendPduHandle -- handle for a matched request
OUT maxSizeResponseScopedPDU -- maximum size of Response PDU
OUT statusInformation -- success or errorIndication
-- (error counter OID and value
-- when errorIndication)
OUT stateReference -- reference to state information
-- to be used for a possible
) -- Response
5) If the result is a FAILURE errorIndication, the message is
discarded without further processing.
6) At this point, the abstract data elements have been prepared and
processing continues as described in Section 4.2.2, PDU
Dispatching for Incoming Messages.
4.2.2. PDU Dispatching for Incoming Messages
The elements of procedure for the dispatching of PDUs depends on the
value of sendPduHandle. If the value of sendPduHandle is <none>,
then this is a request or notification and the procedures specified
in Section 4.2.2.1 apply. If the value of snmpPduHandle is not
<none>, then this is a response and the procedures specified in
Section 4.2.2.2 apply.
Case, et al. Standards Track [Page 12]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
4.2.2.1. Incoming Requests and Notifications
The following procedures are followed for the dispatching of PDUs
when the value of sendPduHandle is <none>, indicating this is a
request or notification.
1) The combination of contextEngineID and pduType is used to
determine which application has registered for this request or
notification.
2) If no application has registered for the combination, then:
a) The snmpUnknownPDUHandlers counter is incremented.
b) A Response message is generated using the abstract service
primitive:
result = -- SUCCESS or FAILURE
prepareResponseMessage(
IN messageProcessingModel -- as provided by MP module
IN securityModel -- as provided by MP module
IN securityName -- as provided by MP module
IN securityLevel -- as provided by MP module
IN contextEngineID -- as provided by MP module
IN contextName -- as provided by MP module
IN pduVersion -- as provided by MP module
IN PDU -- as provided by MP module
IN maxSizeResponseScopedPDU -- as provided by MP module
IN stateReference -- as provided by MP module
IN statusInformation -- errorIndication plus
-- snmpUnknownPDUHandlers OID
-- value pair.
OUT destTransportDomain -- destination transportDomain
OUT destTransportAddress -- destination transportAddress
OUT outgoingMessage -- the message to send
OUT outgoingMessageLength -- its length
)
c) If the result is SUCCESS, then the prepared message is sent to
the originator of the request as identified by the
transportDomain and transportAddress. The transport used to
send the outgoingMessage is returned via destTransportDomain,
and the address to which it was sent is returned via
destTransportAddress.
d) The incoming message is discarded without further processing.
Message Processing for this message is complete.
Case, et al. Standards Track [Page 13]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
3) The PDU is dispatched to the application, using the abstract
service primitive:
processPdu( -- process Request/Notification
IN messageProcessingModel -- as provided by MP module
IN securityModel -- as provided by MP module
IN securityName -- as provided by MP module
IN securityLevel -- as provided by MP module
IN contextEngineID -- as provided by MP module
IN contextName -- as provided by MP module
IN pduVersion -- as provided by MP module
IN PDU -- as provided by MP module
IN maxSizeResponseScopedPDU -- as provided by MP module
IN stateReference -- as provided by MP module
-- needed when sending response
)
Message processing for this message is complete.
4.2.2.2. Incoming Responses
The following procedures are followed for the dispatching of PDUs
when the value of sendPduHandle is not <none>, indicating this is a
response.
1) The value of sendPduHandle is used to determine, in an
implementation-defined manner, which application is waiting for a
response associated with this sendPduHandle.
2) If no waiting application is found, the message is discarded
without further processing, and the stateReference is released.
The snmpUnknownPDUHandlers counter is incremented. Message
Processing is complete for this message.
3) Any cached information, including stateReference, about the
message is discarded.
Case, et al. Standards Track [Page 14]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
4) The response is dispatched to the application using the abstract
service primitive:
processResponsePdu( -- process Response PDU
IN messageProcessingModel -- provided by the MP module
IN securityModel -- provided by the MP module
IN securityName -- provided by the MP module
IN securityLevel -- provided by the MP module
IN contextEngineID -- provided by the MP module
IN contextName -- provided by the MP module
IN pduVersion -- provided by the MP module
IN PDU -- provided by the MP module
IN statusInformation -- provided by the MP module
IN sendPduHandle -- provided by the MP module
)
Message Processing is complete for this message.
4.3. Application Registration for Handling PDU types
Applications that want to process certain PDUs must register with the
PDU Dispatcher. Applications specify the combination of
contextEngineID and pduType(s) for which they want to take
responsibility.
1) An application registers according to the abstract interface
primitive:
statusInformation = -- success or errorIndication
registerContextEngineID(
IN contextEngineID -- take responsibility for this one
IN pduType -- the pduType(s) to be registered
)
Note: Implementations may provide a means of requesting
registration for simultaneous multiple contextEngineID values,
e.g., all contextEngineID values, and may also provide a means for
requesting simultaneous registration for multiple values of the
pduType.
2) The parameters may be checked for validity; if they are not, then
an errorIndication (invalidParameter) is returned to the
application.
3) Each combination of contextEngineID and pduType can be registered
only once. If another application has already registered for the
specified combination, then an errorIndication (alreadyRegistered)
is returned to the application.
Case, et al. Standards Track [Page 15]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
4) Otherwise, the registration is saved so that SNMP PDUs can be
dispatched to this application.
4.4. Application Unregistration for Handling PDU Types
Applications that no longer want to process certain PDUs must
unregister with the PDU Dispatcher.
1) An application unregisters using the abstract service primitive:
unregisterContextEngineID(
IN contextEngineID -- give up responsibility for this
IN pduType -- the pduType(s) to be unregistered
)
Note: Implementations may provide a means for requesting the
unregistration for simultaneous multiple contextEngineID values,
e.g., all contextEngineID values, and may also provide a means for
requesting simultaneous unregistration for multiple values of
pduType.
2) If the contextEngineID and pduType combination has been
registered, then the registration is deleted.
If no such registration exists, then the request is ignored.
5. Definitions
5.1. Definitions for SNMP Message Processing and Dispatching
SNMP-MPD-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF
MODULE-IDENTITY, OBJECT-TYPE,
snmpModules, Counter32 FROM SNMPv2-SMI;
snmpMPDMIB MODULE-IDENTITY
LAST-UPDATED "200210140000Z"
ORGANIZATION "SNMPv3 Working Group"
CONTACT-INFO "WG-EMail: snmpv3@lists.tislabs.com
Subscribe: snmpv3-request@lists.tislabs.com
Co-Chair: Russ Mundy
Network Associates Laboratories
postal: 15204 Omega Drive, Suite 300
Rockville, MD 20850-4601
USA
Case, et al. Standards Track [Page 16]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
EMail: mundy@tislabs.com
phone: +1 301-947-7107
Co-Chair &
Co-editor: David Harrington
Enterasys Networks
postal: 35 Industrial Way
P. O. Box 5005
Rochester NH 03866-5005
USA
EMail: dbh@enterasys.com
phone: +1 603-337-2614
Co-editor: Jeffrey Case
SNMP Research, Inc.
postal: 3001 Kimberlin Heights Road
Knoxville, TN 37920-9716
USA
EMail: case@snmp.com
phone: +1 423-573-1434
Co-editor: Randy Presuhn
BMC Software, Inc.
postal: 2141 North First Street
San Jose, CA 95131
USA
EMail: randy_presuhn@bmc.com
phone: +1 408-546-1006
Co-editor: Bert Wijnen
Lucent Technologies
postal: Schagen 33
3461 GL Linschoten
Netherlands
EMail: bwijnen@lucent.com
phone: +31 348-680-485
"
DESCRIPTION "The MIB for Message Processing and Dispatching
Copyright (C) The Internet Society (2002). This
version of this MIB module is part of RFC 3412;
see the RFC itself for full legal notices.
"
REVISION "200210140000Z" -- 14 October 2002
DESCRIPTION "Updated addresses, published as RFC 3412."
REVISION "199905041636Z" -- 4 May 1999
DESCRIPTION "Updated addresses, published as RFC 2572."
Case, et al. Standards Track [Page 17]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
REVISION "199709300000Z" -- 30 September 1997
DESCRIPTION "Original version, published as RFC 2272."
::= { snmpModules 11 }
-- Administrative assignments ***************************************
snmpMPDAdmin OBJECT IDENTIFIER ::= { snmpMPDMIB 1 }
snmpMPDMIBObjects OBJECT IDENTIFIER ::= { snmpMPDMIB 2 }
snmpMPDMIBConformance OBJECT IDENTIFIER ::= { snmpMPDMIB 3 }
-- Statistics for SNMP Messages *************************************
snmpMPDStats OBJECT IDENTIFIER ::= { snmpMPDMIBObjects 1 }
snmpUnknownSecurityModels OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION "The total number of packets received by the SNMP
engine which were dropped because they referenced a
securityModel that was not known to or supported by
the SNMP engine.
"
::= { snmpMPDStats 1 }
snmpInvalidMsgs OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION "The total number of packets received by the SNMP
engine which were dropped because there were invalid
or inconsistent components in the SNMP message.
"
::= { snmpMPDStats 2 }
snmpUnknownPDUHandlers OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION "The total number of packets received by the SNMP
engine which were dropped because the PDU contained
in the packet could not be passed to an application
responsible for handling the pduType, e.g. no SNMP
application had registered for the proper
combination of the contextEngineID and the pduType.
"
::= { snmpMPDStats 3 }
Case, et al. Standards Track [Page 18]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
-- Conformance information ******************************************
snmpMPDMIBCompliances OBJECT IDENTIFIER ::= {snmpMPDMIBConformance 1}
snmpMPDMIBGroups OBJECT IDENTIFIER ::= {snmpMPDMIBConformance 2}
-- Compliance statements
snmpMPDCompliance MODULE-COMPLIANCE
STATUS current
DESCRIPTION "The compliance statement for SNMP entities which
implement the SNMP-MPD-MIB.
"
MODULE -- this module
MANDATORY-GROUPS { snmpMPDGroup }
::= { snmpMPDMIBCompliances 1 }
snmpMPDGroup OBJECT-GROUP
OBJECTS {
snmpUnknownSecurityModels,
snmpInvalidMsgs,
snmpUnknownPDUHandlers
}
STATUS current
DESCRIPTION "A collection of objects providing for remote
monitoring of the SNMP Message Processing and
Dispatching process.
"
::= { snmpMPDMIBGroups 1 }
END
6. The SNMPv3 Message Format
This section defines the SNMPv3 message format and the corresponding
SNMP version 3 Message Processing Model (v3MP).
SNMPv3MessageSyntax DEFINITIONS IMPLICIT TAGS ::= BEGIN
SNMPv3Message ::= SEQUENCE {
-- identify the layout of the SNMPv3Message
-- this element is in same position as in SNMPv1
-- and SNMPv2c, allowing recognition
-- the value 3 is used for snmpv3
msgVersion INTEGER ( 0 .. 2147483647 ),
-- administrative parameters
msgGlobalData HeaderData,
-- security model-specific parameters
-- format defined by Security Model
Case, et al. Standards Track [Page 19]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
msgSecurityParameters OCTET STRING,
msgData ScopedPduData
}
HeaderData ::= SEQUENCE {
msgID INTEGER (0..2147483647),
msgMaxSize INTEGER (484..2147483647),
msgFlags OCTET STRING (SIZE(1)),
-- .... ...1 authFlag
-- .... ..1. privFlag
-- .... .1.. reportableFlag
-- Please observe:
-- .... ..00 is OK, means noAuthNoPriv
-- .... ..01 is OK, means authNoPriv
-- .... ..10 reserved, MUST NOT be used.
-- .... ..11 is OK, means authPriv
msgSecurityModel INTEGER (1..2147483647)
}
ScopedPduData ::= CHOICE {
plaintext ScopedPDU,
encryptedPDU OCTET STRING -- encrypted scopedPDU value
}
ScopedPDU ::= SEQUENCE {
contextEngineID OCTET STRING,
contextName OCTET STRING,
data ANY -- e.g., PDUs as defined in [RFC3416]
}
END
6.1. msgVersion
The msgVersion field is set to snmpv3(3) and identifies the message
as an SNMP version 3 Message.
6.2. msgID
The msgID is used between two SNMP entities to coordinate request
messages and responses, and by the v3MP to coordinate the processing
of the message by different subsystem models within the architecture.
Values for msgID SHOULD be generated in a manner that avoids re-use
of any outstanding values. Doing so provides protection against some
replay attacks. One possible implementation strategy would be to use
the low-order bits of snmpEngineBoots [RFC3411] as the high-order
Case, et al. Standards Track [Page 20]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
portion of the msgID value and a monotonically increasing integer for
the low-order portion of msgID.
Note that the request-id in a PDU may be used by SNMP applications to
identify the PDU; the msgID is used by the engine to identify the
message which carries a PDU. The engine needs to identify the
message even if decryption of the PDU (and request-id) fails. No
assumption should be made that the value of the msgID and the value
of the request-id are equivalent.
The value of the msgID field for a response takes the value of the
msgID field from the message to which it is a response. By use of
the msgID value, an engine 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 msgID also provides a simple means of identifying
messages duplicated by the network. If a request is retransmitted, a
new msgID value SHOULD be used for each retransmission.
6.3. msgMaxSize
The msgMaxSize field of the message conveys the maximum message size
supported by the sender of the message, i.e., the maximum message
size that the sender can accept when another SNMP engine sends an
SNMP message (be it a response or any other message) to the sender of
this message on the transport in use for this message.
When an SNMP message is being generated, the msgMaxSize is provided
by the SNMP engine which generates the message. At the receiving
SNMP engine, the msgMaxSize is used to determine the maximum message
size the sender can accommodate.
6.4. msgFlags
The msgFlags field of the message contains several bit fields which
control processing of the message.
The reportableFlag is a secondary aid in determining whether a Report
PDU MUST be sent. It is only used in cases where the PDU portion of
a message cannot be decoded, due to, for example, an incorrect
encryption key. If the PDU can be decoded, the PDU type forms the
basis for decisions on sending Report PDUs.
When the reportableFlag is used, if its value is one, a Report PDU
MUST be returned to the sender under those conditions which can cause
the generation of Report PDUs. Similarly, when the reportableFlag is
used and its value is zero, then a Report PDU MUST NOT be sent. The
reportableFlag MUST always be zero when the message contains a PDU
Case, et al. Standards Track [Page 21]
RFC 3412 Message Processing and Dispatching for SNMP December 2002
from the Unconfirmed Class, such as a Report PDU, a response-type PDU
(such as a Response PDU), or an unacknowledged notification-type PDU
(such as an SNMPv2-trap PDU). The reportableFlag MUST always be one
for a PDU from the Confirmed Class, including request-type PDUs (such
as a Get PDU) and acknowledged notification-type PDUs (such as an
Inform PDU).
If the reportableFlag is set to one for a message containing a PDU
from the Unconfirmed Class, such as a Report PDU, a response-type PDU
(such as a Response PDU), or an unacknowledged notification-type PDU
(such as an SNMPv2-trap PDU), then the receiver of that message MUST
process it as though the reportableFlag had been set to zero.
If the reportableFlag is set to zero for a message containing a
request-type PDU (such as a Get PDU) or an acknowledged
notification-type PDU (such as an Inform PDU), then the receiver of
that message MUST process it as though the reportableFlag had been
set to one.
Report PDUs are generated directly by the SNMPv3 Message Processing
Model, and support engine-to-engine communications, but may be passed
to applications for processing.
An SNMP engine that receives a reportPDU may use it to determine what
kind of problem was detected by the remote SNMP engine. It can do so
based on the error counter included as the first (and only) varBind
of the reportPDU. Based on the detected error, the SNMP engine may
try to send a corrected SNMP message. If that is not possible, it
may pass an indication of the error to the application on whose
behalf the failed SNMP request was issued.
The authFlag and privFlag portions of the msgFlags field are set by
the sender to indicate the securityLevel that was applied to the
message before it was sent on the wire. The receiver of the message
MUST apply the same securityLevel when the message is received and
the contents are being processed.
There are three securityLevels, namely noAuthNoPriv, which is less
than authNoPriv, which is in turn less than authPriv. See the SNMP
architecture document [RFC3411] for details about the securityLevel.
a) authFlag
If the authFlag is set to one, then the securityModel used by the
SNMP engine which sent the messa