05-31-2015 12:59 PM - edited 03-05-2019 01:34 AM
Good morning.
I need help on a task involving ARP.
I have a remote branch with two WAN connections:
- private network to the corporate Headquarters (MPLS, VPLS)
- local internet connection
The remote branch mainly use the internet through the local access, and I have managed to use the MPLS link as a backup internet connection using IP SLA.
When the primary internet link fails, the router route the traffic through the corporate link, and when the primary internet link comes back alive, the router fails-back on it.
Everything works fine, I can see the track going UP/Down and the routing table to change but... traffic flow doesn't change according the routing until I issue the command clear arp-cache.
Particularly in the fail-back operation.
And this behavior also has a lot of sense to me.
I also thought to dramatically reduce the arp cache refresh interval but...
... Is there a way to instruct the router to issue a clear arp-cache command after the route change?
Many thanks for your kind help
Regards
Solved! Go to Solution.
05-31-2015 02:10 PM
You could use an EEM script to trigger on your SLA UP / DOWN.
e.g.
track 1 ip sla 1 reachability
!
event manager applet TRACK-1
event track 1 state down
action 0.1 cli command "enable"
action 0.2 cli command "clear arp-cache"
event track 1 state up
action 0.1 cli command "enable"
action 0.2 cli command "clear arp-cache"
05-31-2015 02:10 PM
You could use an EEM script to trigger on your SLA UP / DOWN.
e.g.
track 1 ip sla 1 reachability
!
event manager applet TRACK-1
event track 1 state down
action 0.1 cli command "enable"
action 0.2 cli command "clear arp-cache"
event track 1 state up
action 0.1 cli command "enable"
action 0.2 cli command "clear arp-cache"
05-31-2015 03:05 PM
It works great!
I didn't know much about EEM scripting, I've never encountered it in any of the (more then a few) books I have read till here.
Thank you very much, I will start studying this topic.
Many many thanks for your precious help
regards
PS
Just for note
I didn't find the option to trigger on a track event.
Maybe It is because I tryed this on an old version IOS under GNS3 or for my poor experience on this topic.
Also the commands seemed a little different.
No matter, I trigger on the syslog pattern " %TRACKING-5-STATE: 10 rtr 10 reachability" (the same for up and down) and every works fine.
SW-GER-CORE#sh event manager history events
No. Time of Event Event Type Name
1 Fri Mar 1 00:11:11 2002 syslog applet: ClearARP
2 Fri Mar 1 00:15:06 2002 syslog applet: ClearARP
3 Fri Mar 1 00:19:11 2002 syslog applet: ClearARP
4 Fri Mar 1 00:23:06 2002 syslog applet: ClearARP
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: