Setup Failover Links on MikroTik Using Recursive Gateway

In this post, i will show you how to setup failover links on MikroTik. I’m using “recursive gateway” method

Background : i have 2 connections, 1 from Fiber Optic and 1 from 4G. If my connection (from Fiber Optic) is down, it does not switch to 4G (except if you dial your ISP’s PPPoE from MikroTik. Or using DHCP from ISP, not from your ONT). So, i was think how to setup “auto route” to 4G

Here is the guide :

1. Go to “IP >> Routes”

2. Create new route, and follow this (Don’t forget to apply) :

  • Dst Address : (i’m using this)
  • Gateway : your ISP gateway

3. Then, create new route again, and follow this (Don’t forget to apply) :

  • Dst Address : keep it
  • Gateway : (follow from step 2)
  • Distance : 1
  • Check Gateway : Ping
  • Target Scope : 30

And what about for secondary (or other) link? You can follow from step 2. But starts from step 2, Gateway (at step 3) and Distance (at step 3) you must set other than main link. For example :

Second Static Route :

  • Dst Address :
  • Gateway : your 2nd ISP gateway

Second Default Route :

  • Gateway :
  • Distance : 2
  • Check Gateway : Ping
  • Target Scope : 30

How it works? If your main link is lost connect, ping from is time out. And then, the default gateway is “automatic” move to secondary link

For recursive check, i recommend to use CloudFlare ( and/or and/or or Quad9 ( and/or and/or Again, it depends on you for recursive destination

That’s it. Hope you can enjoy my post ^_^

Proudly powered by WordPress | Theme: Outfit Blog by Crimson Themes.