Community discussions

MikroTik App
 
vturceniuc
just joined
Topic Author
Posts: 1
Joined: Tue Feb 28, 2017 8:33 pm

script failover with 3 ISP

Tue Feb 28, 2017 9:31 pm

Hello everybody.

I have the following problem, if anyone knows please help me.

I have a hex which has 3 ISP router.
1 ISP Metronet
1 ADSL ISP
1 ISP VODAFONE (on USB)

I need to do failover level script to check in 8.8.8.8 is interrupted when an ISP to give the next.
The order would be
Metronet distance = 1
ADSL 2 = distance
Vodafone stik = distace3

Thank you,
 
AldoJimenez
Trainer
Trainer
Posts: 30
Joined: Fri Feb 12, 2016 11:49 pm
Contact:

Re: script failover with 3 ISP

Wed Mar 01, 2017 1:47 am

You can achieve this with Netwatch.

https://wiki.mikrotik.com/wiki/Manual:Tools/Netwatch
 
User avatar
FlavioCamacho
Trainer
Trainer
Posts: 33
Joined: Tue Jun 24, 2014 7:39 am
Location: Rio de Janeiro - Brasil
Contact:

Re: script failover with 3 ISP

Thu Mar 02, 2017 1:11 am

Make a static route for 8.8.8.8 with each gateway and mark check-gateway with ping to determine if the ISP is UP.

/ip route add dst-address=8.8.8.8 gateway=METRONET distance=1 check-gateway=ping
/ip route add dst-address=8.8.8.8 gateway=ADSL distance=2 check-gateway=ping
/ip route add dst-address=8.8.8.8 gateway=VODAFONE distance=3 check-gateway=ping

With this when one of the gateways is off the default route will be disable.

/ip route add dst-address=0.0.0.0/0 gateway=METRONET distance=1
/ip route add dst-address=0.0.0.0/0 gateway=ADSL distance=2
/ip route add dst-address=0.0.0.0/0 gateway=VODAFONE distance=3

You will see only one black the others will be blue and inactive.
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Re: script failover with 3 ISP

Sat Mar 04, 2017 1:19 pm

Testing the gateway accessibility does not say anything about Internet access.

Who is online

Users browsing this forum: No registered users and 6 guests