Problem on WAN failover without scripting

Hi all,

I am trying to do a WAN failover for my home network without any scripts/netwatch. My setup is adopted from this tutorial:
http://wiki.mikrotik.com/wiki/Advanced_Routing_Failover_without_Scripting#Basic_Setup

There are two separate ADSL connections for failover. If I enable/disable the routes manually the failover is working but of course I want an automatic failover without scripting. Additionally the normal gateway check should be extended to check the ping to IPs 8.8.8.8 and 8.8.4.4 in order to detect an real down state of my PPPoE connections.
The main gateway has the IP 192.168.0.240, the backup PPPoE connection is directl attached to the router with name “PPPoE-TelekomDSL”.

Main routes:
;;; Main route
dst-address=0.0.0.0/0 gateway=8.8.8.8
gateway-status=8.8.8.8 recursive via 192.168.0.240 ether2_homenet check-gateway=ping distance=1
scope=30 target-scope=10

dst-address=0.0.0.0/0 gateway=8.8.4.4 gateway-status=8.8.4.4 unreachable check-gateway=ping
distance=2 scope=30 target-scope=10Here are my gateway checks:
dst-address=8.8.4.4/32 gateway=PPPoE-TelekomDSL gateway-status=PPPoE-TelekomDSL reachable
check-gateway=ping distance=1 scope=10 target-scope=10

dst-address=8.8.8.8/32 gateway=192.168.0.240
gateway-status=192.168.0.240 reachable via ether2_homenet check-gateway=ping distance=1 scope=10
target-scope=10With this setup enabling the backup route does not work automatically even if I disable the main route. The problem is related to the PPPoE-TelekomDSL gateway for dst address 8.8.4.4. If I put the IP from “Local Address” of the PPPoE connection here instead, it does work. But only for 20 seconds because then the route to 8.8.4.4 is marked unreachable agin. For your information, the PPPoE connection puts a DAC route(with “Local Address” from PPPoE as dst) in the routing table…

Again using gateway PPPoE-TelekomDSL marks my route to 8.8.4.4 as active but failover is not working. The backup default route then still has the gateway 8.8.4.4 unreachable set.

Here is my debug log when enabling the route:

automatic disable after 20s

Can anybody explain this behaviour to me? Thanks!

Its really less complicated than that. All you really need to do is add two default gateways. One will have a higher distance than the other. Both will have Check gateway by ping enabled. Then you will also need two NAT rules. That will work perfectly and without any problems.

Yes you can do this if only you disconnect the other WAN port. Even if you use check gateway ping option, as long as the gateway IP is up but its internet connection is down, your automatic failover will not work.

Even if you use check gateway ping option, as long as the gateway IP is up but its internet connection is down, your automatic failover will not work.

That’s true. Personally, I would netwatch to resolve that problem, but he doesn’t want to do that. How would you configure it?

I prefer scripts like the netwatch II http://wiki.mikrotik.com/wiki/Improved_Netwatch_II
I also modified it to include a out interface on the ping command so that the ping will always check if connection on that interface is down.