Community discussions

MikroTik App
 
croppedbee
just joined
Topic Author
Posts: 2
Joined: Sat Jul 14, 2018 6:07 pm

Dual ISP strategy and implementation on Routerboard

Mon Dec 07, 2020 11:59 pm

Hi all,
I've seen some discussion from searching about handling dual ISPs and load balancing, and I'm hoping for some suggestions on the best setup for my particular application. I have a Mikrotik 2011UiAS with firmware v6.47.8.

I have two ISPs that are both bad, but they're my best options where I live.
Viasat - 5-30Mbps bandwidth, 630ms latency, bad reliability
LTE - 3-8Mbps bandwidth, 40ms latency, better reliability?
The Viasat would be fine as my sole ISP (even with the horrible latency and weather-related downtime) except when I exceed 75GB in a given month they throttle me at 0.25Mbps! The LTE seems to have a constant bandwidth of around 5-8Mbps and a 40ms latency, but the bandwidth never goes higher than that. I have no cap on the LTE and no throttling.

I want to put them together to get the best of both worlds but mitigate the worst of both worlds. My initial thought is for the LTE to somehow be accessed for the first ~3 Mbps and the Viasat kicks in after that. That would enable low bandwidth activities (e.g. browsing) to use the low latency connection and preserve some of my Viasat usage on mundane tasks. The Viasat would kick in only when high bandwidth activities are needed which I think would keep me under the 75GB each month.

1) Does this seem like a reasonable strategy or is there a "smart" strategy that I'm unaware of on Mikrotik devices?
2) Is this even possible? If I'm streaming content from Netflix let's say, does it know to switch over to Viasat when the HD content exceeds 3Mbps?
3) Any pointers on the best way to implement this on the Routerboard?
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Dual ISP strategy and implementation on Routerboard

Tue Dec 08, 2020 10:16 am

An already established TCP session cannot switch over to another uplink if there is a NAT between the client and the server, as the relationship of a TCP packet to a given session is determined based on the tuple of client side and server side addresses and ports. It depends on the application whether it can establish a new TCP session automatically if the previously used one breaks.

So you could track the rate of all connections initiated by your LAN side devices, and if a connection exceeds some data rate or data volume, place its remote address to an address-list matched by a mangle rule forcing traffic via the LTE. This would break the existing connection, and it would depend on the application whether user intervention would be required to establish a new one or not. There is also an issue with the session failure detection: if you just stop routing the packets to the "correct" uplink, it takes a few seconds until the client gives up on the session; if you send a RST packet to the client to terminate the session immediately, the application may react differently than it would on retransmission timer expiration.

Another possibility would be to have a router somewhere at a public address on a better connectivity, and create VPN tunnels to it via both uplinks. In such case, the NAT would take place at that other router, so between your home router and that other one you could freely move the traffic between the uplinks without breakin existing sessions. But leaving aside the expenses of running that other router, the overhead of the tunnels would waste some part of the 75 GB.
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1888
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: Dual ISP strategy and implementation on Routerboard

Tue Dec 08, 2020 3:44 pm

You can do some outgoing policy in few ways.
General MultiWan I write here viewtopic.php?f=13&t=166412&p=818011#p818011

But this will be hard to do a proper way "Balance" traffic.

I use often LTE stuff and one way is do a cyclic speedtest and for avg from last 5 I do some QoS and LoadBalance policy but this must be with some scripting and it's not a out-of-box solution.

Who is online

Users browsing this forum: jlsoporteisp, johnb175a, Kuwait, mkx, PBondurant, rocksound and 58 guests