|
|
SNMP is a simple protocol with four basic operations: get, getnext, set, and trap. Each operation is encoded in a separate Protocol Data Unit (PDU). An additional PDU (getResponse) is defined for replying to get, getnext, and set operations. The PDUs are carried across a network in User Datagram Protocol (UDP) datagrams over IP. SNMP usually uses UDP ports 161 and 162.
Although using an unreliable protocol such as UDP may initially seem counter intuitive, it has definite advantages. For example, sending UDP packets over an unreliable network is faster than establishing a TCP connection. This is because SNMP requires only one packet for the request and a second one for the response. On the other hand, all TCP implementations require three packets just to establish a connection.