Community discussions

 
geeko
just joined
Topic Author
Posts: 2
Joined: Fri Dec 19, 2014 2:44 am

How to detect when default gateway changes?

Wed Feb 17, 2016 12:04 am

Hi Everyone,

In a dual wan/failsafe environment, does anyone have an idea how I can detect the switch between WANs?

I'm asking because I need to perform some system cleaning (connection drops + email) when the system changes the default gateway

Many Thanks,
 
geeko
just joined
Topic Author
Posts: 2
Joined: Fri Dec 19, 2014 2:44 am

Re: How to detect when default gateway changes?

Thu Feb 18, 2016 3:38 pm

Hi Guys,

Thank you, I finally mange to figure this one out!

This is how I'm doing right now ( please feel free to step in! )

But I'm currently assigning a specific route for each WAN and track them using ICMP ping.

Best Regards,
geeko
 
scampbell
Trainer
Trainer
Posts: 457
Joined: Thu Jun 22, 2006 5:20 am
Location: Wellington, NZ
Contact:

Re: How to detect when default gateway changes?

Thu Feb 18, 2016 9:09 pm

Hi Geeko,

If you are behind NAT'ed routers then that is the correct way to do it. It also enables a more complex check than just next-hop :-)

If you only need to check next-hop then there is also a setting in the default route called "check-gateway" which can use ping. No use if you are connected to another local router, but easy if your next hop is the ISP.
MTCNA, MTCWE, MTCRE, MTCTCE, MTCSE, MTCINE, Trainer
___________________
Mikrotik Distributor - New Zealand
http://www.campbell.co.nz
 
boyko
just joined
Posts: 9
Joined: Sun Feb 05, 2017 1:59 am

Re: How to detect when default gateway changes?

Fri Feb 10, 2017 8:53 pm

Hi Guys,

Thank you, I finally mange to figure this one out!

This is how I'm doing right now ( please feel free to step in! )

But I'm currently assigning a specific route for each WAN and track them using ICMP ping.

Best Regards,
geeko
I don't see the script / solution - how did you solve this?

Who is online

Users browsing this forum: No registered users and 10 guests