Hello,
I have two ISP connection with failover, now this failover work is ISP’s gateway ping check but I need failover work will be with 8.8.8.8 or another IP. how to possible.
Regards,
Nishadul
Hello,
I have two ISP connection with failover, now this failover work is ISP’s gateway ping check but I need failover work will be with 8.8.8.8 or another IP. how to possible.
Regards,
Nishadul
I do not understand your question. 8.8.8.8 is google dns server. You can point dns servers in mikrotik as you want, for example: first is local dns server, second is internet provider dns server, third google dns 8.8.8.8. If first dns server do not respond, dns requests will be diverted to second dns server and etc.
He most probably wanted to use the ip as checking destination to see if the Internet is accessible.
Netwatch with scripts in Down tab will help. Search more information in the Internet. I do not use this, so can not provide scripts. Why do not use provider gateway if it works?
Don’t check against just 1 IP, I check 3.
This runs every 2 mins in scheduler.
:if ([/ip route get [find comment="GATEWAY"] disabled]=false) do={
:if ([/ping x.x.x.x count=3] = 0 && [/ping x.x.x.x count=3] = 0 && [/ping 8.8.8.8 count=3] = 0) do={
/ip route disable [find comment="GATEWAY"];
:log error "ISP DOWN";
}
}
:delay 5;
:if ([/ip route get [find comment="GATEWAY"] disabled]=true) do={
:if ([/ping x.x.x.x count=3] > 0 || [/ping x.x.x.x count=3] > 0 || [/ping 8.8.8.8 count=3] > 0) do={
/ip route enable [find comment="GATEWAY"];
:log warning "ISP UP";
}
}
My ISP’s connection is as follows:
IIG>>>>>>>>>>ISP-0>>>>>>>>>>>>>>>>ISP-1>>>>>>>>>>>>>>>>>>>>>>>My Router
IIG>>>>>>>>>>ISP-2>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>My Router
If ISP-1 and My Router connection disconnect then failover work
OR
If ISP-2 and My Router connection disconnect the failover work
BUT
If ISP-0 and ISP-1 connection disconnect then my router’s failover NOT WORK because my router get ping of ISP-1. for this reason I want my router check ping for failover of google dns 8.8.8.8 or others IP. so that if any ISP’s (ISP-0, ISP-1, ISP-2) connection fail then my router’s failover work correctly.
you can use black hole approach in route section to make sure ping to x.x.x.x goes via specific wan link ONLY. just an idea to share
https://aacable.wordpress.com/2015/09/17/monitoring-multiple-wan-links-in-pcc-using-black-hole-route-approach/
You’ve got a logic error here… if the default gateway doesn’t work, disable it. Then test it while its disabled, and if it works while its disabled, then re-enable it… You’re clearly missing a step! Ie. set up static routes to those IPs.
second DNS is OK but no internet connection because ISP’s internet connection (cable) is disconnected from IIG.
That’s exactly what I’m doing and it works.
But yes, I forgot to mention that you should have static routes for the addresses that you’re checking.