Community discussions

MUM Europe 2020
just joined
Topic Author
Posts: 5
Joined: Wed Feb 18, 2015 7:18 am

Ping and Bandwidth based Failover with dynamic gateway and IP

Sat Aug 27, 2016 9:59 pm


Have this project that's been boggeling my mind for quite a while.
I feel like I need some pointers or a kick in the right direction. :wink:

I'm looking to create a configuration that supports:
  • Load Balancing based on bandwidth (not round-robin PCC)
  • Ping based failover (Not connection or gateway based)
  • Work with dynamic IP on incoming PPPoE interfaces
Is this even possible? Have it been done by anyone?

I've found and tried and looked at a few solutions, but never found any that seems to full fill all of these requirements.

Thomas Bandwith Based example
Looks like the balancing I'm looking for, but also only appears to work with static WAN IPs.
It's been suggested in the forum to use other properties instead of IP, so that it may work with dynamic.
Haven't gotten it to work in testing, but I'm not an expert either and this is advanced stuff :?

Thomas Failover Script
Again, this only appear to support static IPs. Should be able to adapt it to work with dynamic.
Haven't played around with it enough. Still does not solve my balancing problem.

Regular Two gateways failover and
Advanced Routing Failover without Scripting ... _Scripting
Does not work for me, gateway remain pingable when connection is down.

Regular PCC Load Balancing
Doesn't work well and breaks too many applications for me.
Also the WANs are not of symmetrical speed and quality.
Couldn't get it work well with SSL/TLS nor my WANs dynamic IP & Gateways.

I have two different ISPs connected via their own GPON ONUs in Bridge.
I connect using PPPoE and get a dynamic IP and Gateway from them.

When they fail; the gateway sometimes remains pingable.
When I get a new IP; I may get a completely new Gateway as well.
I may get a new IP & Gateway a couple of times a day.
Worst is when a line starts getting packet loss and long ping times.
25% packet loss and ping times of 1,000ms or more is not uncommon at times.

Bandwidth is not symmetrical between ISPs, ping times and reliability is different as well.
50/10 ISP1 (eth1) AIS Fibre. Best international speed, most reliable, best ping time.
100/10 ISP2 (eth2) 3BB FTTx. Decent international speed, quite reliable, acceptable ping time.

This is the reason I want to use ISP1 until I need more speed or ISP1 fails.
When usage goes over say 45 Mbit, new connections get established on ISP2.
Static IPs or anything special is 2-5x monthly rate, also "business" plans are just as unreliable.
So I have to work with what I've got.

All kinds, say about 30 active clients behind the router.
A few PC gamers, a few console gamers.
Regular internet usage, Skype, Steaming etc from phones and laptops.
A couple of IPTV boxes, 4 - 6. Actually the IPTV is the most important.

  • 2x FiberHome ONU
  • Mikrotik RB2011-UiAS
  • ~5x Ubiquiti UAS-AC-LR
So what do you think?
Is it doable and where shall I start?

Any thoughts and pointers are welcome :D
I just feel like I need some directions to finish this project. :-?

Posts: 30
Joined: Mon Dec 12, 2016 12:21 am

Re: Ping and Bandwidth based Failover with dynamic gateway and IP

Tue Jan 10, 2017 9:58 am

Did you get anywhere with this? I have a similar situation to yours and so far haven't found any solution.
1 of my ISPs have dynamic gateways and the other one (the main one) can lose internet connectivity even though gateway is up.
None of the Mikrotik wiki scripts work for me.
just joined
Topic Author
Posts: 5
Joined: Wed Feb 18, 2015 7:18 am

Re: Ping and Bandwidth based Failover with dynamic gateway and IP

Tue Jan 10, 2017 10:02 am

No, I've put it on ice for now.
Will try Ubiquities failover in their USG on the next site.

Who is online

Users browsing this forum: almdandi, ediseotrumci, macsrwe, mjoksimovic and 163 guests