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

EEM Script to add default route once track comes up and remains stable for some time.

mahesh11288
Level 1
Level 1

I have below EEM script INTERNET-LINK-DOWN where event detector is a TRACK 10. When track goes down, script removes the default route. I am using another event INTERNET-LINK-UP to re-add that default route once track comes up. Here i need a help for event INTERNET-LINK-UP so that it will add default route only when track will be up and stable for some time say 30 min.

 

event manager applet INTERNET-LINK-DOWN

event track 10 state down

  action 1.0 cli command "enable"

  action 1.1 cli command "conf t"

  action 1.2 cli command "no ip route 0.0.0.0 0.0.0.0 186.201.76.233 name DEFAULT_EXIT track 10"

  action 1.9 cli command "exit"

 

event manager applet INTERNET-LINK-UP

event track 10 state up

  action 1.0 cli command "enable"

  action 1.1 cli command "conf t"

  action 1.2 cli command "ip route 0.0.0.0 0.0.0.0 186.201.76.233 name DEFAULT_EXIT track 10"

  action 1.9 cli command "exit"

 

0 Replies 0