cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1436
Views
5
Helpful
3
Replies

How to automatic clear dymaic mac address-table when the other end connected to the switch port is turned off?

minluo74939
Level 1
Level 1
3 Replies 3

Hello,

 

a simple EEM script can do that. Check your logs to see what log entry is generated when the port is turned off, this is what you match with 'event syslog pattern'.

 

event manager applet CLEAR_MAC
event syslog pattern "%LINEPROTO-5-UPDOWN: Line protocol on Interface.* changed state to down"
action 1.0 cli command "enable"
action 2.0 cli command "clear mac address-table dynamic"

thk for your response,sir.

i want to find a switch configuration to solve this question, this is so hack to write a script.

Hello,

 

EEM is not a hack, but used very frequently, and specifically for task automation and customization in cases such as yours. It is an integral part of Cisco IOS.