Simple Network Management Protocol |
Both agents and management systems use SNMP messages to inspect and communicate information about managed objects. SNMP messages are sent via the User Datagram Protocol (UDP). IP is used to route messages between the management system and host.
When SNMP management programs send requests to a network device, the agent program on the device receives the requests and retrieves the requested information from the MIBs. The agent sends the requested information back to the initiating SNMP manager program. An SNMP agent sends information:
To perform these tasks, the management system and agent programs use the following messages:
The basic SNMP request message. Sent by a management system, it requests information about a single MIB entry on an agent — for example, the amount of free drive space.
An extended type of request message that can be used to browse the entire hierarchy of management objects. When it processes a GET-NEXT request for a particular object, the agent returns the identity and value of the object that logically follows the previous information that was sent. The GET-NEXT request is useful mostly for dynamic tables, such as an internal IP route table.
A message that can be used to send and assign an updated MIB value to the agent when write access is permitted.
A request that the data transferred by the agent be as large as possible within the given restraints of message size. This minimizes the number of protocol exchanges required to retrieve a large amount of management information.
Also called a trap message, NOTIFY is an unsolicited message that is sent by an agent to a management system when the agent detects a certain type of event. For example, a trap message might be sent when a system restart occurs. The management system that receives the trap message is referred to as the trap destination.
By default, UDP port 161 is used to listen for SNMP messages and port 162 is used to listen for SNMP traps. You can change these port settings by configuring the local Services file. For more information about how to do this, see "Changing SNMP Port Settings" in this chapter.
The example illustrated in Figure 10.3 shows how management systems and agents communicate information.
Figure 10.3 SNMP Manager and Agent Interaction
The communication process is as follows: