03-06-2013 06:31 PM - edited 03-07-2019 12:06 PM
Guys,
Would like to ask whats the correct snmp config so that it will send to our snmp server when a mac flapping occurs on a cisco switch specifically 4507 switches..
thanks...
Solved! Go to Solution.
03-07-2013 03:55 AM
Hi Mark,
you could enable:
snmp-server enable traps syslog
which sends an additional SNMP-Trap when Syslog-Messages occur.
With an Embedded Event Manager (EEM) Applet you can create a more selective solution.
Here a simple example for the %CDP-4-DUPLEX_MISMATCH message (adapting it for the MAC-Flapping Msg should be a piece of cake):
event manager applet SYSLOG-2-TRAP
event syslog pattern "duplex mismatch"
action 1.0 snmp-trap strdata "Duplex Mismatch!!!"
!
snmp-server enable traps event-manager
The result is attached as a Wireshark capture.
Hope that helps
Rolf
03-06-2013 09:20 PM
Hi Mark,
check the below link:
snmp-server trap mac-notification | Enables the SNMP trap notification on a LAN port when MAC addresses are added to or removed from the address table. |
http://www.cisco.com/en/US/docs/ios/lanswitch/command/reference/lsw_m1.html#wp1012686
HTH
Regards
Inayath
*Plz rate the usefull posts.
03-06-2013 09:35 PM
Dear InayathUlla,
Thanks for your quick response. However, i need an alert when a host flapping occur (ex. duplicate Mac address between 2 ports). As off now, the alerts are generated in the syslog of the switch, what i need is to send an alert to snmp server when this happens...
03-06-2013 10:43 PM
HI Mark,
Please find the configuration which can help you to trigger the trap for mac move:-
CONFIG:
snmp-server enable traps MAC-Notification move threshold
(config)# mac address-table notification threshold
(config)# mac address-table notification threshold interval 120
(config)# mac address-table notification threshold limit 5
NOTE Mac limit 5 it's not an integer of 5 MAC moves, but percentage of moves (5%
movement in our case).
Check the status of the smae under the threshold defined/enabled:
#show mac-address-table notification threshold
Status limit Interval
-------------+-----------+-------------
disabled 50 120
HTH
Regards
Inayath
*Plz rate the usefull posts.
03-07-2013 03:55 AM
Hi Mark,
you could enable:
snmp-server enable traps syslog
which sends an additional SNMP-Trap when Syslog-Messages occur.
With an Embedded Event Manager (EEM) Applet you can create a more selective solution.
Here a simple example for the %CDP-4-DUPLEX_MISMATCH message (adapting it for the MAC-Flapping Msg should be a piece of cake):
event manager applet SYSLOG-2-TRAP
event syslog pattern "duplex mismatch"
action 1.0 snmp-trap strdata "Duplex Mismatch!!!"
!
snmp-server enable traps event-manager
The result is attached as a Wireshark capture.
Hope that helps
Rolf
03-07-2013 05:07 AM
Hi fischer..
I maybe able to do this on our server switch.. thanks for your input..
03-07-2013 05:32 AM
Hi Mark,
your're welcome.
I maybe able to do this on our server switch.. thanks for your input..
If such syslog messages appear on your server switches as well, it should work.
I assume, the messages look like this:
%SW_MATM-4-MACFLAP_NOTIF: Host xxxx.xxxx.xxxx in vlan x is flapping between port x and port x
So you could use "is flapping between" as pattern.
Good luck,
Rolf
02-07-2020 01:20 AM
Hi Inayath,
if we want to display notification mac-flap switch by snmp, is it enough if just enabed mac-notification threshold ? or enabled also change and mac-move ?
Thanks,
Regards,
Arif
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide