Note on SNMP Trap

SNMP trap can be enabled in 2 ways;

– globally with “snmp-server enable trap <trap_name>

– per-host with “snmp-server host <ip_address> trap <trap_name>

I am assuming you know by default that if you issue the 2 commands mentioned above without the trap options for both of them, router will enable all traps and send all trap notifications to the snmp-server.

 

Things to note

snmp trap is enabled (by default) for tty & bgp

Host setting will always override the global config. Host setting implies that only accept notifications from these traps. Hence other traps not enabled will be blocked from that host.

Here is an example;

snmp-server host 192.168.1.100 trap hsrp syslog

The command above implies that the snmp host should only accept hsrp & syslog trap notifications.

– Some traps (e.g snmp linkdown) can only be enabled on global level

– All snmp inform is enabled by default (unlike traps).

– Same inform notification will be sent to snmp host for any trap enabled.

–  If you do not want a particular host to accept notifications from all traps you have enabled, ensure you configure the trap using per-host option with trap set to tty (since tty trap is enabled by default).