Connected: An Internet Encyclopedia
RFC 1157 - 4. Protocol Specification

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1157
Prev: 3.2.6.3.6. egpNeighTable Object Type Names
Next: 4.1. Elements of Procedure

### 4. Protocol Specification

The network management protocol is an application protocol by which the variables of an agent's MIB may be inspected or altered.

Communication among protocol entities is accomplished by the exchange of messages, each of which is entirely and independently represented within a single UDP datagram using the basic encoding rules of ASN.1 (as discussed in Section 3.2.2). A message consists of a version identifier, an SNMP community name, and a protocol data unit (PDU). A protocol entity receives messages at UDP port 161 on the host with which it is associated for all messages except for those which report traps (i.e., all messages except those which contain the Trap-PDU). Messages which report traps should be received on UDP port 162 for further processing. An implementation of this protocol need not accept messages whose length exceeds 484 octets. However, it is recommended that implementations support larger datagrams whenever feasible.

It is mandatory that all implementations of the SNMP support the five PDUs: GetRequest-PDU, GetNextRequest-PDU, GetResponse-PDU, SetRequest-PDU, and Trap-PDU.

        RFC1157-SNMP DEFINITIONS ::= BEGIN

         IMPORTS
              ObjectName, ObjectSyntax, NetworkAddress, IpAddress, TimeTicks
                      FROM RFC1155-SMI;

         -- top-level message

                 Message ::=
                         SEQUENCE {
                              version        -- version-1 for this RFC
                                 INTEGER {
                                     version-1(0)
                                 },

                             community      -- community name
                                 OCTET STRING,

                             data           -- e.g., PDUs if trivial
                                 ANY        -- authentication is being used
                         }

         -- protocol data units

                 PDUs ::=
                         CHOICE {
                             get-request
                                 GetRequest-PDU,

                             get-next-request
                                 GetNextRequest-PDU,

                             get-response
                                 GetResponse-PDU,

                             set-request
                                 SetRequest-PDU,

                             trap
                                 Trap-PDU
                              }

         -- the individual PDUs and commonly used
         -- data types will be defined later

         END

4.1. Elements of Procedure

4.1.1. Common Constructs
4.1.2. The GetRequest-PDU
4.1.3. The GetNextRequest-PDU

4.1.3.1. Example of Table Traversal

4.1.4. The GetResponse-PDU
4.1.5. The SetRequest-PDU
4.1.6. The Trap-PDU

4.1.6.1. The coldStart Trap
4.1.6.2. The warmStart Trap
4.1.6.3. The linkDown Trap
4.1.6.4. The linkUp Trap
4.1.6.5. The authenticationFailure Trap
4.1.6.6. The egpNeighborLoss Trap
4.1.6.7. The enterpriseSpecific Trap

Next: 4.1. Elements of Procedure

Connected: An Internet Encyclopedia
RFC 1157 - 4. Protocol Specification