Automatic Failover with Mikrotk

Configuring automatic failover with Mikrotik routers can be very easy and straightforward, yet most administrators find it difficult.
This is because with Mikrotik, what most people configure is actually not automatic failover. They configure two gateways with different administrative distances and they set the gateway check to ping. With this, the link will NEVER fail over unless the cable is physically disconnected.
To set up a complete automatic failover that does not require you to unplug the cable, do the following:
On Client Router, configure your two WAN interfaces to connect to your ISPs using the IP addresses given to you by your providers. For the automatic failover, do this:

/ip route
add dst-address= gateway= scope=10
add dst-address= gateway= scope=10

add distance=1 gateway= check-gateway=ping
add distance=2 gateway= check-gateway=ping

This is all you need for a full automatic failover that works. Forget the long notes that people write concerning this topic. It is that simple. I have a video on this coming soon. Watch on for it.
NOTE: the two addresses ( and are the two addresses we are pinging, one for each of the WAN interfaces. Once any of the addresses becomes unreachable, the router considers that link down and fails over to the other link. Once the primary comes back, it takes over from the secondary link.
Spread the love

4 thoughts on “Automatic Failover with Mikrotk

    • January 14, 2016 at 4:56 pm

      Works well,except for the NAT that you have configured on one of your WAN interfaces.Remove the nat on the WAN interface and only specify your LAN IPs for natting.

  • July 13, 2018 at 5:52 pm

    What about roadblocking, if I have 2Mbps for each WAN, does it gives me 4Mbps ?

  • July 13, 2018 at 8:26 pm

    You can use per connection classifier to achieve load balancing on a dual WAN environment. However, connections are tied to the link they were establish and a speed test cannot give a combined capacity of both links as the connect to the speedtest server will be tied to a link. See link here


Leave a Reply

Your email address will not be published. Required fields are marked *