Previous | Table of Contents | Next |
The key difference between the GetRequest and the GetNextRequest PDUs is the word lexicographical. That means that the GetNextRequest retrieves the value of the next object within the agents MIB View. Section 4.4.2 provides an example.
Three error conditions are possible:
The manager uses the SetRequest PDU to assign a value to an object residing in the agent. As you can see in Figure 4-9, to generate that PDU the manager assigns PDU Type = 3, specifies a locally defined Request ID, and sets both the ErrorStatus and ErrorIndex to 0. A VarBindList, containing the specified variables and their corresponding values, completes the PDU. When the agent receives the SetRequest PDU, it alters the values of the named objects to the values in the variable binding. Under error-free conditions, the agent generates a GetResponse PDU of identical form, except that the assigned PDU Type = 2, Error Status = noError, and Error Index = 0
Four error conditions are possible:
The Trap PDU has a format distinct from the four other SNMP PDUs, as you can see in Figure 4-10. The first field indicates the Trap PDU and contains PDU Type = 4. The Enterprise field identifies the management enterprise under whose registration authority the trap was defined. For example, the OID prefix {1.3.6.1.4.1.110} would identify Network General Corp. as the Enterprise sending a trap. The Agent Address field, which contains the IP address of the agent, provides further identification. If a non-IP transport protocol is used, the value 0.0.0.0 is returned.
The Generic Trap type provides more specific information on the event being reported. There are seven defined values (enumerated INTEGER types) for this field:
Trap | Value | Meaning | |
---|---|---|---|
coldStart | 0 | The sending protocol entity (higher-layer network management) has reinitialized, indicating that the agents configuration or entity implementation may be altered. | |
warmStart | 1 | The sending protocol has reinitialized, but neither the agents configuration nor the protocol entity implementation has been altered. | |
linkDown | 2 | A communication link has failed. The affected interface is identified as the first element within the Variable Bindings field: name and value of the ifIndex instance. | |
linkUp | 3 | A communication link has come up. The affected interface is identified as the first element within the Variable Bindings field: name and value of the ifIndex instance. | |
authenticationFailure | 4 | The agent has received an improperly authenticated SNMP message from the manager; that is, the community name was incorrect. | |
egpNeighborLoss | 5 | An EGP peer neighbor is down. | |
enterpriseSpecific | 6 | A nongeneric trap has occurred, which is further identified by the Specific Trap Type field and Enterprise field. | |
Two additional fields complete the Trap PDU. The Timestamp field contains the value of the sysUpTime object, representing the amount of time elapsed between the last (re-)initialization of the agent and the generation of that Trap. The last field contains the Variable Bindings.
The agent uses the Trap PDU to alert the manager that a predefined event has occurred. To generate the Trap PDU, the agent assigns PDU Type = 4 and fills in the Enterprise, Agent Address, Generic Trap, Specific Trap Type, and Timestamp fields, as well as the Variable Bindings list.
By definition (and convention), Traps are application specific. Therefore, it would be difficult to cover the range of uses for this PDU. RFC 1215, A Convention for Defining Traps for Use with the SNMP, offers some guidelines for their use [4-5]. Figure 4-11 illustrates how an agent in a router could use a Trap to communicate a significant event to the manager. Section 4.4.4 provides an example of a real-world application.
Recall from our discussion in Chapter 2 that the SNMP PDUs are encoded using the context-specific class, with a tag that identifies the PDU (review Figure 2-15). The Length and Value fields are then constructed to convey a particular structure and quantity of information. Now that we have discussed the structure of the SNMP PDUs, we can revisit these encodings in more detail.
Previous | Table of Contents | Next |