Networking / Beginners

Requests, Responses, and Notifications

SNMP is a client-server protocol. Management agents connect to the managed devices and issue requests. Managed devices return responses.

The basic requests are very simple. They are GET and SET to read and write to an individual MIB object identified by its OID and, if the object is in a table, by the appropriate index values. Index objects are read and write protected-there is no need to specifically read an index because it is always supplied in a GET request and returned in a GET response to give context to the read request, and clearly it would be a bad idea to allow the index of a row to be changed dynamically. Some MIB modules also make some of their objects read-only so that the device may report information (such as statistics) without it being modifiable by an external component. Other than these restrictions, however, GET and SET are quite straightforward in their operation.

However, it would be hugely inefficient to manage the configuration of a remote device one object at a time, so SNMP allows multiple objects within a single MIB row to be read or written in a single request. That is, a single GET or SET command can operate on multiple objects within a single row. Further, the GET-BULK command allows a management station to read multiple rows from a table, improving the retrieval time when an entire table is being read. Similarly, the GET-NEXT request allows a management agent to "walk" the OID tree to find the next object in a MIB row, or more usually to navigate a MIB table (which may be sparsely populated) reading one row at a time.

Row creation and deletion are special functions that are handled using the SET command and not through their own special messages. MIB rows contain a special writable object called the row status that is used to control the creation and deletion of the row. When a management station creates a row for the first time, it writes the value create to the row status object-if the row already exists, the operation will be failed by the managed device. If the row creation was successful, the management status goes on to write the other objects, and when the row is ready for use, it sets the row status to active. At this point, the configuration information is available and the device or component can be activated.

At any time the management station can move the row back into the not ready state by writing that value into the row status object. This effectively takes the row back into the state it was in as it was being created. To delete the row, the row status is set to the value deleted and the managed device must stop the corresponding process or device and delete the corresponding information.

A final SNMP message called a TRAP (sometimes known as a notification) may be issued by the managed device to report a specific event (e.g., the crossing of a threshold).

[Previous] [Contents] [Next]