SNMP traps are unreliable because the receiver does not send acknowledgments when it receives traps. The sender does not
know if the traps were received. However, an SNMP entity that receives an inform acknowledges the message with an SNMP response
PDU. If the sender never receives the response, the inform can be sent again. Thus, informs are more likely to reach their
intended destination.
Compared to traps, informs consume more resources in the agent and in the network. Unlike a trap, which is discarded as soon
as it is sent, an inform must be held in memory until a response is received or the request times out. Also, traps are sent
only once; an inform may be sent several times. The retries increase traffic and overhead on the network.
If you do not enter a
snmp-server
host command, no notifications are sent. To configure the device to send SNMP notifications, you must enter at least one
snmp-server
host command. If you enter the command without keywords, all trap types are enabled for the host.
To enable multiple hosts, you must issue a separate
snmp-server
host command for each host. You can specify multiple notification types in the command for each host.
When multiple
snmp-server
host commands are given for the same host and type of notification, each succeeding command overwrites the previous command. Only
the last
snmp-server
host command will be in effect. For example, if you enter an
snmp-server
host
inform command for a host and then enter another
snmp-server
host
inform command for the same host, the second command replaces the first.
The
snmp-server
host command is used in conjunction with the
snmp-server
enable command. Use the
snmp-server
enable command to specify which SNMP notifications are sent globally. For a host to receive most notifications, at least one
snmp-server
enable command and the
snmp-server
host command for that host must be enabled.
Some notification types cannot be controlled with the
snmp-server
enable command. For example, some notification types are always enabled and others are enabled by a different command. For example,
the linkUpDown notifications are controlled by the
snmp
trap
link-status command. These notification types do not require an
snmp-server
enable command.
A
notification-type option’s availability depends on the device type and the Cisco IOS software features supported on the device. For example,
the envmon notification type is available only if the environmental monitor is part of the system. To see what notification
types are available on your system, use the command help (?) at the end of the
snmp-server
host command.
Perform this task to configure the recipient of an SNMP trap operation.