Author Topic: Raspberry Pi + Speedify + two ISPs  (Read 3442 times)

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9280
    • View Profile
Raspberry Pi + Speedify + two ISPs
« on: June 11, 2022, 04:38:02 PM »
I keep bringing this up in threads that are really about Starlink or RPi supply chain issues. Here's why I'm actually interested in RPi all of the sudden.

The goal is to bond two crappy ISP connections into one more stable connection

First, get two internet connections in and one out from the RPi
WAN
1 wifi connection to ISP 1, or possibly an ethernet connection via wireless bridge from router 1 (Starlink) to router 2 (cabled into RPi)
1 ethernet connection to ISP 2

LAN
1 wifi hotspot to broadcast the signal (either a USB wifi adapter for RPi or a USB ethernet adapter to a hotspot router/switch)

The setup will depend a bit on how I can get the best range. I'm not sure if  the on-board wifi for the RPi or a USB wifi adapter will have the power and range of a large, power-hungry router.

Then add Speedify channel bonding
Speedify with DNS ad blocking which
 - bonds the two connections with near-instant failover (based on reviews). This is key - IP does not change when you switch connections.
 - provides a VPN
 - provides rules-based VPN bypass for streaming services (apparently Netflix, Hulu, et cetera block VPNs). This saves you from having to disconnect from your VPN just to stream something.
 - provides DNS-level ad-blocking (think Pi-Hole)

I am not sure whether I should just install the command-line Raspberry Pi OS Lite, or the desktop version, or possibly Ubuntu. Speedify has some fancy GUI stuff you can use for config that might simplify my life.

Once set up and running, I don't imagine doing anything with the RPi as it will be in a location that would be a fairly unpleasant place to work. I'm also not expecting to have a keyboard and monitor attached to it except for setup.

This person is doing almost the same (bonding his home connection to the restaurant next door who is, no doubt, thrilled).
https://speedify.com/blog/better-internet-anywhere/best-pi-hole-alternative-bonded-internet-ad-blocking-dns/

He is using onboard ethernet for the main ISP connection, on-board wifi for the client connections and USB wifi to poach the restaurant's connection

Other docs/marketing stuff

Hardware
USB ethernet
https://www.amazon.com/UGREEN-Ethernet-Internet-Compatible-Raspberry/dp/B091TL1VQ4

USB wifi. Something like this I suppose
https://www.amazon.com/dp/B07FCN6WGX


High-level overview of RPi + Speedify
https://speedify.com/blog/how-to/raspberry-pi-vpn-router/

RPi + Speedify Install overview
https://speedify.com/blog/how-to/install-speedify-raspberry-pi/
https://support.speedify.com/article/562-install-speedify-linux

Managing connections (i.e. setting the priority for multiple connections)
https://support.speedify.com/article/236-connection-settings

Speedify for Linux overview
https://speedify.com/linux-vpn/
« Last Edit: June 11, 2022, 04:55:52 PM by ergophobe »

littleman

  • Administrator
  • Hero Member
  • *****
  • Posts: 6546
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #1 on: June 11, 2022, 07:08:46 PM »
Seems like a cool project.

>I am not sure whether I should just install the command-line Raspberry Pi OS Lite, or the desktop version...

One thing you could do is install the full OS, but then set it up so it boots to the command line instead of the full desktop.  This way you have the option of entering the desktop if you want to, but don't have to have the ram being sucked up for no reason while not in use.

The setting for that is in:
sudo raspi-config -> 1 -> System Options ->S5
« Last Edit: June 11, 2022, 07:19:40 PM by littleman »

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9280
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #2 on: June 11, 2022, 08:06:26 PM »
Ah. Thanks! That's perfect.

I should have plenty of room on the SD card for anything I want so no problem there, but as you say, no reason to use up all that RAM if I won't typically have a monitor attached.

I'm kind of excited. It's been a while since I've done a new tech thing. I always find it stimulating as long as there is no hard deadline, and in this case there is not.

littleman

  • Administrator
  • Hero Member
  • *****
  • Posts: 6546
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #3 on: June 11, 2022, 08:12:53 PM »
I know what you mean.  Tech projects that have practical applications just feel so nice.  They kinda make you feel like a wizard.

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9280
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #4 on: June 11, 2022, 08:39:29 PM »
Unless there's a deadline that you are failing to meet, in which case they make you feel like an incompetent fool with a high resting heart rate :-)

My wife used to work with a guy (great guy, very funny and still a friend) who would figure something out and say, "I'm a genius!" and then realize that there was a wrinkle he hadn't understood and would say, "I'm an idiot!" Some days she would hear him say both of those several times if he was making progress on a hard problem. I think that pretty much sums it up.
« Last Edit: June 11, 2022, 08:43:20 PM by ergophobe »

rcjordan

  • I'm consulting the authorities on the subject
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 16313
  • Debbie says...
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #5 on: June 12, 2022, 01:07:37 AM »
>two ISPs

About 2000 I read that Willie Nelson paid big buck$ to have his tour bus rigged to merge multiple ISPs. I have always been jealous.

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9280
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #6 on: June 13, 2022, 02:52:43 PM »
You can now get Starink for RV. Get Starlink plus a couple of 4G/5g routers for when you're on the move (Starlink for RVs does not work if you're in motion), RPi with 4-5 network cards and Speedify and you could roll like a star.

littleman

  • Administrator
  • Hero Member
  • *****
  • Posts: 6546
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #7 on: June 25, 2022, 02:58:33 AM »
How's the project going?

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9280
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #8 on: June 27, 2022, 04:05:24 AM »
Got the Raspberry Pi on Friday, but realized I need the HDMI to micro HDMI adapter to connect a monitor and really get started. That comes on Tuesday.

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9280
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #9 on: June 27, 2022, 10:49:09 PM »
Turns out they shipped an HDMI cable with it. I just noticed.

I also got lucky. I thought the RPi had two USB-C ports, but it has 2 USB3 and 2 USB2. I thought I bought a USB-C wifi card that wasn't going to work, but it turns out I accidentally ordered the right card. Should be here tomorrow :-)

First try was a total failure - could not get the Speedify app to run. That made me wonder if it isn't ready for the new 64-bit RPi OS so I'm starting over with 32-bit. I guess if that fails, I'll try a Ubuntu LTS release

Also, man that thing gets hot! I bought a case fan, but I am thinking I might be better with no case.
« Last Edit: June 28, 2022, 12:05:05 AM by ergophobe »

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9280
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #10 on: June 28, 2022, 01:24:45 AM »
Halfway there.

I am posting this from my RPi connected to Speedify. Since I do not have the additional wireless card, I'm just using the RPi as a computer, not a router/hotspot yet. I think that will be the challenging part.

Typical linux project - some mucking around on the command line, lots of apt install and apt upgrade and working through error messages (turns out that something in the pipe does not like the fact that my random password generator uses "&" in passwords) and such things.

Also, not nearly as hot running outside the case. I think I will put it in some much much larger case to give it room to breathe. I suspect that running a monitor is probably adding to the heat a lot, and that won't be typical.

We'll see how it works. I may also switch out the onboard wifi card for a USB ethernet card. That would potentially reduce interference with the USB wifi card which I'll use for the hotspot since it has better range.

I was thinking that ethernet would draw less power and generate less heat than wifi, but apparently with modern cards that is not generally true. And one guy says that doing this because of heat is like emptying your ashtray and expecting your car to faster :-)
https://forums.anandtech.com/threads/ethernet-card-vs-wifi-power-consumption.2384201/

littleman

  • Administrator
  • Hero Member
  • *****
  • Posts: 6546
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #11 on: June 28, 2022, 10:01:41 PM »
>Heat

Are you using the standard Pi plastic case?  There are a lot of passively/semi-passively cooled metal cases out there.  I'm using the Argon One, but there are some that are basically just giant heat sinks.  Also, I've found that the CPU clocking makes a pretty big difference with heat.  Mine runs a bit hot (typically 55-58C, more when playing videos)  because I have mine over volted and overclocked, but I've found that it does a lot for desktop performance. 

Here's my mods at the top of /boot/config.txt:

over_voltage=6
arm_freq_min=1000
arm_freq=2100
gpu_freq=750


You could probably underclock it when it's just running speedify.
« Last Edit: June 28, 2022, 10:03:30 PM by littleman »

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9280
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #12 on: June 29, 2022, 08:20:43 PM »
Yes, just the plastic case. I looked up "best cases" for RPi and the Argon got kudos for cooling. Might have to spring for one of those. I'm mostly worried about dust and spiders as its final location will be a rather dirty storage area, but space isn't an issue. So it could just go bare in a large cardboard non-flammable metal box, at least during the testing phase.

At the very least, I could probably way underclock the gpu_freq. When it's running Speedify, I probably won't have a monitor attached at all and Speedify shouldn't be running any big calcs on the GPU.

We'll see. Turns out the USB wifi adapter doesn't come until tomorrow (don't know why I thought it was coming yesterday). So still on hold maybe until next week as the next several days are fairly busy.
« Last Edit: June 29, 2022, 08:22:40 PM by ergophobe »

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9280
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #13 on: July 14, 2022, 04:36:32 AM »
Sort of getting there.

- RPi set up with onboard wifi adapter and USB wifi
- Speedify setup
- Access Point set up and I can access the internet over the Access Point

A couple of key sticking points solved
 - get the AP to start up and show as an available network when booting headless
 - getting SSH and all that to work headless

What's not working:
 - the internet

I can load five pages and it will be super fast, then the next page it will just spin and timeout. It is currently way worse over this setup than the direct Starlink connection.

Not sure why but I have some theories to test
 - it's just a crappy router
 - the VPN is intolerant of packet loss
 - there's some interference among the network cards
 - Satan and God are having an argument (see Book of Job)

littleman

  • Administrator
  • Hero Member
  • *****
  • Posts: 6546
    • View Profile
Re: Raspberry Pi + Speedify + two ISPs
« Reply #14 on: July 14, 2022, 06:02:45 AM »
>Satan and God are having an argument (see Book of Job)

Supernatural causes are the easiest to deal with most of the time.