cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4417
Views
0
Helpful
3
Replies

automatic shut and no shut interface

bsurace
Beginner
Beginner

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"

1 Accepted Solution

Accepted Solutions

andrew.prince
Advocate
Advocate

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

View solution in original post

3 Replies 3

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

andrew.prince
Advocate
Advocate

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

Thx you men that works !

Getting Started

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: