Device(config)# snmp-server host 172.20.2.160 comaccess
Device(config)# access-list 10 deny any
This example shows how to send the SNMP traps to the host specified by the name myhost.cisco.com. The
community string is defined as comaccess:
Device(config)# snmp-server enable traps
Device(config)# snmp-server host myhost.cisco.com comaccess snmp
This example shows how to enable the device to send all traps to the host myhost.cisco.com by using the
community string public:
Device(config)# snmp-server enable traps
Device(config)# snmp-server host myhost.cisco.com public
You can verify your settings by entering the show running-config privileged EXEC command.
Related Commands
DescriptionCommand
Enables the device to send SNMP notifications for various traps or
inform requests to the NMS.
snmp-server enable traps
Command Reference, Cisco IOS XE Everest 16.5.1a (Catalyst 3650 Switches)
564
snmp-server host