cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
393
Views
5
Helpful
3
Replies

EEM Script for Two Point to Point tunnel

CCIE Aspirant
Level 1
Level 1

Hi all,

i have one router at my remote site and it has point to point tunnel with our main office router. we have route for all traffic of site to our head office router. and we have EEM script at the remote site that checks the status of the tunnel. if tunnel state goes down the the router reloads and it is because we have sim inside our router and by reloading it, the tunnel comes up.

so now we need to have another router at the head office as backup and incase the main router at head office goes down then the router at site send all the traffic to the backup router.

so in this case i think if we create another tunnel at remote site with backup router and track the status of the tunnel with main router and if it goes down then all traffic will forward to backup router. ( any suggestion on this step).

 

the problem with that is when tunnel with main router goes down i have script at remote router to reloads. so may be traffic forwarded to backup router but router will again and again reload due to reload script. so is there any suggestion how i can make use of script so that if both tunnel goes down then at that case reload else do nothing.

 

following is the current confgis and i need help on how to set all things if we deploy backup router as well

 

track 1 ip sla 1 reachability

 delay down 120 up 1




ip sla 1

 icmp-echo x.x.x.x ( the loopback public IP of tunnel destination at head office )

ip sla schedule 1 life forever start-time now




event manager applet WatchDogApplet

 event timer watchdog name WATCHING time 480

 action 1 track read 1

 action 2 if $_track_state eq "down"

 action 3  reload

 action 4 else

 action 5  syslog msg "timer will reset - No action required"

 action 6 end

!




Thanks

 

1 Accepted Solution

Accepted Solutions

Hello,

 

I am not sure I fully understand your topology, but if you want nothing to happen when both tunnels go down, you need to

configure a second IP SLA

and then a track list that does something/nothing only when both

IP SLAs are down

 

ip sla 1 

icmp-echo 1.1.1.2 source-ip 1.1.1.1

frequency 5

!

ip sla schedule 1 start-time now life forever

!

ip sla 2

icmp-echo 2.2.2.2 source-ip 2.2.2.1

frequency 5

!

ip sla schedule 2 start-time now life forever

!

track 3 list boolean or

object 1

object 2

!

event manager applet NO_ACTION

....

...

...

 

View solution in original post

3 Replies 3

Hello,

 

I am not sure I fully understand your topology, but if you want nothing to happen when both tunnels go down, you need to

configure a second IP SLA

and then a track list that does something/nothing only when both

IP SLAs are down

 

ip sla 1 

icmp-echo 1.1.1.2 source-ip 1.1.1.1

frequency 5

!

ip sla schedule 1 start-time now life forever

!

ip sla 2

icmp-echo 2.2.2.2 source-ip 2.2.2.1

frequency 5

!

ip sla schedule 2 start-time now life forever

!

track 3 list boolean or

object 1

object 2

!

event manager applet NO_ACTION

....

...

...

 

thanks for the reply.

 

i need to reload the router only in case both the tunnel goes down. and incase main tunnel goes down, then all the traffic should be routed to the backup tunnel. only reload should be triggered in case both tunnel are down. 

 

 

Hello,

 

if you cannot work this out, post the running configuration of your router...

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco