Bond two Internet connections of varying quality

5,237

I will try my best to address several questions, as you are talking about different subjects, and the broadness and entangling of the themes involved is more complex than it appears to be at the surface.

We can easily identify a couple of problems:

  • Slow peak time traffic: I will try to address several points here. About your setup, your biggest problem is latency. If you are having bigger problems at peak times your provider may be overselling [too much].

  • Speed: I also have dealt with satellites, and the bigger problem is latency [and rainy days].

I will address the hardware first as it is easier and we will be done about it.

About the raspberry if seems the 100Mbps should be enough for your current needs. However, take that with the aggregated traffic of upstream and downstream of both providers, the pratical limit of an interface being 70-80%, the potential of the rpi not being able to use it to the full max, and some more internal traffic at home, and indeed I also agree it is potentially wiser to have a server with gigabit ports.

I am using here a Lamobo R1 as router server, 5 gigabit ports with a SATA disk. The internal wifi is of no use, too cheap and too unstable. http://linux-sunxi.org/Lamobo_R1 [80 USD]. Or if you are willing to go with an USB ethernet, the Banana Pro is an interesting alternative. http://hardware-libre.fr/2015/01/hands-on-the-new-banana-pro/ (if you are reading this after the 2nd quarter of 2016, there will be already very interesting 64-bit ARM based SBC products out there that will supersede this 32-bit ARMs)

As alternative, you can buy a TP-LINK router Archer C7 v2.0 and install openwrt. AC wifi, 5 gigabit ports. http://www.dd-wrt.com/site/index [the Archer C7 is still good value for money at 100USD with 5 gigabit ports and AC wifi ]

There is an interesting project, the Turris Omnia, also for after mid-2016. https://www.indiegogo.com/projects/turris-omnia-hi-performance-open-source-router#/

Since we are talking about the hardware, about the OS. Archer C7 v2.0 (and the Turris Omnia) support dd-wrt (Linux), and the Lamobo R1 and Banana Pro support Linux. I have tested many alternatives in the Lamobo over more than a month and the best I could find was armbian http://www.armbian.com. Bananian from Sinovoip (the manufacturer) does not seems stable, and the armbian guys have been doing an excellent work adapting Debian for several SBCs (except Raspberry ironically - though they might do it soon).

About bonding, bonding will work but won't aggregate the overall bandwidth with two different providers, but only separate transmissions. (e.g. 2 20Mbps won't give you 40Mbps). Nonetheless, even with bonding you will still have to deal with slow connections, timeouts and retransmissions. Only time will tell if it worth the trouble. Or put it in another way, aggregating providers/interfaces is often used for having more bandwidth than solving latency problems.

As for backup, you are right. Bonding for aggregating or as an active backup. I would try using it for backup actually. This can be done as per this link: https://serverfault.com/questions/133992/failover-internet-connection

Nonetheless, latency is your biggest problem. If the 3G provider allows to transmit to the Internet IP addresses that do not belong to them, I would create iptables/NAT rules to send the upstream data with the address space you have from the satellite via 3G, and receive the downstream via satellite. This alone can reduce your latency in almost half of the time, at least theoretically. The added advantage, is that normally if not using bittorrent, the upstream usage is tipically 1/3 or 1/4 of the downstream usage.

In case the 3G upstream being not enough for your needs, it would be always advantageous to send there your DNS and HTTPS upstream traffic.

Again about latency; I know it sounds a bit counterintuitive, I do advise you getting a commercial (IPsec) VPN provider. The bandwidth can get slightly smaller, however, IPsec works with UDP and you won't be so much dependent on the mechanisms of TCP.

A squid cache on your side won't do you much good. However, a VPN and/or squid cache remotely in a friend/site/vendor with less latency will help you a lot. I do not know whether it is worth a VPN+proxy, it is a matter of testing it.

Share:
5,237

Related videos on Youtube

Erik
Author by

Erik

Señor Platform Engineer

Updated on September 18, 2022

Comments

  • Erik
    Erik almost 2 years

    I live in a remote part of the country, Internet-wise. I utilize a satellite based Internet, but it's having many problems during peak traffic times.

    I have researched a bit and found Ubuntu Bonding. If I build a Linux PC and connect my satellite Internet to the NIC, and a Netgear Aircard for 3G/4G, would Ubuntu Bonding allow me to use these two connections in various states of quality? Should I be added a squid cache too? Or is that a solution for a different problem?

    I want to use a RaspberryPi, but it lacks Gigabit Ethernet and might slow down the overall experience. Will likely use an old PC.

    • Rui F Ribeiro
      Rui F Ribeiro over 8 years
      as for the gigabit ports... I have a Lamobo R1 as my router. The wifi sucks, the gigabit ports work ok. I use on top of a it, a TP-Link Archer C7 v2. If one ethernet port for you is enough, a Banana PI Pro is a very interesting machine. You can use the 2 ways, however bonding is not probably what you are after. Would you tell use you satellite bandwidth? I might have a couple of ideas for you.
    • Erik
      Erik over 8 years
      The company is exede, maximum offering. Purported to be 25mbps..
  • Rui F Ribeiro
    Rui F Ribeiro over 8 years
    Note1: I did prefer to buy the Lamobo R1 than deal with PC junk. I tried 2 months to put the internal wifi to good use, also bought some wifi alternatives. No good. Ended up buying a TP-Link Archer C7 v2 that I use strictly for wifi. Getting 120Mbps in speedtest.net
  • Rui F Ribeiro
    Rui F Ribeiro over 8 years
    Note2: I can elabore more the answer, also in the VPN part later on, as I have to get out. Suffice to say that I have a 100Mbps connection at home, and I made VPN tests with friends in Manila and Phnom Penh to test the theory of VPN helping in environments with constrained bandwidth. Indeed, it improves the Internet browsing experience to the point they reported me they were able to use youtube and stream youtube movies when with the VPN.
  • Erik
    Erik over 8 years
    thanks for the clarity regarding latency issues not getting solved with Bonding.. you're exactly right.
  • Rui F Ribeiro
    Rui F Ribeiro over 8 years
    You are welcome. Actually I have some fun having these kind of talks, as I have a networking/ISP background, and explaining my reasoning in writing makes me organize my line of thinking.
  • Erik
    Erik over 8 years
    because the two networks (the cellular and the satellite), are different IP's.. I cannot bond them? I am reading this in other places but wanted to hear your take.. Thank you again. I think I'll have to get a karmago and just manually switch for now.