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 : 1.1.1.1 (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 : 1.1.1.1 (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 : 1.1.1.2
  • Gateway : your 2nd ISP gateway

Second Default Route :

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

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

For recursive check, i recommend to use CloudFlare (1.1.1.1 and/or 1.1.1.2 and/or 1.1.1.3) or Quad9 (9.9.9.9 and/or 9.9.9.10 and/or 9.9.9.11). 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.