Send the SNMP traps, Community "Public" to the NMS Server:
(config)#snmp-server host traps [Public | Private]

If you need to define the VERSION and the COMMUNITY STRING:
(config)#snmp-server host traps version 2c cisco

To define RO and RW COMMUNITY:
(config)#snmp-server community TST-RO ro <--- READ ONLY COMMUNITY STRING
(config)#snmp-server community TST-RW rw <--- RE-WRITE COMMUNITY STRING

Specify the TRAPS TYPE:
(config)#snmp-server enable traps [mac-notification | bgp | pim | ...] <--- FIRST ENABLE TRAPS OF A TYPE
(config)#snmp-server host traps version 2c cisco [mac-notification | bgp | pim | ...] <--- SEND TRAPS

When the traps contain MAC Address Add/Remove notifications, have in mind the QUANTITY, so control it with:
(config)#mac address-table notification change history-size 150 <--- LIMIT THE TABLE CAPACITY TO 150
(config)#mac address-table notification change interval 1800 <--- SEND TRAP EVERY 30 MINUTES (1800 seconds)

DO NOT FORGET to ENABLE the CAM notifications in Global Configure mode:
(config)#mac address-table notification change

And to make sure:
#show mac address-table notification change interface Gi3/0/1
MAC Notification Feature is Enabled on the switch
Interface            MAC Added Trap MAC Removed Trap
---------            -------------- ----------------
GigabitEthernet3/0/1 Enabled        Enabled

#show mac address-table notification change
MAC Notification Feature is Enabled on the switch
Interval between Notification Traps : 1800 secs
Number of MAC Addresses Added : 0
Number of MAC Addresses Removed : 0
Number of Notifications sent to NMS : 0
Maximum Number of entries configured in History Table : 150
Current History Table Length : 0
MAC Notification Traps are Enabled
History Table contents

And apply to the interface to GENERATE A TRAP when something happens:
(config-if)#snmp trap mac-notification change added

If you need to configure some deeper changes, or set timers, they are done within each particular COMMAND/TRAP, so;
(config)#mac address-table notification [more options like INTERVAL...]

Most Popular Posts