10-03-2019 08:14 AM
Hi Everybody,
i configured backup internet channel with classic SLA commands, like that:
ip sla 10
icmp-echo 8.8.8.8 source-ip X.X.X.X
ip sla schedule 10 life forever start-time now
track 10 ip sla 10 reachability
ip route 0.0.0.0 0.0.0.0 100.100.100.1 track 10
ip route 0.0.0.0 0.0.0.0 Cellular0/1/0 150
everything works fine, but... if channel flapping (ISP gate not available just short time period), this configuration doesnt work... is it possible to configure switching to second channel immediate (when loose 8.8.8.8), but switching back with timeout about 10-15 min?
thanks
10-03-2019 09:35 AM
Hello,
you could use the EEM script and applets below. The second one will run after a delay of 15 minutes. The script also clears the NAT translations in case of failover.
The primary interface assumed is GigabitEthernet0. If that doesn't match your real primary interface, change that accordingly.
event manager applet PRIMARY_DOWN
event track 1 state down
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "interface GigabitEthernet0"
action 4.0 cli command "shut"
action 5.0 cli command "exit"
action 6.0 cli command "interface Cellular0/1/0"
action 7.0 cli command "no shut"
action 5.0 cli command "end"
action 6.0 cli command "clear ip nat translation *"
!
event manager applet PRIMARY_UP
event track 1 state up
event timer countdown time 900
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 6.0 cli command "interface Cellular0/1/0"
action 7.0 cli command "shut"
action 5.0 cli command "exit"
action 3.0 cli command "interface GigabitEthernet0"
action 4.0 cli command "no shut"
action 5.0 cli command "end"
action 6.0 cli command "clear ip nat translation *"
10-03-2019 09:37 AM
Thank you Georg!
never worked before with scripts, but looks like its good time for start :)
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