Skip to content

Instantly share code, notes, and snippets.

@ttyler01
Last active August 23, 2023 01:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ttyler01/12577bb558e50204bc3d5f1802f8962c to your computer and use it in GitHub Desktop.
Save ttyler01/12577bb558e50204bc3d5f1802f8962c to your computer and use it in GitHub Desktop.
These are the things I did to configure Speedify on my Raspberry Pi to bond 3 DSL modems for my house

Intro

Note: Verizon enabled LTE Home Internet in our area a while back and we switched immediately. The below setup was fun and instructive however we wasted no time dumping DSL. The whole-home VPN this provided - which you could still easily set up without all the multiplexing - was great but there were constant issues with streaming services trying to prevent revenue leakage.

I live in a semi-rural area and we have crap internet options. The ONLY wired service to my house is ATT DSL. In 2020 some of the neighbors convinced ATT to sell us business accounts, which allows us to have more than 1 DSL line to the house (we got 3). Rather than run multiple WiFi networks - one for each DSL modem - at my house I wanted to bond the lines and aggregate the bandwidth. ATT won't do this for you, even though the DSL modems support it.

Along comes Speedify (https://speedify.com). For around $130 for three years you get a service that allows you to multiplex an arbitrary number of lines. Many people would use this, for instance, with a laptop if they have crappy WiFi, and bond in LTE from their phone. In my case I wanted to multiplex my 3 DSL lines, put that in front of my home mesh router (which happens to be Google WiFi at the moment but doesn't really matter), and increase the throughput at my house from 6 Mbps to 30 Mbps (the original residential account was about 6 Mbps down). An added bonus is that I get whole house VPN out of the deal. The business modems clock in around 12 Mbps down on a good day, and 1.5 Mbps up. My highest dowload speeds have now been clocked at 34 Mbps down and 4.5 Mbps up. This may not sound like a lot to you, but its multiple HD streaming channels, work from home, and kids school from home for me. It was a game changer for us in 2020, particularly during the pandemic.

You can get even more creative - say if I have an important business call, or the kids a critical exam - and bond LTE to a laptop with the bonded WiFi mesh network! Mind blown!

Some neighbors are just now (06/2021) switching to Star Link. This looks really promising. Sadly, until Star Link certifies 60 degrees on the Horizon I likely have too much obstruction to make it useful for me, even mounted on the roof. So until then I'll probably remain DSL (which, btw is absurdly expensive and we've heard rumors that ATT is going to triple our rates to encourage us to dump DSL).

Below are a few things I did to get Speedify working reliably on my Raspberry Pi

USB Ethernet adapters I am using

https://www.amazon.com/gp/product/B07MK6DJ6M/ref=ppx_yo_dt_b_asin_title_o07_s01?ie=UTF8&psc=1

Set predictable network interface names

rasps-config->Advanced Options->Network Interface Names->Yes
https://speedify.com/blog/how-to/install-speedify-raspberry-pi/
https://support.speedify.com/article/572-getting-started-raspberry-pi

/etc/speedify/speedify.conf

# Set to 1 to enable sharing Speedify to other devices
ENABLE_SHARE=1

# The interface(s) to use for sharing
# ex: SHARE_INTERFACE="eth1"
# When you enable sharing, Speedify will automaticlly set this interface to the NEVER priority so that it is not used as an Internet connection.
# If you disable sharing for the interface and want to use it again as an Internet connection, you can set it back to the Always priority by doing:
# /usr/share/speedify/speedify_cli adapter priority {interface} always
SHARE_INTERFACE="eth0"

# IP to use for the sharing interface
# ex: INTERFACE_IP="192.168.145.1"
INTERFACE_IP="192.168.145.1"

# DNS servers to send over DHCP to clients
# ex: DNS_SERVERS="10.202.0.1,1.1.1.1"
DNS_SERVERS="10.202.0.1,1.1.1.1"

# Set to 1 to allow internet access on other devices when Speedify is disconnected
SHARE_WITHOUT_SPEEDIFY=0

# Wi-Fi hotspot settings
# To use Wi-Fi sharing, set the WIFI_INTERFACE to the same as the SHARE_INTERFACE above
#WIFI_INTERFACE="wlan0"
#WIFI_SSID="SpeedifyAP"
#WIFI_PASSWORD="password"

# WIFI_MODE can either be "2.4" for 2.4GHz or "5" for 5GHz.
# WIFI_CHANNEL will default to 1 for 2.4GHz or 36 for 5GHz
#WIFI_MODE="2.4"
#WIFI_CHANNEL="1"

# Set the WIFI_COUNTRY so the device knows what region you are operating in and can comply with local regulations
#WIFI_COUNTRY="US"

Primitive drawing of my setup

Except for eth0 and wlan0 your network adapter names will vary

                           ------------------
                           |                |                    --------
                           |                | enx000ec663xxxx -> | DSL 1| -> ATT
  ----------------         |                |                    --------
  | Mesh network | -> eth0 | Raspberry Pi 4 | enx000ec663yyyy -> | DSL 2| -> ATT
  ----------------         |                |                    --------
          |                |                | enx000ec663zzzz -> | DSL 3| -> ATT
          |--------> wlan0 |                |                    --------
                           ------------------

I've kept wlan0 active and attached to the mesh network. This allows me to access the Pi from the mesh network directly. This is probably really bad practice, but I didn't want to make wlan0 a hotspot so that I would have to connect to it every time I wanted to log into the Pi.

Quickly updateing Speedify

sudo apt-get update
sudo apt-get --only-upgrade install speedify
sudo apt-get --only-upgrade install speedifyui

Some helpful Speedify commands and configs

Bypass a specific domain

Sometimes I have problems with Webex, or chownow, so you can bypass streaming on these domains, which I think essentially passes traffic to them on a single network interface and unencrypted

sudo /usr/share/speedify/speedify_cli streamingbypass domains add webex.com

Show me what version I'm running

sudo /usr/share/speedify/speedify_cli version

{
	"maj":	11,
	"min":	3,
	"bug":	0,
	"build":	10006
}

Other stuff I did

I installed Docker and am running Prometheus and Grafana and collecting speedify metrics. Recently I signed up for a free Grafana Cloud account and am now shipping my metrics there, along with Speedify logs via Loki. I'll update here later with details on how I did that.

@sators
Copy link

sators commented Aug 23, 2023

Thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment