Description
Enables the sending of Simple Network Management Protocol (SNMP) traps to a specified IPv4 or IPv6 address. You can specify any number of trap “sinks” (one per command).
Note
This command enables system notifications. Use the fenotify snmp command to enable alert notifications.
Use the no form of this command to disable the sending of SNMP traps.
Syntax
[no] snmp-server host ip_address disable
[no] snmp-server host ip_address traps {community_string | port <port> [community_string] | version <version_number> [community_string]}
Parameters
ip_address
IP address where SNMP traps are sent.
disable
Disables the sending of SNMP traps to the specified address.
community_string
Community string needed to send traps to the specified address (default is “public”).
traps
Enables the sending of SNMP traps to the specified address.
port <port>
Overrides the default target port to which traps are sent.
version <version_number
SNMP version of the generated traps (1, 2c, or 3)
Example
The following example enables SNMP version 1 traps to be sent to the specified address using the private community string.
hostname (config) # snmp-server host 10.0.0.2 traps version 1 private