06-28-2011 01:27 AM - edited 03-04-2019 12:49 PM
Hi everybody,
I need help to find my mistake. I have a cisco 1811 with 2 isp. i want to shut down an interface when a IP is not responding anymore and to “no shut” when the ip is back online.
Here what I make:
the interface go shut when 85.14.47.40 not respond but never came up when 85.14.47.40 is back online.
Sorry for my bad English and thanks fo the help.
=====================================================
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 85.14.47.40 source-interface vlan1
frequency 10
ip sla schedule 99 life forever start-time now
!
event manager environment trackcolt FastEthernet1
event manager applet noshutFastEthernet1
event track 100 state up
action 1 cli command "en"
action 2 cli command "conf t"
action 3 cli command "interface FastEthernet1"
action 4 cli command "no shut"
action 5 cli command "end"
event manager applet shutFastEthernet1
event track 100 state down
action 1 cli command "en"
action 2 cli command "conf t"
action 3 cli command "interface FastEthernet1"
action 4 cli command "shut"
action 5 cli command "end"
Solved! Go to Solution.
07-05-2011 12:52 AM
I find using the syslog messages much more reliable.
event manager applet close-FastEthernet1
event syslog pattern "%TRACKING-5-STATE: 1 rtr 1 reachability Up->Down"
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 1.2 cli command "interface FastEthernet1"
action 1.3 cli command "shut"
action 1.4 cli command "end"
exit
event manager applet open-FastEthernet1
event syslog pattern "%TRACKING-5-STATE: 1 rtr 1 reachability Down->Up"
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 1.2 cli command "interface FastEthernet1"
action 1.3 cli command "no shut"
action 1.4 cli command "end"
exit
ip sla 1
icmp-echo 85.14.47.40
request-data-size 500
timeout 2999
frequency 3
ip sla schedule 1 start-time now recurring
track 1 rtr 1 reachability
delay down 10 up 60
07-05-2011 12:02 AM
Hi,
Having few questions here?
Why do you want to shut/ushut the interface specifically?
Are you using both isp connections in load balancing mode or primary/backup mode?
if bgp is used between your company and ISP then no need of IP SLA, bgp will do fall back. If you use static route to connect the ISP then apply the ip sla in the static route for the fall back to work incase primary link goes down.
ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name] [permanent | track number] [tag tag]
HTH
bava
07-05-2011 12:52 AM
I find using the syslog messages much more reliable.
event manager applet close-FastEthernet1
event syslog pattern "%TRACKING-5-STATE: 1 rtr 1 reachability Up->Down"
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 1.2 cli command "interface FastEthernet1"
action 1.3 cli command "shut"
action 1.4 cli command "end"
exit
event manager applet open-FastEthernet1
event syslog pattern "%TRACKING-5-STATE: 1 rtr 1 reachability Down->Up"
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 1.2 cli command "interface FastEthernet1"
action 1.3 cli command "no shut"
action 1.4 cli command "end"
exit
ip sla 1
icmp-echo 85.14.47.40
request-data-size 500
timeout 2999
frequency 3
ip sla schedule 1 start-time now recurring
track 1 rtr 1 reachability
delay down 10 up 60
07-13-2011 06:39 AM
Thx you men that works !
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