RFC 2572
Message Processing and Dispatching for the Simple Network Management Protocol (SNMP)
Status of this Memo β¨
Okay bestie, so this is RFC 2572 π, and it's the "Message Processing and Dispatching for the Simple Network Management Protocol (SNMP)" doc π. It came out of the Network Working Group in April 1999 and it's Standards Track, which is the real deal π . Four authors wrote it: J. Case from SNMP Research Inc., D. Harrington from Cabletron Systems, Inc., R. Presuhn from BMC Software, Inc., and B. Wijnen from IBM T. J. Watson Research π§. It obsoletes RFC 2272, and the header doesn't list any RFC it updates πΈ.
Also, this doc specifies an Internet standards track protocol for the Internet community, and it's literally asking for discussion and suggestions for improvements π¬. If you want the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1) π. Distribution of this memo is unlimited π.
Copyright Notice π
Copyright (C) The Internet Society (1999). All Rights Reserved.
Abstract π«Ά
Okay so the abstract says this doc describes Message Processing and Dispatching for SNMP messages inside the SNMP architecture [RFC2571] π§©. It explains how to send out potentially multiple versions of SNMP messages to the right SNMP Message Processing Models, and how to dispatch PDUs to SNMP applications π. It also describes one Message Processing Model, which is the SNMPv3 Message Processing Model π.
Table of Contents π
1. Introduction ................................................ 3
2. Overview .................................................... 3
2.1. The Dispatcher. .......................................... 5
2.2. Message Processing Subsystem .............................. 5
3. Elements of Message Processing and Dispatching .............. 5
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 ....................... 7
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 ................... 12
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 ................................... 20
6.1. msgVersion ................................................ 21
6.2. msgID ..................................................... 21
6.3. msgMaxSize ................................................ 21
6.4. msgFlags .................................................. 22
6.5. msgSecurityModel .......................................... 24
6.6. msgSecurityParameters ..................................... 24
6.7. scopedPduData ............................................. 24
6.8. scopedPDU ................................................. 25
6.8.1. contextEngineID ......................................... 25
6.8.2. contextName ............................................. 25
6.8.3. data .................................................... 25
7. Elements of Procedure for v3MP .............................. 25
7.1. Prepare an Outgoing SNMP Message .......................... 36
7.2. Prepare Data Elements from an Incoming SNMP Message ....... 31
8. Intellectual Property ....................................... 37
9. Acknowledgements ............................................ 37
10. Security Considerations .................................... 39
11. References ................................................. 40
12. Editors' Addresses ......................................... 41
13. Changes From RFC 2272 ...................................... 42
14. Full Copyright Statement ................................... 44
1. Introduction β¨
Okay so the [RFC2571] Architecture for describing Internet Management Frameworks says an SNMP engine is made up of four things π§:
1) a Dispatcher
2) a Message Processing Subsystem,
3) a Security Subsystem, and
4) an Access Control Subsystem.
Applications use the services of these subsystems π.
It's super important to get the SNMP architecture and its terminology down, so you can see where the Message Processing Subsystem and the Dispatcher fit in and how they talk to everything else π¦. The reader is expected to have already read and understood the SNMP architecture, which is defined in [RFC2571] π.
The Dispatcher in the SNMP engine is the one that 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 pulled out of one, the Dispatcher hands that job off to a message version-specific Message Processing Model inside the Message Processing Subsystem π§.
A Message Processing Model is in charge of processing one version of an SNMP message π. It also coordinates with the Security Subsystem so the right security gets applied to the message being handled π.
The Dispatcher, the Message Processing Subsystem, and applications all interact through abstract data elements and abstract service interface primitives that the SNMP architecture defines π§©.
The Message Processing Subsystem and the Security Subsystem also interact through 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 RFC 2119 π.
2. Overview πΈ
Here's the picture of how Message Processing relates 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 1906) | | +->| otherMP * |<--->| +-------------+ | |
| +------------------+ | +------------+ | | | |
| ^ +---------------------+ +-----------------+ |
| | |
+----------|--------------------------------------------------------+
v
+------------------+
| Network |
+------------------+
2.1. The Dispatcher. π
The Dispatcher is a key piece of an SNMP engine π . There's only one in each SNMP engine, and its job is to dispatch tasks to the multiple version-specific Message Processing Models and to dispatch PDUs to the various applications π§.
For outgoing messages, an application hands over a PDU to be sent, plus the data needed to prepare and send the message π€. The application also specifies which version-specific Message Processing Model will prepare the message with the desired security processing π. Once the message is prepared, the Dispatcher sends it π.
For incoming messages, the Dispatcher figures out the SNMP version of the message and passes it to the matching version-specific Message Processing Model π₯. That model pulls out the components of the message and coordinates the security services for it π‘οΈ. After that version-specific processing, the PDU Dispatcher decides which application, if any, should receive the PDU and forwards it there π¦.
While sending and receiving SNMP messages, the Dispatcher also collects statistics about SNMP messages and how the SNMP engine behaves π. It keeps those in managed objects so remote SNMP entities can access them π. This document defines those managed objects, the MIB module that contains them, and how they might be used to provide useful management π.
Part 2 picks up with 2.2 Message Processing Subsystem, so stay tuned π¦β¨
2.2. Message Processing Subsystem β¨
okay so the Message Processing Subsystem is the part of an SNMP engine that teams up with the Dispatcher to handle the version-specific SNMP messages π . It holds one or more Message Processing Models π¦.
This document describes one Message Processing Model, the SNMPv3 Message Processing Model, in Section 6 π. The SNMPv3 one gets its own separate section on purpose, to show that multiple (independent) Message Processing Models can exist at the same time π and that they 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 that are expected to be developed later are the SNMPv1 message format [RFC1157] and the SNMPv2c message format [RFC1901]. Others may be developed as needed π§.
3. Elements of Message Processing and Dispatching π§
bestie, go check [RFC2571] π for the definitions of:
contextEngineID
contextName
scopedPDU
maxSizeResponseScopedPDU
securityModel
securityName
securityLevel
messageProcessingModel
For incoming messages, a version-specific message processing module hands these values to the Dispatcher β¨. For outgoing messages, an application hands them over π.
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 π, so it's giving "not my problem" energy.
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, and calling upon a securityModel to apply its security services to messages π. It also handles converting data from a version-specific message format into a generic format usable by the Dispatcher, and converting data from Dispatcher format back 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 [RFC1905] π. The values of pduVersion are specific to the version of the PDU contained in a message, and to the PDUs processed by applications π¦. The Dispatcher does not use the value of pduVersion directly π
.
An application specifies the pduVersion when it asks 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, pduVersion is provided to the Dispatcher by a version-specific Message Processing module π₯. The PDU Dispatcher then 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 [RFC1905] elements of procedure and syntax instead of those specified for SNMPv1 π.
3.3. pduType
A value of pduType represents a specific type of protocol operation π·οΈ. The values of 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 then 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 it 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 π«.
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., when it wants to start a conversation by originating a message, such as one containing a request or a trap π£.
- 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
)
- If the
messageProcessingModelvalue 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 π. - The Dispatcher generates a sendPduHandle to coordinate subsequent processing π«.
- The Message Dispatcher sends the request to the version-specific Message Processing module identified by
messageProcessingModelusing 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
)
- If the statusInformation indicates an error, the errorIndication is returned to the calling application. No further processing is performed π¬.
- If the statusInformation indicates success, the sendPduHandle is returned to the application, and the outgoingMessage is sent via the transport specified by the transportDomain to the address specified by the transportAddress π.
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 π.
- 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)
- The Message Dispatcher sends the request to the appropriate Message Processing Model indicated by the received value of
messageProcessingModelusing 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
)
- If the result is an errorIndication, the errorIndication is returned to the calling application. No further processing is performed π.
- If the result is success, the outgoingMessage is sent over the transport specified by the transportDomain to the address specified by the transportAddress π.
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 β¨
okay bestie, here's how a received SNMP message gets dispatched π
- The snmpInPkts counter [RFC1907] gets incremented π.
- The version of the SNMP message gets figured out in an implementation-dependent manner π€·. If the packet can't be parsed well enough to find the version, the snmpInASNParseErrs [RFC1907] counter gets incremented and the message is discarded without further processing ποΈ. If the version isn't supported, the snmpInBadVersions [RFC1907] counter gets incremented and the message is discarded without further processing.
- The origin transportDomain and origin transportAddress get determined.
- The message goes to the version-specific Message Processing Model, which hands back the abstract data elements the Dispatcher needs π. This happens through 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
- If the result is a FAILURE errorIndication, the message is discarded without further processing π«.
- At this point the abstract data elements are all prepped, and processing carries on as described in Section 4.2.2, PDU Dispatching for Incoming Messages π«Ά.
4.2.2. PDU Dispatching for Incoming Messages π¦
the way the PDU dispatching works depends on the value of sendPduHandle π. If sendPduHandle is <none>, then it's a request or notification, and the procedures in Section 4.2.2.1 apply. If the value of snmpPduHandle is not <none>, then it's a response, and the procedures in Section 4.2.2.2 apply.
4.2.2.1. Incoming Requests and Notifications π¬
these are the procedures for dispatching PDUs when sendPduHandle is <none>, which tells us it's a request or notification.
- The combination of contextEngineID and pduType is used to figure out which application registered for this request or notification π.
- If no application has registered for that combination, then: a) The snmpUnknownPDUHandlers counter gets incremented. b) A Response message gets 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, the prepared message gets sent to the originator of the request, as identified by the transportDomain and transportAddress π. d) The incoming message is discarded without further processing. Message Processing for this message is complete π.
- The PDU gets 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 π
these are the procedures for dispatching PDUs when sendPduHandle is not <none>, which tells us it's a response.
- The value of sendPduHandle is used to find, in an implementation-defined manner, which application is waiting for a response tied to this sendPduHandle π΅οΈ.
- If no waiting application is found, the message is discarded without further processing, and the stateReference is released. The snmpUnknownPDUHandlers counter gets incremented. Message Processing is complete for this message π.
- Any cached information about the message, including the stateReference, is discarded π§Ή.
- The response gets 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 have to register with the PDU Dispatcher π. They do this by specifying the combination of contextEngineID and pduType(s) they want to take responsibility for.
- An application registers using 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 means for requesting simultaneous registration for multiple values of pduType.
- The parameters may be checked for validity. If they aren't valid, an errorIndication (invalidParameter) is returned to the application π .
- Each combination of contextEngineID and pduType can be registered only once π. If another application has already registered for the specified combination, an errorIndication (alreadyRegistered) is returned to the application.
- 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 π.
- 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 means for requesting unregistration for simultaneous multiple contextEngineID values, e.g., all contextEngineID values, and may also provide means for requesting simultaneous unregistration for multiple values of pduType.
- If the contextEngineID and pduType combination has been registered, the registration is deleted ποΈ.
If no such registration exists, the request is ignored π.
5. Definitions π§
5.1. Definitions for SNMP Message Processing and Dispatching β¨
okay so this is the MIB module, aka the official little dictionary that lets you watch the Message Processing and Dispatching stuff happen. it's giving admin-panel energy π»π the header info is the list of who wrote it, when it was updated, and the change log (the 1997 original, then the 1999 address refresh) π
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 "9905041636Z" -- 4 April 1999
ORGANIZATION "SNMPv3 Working Group"
CONTACT-INFO "WG-EMail: snmpv3@lists.tislabs.com
Subscribe: majordomo@lists.tislabs.com
In message body: subscribe snmpv3
Chair: Russ Mundy
TIS Labs at Network Associates
postal: 3060 Washington Road
Glenwood, MD 21738
USA
EMail: mundy@tislabs.com
phone: +1 301-854-6889
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 Dave Harrington
Cabletron Systems, Inc.
postal: Post Office Box 5005
MailStop: Durham
35 Industrial Way
Rochester, NH 03867-5005
USA
EMail: dbh@ctron.com
phone: +1 603-337-7357
Co-editor: Randy Presuhn
BMC Software, Inc.
postal: 965 Stewart Drive
Sunnyvale, CA 94086
USA
EMail: randy_presuhn@bmc.com
phone: +1 408-616-3100
Co-editor: Bert Wijnen
IBM T. J. Watson Research
postal: Schagen 33
3461 GL Linschoten
Netherlands
EMail: wijnen@vnet.ibm.com
phone: +31 348-432-794
"
DESCRIPTION "The MIB for Message Processing and Dispatching"
REVISION "9905041636Z" -- 4 April 1999
DESCRIPTION "Updated addresses, published as RFC 2572."
REVISION "9709300000Z" -- 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 }
-- 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 π¦
okay this section is the big one bestie π«Ά it defines the SNMPv3 message format and the SNMP version 3 Message Processing Model (v3MP), so this is literally the shape of every v3 message π¦β¨
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
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 RFC 1905
}
END
6.1. msgVersion π
the msgVersion field is set to snmpv3(3), and that's how it says "hey, I'm an SNMP version 3 Message" π
6.2. msgID π§
the msgID is the thing two SNMP entities use to keep track of requests and their responses, and the v3MP uses it to coordinate how the message gets handled by the different subsystem models in the architecture π₯
values for msgID SHOULD be generated in a way that avoids re-use of any outstanding values, because that gives you some protection against replay attacks π one possible strategy (just one, not the only way!) is to use the low-order bits of snmpEngineBoots [RFC2571] as the high-order portion of the msgID, and a monotonically increasing integer for the low-order portion.
quick but important thing π the request-id in a PDU can be used by SNMP applications to identify the PDU, but the msgID is what the engine uses to identify the message that carries a PDU. the engine needs to identify the message even if decrypting the PDU (and the request-id with it) fails. no assumption should be made that the msgID and the request-id have the same value, so don't mix them up bestie π ββοΈ
the msgID on a response takes the value of the msgID from the message it's responding to. that's how an engine can tell apart all those potentially multiple outstanding requests and match incoming responses to the right ones β¨ when an unreliable datagram service is being used, the msgID also helps spot messages that got duplicated by the network. and if a request gets retransmitted, a new msgID value SHOULD be used for each retransmission πΈ
6.3. msgMaxSize π
the msgMaxSize field conveys the maximum message size the sender supports, which means the biggest message the sender can accept when another SNMP engine sends it an SNMP message (whether that's a response or anything else) over the transport in use for this message ππ
when an SNMP message is being generated, the SNMP engine that generates it provides the msgMaxSize. at the receiving SNMP engine, msgMaxSize is used to figure out the maximum message size the sender can fit β¨
6.4. msgFlags π
okay so msgFlags is a little bundle of bit fields, and they control how the message gets processed π
The reportableFlag is a secondary helper for deciding whether a Report PDU has to go out π¦ It only matters when the PDU part can't be decoded, like if the encryption key is wrong π If the PDU can be decoded, the PDU type is what drives the Report PDU decisions.
When the reportableFlag is used and its value is one, a Report PDU MUST be returned to the sender under those conditions which can cause the generation of Report PDUs. Flip it, and when the reportableFlag is used and its value is zero, a Report PDU MUST NOT be sent. The reportableFlag MUST always be zero when the message contains a PDU from the Unconfirmed Class, like 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 (like a Get PDU) and acknowledged notification-type PDUs (like an Inform PDU) β¨
If the reportableFlag is set to one for a message containing a PDU from the Unconfirmed Class (a Report PDU, a response-type PDU, or an unacknowledged notification-type 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 (like a Get PDU) or an acknowledged notification-type PDU (like 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 they support engine-to-engine communications. They can also be passed to applications for processing π§
An SNMP engine that receives a reportPDU can use it to figure out what kind of problem the remote SNMP engine detected. It does this by looking at the error counter, which is 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 isn't 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: noAuthNoPriv, which is less than authNoPriv, which is in turn less than authPriv. See the SNMP architecture document [RFC2571] 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 message MUST identify the securityName on whose behalf the SNMP message was generated, and MUST provide, in a securityModel-specific manner, sufficient data for the receiver of the message to be able to authenticate that identification. In general, this authentication lets the receiver determine with reasonable certainty that the message was:
- sent on behalf of the principal associated with the securityName,
- not redirected,
- not modified in transit, and
- not replayed.
If the authFlag is zero, then the securityModel used by the SNMP engine which sent the message must identify the securityName on whose behalf the SNMP message was generated, but it does not need to provide sufficient data for the receiver to authenticate the identification, since there's no need to authenticate the message in this case π
b) privFlag
If the privFlag is set, then the securityModel used by the SNMP engine which sent the message MUST also protect the scopedPDU in an SNMP message from disclosure, i.e., it MUST encrypt/decrypt the scopedPDU. If the privFlag is zero, then the securityModel in use doesn't need to protect the data from disclosure π
It is an explicit requirement of the SNMP architecture that if privacy is selected, then authentication is also required. That means that if the privFlag is set, then the authFlag MUST also be set to one π
The combination of the authFlag and the privFlag makes up a Level of Security, like this:
authFlag zero, privFlag zero -> securityLevel is noAuthNoPriv
authFlag zero, privFlag one -> invalid combination, see below
authFlag one, privFlag zero -> securityLevel is authNoPriv
authFlag one, privFlag one -> securityLevel is authPriv
The elements of procedure (see below) describe the action to be taken when the invalid combination of authFlag equal to zero and privFlag equal to one is encountered π¦
The remaining bits in msgFlags are reserved. They MUST be set to zero when sending a message, and they SHOULD be ignored when receiving a message π
6.5. msgSecurityModel π·
the v3MP supports multiple Security Models existing at the same time to provide security services for SNMPv3 messages π§ The msgSecurityModel field in an SNMPv3 Message tells you which Security Model the sender used to generate the message. That's how the receiver knows which securityModel to use for security processing. The mapping to the right securityModel implementation inside an SNMP engine is handled in an implementation-dependent way π
6.6. msgSecurityParameters π
The msgSecurityParameters field of the SNMPv3 Message is used for communication between the Security Model modules in the sending and receiving SNMP engines π«Ά Only the Security Model uses the data in this field, and the Security Model defines both its contents and format. This OCTET STRING isn't interpreted by the v3MP. It just gets passed to the local implementation of the Security Model indicated by the msgSecurityModel field in the message π
6.7. scopedPduData π¦
The scopedPduData field holds either the plain text scopedPDU, if the privFlag in the msgFlags is zero, or an encryptedPDU (encoded as an OCTET STRING). An encryptedPDU has to be decrypted by the securityModel in use to produce a plaintext scopedPDU π
6.8. scopedPDU πΈ
The scopedPDU holds info that identifies an administratively unique context, plus a PDU. The object identifiers in the PDU refer to managed objects which are (expected to be) accessible within the specified context β¨
6.8.1. contextEngineID π§
The contextEngineID in the SNMPv3 message uniquely identifies, within an administrative domain, an SNMP entity that may realize an instance of a context with a particular contextName π
For incoming messages, the contextEngineID is used together with pduType to determine which application the scopedPDU gets sent to for processing π
For outgoing messages, the v3MP sets the contextEngineID to the value the application provided in the request for a message to be sent π
6.8.2. contextName π
The contextName field in an SNMPv3 message, together with the contextEngineID field, identifies the particular context associated with the management information in the PDU portion of the message π The contextName is unique within the SNMP entity specified by the contextEngineID, which may realize the managed objects referenced within the PDU. An application that originates a message provides the value for the contextName field, and this value may be used during processing by an application at the receiving SNMP Engine π
6.8.3. data π
The data field of the SNMPv3 Message holds the PDU. Among other things, the PDU contains the PDU type, which the v3MP uses to determine the type of the incoming SNMP message. The v3MP specifies that the PDU must be one of those specified in [RFC1905] π₯
7. Elements of Procedure for v3MP π
This section describes the procedures an SNMP engine follows when it generates and processes SNMP messages according to the SNMPv3 Message Processing Model π§
Please note that, for the sake of clarity and to keep the text from getting even longer and more complicated, some details were left out of the steps below π
a) Some steps say that when certain error conditions are hit while processing a received message, a message containing a Report PDU is generated and the received message is discarded without further processing. However, a Report-PDU must not be generated unless the PDU causing the generation of the Report PDU can be determined to be a member of the Confirmed Class, or the reportableFlag is set to one and the PDU class cannot be determined π
b) The elements of procedure don't always explicitly say 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 should also be released at that same time β¨
7.1. Prepare an Outgoing SNMP Message β¨
okay so this section walks through how an SNMPv3 message gets built from the data the Message Dispatcher hands over π¦ it's giving step-by-step recipe energy, and every step matters bestie π
- The Message Dispatcher may request that an SNMPv3 message containing a Read Class, Write Class, or Notification Class PDU be prepared for sending. π¦
a) It makes such a request according to the abstract service primitive:
statusInformation = -- success or errorIndication
prepareOutgoingMessage(
IN transportDomain -- requested transport domain
IN transportAddress -- requested destination 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 -- version of the PDU
IN PDU -- SNMP Protocol Data Unit
IN expectResponse -- TRUE or FALSE *
IN sendPduHandle -- the handle for matching
-- incoming responses
OUT destTransportDomain -- destination transport domain
OUT destTransportAddress -- destination transport address
OUT outgoingMessage -- the message to send
OUT outgoingMessageLength -- the length of the message
)
Footnote *: the SNMPv3 Message Processing Model does not use the values of expectResponse or pduVersion. Just a heads up π
b) A unique msgID is generated. The number used for msgID should not have been used recently, and must not be the same as was used for any outstanding request. π₯ no repeats, no drama!
- The Message Dispatcher may request that an SNMPv3 message containing a Response Class or Internal Class PDU be prepared for sending. π
a) It makes such a request according to the abstract service primitive:
result = -- SUCCESS or FAILURE
prepareResponseMessage(
IN messageProcessingModel -- typically, SNMP version
IN securityModel -- same as on incoming request
IN securityName -- same as on incoming request
IN securityLevel -- same as on incoming request
IN contextEngineID -- data from/at this SNMP entity
IN contextName -- data from/in this context
IN pduVersion -- version of the PDU
IN PDU -- SNMP Protocol Data Unit
IN maxSizeResponseScopedPDU -- maximum size sender can accept
IN stateReference -- reference to state
-- information presented with
-- the request
IN statusInformation -- success or errorIndication
-- error counter OID and value
-- when errorIndication
OUT destTransportDomain -- destination transport domain
OUT destTransportAddress -- destination transport address
OUT outgoingMessage -- the message to send
OUT outgoingMessageLength -- the length of the message
)
b) The cached information for the original request is retrieved via the stateReference, including:
- msgID,
- contextEngineID,
- contextName,
- securityModel,
- securityName,
- securityLevel,
- securityStateReference,
- reportableFlag,
- transportDomain, and
- transportAddress.
The SNMPv3 Message Processing Model does not allow cached data to be overridden, except by error indications as detailed in (3) below. π« hands off the cache, babe, unless it's an error indication π
- If statusInformation contains values for an OID/value combination (potentially also containing a securityLevel value, contextEngineID value, or contextName value), then: π₯Ί
a) If reportableFlag is zero, then the original message is discarded, and no further processing is done. A result of FAILURE is returned. SNMPv3 Message Processing is complete. π rip, that message is gone
b) If a PDU is provided, it is the PDU from the original request. If possible, extract the request-id. π
c) A Report PDU is prepared:
- the varBindList is set to contain the OID and value from the statusInformation
- error-status is set to 0
- error-index is set to 0.
- request-id is set to the value extracted in step b) Otherwise, request-id is set to 0 π§
d) The errorIndication in statusInformation may be accompanied by a securityLevel value, a contextEngineID value, or a contextName value.
- If statusInformation contains a value for securityLevel, then securityLevel is set to that value, otherwise it is set to noAuthNoPriv.
- If statusInformation contains a value for contextEngineID, then contextEngineID is set to that value, otherwise it is set to the value of this entity's snmpEngineID.
- If statusInformation contains a value for contextName, then contextName is set to that value, otherwise it is set to the default context of "" (zero-length string). πΈ
e) PDU is set to refer to the new Report-PDU. The old PDU is discarded. ποΈ
f) Processing continues with step 6) below. β
- If contextEngineID is not yet determined, then the contextEngineID is determined, in an implementation-dependent manner, possibly using the transportDomain and transportAddress. π
- If the contextName is not yet determined, the contextName is set to the default context. π
- A scopedPDU is prepared from the contextEngineID, contextName, and PDU. π
- msgGlobalData is constructed as follows:
a) The msgVersion field is set to snmpv3(3). β¨
b) msgID is set as determined in step 1 or 2 above.
c) msgMaxSize is set to an implementation-dependent value.
d) msgFlags are set as follows:
- If securityLevel specifies noAuthNoPriv, then authFlag and privFlag are both set to zero.
- If securityLevel specifies authNoPriv, then authFlag is set to one and privFlag is set to zero.
- If securityLevel specifies authPriv, then authFlag is set to one and privFlag is set to one.
- If the PDU is from the Unconfirmed Class, then the reportableFlag is set to zero.
- If the PDU is from the Confirmed Class then the reportableFlag is set to one.
- All other msgFlags bits are set to zero. π«Ά
e) msgSecurityModel is set to the value of securityModel. π
- If the PDU is from the Response Class or the Internal Class, then:
a) The specified Security Model is called to generate the message according to the primitive:
statusInformation =
generateResponseMsg(
IN messageProcessingModel -- SNMPv3 Message Processing
-- Model
IN globalData -- msgGlobalData from step 7
IN maxMessageSize -- from msgMaxSize (step 7c)
IN securityModel -- as determined in step 7e
IN securityEngineID -- the value of snmpEngineID
IN securityName -- on behalf of this principal
IN securityLevel -- for the outgoing message
IN scopedPDU -- as prepared in step 6)
IN securityStateReference -- as determined in step 2
OUT securityParameters -- filled in by Security Module
OUT wholeMsg -- complete generated message
OUT wholeMsgLength -- length of generated message
)
If, upon return from the Security Model, the statusInformation includes an errorIndication, then any cached information about the outstanding request message is discarded, and an errorIndication is returned, so it can be returned to the calling application. SNMPv3 Message Processing is complete. π the cache gets cleaned up, no clutter!
b) A SUCCESS result is returned. SNMPv3 Message Processing is complete. π
- If the PDU is from the Confirmed Class or the Notification Class, then:
a) If the PDU is from the Unconfirmed Class, then securityEngineID is set to the value of this entity's snmpEngineID.
Otherwise, the snmpEngineID of the target entity is determined, in an implementation-dependent manner, possibly using transportDomain and transportAddress. The value of securityEngineID is set to the value of the target entity's snmpEngineID. π―
b) The specified Security Model is called to generate the message according to the primitive:
statusInformation =
generateRequestMsg(
IN messageProcessingModel -- SNMPv3 Message Processing Model
IN globalData -- msgGlobalData, from step 7
IN maxMessageSize -- from msgMaxSize in step 7 c)
IN securityModel -- as provided by caller
IN securityEngineID -- authoritative SNMP entity
-- from step 9 a)
IN securityName -- as provided by caller
IN securityLevel -- as provided by caller
IN scopedPDU -- as prepared in step 6
OUT securityParameters -- filled in by Security Module
OUT wholeMsg -- complete generated message
OUT wholeMsgLength -- length of the generated message
)
If, upon return from the Security Model, the statusInformation includes an errorIndication, then the message is discarded, and the errorIndication is returned, so it can be returned to the calling application, and no further processing is done. SNMPv3 Message Processing is complete. π€ nope, we're not sending that one
c) If the PDU is from the Confirmed Class, information about the outgoing message is cached, and a (implementation-specific) stateReference is created. Information to be cached includes the values of:
- sendPduHandle
- msgID
- snmpEngineID
- securityModel
- securityName
- securityLevel
- contextEngineID
- contextName
π§ remembering everything so the reply can find its way home
d) A SUCCESS result is returned. SNMPv3 Message Processing is complete. β¨
7.2. Prepare Data Elements from an Incoming SNMP Message π¦
okay now we flip it, bestie! this section is all about unpacking an SNMPv3 message that just showed up and pulling out the data elements the Message Dispatcher needs for the next steps π¬ we're literally reading the mail π
- The message is passed in from the Message Dispatcher according to the abstract service primitive:
result = -- SUCCESS or errorIndication
prepareDataElements(
IN transportDomain -- origin transport domain
IN transportAddress -- origin transport address
IN wholeMsg -- as received from the network
IN wholeMsgLength -- as received from the network
OUT messageProcessingModel -- typically, SNMP version
OUT securityModel -- Security Model to use
OUT securityName -- on behalf of this principal
OUT securityLevel -- Level of Security requested
OUT contextEngineID -- data from/at this entity
OUT contextName -- data from/in this context
OUT pduVersion -- version of the PDU
OUT PDU -- SNMP Protocol Data Unit
OUT pduType -- SNMP PDU type
OUT sendPduHandle -- handle for matched request
OUT maxSizeResponseScopedPDU -- maximum size sender can accept
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
- Okay bestie, this is the bouncer check π If the message you got isn't a valid serialization of an SNMPv3Message value (following the conventions of [RFC1906]), then the snmpInASNParseErrs counter [RFC1907] gets incremented, the message is tossed without any further processing, and you return a FAILURE result. SNMPv3 Message Processing is complete. π
- Next up, you pull out the values for
msgVersion,msgID,msgMaxSize,msgFlags,msgSecurityModel,msgSecurityParameters, andmsgDatafrom the message π - If the
msgSecurityModelvalue doesn't match a securityModel you actually support, then the snmpUnknownSecurityModels counter goes up, the message gets discarded, and you return FAILURE. SNMPv3 Message Processing is complete. π - Now we figure out the securityLevel from the authFlag and privFlag bits of
msgFlags, and it's giving very mathematical π¦- a) If authFlag is not set and privFlag is not set, then securityLevel is set to
noAuthNoPriv. - b) If authFlag is set and privFlag is not set, then securityLevel is set to
authNoPriv. - c) If authFlag is set and privFlag is set, then securityLevel is set to
authPriv. - d) If authFlag is not set and privFlag is set, then the snmpInvalidMsgs counter is incremented, the message is discarded without further processing, and you return a FAILURE result. SNMPv3 Message Processing is complete. π
- e) Any other bits in
msgFlagsare ignored, so no drama there πΈ
- a) If authFlag is not set and privFlag is not set, then securityLevel is set to
- Time for the security module! The one implementing the securityModel you were given gets called for authentication and privacy services, using this abstract service primitive β¨
statusInformation = -- errorIndication or success
-- error counter OID and
-- value if error
processIncomingMsg(
IN messageProcessingModel -- SNMPv3 Message Processing Model
IN maxMessageSize -- of the sending SNMP entity
IN securityParameters -- for the received message
IN securityModel -- for the received message
IN securityLevel -- Level of Security
IN wholeMsg -- as received on the wire
IN wholeMsgLength -- length as received on the wire
OUT securityEngineID -- authoritative SNMP entity
OUT securityName -- identification of the principal
OUT scopedPDU, -- message (plaintext) payload
OUT maxSizeResponseScopedPDU -- maximum size sender can accept
OUT securityStateReference -- reference to security state
) -- information, needed for
-- response
If the security module hands back an errorIndication, then this is what happens:
- a) If statusInformation has values for an OID/value pair, then you try to generate a Report PDU (see step 3 in section 7.1).
- 1) If the scopedPDU came back from processIncomingMsg, then figure out contextEngineID, contextName, and PDU.
- 2) Cache the info about the message and create a stateReference (this part is up to your implementation π§). The stuff to cache is:
msgVersion,msgID,securityLevel,msgFlags,msgMaxSize,securityModel,maxSizeResponseScopedPDU, andsecurityStateReference. - 3) Request that a Report-PDU gets prepared and sent, using this abstract service primitive π
result = -- SUCCESS or FAILURE
returnResponsePdu(
IN messageProcessingModel -- SNMPv3(3)
IN securityModel -- same as on incoming request
IN securityName -- from processIncomingMsg
IN securityLevel -- same as on incoming request
IN contextEngineID -- from step 6 a) 1)
IN contextName -- from step 6 a) 1)
IN pduVersion -- SNMPv2-PDU
IN PDU -- from step 6 a) 1)
IN maxSizeResponseScopedPDU -- from processIncomingMsg
IN stateReference -- from step 6 a) 2)
IN statusInformation -- from processIncomingMsg
)
- b) Otherwise, the incoming message gets discarded without further processing and you return a FAILURE result. SNMPv3 Message Processing is complete. π«Ά
- Next, the scopedPDU gets parsed to pull out the contextEngineID, the contextName, and the PDU. If any parse error shows up, then the snmpInASNParseErrs counter [RFC1907] goes up, the security state information is thrown out, the message is discarded without further processing, and you return a FAILURE result. SNMPv3 Message Processing is complete. Treating an unknown PDU type as a parse error is an implementation option, so it's up to you π
- The pduVersion is worked out in an implementation-dependent way. For SNMPv3, the pduVersion would be an SNMPv2-PDU π
- The pduType also gets determined in an implementation-dependent way. For RFC 1905, the pduTypes include:
GetRequest-PDUGetNextRequest-PDUGetBulkRequest-PDUSetRequest-PDUInformRequest-PDUSNMPv2-Trap-PDUResponse-PDUReport-PDU
- Okay, if the pduType is from the Response Class or the Internal Class, then:
- a) The msgID value gets used to look up the cached info for a matching outstanding Request message. If there's no such outstanding Request message, then the security state information is thrown out, the message is discarded without further processing, and you return a FAILURE result. SNMPv3 Message Processing is complete. π
- b) sendPduHandle gets pulled from the cached info.
Otherwise, sendPduHandle is set to <none>, which is an implementation-defined value.
- If the pduType is from the Internal Class, then:
- a) statusInformation is created from the contents of the Report-PDU, in an implementation-dependent way. This statusInformation gets forwarded to the application linked to the sendPduHandle π₯
- b) The cached data for the outstanding message, referred to by stateReference, gets retrieved. Now this part is serious, bestie π¨ Internal Class PDUs delivered at the noAuthNoPriv security level open a window of opportunity for spoofing or replay attacks. If the receiver of such messages knows about these risks, then using these unauthenticated messages is acceptable, and they may be useful for discovering engine IDs or for spotting misconfiguration at remote nodes. If the securityModel or securityLevel values differ from the cached ones, an implementation may keep the cached info about the outstanding Request message, just in case the Internal Class PDU that came in turns out to be illegitimate. Otherwise, any cached info about the outstanding Request message gets discarded.
- c) The security state information for this incoming message is thrown out π§Ή
- d) stateReference is set to
<none> - e) You return a SUCCESS result. SNMPv3 Message Processing is complete. β¨
- If the pduType is from the Response Class, then:
- a) The cached data for the outstanding request, referred to by stateReference, gets retrieved, including:
snmpEngineIDsecurityModelsecurityNamesecurityLevelcontextEngineIDcontextName
- b) If the values pulled from the incoming message differ from the cached data, then any cached info about the outstanding Request message gets discarded, the incoming message gets discarded without further processing, and you return a FAILURE result. SNMPv3 Message Processing is complete. π ββοΈ If the securityModel or securityLevel values differ from the cached ones, an implementation may keep the cached info about the outstanding Request message, in case the Response Class PDU that came in is illegitimate.
- c) Otherwise, any cached info about the outstanding Request message gets discarded, and stateReference is set to
<none>π - d) You return a SUCCESS result. SNMPv3 Message Processing is complete. π¦
- a) The cached data for the outstanding request, referred to by stateReference, gets retrieved, including:
- If the pduType is from the Confirmed Class, then:
- a) If the value of securityEngineID is not equal to the value of snmpEngineID, then the security state information is thrown out, any cached info about this message is discarded, the incoming message is discarded without further processing, and you return a FAILURE result. SNMPv3 Message Processing is complete. π
- b) Info about the message gets cached and a stateReference gets created (again, implementation-specific π). The stuff to cache includes the values of:
okay so first up, here's the rest of that parameter list from step 13 π
msgVersion,
msgID,
securityLevel,
msgFlags,
msgMaxSize,
securityModel,
maxSizeResponseScopedPDU,
securityStateReference
c) okay so a SUCCESS result gets returned, and SNMPv3 Message Processing is complete π
- if the
pduTypeis from the Unconfirmed Class, then a SUCCESS result gets returned and SNMPv3 Message Processing is done π
8. Intellectual Property β¨
The IETF doesn't take a side on whether any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology in this document are valid or how far they reach. It also doesn't say whether any license under those rights might or might not be available, and it hasn't claimed to have looked for any such rights π«Ά. If you want the IETF's procedures for rights in standards-track and standards-related documentation, check out BCP-11. Copies of claims of rights made available for publication, any assurances of licenses to be made available, or the result of an attempt to get a general license or permission for implementors or users to use such proprietary rights can be obtained from the IETF Secretariat π.
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 π©.
9. Acknowledgements π
This document is the result of the efforts of the SNMPv3 Working Group. Some special thanks are in order to the following SNMPv3 WG members π:
- Harald Tveit Alvestrand (Maxware)
- Dave Battle (SNMP Research, Inc.)
- Alan Beard (Disney Worldwide Services)
- Paul Berrevoets (SWI Systemware/Halcyon Inc.)
- Martin Bjorklund (Ericsson)
- Uri Blumenthal (IBM T. J. Watson Research Center)
- Jeff Case (SNMP Research, Inc.)
- John Curran (BBN)
- Mike Daniele (Compaq Computer Corporation)
- T. Max Devlin (Eltrax Systems)
- John Flick (Hewlett Packard)
- Rob Frye (MCI)
- Wes Hardaker (U.C.Davis, Information Technology - D.C.A.S.)
- David Harrington (Cabletron Systems Inc.)
- Lauren Heintz (BMC Software, Inc.)
- N.C. Hien (IBM T. J. Watson Research Center)
- Michael Kirkham (InterWorking Labs, Inc.)
- Dave Levi (SNMP Research, Inc.)
- Louis A Mamakos (UUNET Technologies Inc.)
- Joe Marzot (Nortel Networks)
- Paul Meyer (Secure Computing Corporation)
- Keith McCloghrie (Cisco Systems)
- Bob Moore (IBM)
- Russ Mundy (TIS Labs at Network Associates)
- Bob Natale (ACE*COMM Corporation)
- Mike O'Dell (UUNET Technologies Inc.)
- Dave Perkins (DeskTalk)
- Peter Polkinghorne (Brunel University)
- Randy Presuhn (BMC Software, Inc.)
- David Reeder (TIS Labs at Network Associates)
- David Reid (SNMP Research, Inc.)
- Aleksey Romanov (Quality Quorum)
- Shawn Routhier (Epilogue)
- Juergen Schoenwaelder (TU Braunschweig)
- Bob Stewart (Cisco Systems)
- Mike Thatcher (Independent Consultant)
- Bert Wijnen (IBM T. J. Watson Research Center)
The document is based on recommendations of the IETF Security and Administrative Framework Evolution for SNMP Advisory Team. Members of that Advisory Team were:
- David Harrington (Cabletron Systems Inc.)
- Jeff Johnson (Cisco Systems)
- David Levi (SNMP Research Inc.)
- John Linn (Openvision)
- Russ Mundy (Trusted Information Systems) chair
- Shawn Routhier (Epilogue)
- Glenn Waters (Nortel)
- Bert Wijnen (IBM T. J. Watson Research Center)
As recommended by the Advisory Team and the SNMPv3 Working Group Charter, the design incorporates as much as practical from previous RFCs and drafts. As a result, special thanks are due to the authors of previous designs known as SNMPv2u and SNMPv2* π:
- Jeff Case (SNMP Research, Inc.)
- David Harrington (Cabletron Systems Inc.)
- David Levi (SNMP Research, Inc.)
- Keith McCloghrie (Cisco Systems)
- Brian O'Keefe (Hewlett Packard)
- Marshall T. Rose (Dover Beach Consulting)
- Jon Saperia (BGS Systems Inc.)
- Steve Waldbusser (International Network Services)
- Glenn W. Waters (Bell-Northern Research Ltd.)
10. Security Considerations π
okay this one is serious bestie, so read it all π. The Dispatcher coordinates the processing of messages to provide a level of security for management messages and to direct the SNMP PDUs to the proper SNMP application(s) π.
A Message Processing Model, and in particular the V3MP defined in this document, interacts as part of the Message Processing with Security Models in the Security Subsystem via the abstract service interface primitives defined in [RFC2571] and elaborated above.
The level of security actually provided is mainly decided by the specific Security Model implementation(s) and the specific SNMP application implementation(s) built into this framework. Applications have access to data which is not secured. Applications should take reasonable steps to protect the data from disclosure, and when they send data across the network, they should obey the securityLevel and call upon the services of an Access Control Model as they apply access control π‘οΈ.
The values for the msgID element used in communication between SNMP entities must be chosen to avoid replay attacks. The values do not need to be unpredictable; it is sufficient that they not repeat. π¨
When exchanges are carried out over an insecure network, there is an open opportunity for a third party to spoof or replay messages when any message of an exchange is given at the security level of noAuthNoPriv. For most exchanges, all messages exist at the same security level. In the case where the final message is an Internal Class PDU, this message may be delivered at a level of noAuthNoPriv or authNoPriv, independent of the security level of the preceding messages. Internal Class PDUs delivered at the level of authNoPriv are not considered to pose a security hazard. Internal Class PDUs delivered at the security level of noAuthNoPriv open a window of opportunity for spoofing or replay attacks. If the receiver of such messages is aware of these risks, the use of such unauthenticated messages is acceptable and may provide a useful function for discovering engine IDs or for detecting misconfiguration at remote nodes π.
This document also contains a MIB definition module. None of the objects defined is writable, and the information they represent is not deemed to be particularly sensitive. However, if they are deemed sensitive in a particular environment, access to them should be restricted through the use of appropriately configured Security and Access Control models π.
11. References π
- [RFC1901] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Introduction to Community-based SNMPv2", RFC 1901, January 1996.
- [RFC2578] McCloghrie, K., Perkins, D. and J. Schoenwaelder, "Structure of Management Information Version 2 (SMIv2)", STD 58, RFC 2578, April 1999.
- [RFC1905] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Protocol Operations for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1905, January 1996.
- [RFC1906] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Transport Mappings for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1906, January 1996.
- [RFC1907] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Management Information Base for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1907 January 1996.
- [RFC1908] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Coexistence between Version 1 and Version 2 of the Internet-standard Network Management Framework", RFC 1908, January 1996.
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [RFC2028] Hovey, R. and S. Bradner, "The Organizations Involved in the IETF Standards Process", BCP 11, RFC 2028, October 1996.
- [RFC2571] Harrington, D., Presuhn, R. and B. Wijnen, "An Architecture for describing SNMP Management Frameworks", RFC 2571, April 1999.
- [RFC2574] Blumenthal, U. and B. Wijnen, "The User-Based Security Model for Version 3 of the Simple Network Management Protocol (SNMPv3)", RFC 2574, April 1999.
- [RFC2575] Wijnen, B., Presuhn, R. and K. McCloghrie, "View-based Access Control Model for the Simple Network Management Protocol (SNMP)", RFC 2575, April 1999.
- [RFC2573] Levi, D., Meyer, P. and B. Stewart, "SNMP Applications", RFC 2573, April 1999.
- [RFC2570] Case, J., Mundy, R., Partain, D. and B. Stewart, "Introduction to Version 3 of the Internet-standard Network Management Framework", RFC 2570, April 1999.
12. Editors' Addresses π
Jeffrey Case:
Jeffrey Case
SNMP Research, Inc.
3001 Kimberlin Heights Road
Knoxville, TN 37920-9716
USA
Phone: +1 423-573-1434
EMail: case@snmp.com
Dave Harrington:
Dave Harrington
Cabletron Systems, Inc
Post Office Box 5005
Mail Stop: Durham
35 Industrial Way
Rochester, NH 03867-5005
USA
Phone: +1 603-337-7357
EMail: dbh@ctron.com
Randy Presuhn:
Randy Presuhn
BMC Software, Inc.
965 Stewart Drive
Sunnyvale, CA 94086
USA
Phone: +1 408-616-3100
EMail: randy_presuhn@bmc.com
Bert Wijnen:
Bert Wijnen
IBM T. J. Watson Research
Schagen 33
3461 GL Linschoten
Netherlands
Phone: +31 348-432-794
EMail: wijnen@vnet.ibm.com
13. Changes From RFC 2272 π¦
okay so this is the changelog from RFC 2272, the previous version of this doc π. Here's what changed:
- Updated contact information for editors.
- Made parameter identification in
prepareResponseMessage()consistent, both internally and with architecture. - Made references to
processIncomingMsg()consistent, both internally and with architecture. - Deleted superfluous
expectResponseparameter fromprocessIncomingMsg(), consistent with architecture. - Fixed typos.
- Removed sending of a report PDU from step 4 on page 30 on RFC 2272.
- Use "PDU Class" terminology instead of directly using RFC 1905 PDU types, in order to potentially allow use of new PDU types in the future.
- Added intro document to references.
- Made various clarifications to the text.
- The handling of the
reportableFlaghas been made consistent. - The acknowledgement list has been updated.
14. Full Copyright Statement β¨
Okay bestie, this is the legal part π Here's the copyright notice, word for word, because it has to stay exact:
Copyright (C) The Internet Society (1999). All Rights Reserved. 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.
So the vibe is: you can share it, remix it, translate it, and build cool stuff on top of it π¦ but you can't edit the original doc itself, and the permissions are forever π The Internet Society and the IETF also aren't handing out any warranties, so it's all "as is" π«
Acknowledgement π
Shoutout to the people keeping the RFC Editor function running π«Ά Right now, it's funded by the Internet Society. Literally the unsung heroes β¨
π¦ where this page comes from
- ietf: rfc2572 1999-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms