03-22-2013 06:53 AM
Hello everybody,
I am referring to an existing post which covers exactly my need: https://supportforums.cisco.com/thread/345889
The solution was the following:
track 100 rtr 99 reachability
delay down 10 up 60
! consider it "down" if down for 10 secs, consider it "up" if up for 60 secs
ip sla 99
icmp-echo 10.x.x.x source-interface s0/0/0
frequency 10
ip sla schedule 99 life forever start-time now
!
event manager environment _interface_to_shut fa0/0/0
event manager applet shut_some_interfaceevent track 151 state down
action 1 cli command "conf t"
action 2 cli command "interface $_interface_to_shut"
action 2 cli command "shut"
action 3 cli command "end"
action 4 syslog priority errors msg "10.x.x.x unpingable; shutting down $_interface_to_shut"
!
I am using a Catalyst 3750 with IOS Services 12.2(55)SE and I have small problem using a command which doesn't exist on my version:
The "event track" command doesn't exist... By the way why is it followed by 151 in the example?
I guess I should be using an other command, maybe "event ipsla"? but I don't know how to use it well. Do I still need to use IP SLA?
Thanks in advance!
Cheers
Solved! Go to Solution.
03-23-2013 11:15 PM
The track ED isn't available on all platforms. However, you can get around that by using syslog instead. In this case (assuming track 100 is your ID) this should work:
event syslog pattern "100 ip sla 99 reachability Up->Down"
03-23-2013 06:44 PM
Dear Jacques, Your information is right and it will work. But i have one query. Most of the IOS "event track 151 state down" command will not work. Whats the solution for this without changing the IOS.
Also is any commands to hold on for 30min when the primary link is came down. So during the 30min, the link performance
should be checked in every minute. Is it possible ?
03-23-2013 11:19 PM
If the primary link goes down, you would likely want to fail over immediately. IP SLA will constantly check the main link, so you don't need a 30 minute hold down there. We typically see people using larger hold downs when the main link comes back up. If you need to wait longer than three minutes, then consider having the "up" applet configure another countdown applet that counts down the number of sconds corresponding to your desired hold down. If the link goes back down, have your "down" applet remove the third countdown applet. If the countdown applet is allowed to hit zero, then it will perform the fail back to the main link.
03-23-2013 11:15 PM
The track ED isn't available on all platforms. However, you can get around that by using syslog instead. In this case (assuming track 100 is your ID) this should work:
event syslog pattern "100 ip sla 99 reachability Up->Down"
03-28-2013 12:50 AM
Hello Joseph,
Yes you're right. It took me some time to realize the slight differences that can exist between the different IOS platforms. The documentation isn't very explicit about that
As you wrote, the track ED is not available on my C3750. I had to track the Syslog message generated by the SLA which works fine. The only drawback I see is that it needs a "way back" in order to work again : Since the applet is called when the Syslog message is generated (Up -> Down), it also needs a "Down->Up" message in order to be fired again. The trick is to use a correct delay because if the time between two failures ( Down, Up and Down again) is less than the delay, the applet won't be fired the second time! I don't know if I made myself clear but there is an "inertia" with this solution that the track ED doesn't have.
By the way, do you have any example on how to write such a "countdown applet" you're referring to in your response to
Anishkumar?
Thanks again!
03-28-2013 07:51 AM
Something like this:
event manager environment q “
event manager applet track_up
event track 1 state down
action 1.0 cli command “enable”
action 2.0 cli command “config t”
action 3.0 cli command “event manager applet track_timer”
action 3.1 cli command “event timer countdown time 300”
action 3.2 cli command “action 1.0 cli command enable”
action 3.3 cli command “action 2.0 cli command $q config t$q”
action 3.4 cli command “action 3.0 cli command $q int tun0$q”
action 3.5 cli command “action 4.0 cli command shut”
action 3.6 cli command “action 5.0 cli command $q no event manager applet track_timer$q”
action 3.7 cli command “action 6.0 cli command end”
action 3.8 cli command “end”
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