home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / rfc / 3 / rfc2272.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  86.4 KB  |  2,188 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                            J. Case
  8. Request for Comments: 2272                           SNMP Research, Inc.
  9. Obsoletes: 2262                                            D. Harrington
  10. Category: Standards Track                        Cabletron Systems, Inc.
  11.                                                               R. Presuhn
  12.                                                       BMC Software, Inc.
  13.                                                                B. Wijnen
  14.                                                IBM T. J. Watson Research
  15.                                                             January 1998
  16.  
  17.  
  18.                Message Processing and Dispatching for the
  19.                Simple Network Management Protocol (SNMP)
  20.  
  21. Status of this Memo
  22.  
  23.    This document specifies an Internet standards track protocol for the
  24.    Internet community, and requests discussion and suggestions for
  25.    improvements.  Please refer to the current edition of the "Internet
  26.    Official Protocol Standards" (STD 1) for the standardization state
  27.    and status of this protocol.  Distribution of this memo is unlimited.
  28.  
  29. Copyright Notice
  30.  
  31.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  32.  
  33. IANA Note
  34.  
  35.    Due to a clerical error in the assignment of the snmpModules in this
  36.    memo, this RFC provides the corrected number assignment for this
  37.    protocol.  This memo obsoletes RFC 2262.
  38.  
  39. Abstract
  40.  
  41.    This document describes the Message Processing and Dispatching for
  42.    SNMP messages within the SNMP architecture [RFC2271].  It defines the
  43.    procedures for dispatching potentially multiple versions of SNMP
  44.    messages to the proper SNMP Message Processing Models, and for
  45.    dispatching PDUs to SNMP applications.  This document also describes
  46.    one Message Processing Model - the SNMPv3 Message Processing Model.
  47.  
  48. Table of Contents
  49.  
  50.    1. Introduction ...............................................    2
  51.    2. Overview ...................................................    3
  52.    2.1. The Dispatcher. ..........................................    5
  53.    2.2. Message Processing Subsystem .............................    5
  54.    3. Elements of Message Processing and Dispatching .............    6
  55.  
  56.  
  57.  
  58. Case, et. al.               Standards Track                     [Page 1]
  59.  
  60. RFC 2272               SNMPv3 Management Protocol           January 1998
  61.  
  62.  
  63.    3.1. messageProcessingModel ...................................    6
  64.    3.2. pduVersion ...............................................    6
  65.    3.3. pduType ..................................................    7
  66.    3.4. sendPduHandle ............................................    7
  67.    4. Dispatcher Elements of Procedure ...........................    7
  68.    4.1. Sending an SNMP Message to the Network ...................    7
  69.    4.1.1. Sending a Request or Notification ......................    7
  70.    4.1.2. Sending a Response to the Network ......................    9
  71.    4.2. Receiving an SNMP Message from the Network ...............   10
  72.    4.2.1. Message Dispatching of received SNMP Messages ..........   10
  73.    4.2.2. PDU Dispatching for Incoming Messages ..................   11
  74.    4.2.2.1. Incoming Requests and Notifications ..................   12
  75.    4.2.2.2. Incoming Responses ...................................   13
  76.    4.3. Application Registration for Handling PDU types ..........   14
  77.    4.4. Application Unregistration for Handling PDU Types ........   14
  78.    5. Definitions ................................................   15
  79.    5.1. Definitions for SNMP Message Processing and Dispatching ..   15
  80.    6. The SNMPv3 Message Format ..................................   18
  81.    6.1. msgVersion ...............................................   19
  82.    6.2. msgID ....................................................   19
  83.    6.3. msgMaxSize ...............................................   19
  84.    6.4. msgFlags .................................................   20
  85.    6.5. msgSecurityModel .........................................   22
  86.    6.6. msgSecurityParameters ....................................   22
  87.    6.7. scopedPduData ............................................   22
  88.    6.8. scopedPDU ................................................   22
  89.    6.8.1. contextEngineID ........................................   22
  90.    6.8.2. contextName ............................................   23
  91.    6.8.3. data ...................................................   23
  92.    7. Elements of Procedure for v3MP .............................   23
  93.    7.1. Prepare an Outgoing SNMP Message .........................   24
  94.    7.2. Prepare Data Elements from an Incoming SNMP Message ......   29
  95.    8. Intellectual Property ......................................   34
  96.    9. Acknowledgements ...........................................   35
  97.    10. Security Considerations ...................................   36
  98.    11. References ................................................   36
  99.    12. Editors' Addresses ........................................   38
  100.    13. Full Copyright Statement ..................................   39
  101.  
  102. 1.  Introduction
  103.  
  104.    The Architecture for describing Internet Management Frameworks
  105.    [RFC2271] describes that an SNMP engine is composed of:
  106.  
  107.         1) a Dispatcher
  108.         2) a Message Processing Subsystem,
  109.         3) a Security Subsystem, and
  110.         4) an Access Control Subsystem.
  111.  
  112.  
  113.  
  114. Case, et. al.               Standards Track                     [Page 2]
  115.  
  116. RFC 2272               SNMPv3 Management Protocol           January 1998
  117.  
  118.  
  119.    Applications make use of the services of these subsystems.
  120.  
  121.    It is important to understand the SNMP architecture and its
  122.    terminology to understand where the Message Processing Subsystem and
  123.    Dispatcher described in this document fit into the architecture and
  124.    interact with other subsystems within the architecture.  The reader
  125.    is expected to have read and understood the description of the SNMP
  126.    architecture, defined in [RFC2271].
  127.  
  128.    The Dispatcher in the SNMP engine sends and receives SNMP messages.
  129.    It also dispatches SNMP PDUs to SNMP applications. When an SNMP
  130.    message needs to be prepared or when data needs to be extracted from
  131.    an SNMP message, the Dispatcher delegates these tasks to a message
  132.    version-specific Message Processing Model within the Message
  133.    Processing Subsystem.
  134.  
  135.    A Message Processing Model is responsibile for processing a SNMP
  136.    version-specific message and for coordinating the interaction with
  137.    the Security Subsystem to ensure proper security is applied to the
  138.    SNMP message being handled.
  139.  
  140.    Interactions between the Dispatcher, the Message Processing
  141.    Subsystem, and applications are modelled using abstract data elements
  142.    and abstract service interface primitives defined by the SNMP
  143.    architecture.
  144.  
  145.    Similarly, interactions between the Message Processing Subsystem and
  146.    the Security Subsystem are modelled using abstract data elements and
  147.    abstract service interface primitives as defined by the SNMP
  148.    architecture.
  149.  
  150.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  151.    "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this
  152.    document are to be interpreted as described in RFC 2119.
  153.  
  154. 2.  Overview
  155.  
  156.    The following illustration depicts the Message Processing in relation
  157.    to  SNMP applications, the Security Subsystem and Transport Mappings.
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Case, et. al.               Standards Track                     [Page 3]
  171.  
  172. RFC 2272               SNMPv3 Management Protocol           January 1998
  173.  
  174.  
  175.    +-------------------------------------------------------------------+
  176.    | SNMP Entity                                                       |
  177.    |                                                                   |
  178.    | +---------------------------------------------------------------+ |
  179.    | | Applications                                                  | |
  180.    | | +-----------+  +--------------+                               | |
  181.    | | | Command   |  | Notification |                               | |
  182.    | | | Generator |  | Originator   | +-----------+ +--------------+| |
  183.    | | +-----------+  +--------------+ | Proxy     | | Other         | |
  184.    | | +-----------+  +--------------+ | Forwarder | |Application(s)|| |
  185.    | | | Command   |  | Notification | +-----------+ +--------------+| |
  186.    | | | Responder |  | Receiver     |                               | |
  187.    | | +-----------+  +--------------+                               | |
  188.    | +---------------------------------------------------------------+ |
  189.    |        ^                ^               ^           ^             |
  190.    |        |                |               |           |             |
  191.    |        v                v               v           v             |
  192.    |        +--------+-------+---------------+-----------+             |
  193.    |                 ^                                                 |
  194.    |                 |    +---------------------+  +-----------------+ |
  195.    |                 |    | Message Processing  |  | Security        | |
  196.    | Dispatcher      v    | Subsystem           |  | Subsystem       | |
  197.    | +------------------+ |     +------------+  |  |                 | |
  198.    | | PDU Dispatcher   | |  +->| v1MP     * |<--->| +-------------+ | |
  199.    | |                  | |  |  +------------+  |  | | Other       | | |
  200.    | |                  | |  |  +------------+  |  | | Security    | | |
  201.    | |                  | |  +->| v2cMP    * |<--->| | Model       | | |
  202.    | | Message          | |  |  +------------+  |  | +-------------+ | |
  203.    | | Dispatcher  <-------->+                  |  |                 | |
  204.    | |                  | |  |  +------------+  |  | +-------------+ | |
  205.    | |                  | |  +->| v3MP     * |<--->| | User-based  | | |
  206.    | | Transport        | |  |  +------------+  |  | | Security    | | |
  207.    | | Mapping          | |  |  +------------+  |  | | Model       | | |
  208.    | | (e.g RFC1906)    | |  +->| otherMP  * |<--->| +-------------+ | |
  209.    | +------------------+ |     +------------+  |  |                 | |
  210.    |          ^           +---------------------+  +-----------------+ |
  211.    |          |                                                        |
  212.    +----------|--------------------------------------------------------+
  213.               v
  214.      +------------------+
  215.      |   Network        |
  216.      +------------------+
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Case, et. al.               Standards Track                     [Page 4]
  227.  
  228. RFC 2272               SNMPv3 Management Protocol           January 1998
  229.  
  230.  
  231. 2.1.  The Dispatcher.
  232.  
  233.    The Dispatcher is a key piece of an SNMP engine. There is only one in
  234.    an SNMP engine, and its job is to dispatch tasks to the multiple
  235.    version-specific Message Processing Models, and to dispatch PDUs to
  236.    various applications.
  237.  
  238.    For outgoing messages, an application provides a PDU to be sent, plus
  239.    the data needed to prepare and send the message, and the application
  240.    specifies which version-specific Message Processing Model will be
  241.    used to prepare the message with the desired security processing.
  242.    Once the message is prepared, the Dispatcher sends the message.
  243.  
  244.    For incoming messages, the Dispatcher determines the SNMP version of
  245.    the incoming message and passes the message to the version-specific
  246.    Message Processing Model to extract the components of the message and
  247.    to coordinate the processing of security services for the message.
  248.    After version-specific processing, the PDU Dispatcher determines
  249.    which application, if any, should receive the PDU for processing and
  250.    forwards it accordingly.
  251.  
  252.    The Dispatcher, while sending and receiving SNMP messages, collects
  253.    statistics about SNMP messages and the behavior of the SNMP engine in
  254.    managed objects to make them accessible to remote SNMP entities.
  255.    This document defines these managed objects, the MIB module which
  256.    contains them, and how these managed objects might be used to provide
  257.    useful management.
  258.  
  259. 2.2.  Message Processing Subsystem
  260.  
  261.    The SNMP Message Processing Subsystem is the part of an SNMP engine
  262.    which interacts with the Dispatcher to handle the version-specific
  263.    SNMP messages. It contains one or more Message Processing Models.
  264.  
  265.    This document describes one Message Processing Model, the SNMPv3
  266.    Message Processing Model, in Section 6. The SNMPv3 Message Processing
  267.    Model is defined in a separate section to show that multiple
  268.    (independent) Message Processing Models can exist at the same time
  269.    and that such Models can be described in different documents. The
  270.    SNMPv3 Message Processing Model can be replaced or supplemented with
  271.    other Message Processing Models in the future. Two Message Processing
  272.    Models which are expected to be developed in the future are the
  273.    SNMPv1 message format [RFC1157] and the SNMPv2c message format
  274.    [RFC1901].  Others may be developed as needed.
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Case, et. al.               Standards Track                     [Page 5]
  283.  
  284. RFC 2272               SNMPv3 Management Protocol           January 1998
  285.  
  286.  
  287. 3.  Elements of Message Processing and Dispatching
  288.  
  289.    See [RFC2271] for the definitions of
  290.            contextEngineID
  291.            contextName
  292.            scopedPDU
  293.            maxSizeResponseScopedPDU
  294.            securityModel
  295.            securityName
  296.            securityLevel
  297.            messageProcessingModel
  298.  
  299.    For incoming messages, a version-specific message processing module
  300.    provides these values to the Dispatcher. For outgoing messages, an
  301.    application provides these values to the Dispatcher.
  302.  
  303.    For some version-specific processing, the values may be extracted
  304.    from received messages; for o............., the values may be
  305.    determined by algorithm, or by an implementation-defined mechanism.
  306.    The mechanism by which the value is determined is irrelevant to the
  307.    Dispatcher.
  308.  
  309.    The following additional or expanded definitions are for use within
  310.    the Dispatcher.
  311.  
  312. 3.1.  messageProcessingModel
  313.  
  314.    The value of messageProcessingModel identifies a Message Processing
  315.    Model.  A Message Processing Model describes the version-specific
  316.    procedures for extracting data from messages, generating messages,
  317.    calling upon a securityModel to apply its security services to
  318.    messages, for converting data from a version-specific message format
  319.    into a generic format usable by the Dispatcher, and for converting
  320.    data from Dispatcher format into a version-specific message format.
  321.  
  322. 3.2.  pduVersion
  323.  
  324.    The value of pduVersion represents a specific version of protocol
  325.    operation and its associated PDU formats, such as SNMPv1 or SNMPv2
  326.    [RFC1905].  The values of pduVersion are specific to the version of
  327.    the PDU contained in a message, and the PDUs processed by
  328.    applications. The Dispatcher does not use the value of pduVersion
  329.    directly.
  330.  
  331.    An application specifies the pduVersion when it requests the PDU
  332.    Dispatcher to send a PDU to another SNMP engine. The Dispatcher
  333.    passes the pduVersion to a Message Processing Model, so it knows how
  334.    to handle the PDU properly.
  335.  
  336.  
  337.  
  338. Case, et. al.               Standards Track                     [Page 6]
  339.  
  340. RFC 2272               SNMPv3 Management Protocol           January 1998
  341.  
  342.  
  343.    For incoming messages, pduVersion is provided to the Dispatcher by a
  344.    version-specific Message Processing module. The PDU Dispatcher passes
  345.    the pduVersion to the application so it knows how to handle the PDU
  346.    properly.  For example, a command responder application needs to know
  347.    whether to use [RFC1905] elements of procedure and syntax instead of
  348.    those specified for SNMPv1.
  349.  
  350. 3.3.  pduType
  351.  
  352.    A value of pduType represents a specific type of protocol operation.
  353.    The values of pduType are specific to the version of the PDU
  354.    contained in a message.
  355.  
  356.    Applications register to support particular pduTypes for particular
  357.    contextEngineIDs.
  358.  
  359.    For incoming messages, pduType is provided to the Dispatcher by a
  360.    version-specific Message Processing module. It is subsequently used
  361.    to dispatch the PDU to the application which registered for the
  362.    pduType for the contextEngineID of the associated scopedPDU.
  363.  
  364. 3.4.  sendPduHandle
  365.  
  366.    This handle is generated for coordinating the processing of requests
  367.    and responses between the SNMP engine and an application. The handle
  368.    must be unique across all version-specific Message Processing Models,
  369.    and is of local significance only.
  370.  
  371. 4.  Dispatcher Elements of Procedure
  372.  
  373.    This section describes the procedures followed by the Dispatcher when
  374.    generating and processing SNMP messages.
  375.  
  376. 4.1.  Sending an SNMP Message to the Network
  377.  
  378.    This section describes the procedure followed by an SNMP engine
  379.    whenever it sends an SNMP message.
  380.  
  381. 4.1.1.  Sending a Request or Notification
  382.  
  383.    The following procedures are followed by the Dispatcher when an
  384.    application wants to send an SNMP PDU to another (remote)
  385.    application, i.e., to initiate a communication by originating a
  386.    message, such as one containing a request or a trap.
  387.  
  388.    1) The application requests this using the abstract service
  389.       primitive:
  390.  
  391.  
  392.  
  393.  
  394. Case, et. al.               Standards Track                     [Page 7]
  395.  
  396. RFC 2272               SNMPv3 Management Protocol           January 1998
  397.  
  398.  
  399.        statusInformation =              -- sendPduHandle if success
  400.                                         -- errorIndication if failure
  401.          sendPdu(
  402.          IN   transportDomain           -- transport domain to be used
  403.          IN   transportAddress          -- destination network address
  404.          IN   messageProcessingModel    -- typically, SNMP version
  405.          IN   securityModel             -- Security Model to use
  406.          IN   securityName              -- on behalf of this principal
  407.          IN   securityLevel             -- Level of Security requested
  408.          IN   contextEngineID           -- data from/at this entity
  409.          IN   contextName               -- data from/in this context
  410.          IN   pduVersion                -- the version of the PDU
  411.          IN   PDU                       -- SNMP Protocol Data Unit
  412.          IN   expectResponse            -- TRUE or FALSE
  413.               )
  414.  
  415.    2) If the messageProcessingModel value does not represent a Message
  416.       Processing Model known to the Dispatcher, then an errorIndication
  417.       (implementation-dependent) is returned to the calling application.
  418.       No further processing is performed.
  419.  
  420.    3) The Dispatcher generates a sendPduHandle to coordinate
  421.       subsequent processing.
  422.  
  423.    4) The Message Dispatcher sends the request to the version-specific
  424.       Message Processing module identified by messageProcessingModel
  425.       using the abstract service primitive:
  426.  
  427.       statusInformation =              - success or error indication
  428.         prepareOutgoingMessage(
  429.         IN   transportDomain           -- as specified by application
  430.         IN   transportAddress          -- as specified by application
  431.         IN   messageProcessingModel    -- as specified by application
  432.         IN   securityModel             -- as specified by application
  433.         IN   securityName              -- as specified by application
  434.         IN   securityLevel             -- as specified by application
  435.         IN   contextEngineID           -- as specified by application
  436.         IN   contextName               -- as specified by application
  437.         IN   pduVersion                -- the version of the PDU
  438.         IN   PDU                       -- as specified by application
  439.         IN   expectResponse            -- as specified by application
  440.         IN   sendPduHandle             -- as determined in step 3.
  441.         OUT  destTransportDomain       -- destination transport domain
  442.         OUT  destTransportAddress      -- destination transport address
  443.         OUT  outgoingMessage           -- the message to send
  444.         OUT  outgoingMessageLength     -- the message length
  445.              )
  446.  
  447.  
  448.  
  449.  
  450. Case, et. al.               Standards Track                     [Page 8]
  451.  
  452. RFC 2272               SNMPv3 Management Protocol           January 1998
  453.  
  454.  
  455.    5) If the statusInformation indicates an error, the errorIndication
  456.       is returned to the calling application.  No further processing is
  457.       performed.
  458.  
  459.    6) If the statusInformation indicates success, the sendPduHandle is
  460.       returned to the application, and the outgoingMessage is sent via
  461.       the transport specified by the transportDomain to the address
  462.       specified by the transportAddress.
  463.  
  464.    Outgoing Message Processing is complete.
  465.  
  466. 4.1.2.  Sending a Response to the Network
  467.  
  468.    The following procedure is followed when an application wants to
  469.    return a response back to the originator of an SNMP Request.
  470.  
  471.    1) An application can request this using the abstract service
  472.       primitive:
  473.  
  474.       returnResponsePDU(
  475.        IN   messageProcessingModel   -- typically, SNMP version
  476.        IN   securityModel            -- Security Model in use
  477.        IN   securityName             -- on behalf of this principal
  478.        IN   securityLevel            -- same as on incoming request
  479.        IN   contextEngineID          -- data from/at this SNMP entity
  480.        IN   contextName              -- data from/in this context
  481.        IN   pduVersion               -- the version of the PDU
  482.        IN   PDU                      -- SNMP Protocol Data Unit
  483.        IN   maxSizeResponseScopedPDU -- maximum size of Response PDU
  484.        IN   stateReference           -- reference to state information
  485.                                      -- as presented with the request
  486.        IN   statusInformation        -- success or errorIndication
  487.        )                             -- (error counter OID and value
  488.                                      -- when errorIndication)
  489.  
  490.    2) The Message Dispatcher sends the request to the appropriate
  491.       Message Processing Model indicated by the received value of
  492.       messageProcessingModel using the abstract service primitive:
  493.  
  494.       result =                        -- SUCCESS or errorIndication
  495.        prepareResponseMessage(
  496.        IN   messageProcessingModel   -- specified by application
  497.        IN   securityModel            -- specified by application
  498.        IN   securityName             -- specified by application
  499.        IN   securityLevel            -- specified by application
  500.        IN   contextEngineID          -- specified by application
  501.        IN   contextName              -- specified by application
  502.        IN   pduVersion               -- specified by application
  503.  
  504.  
  505.  
  506. Case, et. al.               Standards Track                     [Page 9]
  507.  
  508. RFC 2272               SNMPv3 Management Protocol           January 1998
  509.  
  510.  
  511.        IN   PDU                      -- specified by application
  512.        IN   maxSizeResponseScopedPDU -- specified by application
  513.        IN   stateReference           -- specified by application
  514.        IN   statusInformation        -- specified by application
  515.        OUT  destTransportDomain      -- destination transport domain
  516.        OUT  destTransportAddress     -- destination transport address
  517.        OUT  outgoingMessage          -- the message to send
  518.        OUT  outgoingMessageLength    -- the message length
  519.             )
  520.  
  521.    3) If the result is an errorIndication, the errorIndication is
  522.       returned to the calling application.  No further processing is
  523.       performed.
  524.  
  525.    4) If the result is success, the outgoingMessage is sent over the
  526.       transport specified by the transportDomain to the address
  527.       specified by the transportAddress.
  528.  
  529.    Message Processing is complete.
  530.  
  531. 4.2.  Receiving an SNMP Message from the Network
  532.  
  533.    This section describes the procedure followed by an SNMP engine
  534.    whenever it receives an SNMP message.
  535.  
  536.    Please note, that for the sake of clarity and to prevent the text
  537.    from being even longer and more complicated, some details were
  538.    omitted from the steps below.  In particular, The elements of
  539.    procedure do not always explicitly indicate when state information
  540.    needs to be released. The general rule is that if state information
  541.    is available when a message is to be "discarded without further
  542.    processing", then the state information must also be released at that
  543.    same time.
  544.  
  545. 4.2.1.  Message Dispatching of received SNMP Messages
  546.  
  547.    1) The snmpInPkts counter [RFC1907] is incremented.
  548.  
  549.    2) The version of the SNMP message is determined in an
  550.       implementation-dependent manner.  If the packet cannot be
  551.       sufficiently parsed to determine the version of the SNMP message,
  552.       then the snmpInASNParseErrs [RFC1907] counter is incremented, and
  553.       the message is discarded without further processing.  If the
  554.       version is not supported, then the snmpInBadVersions [RFC1907]
  555.       counter is incremented, and the message is discarded without
  556.       further processing.
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Case, et. al.               Standards Track                    [Page 10]
  563.  
  564. RFC 2272               SNMPv3 Management Protocol           January 1998
  565.  
  566.  
  567.    3) The origin transportDomain and origin transportAddress are
  568.       determined.
  569.  
  570.    4) The message is passed to the version-specific Message Processing
  571.       Model which returns the abstract data elements required by the
  572.       Dispatcher.  This is performed using the abstract service
  573.       primitive:
  574.  
  575.       result =                        -- SUCCESS or errorIndication
  576.         prepareDataElements(
  577.         IN   transportDomain          -- origin as determined in step 3.
  578.         IN   transportAddress         -- origin as determined in step 3.
  579.         IN   wholeMsg                 -- as received from the network
  580.         IN   wholeMsgLength           -- as received from the network
  581.         OUT  messageProcessingModel   -- typically, SNMP version
  582.         OUT  securityModel            -- Security Model to use
  583.         OUT  securityName             -- on behalf of this principal
  584.         OUT  securityLevel            -- Level of Security requested
  585.         OUT  contextEngineID          -- data from/at this entity
  586.         OUT  contextName              -- data from/in this context
  587.         OUT  pduVersion               -- the version of the PDU
  588.         OUT  PDU                      -- SNMP Protocol Data Unit
  589.         OUT  pduType                  -- SNMP PDU type
  590.         OUT  sendPduHandle            -- handle for a matched request
  591.         OUT  maxSizeResponseScopedPDU -- maximum size of Response PDU
  592.         OUT  statusInformation        -- success or errorIndication
  593.                                       -- (error counter OID and value
  594.                                       -- when errorIndication)
  595.         OUT  stateReference           -- reference to state information
  596.                                       -- to be used for a possible
  597.              )                        -- Response
  598.  
  599.    5) If the result is a FAILURE errorIndication, the message is
  600.       discarded without further processing.
  601.  
  602.    6) At this point, the abstract data elements have been prepared and
  603.       processing continues as described in Section 4.2.2, PDU
  604.       Dispatching for Incoming Messages.
  605.  
  606. 4.2.2.  PDU Dispatching for Incoming Messages
  607.  
  608.    The elements of procedure for the dispatching of PDUs depends on the
  609.    value of sendPduHandle.  If the value of sendPduHandle is <none>,
  610.    then this is a request or notification and the procedures specified
  611.    in Section 4.2.2.1 apply.  If the value of snmpPduHandle is not
  612.    <none>, then this is a response and the procedures specified in
  613.    Section 4.2.2.2 apply.
  614.  
  615.  
  616.  
  617.  
  618. Case, et. al.               Standards Track                    [Page 11]
  619.  
  620. RFC 2272               SNMPv3 Management Protocol           January 1998
  621.  
  622.  
  623. 4.2.2.1.  Incoming Requests and Notifications
  624.  
  625.    The following procedures are followed for the dispatching of PDUs
  626.    when the value of sendPduHandle is <none>, indicating this is a
  627.    request or notification.
  628.  
  629.    1) The combination of contextEngineID and pduType is used to
  630.       determine which application has registered for this request or
  631.       notification.
  632.  
  633.    2) If no application has registered for the combination, then
  634.  
  635.       a) The snmpUnknownPDUHandlers counter is incremented.
  636.  
  637.       b) A Response message is generated using the abstract service
  638.          primitive:
  639.  
  640.          result =                         -- SUCCESS or FAILURE
  641.          prepareResponseMessage(
  642.          IN   messageProcessingModel    -- as provided by MP module
  643.          IN   securityModel             -- as provided by MP module
  644.          IN   securityName              -- as provided by MP module
  645.          IN   securityLevel             -- as provided by MP module
  646.          IN   contextEngineID           -- as provided by MP module
  647.          IN   contextName               -- as provided by MP module
  648.          IN   pduVersion                -- as provided by MP module
  649.          IN   PDU                       -- as provided by MP module
  650.          IN   maxSizeResponseScopedPDU  -- as provided by MP module
  651.          IN   stateReference            -- as provided by MP module
  652.          IN   statusInformation         -- errorIndication plus
  653.                                         -- snmpUnknownPDUHandlers OID
  654.                                         -- value pair.
  655.          OUT  transportDomain           -- destination transportDomain
  656.          OUT  transportAddress          -- destination transportAddress
  657.          OUT  outgoingMessage           -- the message to send
  658.          OUT  outgoingMessageLength     -- its length
  659.          )
  660.  
  661.       c) If the result is SUCCESS, then the prepared message is sent to
  662.          the originator of the request as identified by the
  663.          transportDomain and transportAddress.
  664.  
  665.       d) The incoming message is discarded without further processing.
  666.          Message Processing for this message is complete.
  667.  
  668.    3) The PDU is dispatched to the application, using the abstract
  669.       service primitive:
  670.  
  671.  
  672.  
  673.  
  674. Case, et. al.               Standards Track                    [Page 12]
  675.  
  676. RFC 2272               SNMPv3 Management Protocol           January 1998
  677.  
  678.  
  679.       processPdu(                     -- process Request/Notification
  680.         IN   messageProcessingModel   -- as provided by MP module
  681.         IN   securityModel            -- as provided by MP module
  682.         IN   securityName             -- as provided by MP module
  683.         IN   securityLevel            -- as provided by MP module
  684.         IN   contextEngineID          -- as provided by MP module
  685.         IN   contextName              -- as provided by MP module
  686.         IN   pduVersion               -- as provided by MP module
  687.         IN   PDU                      -- as provided by MP module
  688.         IN   maxSizeResponseScopedPDU -- as provided by MP module
  689.         IN   stateReference           -- as provided by MP module
  690.                                       -- needed when sending response
  691.              )
  692.  
  693.       Message processing for this message is complete.
  694.  
  695. 4.2.2.2.  Incoming Responses
  696.  
  697.    The following procedures are followed for the dispatching of PDUs
  698.    when the value of sendPduHandle is not <none>, indicating this is a
  699.    response.
  700.  
  701.       1) The value of sendPduHandle is used to determine, in an
  702.          implementation-defined manner, which application is waiting for
  703.          a response PDU associated with this sendPduHandle.
  704.  
  705.       2) If no waiting application is found, the message is discarded
  706.          without further processing, and the stateReference is released.
  707.          The snmpUnknownPDUHandlers counter is incremented.  Message
  708.          Processing is complete for this message.
  709.  
  710.       3) Any cached information, including stateReference, about the
  711.          message is discarded.
  712.  
  713.       4) The response is dispatched to the application using the
  714.          abstract service primitive:
  715.  
  716.          processResponsePdu(              -- process Response PDU
  717.            IN   messageProcessingModel    -- provided by the MP module
  718.            IN   securityModel             -- provided by the MP module
  719.            IN   securityName              -- provided by the MP module
  720.            IN   securityLevel             -- provided by the MP module
  721.            IN   contextEngineID           -- provided by the MP module
  722.            IN   contextName               -- provided by the MP module
  723.            IN   pduVersion                -- provided by the MP module
  724.            IN   PDU                       -- provided by the MP module
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Case, et. al.               Standards Track                    [Page 13]
  731.  
  732. RFC 2272               SNMPv3 Management Protocol           January 1998
  733.  
  734.  
  735.            IN   statusInformation         -- provided by the MP module
  736.            IN   sendPduHandle             -- provided by the MP module
  737.                 )
  738.  
  739.          Message Processing is complete for this message.
  740.  
  741. 4.3.  Application Registration for Handling PDU types
  742.  
  743.    Applications that want to process certain PDUs must register with the
  744.    PDU Dispatcher. Applications specify the combination of
  745.    contextEngineID and pduType(s) for which they want to take
  746.    responsibility
  747.  
  748.    1) An application registers according to the abstract interface
  749.       primitive:
  750.  
  751.       statusInformation =           -- success or errorIndication
  752.         registerContextEngineID(
  753.         IN   contextEngineID        -- take responsibility for this one
  754.         IN   pduType                -- the pduType(s) to be registered
  755.              )
  756.  
  757.       Note: implementations may provide a means of requesting
  758.       registration for simultaneous multiple contextEngineID values,
  759.       e.g., all contextEngineID values, and may also provide means for
  760.       requesting simultaneous registration for multiple values of
  761.       pduType.
  762.  
  763.    2) The parameters may be checked for validity; if they are not, then
  764.       an errorIndication (invalidParameter) is returned to the
  765.       application.
  766.  
  767.    3) Each combination of contextEngineID and pduType can be registered
  768.       only once.  If another application has already registered for the
  769.       specified combination, then an errorIndication (alreadyRegistered)
  770.       is returned to the application.
  771.  
  772.    4) Otherwise, the registration is saved so that SNMP PDUs can be
  773.       dispatched to this application.
  774.  
  775. 4.4.  Application Unregistration for Handling PDU Types
  776.  
  777.    Applications that no longer want to process certain PDUs must
  778.    unregister with the PDU Dispatcher.
  779.  
  780.    1) An application unregisters using the abstract service primitive:
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Case, et. al.               Standards Track                    [Page 14]
  787.  
  788. RFC 2272               SNMPv3 Management Protocol           January 1998
  789.  
  790.  
  791.       unregisterContextEngineID(
  792.        IN   contextEngineID        -- give up responsibility for this
  793.        IN   pduType                -- the pduType(s) to be unregistered
  794.              )
  795.       Note: implementations may provide means for requesting
  796.       unregistration for simultaneous multiple contextEngineID values,
  797.       e.g., all contextEngineID values, and may also provide means for
  798.       requesting simultaneous unregistration for multiple values of
  799.       pduType.
  800.  
  801.    2) If the contextEngineID and pduType combination has been
  802.       registered, then the registration is deleted.
  803.  
  804.       If no such registration exists, then the request is ignored.
  805.  
  806. 5.  Definitions
  807.  
  808. 5.1.  Definitions for SNMP Message Processing and Dispatching
  809.  
  810.    SNMP-MPD-MIB DEFINITIONS ::= BEGIN
  811.  
  812.    IMPORTS
  813.        MODULE-COMPLIANCE, OBJECT-GROUP         FROM SNMPv2-CONF
  814.        MODULE-IDENTITY, OBJECT-TYPE,
  815.        snmpModules, Counter32                  FROM SNMPv2-SMI;
  816.  
  817.    snmpMPDMIB MODULE-IDENTITY
  818.        LAST-UPDATED "9711200000Z"              -- 20 November 1997
  819.        ORGANIZATION "SNMPv3 Working Group"
  820.        CONTACT-INFO "WG-email:   snmpv3@tis.com
  821.                      Subscribe:  majordomo@tis.com
  822.                                  In message body:  subscribe snmpv3
  823.  
  824.                      Chair:      Russ Mundy
  825.                                  Trusted Information Systems
  826.                      postal:     3060 Washington Road
  827.                                  Glenwood, MD 21738
  828.                                  USA
  829.                      email:      mundy@tis.com
  830.                      phone:      +1 301-854-6889
  831.  
  832.                      Co-editor:  Jeffrey Case
  833.                                  SNMP Research, Inc.
  834.                      postal:     3001 Kimberlin Heights Road
  835.                                  Knoxville, TN 37920-9716
  836.                                  USA
  837.                      email:      case@snmp.com
  838.                      phone:      +1 423-573-1434
  839.  
  840.  
  841.  
  842. Case, et. al.               Standards Track                    [Page 15]
  843.  
  844. RFC 2272               SNMPv3 Management Protocol           January 1998
  845.  
  846.  
  847.                      Co-editor   Dave Harrington
  848.                                  Cabletron Systems, Inc.
  849.                      postal:     Post Office Box 5005
  850.                                  MailStop: Durham
  851.                                  35 Industrial Way
  852.                                  Rochester, NH 03867-5005
  853.                                  USA
  854.                      email:      dbh@ctron.com
  855.                      phone:      +1 603-337-7357
  856.  
  857.                      Co-editor:  Randy Presuhn
  858.                                  BMC Software, Inc.
  859.                      postal:     1190 Saratoga Ave, Suite 190
  860.                                  San Jose, CA 95120
  861.                                  USA
  862.                      email:      rpresuhn@bmc.com
  863.                      phone:      +1 408-556-0720
  864.  
  865.                      Co-editor:  Bert Wijnen
  866.                                  IBM T. J. Watson Research
  867.                      postal:     Schagen 33
  868.                                  3461 GL Linschoten
  869.                                  Netherlands
  870.                      email:      wijnen@vnet.ibm.com
  871.                      phone:      +31 348-432-794
  872.  
  873.                     "
  874.        DESCRIPTION  "The MIB for Message Processing and Dispatching"
  875.        ::= { snmpModules 11 }
  876.  
  877.    -- Administrative assignments ***************************************
  878.  
  879.    snmpMPDAdmin           OBJECT IDENTIFIER ::= { snmpMPDMIB 1 }
  880.    snmpMPDMIBObjects      OBJECT IDENTIFIER ::= { snmpMPDMIB 2 }
  881.    snmpMPDMIBConformance  OBJECT IDENTIFIER ::= { snmpMPDMIB 3 }
  882.  
  883.    -- Statistics for SNMP Messages *************************************
  884.  
  885.    snmpMPDStats           OBJECT IDENTIFIER ::= { snmpMPDMIBObjects 1 }
  886.  
  887.    snmpUnknownSecurityModels OBJECT-TYPE
  888.        SYNTAX       Counter32
  889.        MAX-ACCESS   read-only
  890.        STATUS       current
  891.        DESCRIPTION "The total number of packets received by the SNMP
  892.                     engine which were dropped because they referenced a
  893.                     securityModel that was not known to or supported by
  894.                     the SNMP engine.
  895.  
  896.  
  897.  
  898. Case, et. al.               Standards Track                    [Page 16]
  899.  
  900. RFC 2272               SNMPv3 Management Protocol           January 1998
  901.  
  902.  
  903.                    "
  904.        ::= { snmpMPDStats 1 }
  905.  
  906.    snmpInvalidMsgs OBJECT-TYPE
  907.        SYNTAX       Counter32
  908.        MAX-ACCESS   read-only
  909.        STATUS       current
  910.        DESCRIPTION "The total number of packets received by the SNMP
  911.                     engine which were dropped because there were invalid
  912.                     or inconsistent components in the SNMP message.
  913.                    "
  914.        ::= { snmpMPDStats 2 }
  915.  
  916.    snmpUnknownPDUHandlers OBJECT-TYPE
  917.        SYNTAX       Counter32
  918.        MAX-ACCESS   read-only
  919.        STATUS       current
  920.        DESCRIPTION "The total number of packets received by the SNMP
  921.                     engine which were dropped because the PDU contained
  922.                     in the packet could not be passed to an application
  923.                     responsible for handling the pduType, e.g. no SNMP
  924.                     application had registered for the proper
  925.                     combination of the contextEngineID and the pduType.
  926.                    "
  927.        ::= { snmpMPDStats 3 }
  928.  
  929.    -- Conformance information ******************************************
  930.  
  931.    snmpMPDMIBCompliances OBJECT IDENTIFIER ::= {snmpMPDMIBConformance 1}
  932.    snmpMPDMIBGroups      OBJECT IDENTIFIER ::= {snmpMPDMIBConformance 2}
  933.  
  934.    -- Compliance statements
  935.  
  936.    snmpMPDCompliance MODULE-COMPLIANCE
  937.        STATUS       current
  938.        DESCRIPTION "The compliance statement for SNMP entities which
  939.                     implement the SNMP-MPD-MIB.
  940.                    "
  941.  
  942.        MODULE    -- this module
  943.  
  944.            MANDATORY-GROUPS { snmpMPDGroup }
  945.  
  946.        ::= { snmpMPDMIBCompliances 1 }
  947.  
  948.    snmpMPDGroup OBJECT-GROUP
  949.        OBJECTS {
  950.                  snmpUnknownSecurityModels,
  951.  
  952.  
  953.  
  954. Case, et. al.               Standards Track                    [Page 17]
  955.  
  956. RFC 2272               SNMPv3 Management Protocol           January 1998
  957.  
  958.  
  959.                  snmpInvalidMsgs,
  960.                  snmpUnknownPDUHandlers
  961.                }
  962.        STATUS       current
  963.        DESCRIPTION "A collection of objects providing for remote
  964.                     monitoring of the SNMP Message Processing and
  965.                     Dispatching process.
  966.                    "
  967.        ::= { snmpMPDMIBGroups 1 }
  968.  
  969.    END
  970.  
  971. 6.  The SNMPv3 Message Format
  972.  
  973.    This section defines the SNMPv3 message format and the corresponding
  974.    SNMP version 3 Message Processing Model (v3MP).
  975.  
  976.    SNMPv3MessageSyntax DEFINITIONS IMPLICIT TAGS ::= BEGIN
  977.  
  978.        SNMPv3Message ::= SEQUENCE {
  979.            -- identify the layout of the SNMPv3Message
  980.            -- this element is in same position as in SNMPv1
  981.            -- and SNMPv2c, allowing recognition
  982.            msgVersion INTEGER { snmpv3 (3) },
  983.            -- administrative parameters
  984.            msgGlobalData HeaderData,
  985.            -- security model-specific parameters
  986.            -- format defined by Security Model
  987.            msgSecurityParameters OCTET STRING,
  988.            msgData  ScopedPduData
  989.        }
  990.  
  991.        HeaderData ::= SEQUENCE {
  992.            msgID      INTEGER (0..2147483647),
  993.            msgMaxSize INTEGER (484..2147483647),
  994.  
  995.            msgFlags   OCTET STRING (SIZE(1)),
  996.                       --  .... ...1   authFlag
  997.                       --  .... ..1.   privFlag
  998.                       --  .... .1..   reportableFlag
  999.                       --              Please observe:
  1000.                       --  .... ..00   is OK, means noAuthNoPriv
  1001.                       --  .... ..01   is OK, means authNoPriv
  1002.                       --  .... ..10   reserved, must NOT be used.
  1003.                       --  .... ..11   is OK, means authPriv
  1004.  
  1005.            msgSecurityModel INTEGER (0..2147483647)
  1006.        }
  1007.  
  1008.  
  1009.  
  1010. Case, et. al.               Standards Track                    [Page 18]
  1011.  
  1012. RFC 2272               SNMPv3 Management Protocol           January 1998
  1013.  
  1014.  
  1015.        ScopedPduData ::= CHOICE {
  1016.            plaintext    ScopedPDU,
  1017.            encryptedPDU OCTET STRING  -- encrypted scopedPDU value
  1018.        }
  1019.  
  1020.        ScopedPDU ::= SEQUENCE {
  1021.            contextEngineID  OCTET STRING,
  1022.            contextName      OCTET STRING,
  1023.            data             ANY -- e.g., PDUs as defined in RFC1905
  1024.        }
  1025.    END
  1026.  
  1027. 6.1.  msgVersion
  1028.  
  1029.    The msgVersion field is set to snmpv3(3) and identifies the message
  1030.    as an SNMP version 3 Message.
  1031.  
  1032. 6.2.  msgID
  1033.  
  1034.    The msgID is used between two SNMP entities to coordinate request
  1035.    messages and responses, and by the v3MP to coordinate the processing
  1036.    of the message by different subsystem models within the architecture.
  1037.  
  1038.    Values for msgID should be generated in a manner that avoids re-use
  1039.    of any outstanding values.  Doing so provides protection against some
  1040.    replay attacks.  One possible implementation strategy would be to use
  1041.    the low-order bits of snmpEngineBoots [RFC2271] as the high-order
  1042.    portion of the msgID value and a monotonically increasing integer for
  1043.    the low-order portion of msgID.
  1044.  
  1045.    Note that the request-id in a PDU is used by SNMP applications to
  1046.    identify the PDU; the msgID is used by the engine to identify the
  1047.    message which carries a PDU. The engine may need to identify the
  1048.    message even if decrypting of the PDU (and request-id) fails. No
  1049.    assumption should be made that the value of the msgID and the value
  1050.    of the request-id are equivalent.
  1051.  
  1052. 6.3.  msgMaxSize
  1053.  
  1054.    The msgMaxSize field of the message conveys the maximum message size
  1055.    supported by the sender of the message, i.e., the maximum message
  1056.    size that the sender can accept when another SNMP engine sends an
  1057.    SNMP message (be it a response or any other message) to the sender of
  1058.    this message.
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Case, et. al.               Standards Track                    [Page 19]
  1067.  
  1068. RFC 2272               SNMPv3 Management Protocol           January 1998
  1069.  
  1070.  
  1071.    When an SNMP message is being generated, the msgMaxSize is provided
  1072.    by the SNMP engine which generates the message.  At the receiving
  1073.    SNMP engine, the msgMaxSize is used to determine how big the Response
  1074.    to a Request message can be.
  1075.  
  1076. 6.4.  msgFlags
  1077.  
  1078.    The msgFlags field of the message contains several bit fields which
  1079.    control processing of the message.
  1080.  
  1081.    When the reportableFlag is one, a Report PDU must be returned to the
  1082.    sender under those conditions which can cause the generation of
  1083.    Report PDUs.  When the reportableFlag is zero, then a Report PDU must
  1084.    not be sent.  The reportableFlag must always be zero when the message
  1085.    contains a Report PDU, a response-type PDU (such as a Response PDU),
  1086.    or an unacknowledged notification-type PDU (such as an SNMPv2-trap
  1087.    PDU).  The reportableFlag must always be one for a request-type PDU
  1088.    (such as a Get PDU) and an acknowledged notification-type PDU (such
  1089.    as an Inform PDU).
  1090.  
  1091.    If the reportableFlag is set to one for a message containing a Report
  1092.    PDU, a re 3) Each pe PDU (such as a Response PDU), or an
  1093.    unacknowledged notification-type PDU (such as an SNMPv2-trap PDU),
  1094.    then the receiver of that message must process it as though the
  1095.    reportableFlag had been set to zero.
  1096.  
  1097.    If the reportableFlag is set to zero for a message containing a
  1098.    request-type PDU (such as a Get PDU) or an acknowledged notification-
  1099.    type PDU (such as an Inform PDU), then the receiver of that message
  1100.    must process it as though the reportableFlag had been set to one.
  1101.  
  1102.    Report PDUs are engine-to-engine communications and are processed
  1103.    directly by the SNMPv3 Message Processing Model, and are generally
  1104.    not passed to applications for processing, unlike all other PDU
  1105.    types.
  1106.  
  1107.    Note that the reportableFlag is a secondary aid in determining
  1108.    whether a Report PDU must be sent.  It is only used in cases where
  1109.    the PDU portion of a message cannot be decoded, due to, for example,
  1110.    an incorrect ecryption key.  If the PDU can be decoded, the PDU type
  1111.    forms the basis for decisions on sending Report PDUs.
  1112.  
  1113.    The authFlag and privFlag portions of the msgFlags field are set by
  1114.    the sender to indicate the securityLevel that was applied to the
  1115.    message before it was sent on the wire.  The receiver of the message
  1116.    must apply the same securityLevel when the message is received and
  1117.    the contents are being processed.
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Case, et. al.               Standards Track                    [Page 20]
  1123.  
  1124. RFC 2272               SNMPv3 Management Protocol           January 1998
  1125.  
  1126.  
  1127.    There are three securityLevels, namely noAuthNoPriv, which is less
  1128.    than authNoPriv, which is in turn less than authPriv.  See the SNMP
  1129.    architecture document [RFC2271] for details about the securityLevel.
  1130.  
  1131.    a) authFlag
  1132.  
  1133.       If the authFlag is set to one, then the securityModel used by the
  1134.       SNMP engine which sent the message must identify the securityName
  1135.       on whose behalf the SNMP message was generated and must provide,
  1136.       in a securityModel-specific manner, sufficient data for the
  1137.       receiver of the message to be able to authenticate that
  1138.       identification.  In general, this authentication will allow the
  1139.       receiver to determine with reasonable certainty that the message
  1140.       was:
  1141.  
  1142.       -  sent on behalf of the principal associated with the
  1143.          securityName,
  1144.  
  1145.       -  was not redirected,
  1146.  
  1147.       -  was not modified in transit, and
  1148.  
  1149.       -  was not replayed.
  1150.  
  1151.       If the authFlag is zero, then the securityModel used by the SNMP
  1152.       engine which sent the message must identify the securityName on
  1153.       whose behalf the SNMP message was generated but it does not need
  1154.       to provide sufficient data for the receiver of the message to
  1155.       authenticate the identification, as there is no need to
  1156.       authenticate the message in this case.
  1157.  
  1158.    b) privFlag
  1159.  
  1160.       If the privFlag is set, then the securityModel used by the SNMP
  1161.       engine which sent the message must also protect the scopedPDU in
  1162.       an SNMP message from disclosure, i.e., must encrypt/decrypt the
  1163.       scopedPDU. If the privFlag is zero, then the securityModel in use
  1164.       does not need to protect the data from disclosure.
  1165.  
  1166.       It is an explicit requirement of the SNMP architecture that if
  1167.       privacy is selected, then authentication is also required.  That
  1168.       means that if the privFlag is set, then the authFlag must also be
  1169.       set to one.
  1170.  
  1171.       The combination of the authFlag and the privFlag comprises a Level
  1172.       of Security as follows:
  1173.  
  1174.          authFlag zero, privFlag zero -> securityLevel is noAuthNoPriv
  1175.  
  1176.  
  1177.  
  1178. Case, et. al.               Standards Track                    [Page 21]
  1179.  
  1180. RFC 2272               SNMPv3 Management Protocol           January 1998
  1181.  
  1182.  
  1183.          authFlag zero, privFlag one  -> invalid combination
  1184.          authFlag one,  privFlag zero -> securityLevel is authNoPriv
  1185.          authFlag one,  privFlag one  -> securityLevel is authPriv
  1186.  
  1187. 6.5.  msgSecurityModel
  1188.  
  1189.    The v3MP supports the concurrent existence of multiple Security
  1190.    Models to provide security services for SNMPv3 messages.  The
  1191.    msgSecurityModel field in an SNMPv3 Message identifies which Security
  1192.    Model was used by the sender to generate the message and therefore
  1193.    which securityModel must be used by the receiver to perform security
  1194.    processing for the message.  The mapping to the appropriate
  1195.    securityModel implementation within an SNMP engine is accomplished in
  1196.    an implementation-dependent manner.
  1197.  
  1198. 6.6.  msgSecurityParameters
  1199.  
  1200.    The msgSecurityParameters field of the SNMPv3 Message is used for
  1201.    communication between the Security Model modules in the sending and
  1202.    receiving SNMP engines. The data in the msgSecurityParameters field
  1203.    is used exclusively by the Security Model, and the contents and
  1204.    format of the data is defined by the Security Model.  This OCTET
  1205.    STRING is not interpreted by the v3MP, but is passed to the local
  1206.    implementation of the Security Model indicated by the
  1207.    msgSecurityModel field in the message.
  1208.  
  1209. 6.7.  scopedPduData
  1210.  
  1211.    The scopedPduData field represents either the plain text scopedPDU if
  1212.    the privFlag in the msgFlags is zero, or it represents an
  1213.    encryptedPDU (encoded as an OCTET STRING) which must be decrypted by
  1214.    the securityModel in use to produce a plaintext scopedPDU.
  1215.  
  1216. 6.8.  scopedPDU
  1217.  
  1218.    The scopedPDU contains information to identify an administratively
  1219.    unique context and a PDU. The object identifiers in the PDU refer to
  1220.    managed objects which are (expected to be) accessible within the
  1221.    specified context.
  1222.  
  1223. 6.8.1.  contextEngineID
  1224.  
  1225.    The contextEngineID in the SNMPv3 message, uniquely identifies,
  1226.    within an administrative domain, an SNMP entity that may realize an
  1227.    instance of a context with a particular contextName.
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Case, et. al.               Standards Track                    [Page 22]
  1235.  
  1236. RFC 2272               SNMPv3 Management Protocol           January 1998
  1237.  
  1238.  
  1239.    For incoming messages, the contextEngineID is used to determine to
  1240.    which application the scopedPDU will be sent for processing.
  1241.  
  1242.    For outgoing messages, the v3MP sets the contextEngineID to the value
  1243.    provided by the application in the request for a message to be sent.
  1244.  
  1245. 6.8.2.  contextName
  1246.  
  1247.    The contextName field in an SNMPv3 message, in conjunction with the
  1248.    contextEngineID field, identifies the particular context associated
  1249.    with the management information contained in the PDU portion of the
  1250.    message.  The contextName is unique within the SNMP entity specified
  1251.    by the contextEngineID, which may realize the managed objects
  1252.    referenced within the PDU.  An application which originates a message
  1253.    provides the value for the contextName field and this value may be
  1254.    used during processing by an application at the receiving SNMP
  1255.    Engine.
  1256.  
  1257. 6.8.3.  data
  1258.  
  1259.    The data field of the SNMPv3 Message contains the PDU.  Among other
  1260.    things, the PDU contains the PDU type that is used by the v3MP to
  1261.    determine the type of the incoming SNMP message.  The v3MP specifies
  1262.    that the PDU must be one of those specified in [RFC1905].
  1263.  
  1264. 7.  Elements of Procedure for v3MP
  1265.  
  1266.    This section describes the procedures followed by an SNMP engine when
  1267.    generating and processing SNMP messages according to the SNMPv3
  1268.    Message Processing Model.
  1269.  
  1270.    Please note, that for the sake of clarity and to prevent the text
  1271.    from being even longer and more complicated, some details were
  1272.    omitted from the steps below.
  1273.  
  1274.       a) Some steps specify that when some error conditions are
  1275.          encountered when processing a received message, a message
  1276.          containing a Report PDU is generated and the received message
  1277.          is discarded without further processing.  However, a Report-PDU
  1278.          must not be generated unless the reportableFlag is set in the
  1279.          received message.
  1280.  
  1281.       b) The elements of procedure do not always explicitly indicate
  1282.          when state information needs to be released. The general rule
  1283.          is that if state information is available when a message is to
  1284.          be "discarded without further processing", then the state
  1285.          information must also be released at that same time.
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Case, et. al.               Standards Track                    [Page 23]
  1291.  
  1292. RFC 2272               SNMPv3 Management Protocol           January 1998
  1293.  
  1294.  
  1295. 7.1.  Prepare an Outgoing SNMP Message
  1296.  
  1297.    This section describes the procedure followed to prepare an SNMPv3
  1298.    message from the data elements passed by the Message Dispatcher.
  1299.  
  1300.    1) The Message Dispatcher may request that an SNMPv3 message
  1301.       containing a GetRequest-PDU, GetNextRequest-PDU, GetBulkRequest-
  1302.       PDU, SetRequest-PDU, InformRequest-PDU, or SNMPv2-Trap-PDU be
  1303.       prepared for sending.
  1304.  
  1305.       a) It makes such a request according to the abstract service
  1306.          primitive:
  1307.  
  1308.          statusInformation =           -- success or errorIndication
  1309.            prepareOutgoingMessage(
  1310.            IN   transportDomain        -- requested transport domain
  1311.            IN   transportAddress       -- requested destination address
  1312.            IN   messageProcessingModel -- typically, SNMP version
  1313.            IN   securityModel          -- Security Model to use
  1314.            IN   securityName           -- on behalf of this principal
  1315.            IN   securityLevel          -- Level of Security requested
  1316.            IN   contextEngineID        -- data from/at this entity
  1317.            IN   contextName            -- data from/in this context
  1318.            IN   pduVersion             -- version of the PDU
  1319.            IN   PDU                    -- SNMP Protocol Data Unit
  1320.            IN   expectResponse         -- TRUE or FALSE
  1321.            IN   sendPduHandle          -- the handle for matching
  1322.                                        -- incoming responses
  1323.            OUT  destTransportDomain    -- destination transport domain
  1324.            OUT  destTransportAddress   -- destination transport address
  1325.            OUT  outgoingMessage        -- the message to send
  1326.            OUT  outgoingMessageLength  -- the length of the message
  1327.            )
  1328.  
  1329.       b) A unique msgID is generated.  The number used for msgID should
  1330.          not have been used recently, and must not be the same as was
  1331.          used for any outstanding request.
  1332.  
  1333.          * SNMPv3 does not use the values of expectResponse or
  1334.          pduVersion.
  1335.  
  1336.    2) The Message Dispatcher may request that an SNMPv3 message
  1337.       containing a Response-PDU or Report-PDU be prepared for sending.
  1338.  
  1339.       a) It makes such a request according to the abstract service
  1340.          primitive:
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Case, et. al.               Standards Track                    [Page 24]
  1347.  
  1348. RFC 2272               SNMPv3 Management Protocol           January 1998
  1349.  
  1350.  
  1351.          result =                        -- SUCCESS or FAILURE
  1352.          prepareResponseMessage(
  1353.           IN   messageProcessingModel   -- typically, SNMP version
  1354.           IN   securityModel            -- same as on incoming request
  1355.           IN   securityName             -- same as on incoming request
  1356.           IN   securityLevel            -- same as on incoming request
  1357.           IN   contextEngineID          -- data from/at this SNMP entity
  1358.           IN   contextName              -- data from/in this context
  1359.           IN   pduVersion               -- version of the PDU
  1360.           IN   PDU                      -- SNMP Protocol Data Unit
  1361.           IN   maxSizeResponseScopedPDU -- maximum size of Response PDU
  1362.           IN   stateReference           -- reference to state
  1363.                                         -- information presented with
  1364.                                         -- the request
  1365.           IN   statusInformation        -- success or errorIndication
  1366.                                         -- error counter OID and value
  1367.                                         -- when errorIndication
  1368.           OUT  transportDomain          -- destination transport domain
  1369.           OUT  transportAddress         -- destination transport address
  1370.           OUT  outgoingMessage          -- the message to send
  1371.           OUT  outgoingMessageLength    -- the length of the message
  1372.           )
  1373.  
  1374.       b) The cached information for the original request is retrieved
  1375.          via the stateReference, including
  1376.  
  1377.                   - msgID,
  1378.                   - contextEngineID,
  1379.                   - contextName,
  1380.                   - securityModel,
  1381.                   - securityName,
  1382.                   - securityLevel,
  1383.                   - securityStateReference,
  1384.                   - reportableFlag,
  1385.                   - transportDomain, and
  1386.                   - transportAddress.
  1387.  
  1388.          The SNMPv3 Message Processing Model does not allow cached data
  1389.          to be overridden, except by error indications as detailed in
  1390.          (3) below.
  1391.  
  1392.    3) If statusInformation contains values for an OID/value combination
  1393.       (potentially also containing a securityLevel value,
  1394.       contextEngineID value, or contextName value), then
  1395.  
  1396.       a) If reportableFlag is zero, then the original message is
  1397.          discarded, and no further processing is done. A result of
  1398.          FAILURE is returned. SNMPv3 Message Processing is complete.
  1399.  
  1400.  
  1401.  
  1402. Case, et. al.               Standards Track                    [Page 25]
  1403.  
  1404. RFC 2272               SNMPv3 Management Protocol           January 1998
  1405.  
  1406.  
  1407.       b) If a PDU is provided, it is the PDU from the original request.
  1408.          If possible, extract the request-id.
  1409.  
  1410.       c) A Report PDU is prepared:
  1411.  
  1412.          1) the varBindList is set to contain the OID and value from the
  1413.             statusInformation
  1414.  
  1415.          2) error-status is set to 0
  1416.  
  1417.          3) error-index is set to 0.
  1418.  
  1419.          4) request-id is set to the value extracted in step b)
  1420.             Otherwise, request-id is set to 0
  1421.  
  1422.       d) The errorIndication in statusInformation may be accompanied by
  1423.          a securityLevel value, a contextEngineID value, or a
  1424.          contextName value.
  1425.  
  1426.          1) If statusInformation contains a value for securityLevel,
  1427.             then securityLevel is set to that value, otherwise it is set
  1428.             to noAuthNoPriv.
  1429.  
  1430.          2) If statusInformation contains a value for contextEngineID,
  1431.             then contextEngineID is set to that value, otherwise it is
  1432.             set to the value of this entity's snmpEngineID.
  1433.  
  1434.          3) If statusInformation contains a value for contextName, then
  1435.             contextName is set to that value, otherwise it is set to the
  1436.             default context of "" (zero-length string).
  1437.  
  1438.       e) PDU is set to refer to the new Report-PDU.  The old PDU is
  1439.          discarded.
  1440.  
  1441.       f) Processing continues with step 6) below.
  1442.  
  1443.    4) If contextEngineID is not yet determined, then the contextEngineID
  1444.       is determined, in an implementation-dependent manner, possibly
  1445.       using the transportDomain and transportAddress.
  1446.  
  1447.    5) If the contextName is not yet determined, the contextName is set
  1448.       to the default context.
  1449.  
  1450.    6) A scopedPDU is prepared from the contextEngineID, contextName, and
  1451.       PDU.
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458. Case, et. al.               Standards Track                    [Page 26]
  1459.  
  1460. RFC 2272               SNMPv3 Management Protocol           January 1998
  1461.  
  1462.  
  1463.    7) msgGlobalData is constructed as follows
  1464.  
  1465.       a) The msgVersion field is set to snmpv3(3).
  1466.  
  1467.       b) msgID is set as determined in step 1 or 2 above.
  1468.  
  1469.       c) msgMaxSize is set to an implementation-dependent value.
  1470.  
  1471.       d) msgFlags are set as follows:
  1472.  
  1473.          -  If securityLevel specifies noAuthNoPriv, then authFlag and
  1474.             privFlag are both set to zero.
  1475.  
  1476.          -  If securityLevel specifies authNoPriv, then authFlag is set
  1477.             to one and privFlag is set to zero.
  1478.  
  1479.          -  If securityLevel specifies authPriv, then authFlag is set to
  1480.             one and privFlag is set to one.
  1481.  
  1482.          -  If the PDU is a Response-PDU, Report-PDU or SNMPv2-Trap-PDU,
  1483.             then the reportableFlag is set to zero.
  1484.  
  1485.          -  If the PDU is a GetRequest-PDU, GetNextRequest-PDU,
  1486.             GetBulkRequest-PDU, SetRequest-PDU, or InformRequest-PDU
  1487.             then the reportableFlag is set to one.
  1488.  
  1489.          -  All other msgFlags bits are set to zero.
  1490.  
  1491.       e) msgSecurityModel is set to the value of securityModel
  1492.  
  1493.    8) If the PDU is a Response-PDU or Report-PDU, then
  1494.  
  1495.       a) The specified Security Model is called to generate the message
  1496.          according to the primitive:
  1497.  
  1498.          statusInformation =
  1499.            generateResponseMsg(
  1500.            IN   messageProcessingModel -- SNMPv3 Message Processing
  1501.                                        -- Model
  1502.            IN   globalData             -- msgGlobalData from step 7
  1503.            IN   maxMessageSize         -- from msgMaxSize (step 7c)
  1504.            IN   securityModel          -- as determined in step 7e
  1505.            IN   securityEngineID       -- the value of snmpEngineID
  1506.            IN   securityName           -- on behalf of this principal
  1507.            IN   securityLevel          -- for the outgoing message
  1508.            IN   scopedPDU              -- as prepared in step 6)
  1509.            IN   securityStateReference -- as determined in step 2
  1510.            OUT  securityParameters     -- filled in by Security Module
  1511.  
  1512.  
  1513.  
  1514. Case, et. al.               Standards Track                    [Page 27]
  1515.  
  1516. RFC 2272               SNMPv3 Management Protocol           January 1998
  1517.  
  1518.  
  1519.            OUT  wholeMsg               -- complete generated message
  1520.            OUT  wholeMsgLength         -- length of generated message
  1521.            )
  1522.  
  1523.          If, upon return from the Security Model, the statusInformation
  1524.          includes an errorIndication, then any cached information about
  1525.          the outstanding request message is discarded, and an
  1526.          errorIndication is returned, so it can be returned to the
  1527.          calling application. SNMPv3 Message Processing is complete.
  1528.  
  1529.       b) A SUCCESS result is returned. SNMPv3 Message Processing is
  1530.          complete.
  1531.  
  1532.    9) If the PDU is a GetRequest-PDU, GetNextRequest-PDU,
  1533.       GetBulkRequest-PDU, SetRequest-PDU, InformRequest-PDU, or or
  1534.       SNMPv2-Trap-PDU, then
  1535.  
  1536.       a) If the PDU is an SNMPv2-Trap-PDU, then securityEngineID is set
  1537.          to the value of this entity's snmpEngineID.
  1538.  
  1539.          Otherwise, the snmpEngineID of the target entity is determined,
  1540.          in an implementation-dependent manner, possibly using
  1541.          transportDomain and transportAddress.  The value of
  1542.          securityEngineID is set to the value of the target entity's
  1543.          snmpEngineID.
  1544.  
  1545.       b) The specified Security Model is called to generate the message
  1546.          according to the primitive:
  1547.  
  1548.          statusInformation =
  1549.           generateRequestMsg(
  1550.           IN  messageProcessingModel -- SNMPv3 Message Processing Model
  1551.           IN  globalData             -- msgGlobalData, from step 7
  1552.           IN  maxMessageSize         -- from msgMaxSize in step 7 c)
  1553.           IN  securityModel          -- as provided by caller
  1554.           IN  securityEngineID       -- authoritative SNMP entity
  1555.           IN  securityName           -- as provided by caller
  1556.           IN  securityLevel          -- as provided by caller
  1557.           IN  snmpEngineID           -- as determined in step 9 a)
  1558.           IN  scopedPDU              -- as prepared in step 6
  1559.           OUT securityParameters     -- filled in by Security Module
  1560.           OUT wholeMsg               -- complete generated message
  1561.           OUT wholeMsgLength         -- length of the generated message
  1562.           )
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Case, et. al.               Standards Track                    [Page 28]
  1571.  
  1572. RFC 2272               SNMPv3 Management Protocol           January 1998
  1573.  
  1574.  
  1575.          If, upon return from the Security Model, the statusInformation
  1576.          includes an errorIndication, then the message is discarded, and
  1577.          the errorIndication is returned, so it can be returned to the
  1578.          calling application, and no further processing is done.
  1579.          SNMPv3 Message Processing is complete.
  1580.  
  1581.       c) Information about the outgoing message is cached, and a
  1582.          stateReference is created (implementation-specific).
  1583.          Information to be cached includes the values of:
  1584.  
  1585.                       - sendPduHandle
  1586.                       - msgID
  1587.                       - snmpEngineID
  1588.                       - securityModel
  1589.                       - securityName
  1590.                       - securityLevel
  1591.                       - contextEngineID
  1592.                       - contextName
  1593.  
  1594.       d) A SUCCESS result is returned.  SNMPv3 Message Processing is
  1595.          complete.
  1596.  
  1597. 7.2.  Prepare Data Elements from an Incoming SNMP Message
  1598.  
  1599.    This section describes the procedure followed to extract data from an
  1600.    SNMPv3 message, and to prepare the data elements required for further
  1601.    processing of the message by the Message Dispatcher.
  1602.  
  1603.    1) The message is passed in from the Message Dispatcher according to
  1604.       the abstract service primitive:
  1605.  
  1606.        result =                         -- SUCCESS or errorIndication
  1607.          prepareDataElements(
  1608.          IN  transportDomain          -- origin transport domain
  1609.          IN  transportAddress         -- origin transport address
  1610.          IN  wholeMsg                 -- as received from the network
  1611.          IN  wholeMsgLength           -- as received from the network
  1612.          OUT messageProcessingModel   -- typically, SNMP version
  1613.          OUT securityModel            -- Security Model to use
  1614.          OUT securityName             -- on behalf of this principal
  1615.          OUT securityLevel            -- Level of Security requested
  1616.          OUT contextEngineID          -- data from/at this entity
  1617.          OUT contextName              -- data from/in this context
  1618.          OUT pduVersion               -- version of the PDU
  1619.          OUT PDU                      -- SNMP Protocol Data Unit
  1620.          OUT pduType                  -- SNMP PDU type
  1621.          OUT sendPduHandle            -- handle for matched request
  1622.          OUT maxSizeResponseScopedPDU -- maximum size of Response PDU
  1623.  
  1624.  
  1625.  
  1626. Case, et. al.               Standards Track                    [Page 29]
  1627.  
  1628. RFC 2272               SNMPv3 Management Protocol           January 1998
  1629.  
  1630.  
  1631.          OUT statusInformation        -- success or errorIndication
  1632.                                       -- error counter OID and value
  1633.                                       -- when errorIndication
  1634.          OUT stateReference           -- reference to state information
  1635.                                       -- to be used for a possible
  1636.          )                            -- Response
  1637.  
  1638.    2) If the received message is not the serialization (according to
  1639.       the conventions of [RFC1906]) of an SNMPv3Message value, then the
  1640.       snmpInASNParseErrs counter [RFC1907] is incremented, the message
  1641.       is discarded without further processing, and a FAILURE result is
  1642.       returned. SNMPv3 Message Processing is complete.
  1643.  
  1644.    3) The values for msgVersion, msgID, msgMaxSize, msgFlags,
  1645.       msgSecurityModel, msgSecurityParameters, and msgData are extracted
  1646.       from the message.
  1647.  
  1648.    4) If the value of the msgSecurityModel component does not match a
  1649.       supported securityModel, then the snmpUnknownSecurityModels
  1650.       counter is incremented, a Report PDU is generated, the message is
  1651.       discarded without further processing, and a FAILURE result is
  1652.       returned. SNMPv3 Message Processing is complete.
  1653.  
  1654.    5) The securityLevel is determined from the authFlag and the
  1655.       privFlag bits of the msgFlags component as follows:
  1656.  
  1657.       a) If the authFlag is not set and the privFlag is not set, then
  1658.          securityLevel is set to noAuthNoPriv.
  1659.  
  1660.       b) If the authFlag is set and the privFlag is not set, then
  1661.          securityLevel is set to authNoPriv.
  1662.  
  1663.       c) If the authFlag is set and the privFlag is set, then
  1664.          securityLevel is set to authPriv.
  1665.  
  1666.       d) If the authFlag is not set and privFlag is set, then the
  1667.          snmpInvalidMsgs counter is incremented, a Report PDU is
  1668.          generated, the message is discarded without further processing,
  1669.          and a FAILURE result is returned. SNMPv3 Message Processing is
  1670.          complete.
  1671.  
  1672.    6) The security module implementing the Security Model as specified
  1673.       by the securityModel component is called for authentication and
  1674.       privacy services.  This is done according to the abstract service
  1675.       primitive:
  1676.  
  1677.        statusInformation =            -- errorIndication or success
  1678.                                       -- error counter OID and
  1679.  
  1680.  
  1681.  
  1682. Case, et. al.               Standards Track                    [Page 30]
  1683.  
  1684. RFC 2272               SNMPv3 Management Protocol           January 1998
  1685.  
  1686.  
  1687.                                       -- value if error
  1688.          processIncomingMsg(
  1689.          IN  messageProcessingModel   -- SNMPv3 Message Processing Model
  1690.          IN  expectResponse           -- TRUE or FALSE
  1691.          IN  maxMessageSize           -- of the sending SNMP entity
  1692.          IN  securityParameters       -- for the received message
  1693.          IN  securityModel            -- for the received message
  1694.          IN  securityLevel            -- Level of Security
  1695.          IN  wholeMsg                 -- as received on the wire
  1696.          IN  wholeMsgLength           -- length as received on the wire
  1697.          OUT securityEngineID         -- authoritative SNMP entity
  1698.          OUT securityName             -- identification of the principal
  1699.          OUT scopedPDU,               -- message (plaintext) payload
  1700.          OUT maxSizeResponseScopedPDU -- maximum size of Response PDU
  1701.          OUT securityStateReference   -- reference to security state
  1702.          )                            -- information, needed for
  1703.                                       -- response
  1704.  
  1705.       If an errorIndication is returned by the security module, then
  1706.  
  1707.       a) If statusInformation contains values for an OID/value pair,
  1708.          then a Report PDU is generated.
  1709.  
  1710.          1) If the scopedPDU has been returned from ProcessIncomingMsg
  1711.             then determine contextEngineID, contextName, and PDU.
  1712.  
  1713.          2) Information about the message is cached and a
  1714.             stateReference is created (implementation-specific).
  1715.             Information to be cached includes the values of:
  1716.  
  1717.                           msgVersion,
  1718.                           msgID,
  1719.                           securityLevel,
  1720.                           msgFlags,
  1721.                           msgMaxSize,
  1722.                           securityModel,
  1723.                           maxSizeResponseScopedPDU,
  1724.                           securityStateReference
  1725.  
  1726.          3) Request that a Report-PDU be prepared and sent, according
  1727.             to the abstract service primitive:
  1728.  
  1729.              result =                     -- SUCCESS or FAILURE
  1730.              returnResponsePDU(
  1731.              IN  messageProcessingModel   -- SNMPv3(3)
  1732.              IN  securityModel            -- same as on incoming request
  1733.              IN  securityName             -- from ProcessIncomingMsg
  1734.              IN  securityLevel            -- same as on incoming request
  1735.  
  1736.  
  1737.  
  1738. Case, et. al.               Standards Track                    [Page 31]
  1739.  
  1740. RFC 2272               SNMPv3 Management Protocol           January 1998
  1741.  
  1742.  
  1743.              IN  contextEngineID          -- from step 6 a) 1)
  1744.              IN  contextName              -- from step 6 a) 1)
  1745.              IN  pduVersion               -- SNMPv2-PDU
  1746.              IN  PDU                      -- from step 6 a) 1)
  1747.              IN  maxSizeResponseScopedPDU -- from ProcessIncomingMsg
  1748.              IN  stateReference           -- from step 6 a) 2)
  1749.              IN  statusInformation        -- from ProcessIncomingMsg
  1750.              OUT transportDomain          -- destination's transport
  1751.                                           -- domain
  1752.              OUT transportAddress         -- destination's transport
  1753.                                           -- address
  1754.              OUT outgoingMessage          -- the message to send
  1755.              OUT outgoingMessageLength    -- the length of the message
  1756.              )
  1757.  
  1758.       b) The incoming message is discarded without further processing,
  1759.          and a FAILURE result is returned. SNMPv3 Message Processing is
  1760.          complete.
  1761.  
  1762.    7) The scopedPDU is parsed to extract the contextEngineID, the
  1763.       contextName and the PDU.  If any parse error occurs, then the
  1764.       snmpInASNParseErrs counter [RFC1907] is incremented, the security
  1765.       state information is discarded, the message is discarded without
  1766.       further processing, and a FAILURE result is returned. SNMPv3
  1767.       Message Processing is complete.
  1768.  
  1769.    8) The pduVersion is set to an SNMPv2-PDU.
  1770.  
  1771.    9) The pduType is determined, in an implementation-dependent manner,
  1772.       to be:
  1773.  
  1774.                - a GetRequest-PDU,
  1775.                - a GetNextRequest-PDU,
  1776.                - a GetBulkRequest-PDU,
  1777.                - a SetRequest-PDU,
  1778.                - an InformRequest-PDU,
  1779.                - an SNMPv2-Trap-PDU,
  1780.                - a Response-PDU, or
  1781.                - a Report-PDU.
  1782.  
  1783.    10) If the pduType is a Response-PDU or Report-PDU, then
  1784.  
  1785.        a) The value of the msgID component is used to find the cached
  1786.           information for a corresponding outstanding Request message.
  1787.           If no such outstanding Request message is found, then the
  1788.           security state information is discarded, the message is
  1789.           discarded without further processing, and a FAILURE result is
  1790.           returned. SNMPv3 Message Processing is complete.
  1791.  
  1792.  
  1793.  
  1794. Case, et. al.               Standards Track                    [Page 32]
  1795.  
  1796. RFC 2272               SNMPv3 Management Protocol           January 1998
  1797.  
  1798.  
  1799.        b) sendPduHandle is retrieved from the cached information.
  1800.  
  1801.        Otherwise, sendPduHandle is set to <none>, an implementation
  1802.        defined value.
  1803.  
  1804.    11) If the pduType is a Report-PDU, then
  1805.  
  1806.        a) statusInformation is created using the contents of the
  1807.           Report-PDU, in an implementation-dependent manner. This
  1808.           statusInformation will be forwarded to the application
  1809.           associated with the sendPduHandle.
  1810.  
  1811.        b) Any cached information about the outstanding Request message
  1812.           message is discarded.
  1813.  
  1814.        c) The security state information for this incoming message is
  1815.           discarded.
  1816.  
  1817.        d) stateReference is set to <none>
  1818.  
  1819.        e) A SUCCESS result is returned. SNMPv3 Message Processing is
  1820.            complete.
  1821.  
  1822.    12) If the pduType is a Response-PDU, then
  1823.  
  1824.        a) The cached data for the outstanding request, referred to by
  1825.           stateReference, is retrieved, including
  1826.  
  1827.                        - snmpEngineID
  1828.                        - securityModel
  1829.                        - securityName
  1830.                        - securityLevel
  1831.                        - contextEngineID
  1832.                        - contextName
  1833.  
  1834.        b) If the values extracted from the incoming message differ from
  1835.           the cached data, then the security state information is
  1836.           discarded, any cached information about the outstanding
  1837.           Request message is discarded, the incoming message is
  1838.           discarded without further processing, and a FAILURE result is
  1839.           returned.  SNMPv3 Message Processing is complete.
  1840.  
  1841.        c) Otherwise, any cached information about the outstanding
  1842.           Request message is discarded, and stateReference is set to
  1843.           <none>.
  1844.  
  1845.        d) A SUCCESS result is returned. SNMPv3 Message Processing is
  1846.           complete.
  1847.  
  1848.  
  1849.  
  1850. Case, et. al.               Standards Track                    [Page 33]
  1851.  
  1852. RFC 2272               SNMPv3 Management Protocol           January 1998
  1853.  
  1854.  
  1855.    13) If the pduType is a GetRequest-PDU, GetNextRequest-PDU,
  1856.        GetBulkRequest-PDU, SetRequest-PDU, or InformRequest-PDU, then
  1857.  
  1858.        a) If the value of securityEngineID is not equal to the value of
  1859.           snmpEngineID, then the security state information is
  1860.           discarded, any cached information about the outstanding
  1861.           Request message is discarded, the incoming message is
  1862.           discarded without further processing, and a FAILURE result is
  1863.           returned.  SNMPv3 Message Processing is complete.
  1864.  
  1865.        b) Information about the message is cached and a stateReference
  1866.           is created (implementation-specific).  Information to be
  1867.           cached includes the values of:
  1868.  
  1869.                         msgVersion,
  1870.                         msgID,
  1871.                         securityLevel,
  1872.                         msgFlags,
  1873.                         msgMaxSize,
  1874.                         securityModel,
  1875.                         maxSizeResponseScopedPDU,
  1876.                         securityStateReference
  1877.  
  1878.        c) A SUCCESS result is returned. SNMPv3 Message Processing is
  1879.           complete.
  1880.  
  1881.    14) If the pduType is an SNMPv2-Trap-PDU, then A SUCCESS result is
  1882.        returned. SNMPv3 Message Processing is complete.
  1883.  
  1884. 8.  Intellectual Property
  1885.  
  1886.    The IETF takes no position regarding the validity or scope of any
  1887.    intellectual property or other rights that might be claimed to
  1888.    pertain to the implementation or use of the technology described in
  1889.    this document or the extent to which any license under such rights
  1890.    might or might not be available; neither does it represent that it
  1891.    has made any effort to identify any such rights.  Information on the
  1892.    IETF's procedures with respect to rights in standards-track and
  1893.    standards-related documentation can be found in BCP-11.  Copies of
  1894.    claims of rights made available for publication and any assurances of
  1895.    licenses to be made available, or the result of an attempt made to
  1896.    obtain a general license or permission for the use of such
  1897.    proprietary rights by implementors or users of this specification can
  1898.    be obtained from the IETF Secretariat.
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Case, et. al.               Standards Track                    [Page 34]
  1907.  
  1908. RFC 2272               SNMPv3 Management Protocol           January 1998
  1909.  
  1910.  
  1911.    The IETF invites any interested party to bring to its attention any
  1912.    copyrights, patents or patent applications, or other proprietary
  1913.    rights which may cover technology that may be required to practice
  1914.    this standard.  Please address the information to the IETF Executive
  1915.    Director.
  1916.  
  1917. 9.  Acknowledgements
  1918.  
  1919.    This document is the result of the efforts of the SNMPv3 Working
  1920.    Group.  Some special thanks are in order to the following SNMPv3 WG
  1921.    members:
  1922.  
  1923.       Dave Battle (SNMP Research, Inc.)
  1924.       Uri Blumenthal (IBM T.J. Watson Research Center)
  1925.       Jeff Case (SNMP Research, Inc.)
  1926.       John Curran (BBN)
  1927.       T. Max Devlin (Hi-TECH Connections)
  1928.       John Flick (Hewlett Packard)
  1929.       David Harrington (Cabletron Systems Inc.)
  1930.       N.C. Hien (IBM T.J. Watson Research Center)
  1931.       Dave Levi (SNMP Research, Inc.)
  1932.       Louis A Mamakos (UUNET Technologies Inc.)
  1933.       Paul Meyer (Secure Computing Corporation)
  1934.       Keith McCloghrie (Cisco Systems)
  1935.       Russ Mundy (Trusted Information Systems, Inc.)
  1936.       Bob Natale (ACE*COMM Corporation)
  1937.       Mike O'Dell (UUNET Technologies Inc.)
  1938.       Dave Perkins (DeskTalk)
  1939.       Peter Polkinghorne (Brunel University)
  1940.       Randy Presuhn (BMC Software, Inc.)
  1941.       David Reid (SNMP Research, Inc.)
  1942.       Shawn Routhier (Epilogue)
  1943.       Juergen Schoenwaelder (TU Braunschweig)
  1944.       Bob Stewart (Cisco Systems)
  1945.       Bert Wijnen (IBM T.J. Watson Research Center)
  1946.  
  1947.    The document is based on recommendations of the IETF Security and
  1948.    Administrative Framework Evolution for SNMP Advisory Team.  Members
  1949.    of that Advisory Team were:
  1950.  
  1951.       David Harrington (Cabletron Systems Inc.)
  1952.       Jeff Johnson (Cisco Systems)
  1953.       David Levi (SNMP Research Inc.)
  1954.       John Linn (Openvision)
  1955.       Russ Mundy (Trusted Information Systems) chair
  1956.       Shawn Routhier (Epilogue)
  1957.       Glenn Waters (Nortel)
  1958.       Bert Wijnen (IBM T. J. Watson Research Center)
  1959.  
  1960.  
  1961.  
  1962. Case, et. al.               Standards Track                    [Page 35]
  1963.  
  1964. RFC 2272               SNMPv3 Management Protocol           January 1998
  1965.  
  1966.  
  1967.    As recommended by the Advisory Team and the SNMPv3 Working Group
  1968.    Charter, the design incorporates as much as practical from previous
  1969.    RFCs and drafts. As a result, special thanks are due to the authors
  1970.    of previous designs known as SNMPv2u and SNMPv2*:
  1971.  
  1972.    Jeff Case (SNMP Research, Inc.)
  1973.    David Harrington (Cabletron Systems Inc.)
  1974.    David Levi (SNMP Research, Inc.)
  1975.    Keith McCloghrie (Cisco Systems)
  1976.    Brian O'Keefe (Hewlett Packard)
  1977.    Marshall T. Rose (Dover Beach Consulting)
  1978.    Jon Saperia (BGS Systems Inc.)
  1979.    Steve Waldbusser (International Network Services)
  1980.    Glenn W. Waters (Bell-Northern Research Ltd.)
  1981.  
  1982. 10.  Security Considerations
  1983.  
  1984.    The Dispatcher coordinates the processing of messages to provide a
  1985.    level of security for management messages and to direct the SNMP PDUs
  1986.    to the proper SNMP application(s).
  1987.  
  1988.    A Message Processing Model, and in particular the V3MP defined in
  1989.    this document, interacts as part of the Message Processing with
  1990.    Security Models in the Security Subsystem via the abstract service
  1991.    interface primitives defined in [RFC2271] and elaborated above.
  1992.  
  1993.    The level of security actually provided is primarily determined by
  1994.    the specific Security Model implementation(s) and the specific SNMP
  1995.    application implementation(s) incorporated into this framework.
  1996.    Applications have access to data which is not secured. Applications
  1997.    should take reasonable steps to protect the data from disclosure, and
  1998.    when they send data across the network, they should obey the
  1999.    securityLevel and call upon the services of an Access Control Model
  2000.    as they apply access control.
  2001.  
  2002.    The values for the msgID element used in communication between SNMP
  2003.    entities must be chosen to avoid replay attacks.  The values do not
  2004.    need to be unpredictable; it is sufficient that they not repeat.
  2005.  
  2006. 11.  References
  2007.  
  2008.    [RFC1901] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2009.       "Introduction to Community-based SNMPv2",
  2010.       RFC 1901, January 1996.
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018. Case, et. al.               Standards Track                    [Page 36]
  2019.  
  2020. RFC 2272               SNMPv3 Management Protocol           January 1998
  2021.  
  2022.  
  2023.    [RFC1902] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2024.       "Structure of Management Information for
  2025.       Version  2 of the Simple Network Management Protocol (SNMPv2)",
  2026.       RFC 1902, January 1996.
  2027.  
  2028.    [RFC1905] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2029.       "Protocol Operations for Version 2 of the
  2030.       Simple Network Management Protocol (SNMPv2)", RFC 1905, January
  2031.       1996.
  2032.  
  2033.    [RFC1906] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2034.       "Transport Mappings for Version 2 of the
  2035.       Simple Network Management Protocol (SNMPv2)", RFC 1906, January
  2036.       1996.
  2037.  
  2038.    [RFC1907] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2039.       "Management Information Base for Version 2
  2040.       of the Simple Network Management Protocol (SNMPv2)", RFC 1907
  2041.       January 1996.
  2042.  
  2043.    [RFC1908] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2044.       "Coexistence between Version 1 and Version
  2045.       2 of the Internet-standard Network Management Framework", RFC
  2046.       1908, January 1996.
  2047.  
  2048.    [RFC 2028] Hovey, R., and S. Bradner, "The Organizations Involved in
  2049.       the IETF Standards Process", BCP 11, RFC 2028, October 1996.
  2050.  
  2051.    [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  2052.       Requirement Levels", RFC 2119, BCP 14, March 1997.
  2053.  
  2054.    [RFC2271] Harrington, D., Presuhn, R., and B. Wijnen, "An
  2055.       Architecture for describing SNMP Management Frameworks",
  2056.       RFC 2271, January 1998.
  2057.  
  2058.    [RFC2274] Blumenthal, U., and B. Wijnen, "The User-Based
  2059.       Security Model for Version 3 of the Simple Network
  2060.       Management Protocol (SNMPv3)", RFC 2274, January 1998.
  2061.  
  2062.    [RFC2275] Wijnen, B., Presuhn, R., and K. McCloghrie,
  2063.       "View-based Access Control Model for the Simple
  2064.       Network Management Protocol (SNMP)", RFC 2275, January 1998.
  2065.  
  2066.    [RFC2273] Levi, D., Meyer, P., and B. Stewart, "SNMPv3
  2067.       Applications", RFC 2273, January 1998.
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074. Case, et. al.               Standards Track                    [Page 37]
  2075.  
  2076. RFC 2272               SNMPv3 Management Protocol           January 1998
  2077.  
  2078.  
  2079. 12.  Editors' Addresses
  2080.  
  2081.    Jeffrey Case
  2082.    SNMP Research, Inc.
  2083.    3001 Kimberlin Heights Road
  2084.    Knoxville, TN 37920-9716
  2085.    USA
  2086.  
  2087.    Phone:     +1 423-573-1434
  2088.    EMail:     case@snmp.com
  2089.  
  2090.  
  2091.    Dave Harrington
  2092.    Cabletron Systems, Inc
  2093.    Post Office Box 5005
  2094.    Mail Stop: Durham
  2095.    35 Industrial Way
  2096.    Rochester, NH 03867-5005
  2097.    USA
  2098.  
  2099.    Phone:      +1 603-337-7357
  2100.    EMail:      dbh@ctron.com
  2101.  
  2102.  
  2103.    Randy Presuhn
  2104.    BMC Software, Inc.
  2105.    1190 Saratoga Avenue
  2106.    Suite 130
  2107.    San Jose, CA 95129
  2108.    USA
  2109.  
  2110.    Phone:      +1 408-556-0720
  2111.    EMail:      rpresuhn@bmc.com
  2112.  
  2113.  
  2114.    Bert Wijnen
  2115.    IBM T. J. Watson Research
  2116.    Schagen 33
  2117.    3461 GL Linschoten
  2118.    Netherlands
  2119.  
  2120.    Phone:      +31 348-432-794
  2121.    EMail:      wijnen@vnet.ibm.com
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130. Case, et. al.               Standards Track                    [Page 38]
  2131.  
  2132. RFC 2272               SNMPv3 Management Protocol           January 1998
  2133.  
  2134.  
  2135. 13.  Full Copyright Statement
  2136.  
  2137.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  2138.  
  2139.    This document and translations of it may be copied and furnished to
  2140.    others, and derivative works that comment on or otherwise explain it
  2141.    or assist in its implementation may be prepared, copied, published
  2142.    and distributed, in whole or in part, without restriction of any
  2143.    kind, provided that the above copyright notice and this paragraph are
  2144.    included on all such copies and derivative works.  However, this
  2145.    document itself may not be modified in any way, such as by removing
  2146.    the copyright notice or references to the Internet Society or other
  2147.    Internet organizations, except as needed for the purpose of
  2148.    developing Internet standards in which case the procedures for
  2149.    copyrights defined in the Internet Standards process must be
  2150.    followed, or as required to translate it into languages other than
  2151.    English.
  2152.  
  2153.    The limited permissions granted above are perpetual and will not be
  2154.    revoked by the Internet Society or its successors or assigns.
  2155.  
  2156.    This document and the information contained herein is provided on an
  2157.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  2158.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  2159.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  2160.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  2161.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186. Case, et. al.               Standards Track                    [Page 39]
  2187.  
  2188.