General Discussion
  >> Fibre Broadband


Register (or login) on our website and you will not see this ad.


Pages in this thread: 1 | 2 | 3 | 4 | (show all)   Print Thread
Standard User hoopla
(committed) Thu 04-Feb-21 22:14:28
Print Post

Combine connections using Pi


[link to this post]
 
I'm pretty sure that somewhere on here I read about a way to run a proxy server using a Raspberry Pi on the network and a remote vpn server so that you can combine more than one internet connection.

The trouble is that I can't remember what it was called or where I saw it. A fruitless hour of searching has drawn a blank.

Can anyone help?
Standard User ian72
(eat-sleep-adslguide) Fri 05-Feb-21 11:43:32
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
Haven't done it myself but google "Raspberry pi proxy server" and you will get links like this one
Standard User danielhyde
(member) Fri 05-Feb-21 12:55:21
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
In reply to a post by hoopla:
I'm pretty sure that somewhere on here I read about a way to run a proxy server using a Raspberry Pi on the network and a remote vpn server so that you can combine more than one internet connection.

The trouble is that I can't remember what it was called or where I saw it. A fruitless hour of searching has drawn a blank.

Can anyone help?


It's certainly possible but depending on the speed of the connections a raspberry pi may struggle.
Also you will need a VPN server in the cloud.

Thanks Dan


Register (or login) on our website and you will not see this ad.

Standard User caffn8me
(eat-sleep-adslguide) Fri 05-Feb-21 13:25:26
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
In reply to a post by hoopla:
I'm pretty sure that somewhere on here I read about a way to run a proxy server using a Raspberry Pi on the network and a remote vpn server so that you can combine more than one internet connection.
The big questions is; what exactly are you trying to achieve? Do you want some traffic from your LAN to route via your normal gateway and some to route out through the Raspberry Pi over the VPN? It's the word 'combine' that's got me puzzled.

Sarah

--
If I can't drink my bowl of coffee three times daily, then in my torment, I will shrivel up like a piece of roast goat

Spiders on coffee - Badass spiders on drugs

Edited by caffn8me (Fri 05-Feb-21 13:45:44)

Standard User FarmerStuart
(newbie) Fri 05-Feb-21 17:00:16
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
Need a bit more info really on what you are looking to achieve and your setup.
I think what you are asking is how to use multiple WAN connections in tandem to either increase speed or add redundancy. If that’s the case there are articles online about using Squid (a widely used Linux proxy server) with multiple WAN links but the ones I saw dated back a long time and it didn’t seem a nice solution. I assume the remote VPN server is to give all the links the same outgoing IP address when the traffic hits the internet by running VPN tunnels over each WAN link and then combining the traffic at the remote end.

If it was me I’d be looking at a hardware solution with a router that could load balance or do failover. I’ve used Draytek kit to do this in the past but there are other good options out there too eg Edgerouter, Mikrotik etc.
Best way to achieve this is with an ISP that would let you bond the connections together but that’s fairly specialist offering.
Standard User Davey_H
(regular) Fri 05-Feb-21 17:51:45
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
Are you thinking of OpenMPTCProuter?

You can certainly run it on a RasPi

I recall there's been a couple of threads on here about using it, I don't think either used a Pi though.

Edit - Yep, found these

https://forums.thinkbroadband.com/mobilebroadband/f/...

https://forums.thinkbroadband.com/general/f/4668406-...

There's also Speedify

https://speedify.com/blog/raspberry-pi-bonding-route...

Edited by Davey_H (Fri 05-Feb-21 18:39:05)

Standard User hoopla
(committed) Fri 05-Feb-21 19:01:53
Print Post

Re: Combine connections using Pi


[re: Davey_H] [link to this post]
 
Basically, I currently have a 4G connection with pretty good uplink speeds, but poor downlink and poor ping times.

I should have FTTC in a week or two, which should have decent ping and downlink, but not good uplink speeds.

What I want to explore is some way to combine these. Only interested in better performance: no need for a VPN otherwise.

I have a spare Pi4 and I have a (mostly) spare server in a German hosting centre, running Debian 10. The only worry is that openmptcprouter docs say that "SSH port is changed to 65222 (TCP)" which would be a bit of a pain: a different (non-standard) port is being used for a few things there.

I'm not keen to spend a lot of money on extra hardware for just an experiment.

I think that OpenMPTCRouter was indeed the name I'd forgotten. Can't think how - it's so catchy!

Edited by hoopla (Fri 05-Feb-21 19:56:45)

Standard User hoopla
(committed) Fri 05-Feb-21 20:18:11
Print Post

Re: Combine connections using Pi


[re: Davey_H] [link to this post]
 
In reply to a post by Davey_H:
There's also Speedify

https://speedify.com/blog/raspberry-pi-bonding-route...
I'm struggling to make sense of this one.
They say you can use a Pi and that you can have the LAN side connected to the ethernet port, but it says "Note that you can only share over an Ethernet port that is not connected to an internet source. Pick one ethernet card to share with your client or client devices, and it must not be one of the ones that are connected to the internet already."
I've never seen a Pi with more than one ethernet port. Am I missing something?
Standard User FarmerStuart
(newbie) Fri 05-Feb-21 20:31:29
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
USB network adapter or wifi on the newer ones?
Standard User candlerb
(fountain of knowledge) Sat 06-Feb-21 10:28:52
Print Post

Re: Combine connections using Pi


[re: FarmerStuart] [link to this post]
 
In reply to a post by FarmerStuart:
USB network adapter or wifi on the newer ones?


Tagged VLANs into a switch? But if the OP knew what tagged VLANs were, then they probably wouldn't be asking questions here smile

I'll try to make one thing clear. Some of the advice offered previously has been about routers with dual-WAN ports. These are easy to deploy. However what happens with these is that any particular session (e.g. TCP session to fetch a web page) goes over one or other link - both inbound and outbound traffic for that session. This may be useful if there are several people in a household who are using the Internet simultaneously, and to balance their usage between them.

However this *can't* be used to combine bandwidth for a single session (e.g. a single large download), nor to use one link for upload and the other link for download as part of the same session. I think this is why the OP wants some sort of VPN solution, where two VPN connections are connected to some remote VPN node, and traffic is load-balanced between them.

Unfortunately, I don't think this is going to work well.

From my experience, probably the thing most likely to work would be two L2TP sessions with PPP-multilink across them, since this is the same technology used for "bonding" discrete PPP sessions. You need an L2TP termination point at the other end. AAISP offer an L2TP service for £10 per month, but I don't know if it supports multilink. Plus, you need a router which would do L2TP and multilink (possibly their "firebrick" device can do this), and you need to understand how to configure L2TP and multilink.

Maybe some VPN supplier offers a packaged solution for bonding that's easy to deploy. In which case, they'll also advise on what device or software is needed at the client side, to work with their VPN.

But to be honest, whatever you do, I don't think it will work well. You can't really combine two bad links to make one good link. You *can* combine two similar good links to make one good link with twice the throughput. FTTC and 4G have very different characteristics; if you divide your traffic between FTTC and 4G and find performance problems, it will be pretty much impossible to debug. TCP in particular can get very unhappy when packets arrive out-of-order, which will be the case when dividing packets between two links with very different latencies.

I think in this situation, multi-WAN with FTTC as primary and 4G as failover (or FTTC primary for some users and 4G primary for others) is simpler and easier to troubleshoot.
Standard User kitcat
(experienced) Sat 06-Feb-21 11:06:57
Print Post

Re: Combine connections using Pi


[re: candlerb] [link to this post]
 
Some years ago there were quite a few bonded lines set up using the firebrick and AAISPs L2TP service in an attempt to get higher bandwidth on ADSL2+

Seemed to work well from the posts on here describing it.

I have never seen a solution mentioned on here that was successful for 2 connections with different latencies.
Standard User hoopla
(committed) Sat 06-Feb-21 11:33:52
Print Post

Re: Combine connections using Pi


[re: candlerb] [link to this post]
 
In reply to a post by candlerb:
But to be honest, whatever you do, I don't think it will work well. You can't really combine two bad links to make one good link. You *can* combine two similar good links to make one good link with twice the throughput. FTTC and 4G have very different characteristics; if you divide your traffic between FTTC and 4G and find performance problems, it will be pretty much impossible to debug. TCP in particular can get very unhappy when packets arrive out-of-order, which will be the case when dividing packets between two links with very different latencies.

I think in this situation, multi-WAN with FTTC as primary and 4G as failover (or FTTC primary for some users and 4G primary for others) is simpler and easier to troubleshoot.
No, I don't think it will be any good either, but the facilities are sitting idle, so it may be worth a try.

And that's why I won't even consider buying special hardware to try it, or paying for two expensive FTTC lines.

Not much point for me in having failover from FTTC to 4G - in my experience, a working FTTC connection is easily reliable enough. And if it isn't, it needs to be fixed.

The other alternative is to simply have two virtual networks and choose between them, but that's more faff than I want on a day-to-day basis.
Standard User zzing123
(member) Sat 06-Feb-21 12:03:43
Print Post

Re: Combine connections using Pi


[re: candlerb] [link to this post]
 
I'd agree with what candlerb says.

I also have hilariously unreliable FTTC that Openreach think is 'good enough' and reliable 4/5G but the former has super low latency and the latter is fast but high latency.

If you want bonding, you need to use a service to 'combine' the streams on the other end. The only ones that do that are essentially 'SD-WAN' providers, which are proprietary and £££ (Cisco Meraki, Silverpeak, Peplink Speedfusion, VMWare Velocloud etc). The reason for this is that SD-WAN is non-standard and still 'new', but essentially all involve putting a VPN to a concentrator and then managing the network via various technologies including OSPF and link aggregation and so forth. The point is you can use any ISP or connection underneath them for the 'physical network', but your locked into the tech.

Opensource SD-WAN exists, but it's very 'beta'. OpenMPTCPRouter is a modified OpenWRT to do MPTCP, but its a little unnecessarily complicated and really feels more like a testing ground for using multipath than a solid solution. Another is FlexiWAN, which allows 3 free devices. But both of these are a bit ropey. If you want an open source it's best just to have a VPN to your own VPS or server and just use simple aggregation across these links, but it's fragile.

Finally you have ISPs. Cerberus, AAISP, Watchfront, Sharedband and Evolving all provide bonded broadband solutions as a fully managed package. Prices are more than a multiple of X lines due to the need to use more expensive CPE equipment.

Finally the other option to bonding is failover. 'Failover' between 4G and FTTC and back again is considerably easier. In fact most cheap routers will support failover which just involves pinging a host continuously and flipping the link to keep up time, but you're only using the bandwidth of one link at a time.
Standard User heathrow
(regular) Sat 06-Feb-21 12:18:21
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
An Edgerouter X costs around £45.

It supports both loadbalancing and failover.

Load balancing allows you to use two links to increase your capacity.

It's not as smooth as bonding and using a higher end router but it will be easier to set up than a Pi. Which once you have bought dongles to give you extra ethernet ports will cost as you as much anyway.


I have an Edgerouter X which for a few weeks was load balancing an AAISP FTTC link with a Virgin 150 Mbps link.


It now load balances the Virgin link with a Communiuty Fibre 1 gig FTTP link.
Standard User wifigeek
(knowledge is power) Sun 07-Feb-21 13:24:35
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
mptcprouter.
Standard User amiga_dude
(learned) Sun 07-Feb-21 13:58:56
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
IT might be off topic but I thought put in here anyway if helps

Youtube - (Craft Computing) VPN Everything! OpenVPN Gateway Tutorial
Standard User Pheasant
(committed) Sun 07-Feb-21 16:09:23
Print Post

Re: Combine connections using Pi


[re: candlerb] [link to this post]
 
In reply to a post by candlerb:
But to be honest, whatever you do, I don't think it will work well. You can't really combine two bad links to make one good link. You *can* combine two similar good links to make one good link with twice the throughput. FTTC and 4G have very different characteristics; if you divide your traffic between FTTC and 4G and find performance problems, it will be pretty much impossible to debug. TCP in particular can get very unhappy when packets arrive out-of-order, which will be the case when dividing packets between two links with very different latencies.

I think in this situation, multi-WAN with FTTC as primary and 4G as failover (or FTTC primary for some users and 4G primary for others) is simpler and easier to troubleshoot.

Primary / failover would be straightforward with FTTC and 4G WAN links.

I’m still scratching my head how bonding 2 *very* dissimilar links with not only with completely different bandwidths but also (especially for 4G) unpredictable latencies is going to work in practice. How do out of sequence packets get handled? What happens with UDP and audio and video streams on calls for example?

My Broadband Speed Test
Standard User Pheasant
(committed) Sun 07-Feb-21 16:56:11
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
In reply to a post by hoopla:
In reply to a post by candlerb:
But to be honest, whatever you do, I don't think it will work well. You can't really combine two bad links to make one good link. You *can* combine two similar good links to make one good link with twice the throughput. FTTC and 4G have very different characteristics; if you divide your traffic between FTTC and 4G and find performance problems, it will be pretty much impossible to debug. TCP in particular can get very unhappy when packets arrive out-of-order, which will be the case when dividing packets between two links with very different latencies.

I think in this situation, multi-WAN with FTTC as primary and 4G as failover (or FTTC primary for some users and 4G primary for others) is simpler and easier to troubleshoot.
No, I don't think it will be any good either, but the facilities are sitting idle, so it may be worth a try.

And that's why I won't even consider buying special hardware to try it, or paying for two expensive FTTC lines.

Not much point for me in having failover from FTTC to 4G - in my experience, a working FTTC connection is easily reliable enough. And if it isn't, it needs to be fixed.

The other alternative is to simply have two virtual networks and choose between them, but that's more faff than I want on a day-to-day basis.


Have a read of this blog...

http://ltehacks.com/viewtopic.php?f=21&t=1078

My Broadband Speed Test
Standard User hoopla
(committed) Sun 07-Feb-21 20:15:41
Print Post

Re: Combine connections using Pi


[re: Pheasant] [link to this post]
 
In reply to a post by Pheasant:
Have a read of this blog...

http://ltehacks.com/viewtopic.php?f=21&t=1078
Thanks, That's very useful and quite heartening.
I don't think I can do much until I get the FTTC up and running, though perhaps I can try setting up the remote server end, or at least try doing a test installation of it on a local server, to discover what it might break!
Standard User Pheasant
(committed) Sun 07-Feb-21 20:55:58
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
Be really interested to hear how you eventually get on with it.

As I said in my previous post, it makes me wonder how out of sequence packets are dealt with when there is a potential for quite large variability between the type of links used.

Good luck with it all.

My Broadband Speed Test
Standard User heathrow
(regular) Sun 07-Feb-21 21:07:40
Print Post

Re: Combine connections using Pi


[re: kitcat] [link to this post]
 
Load balancing works well when you have lots of things happening.
Standard User Rolandrat
(experienced) Mon 08-Feb-21 09:28:47
Print Post

Re: Combine connections using Pi


[re: kitcat] [link to this post]
 
Any multi WAN Draytek with session based load balancing has always done a damn fine job for me, have used one with 3 x mobile connections and currently 2 x FTTP connections.
No its not bonding but any multi session activity is handled very well. Always a few on Ebay to pick up cheap.
Standard User ian72
(eat-sleep-adslguide) Mon 08-Feb-21 14:40:20
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
I don't think you'll really find a solution that uses the downstream from FTTC and the upstream from 4G. Generally the return path is going to be the same as the outgoing path. Fully bonded could potentially do it but that needs something at the other end as well. Load balancing isn't going to do what you want.

Personally I think for your specific scenario you aren't going to easily find a solution.
Standard User hoopla
(committed) Tue 09-Feb-21 22:21:22
Print Post

Re: Combine connections using Pi


[re: Pheasant] [link to this post]
 
So far, there have been some hitches in the path... For one thing, the FTTC isn't due to be installed until late next week. And for another, I can't remember where I put the spare Pi4 so I've dug out an old Pi3 to stand in for it.

So far, it seems to work well enough with only one WAN connection. A bit slower than going direct, but not a lot.

The speed difference is less than the normal variability of the 4G service. The latency is about 5ms slower. I'm guessing that the Pi4 will be better, when I remember where I put it.

Yes, I know it's pointless aggregating just one connection, but it gives me a feel for the overhead and helps me work out the setup.

I'll see if I can find another SIM card and try with two 4G connections.
Standard User hoopla
(committed) Tue 09-Feb-21 22:26:53
Print Post

Re: Combine connections using Pi


[re: ian72] [link to this post]
 
This is fully bonded and there is something at the other end. That's the whole point of it.

There is a Pi running router software and connecting to the different WAN connections, stuffing all the traffic into a pipe that emerges in a VPN server in a well-connected hosting centre. The one I have available is in Germany, which may account for the few extra ms of ping..

I cancelled my London server a few months ago: the amount of hacking attempts on that was getting ridiculous.

Whether combining will work well remains to be seen, but it does work!
Standard User wifigeek
(knowledge is power) Tue 09-Feb-21 23:30:05
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
my 2x 4g gives about 170 down and 60 up aggregated across two 4G providers.

multipath tcp seems to have some clever schedulers to help deal with out of order packets etc - my two 4g links are very different - ee and three (three is terrible).

been fine even for videoconferencing. seems strange that it works, almost voodoo. but it does appear to work well.
Standard User hoopla
(committed) Sat 13-Feb-21 16:59:36
Print Post

Re: Combine connections using Pi


[re: candlerb] [link to this post]
 
In reply to a post by candlerb:
In reply to a post by FarmerStuart:
USB network adapter or wifi on the newer ones?


Tagged VLANs into a switch? But if the OP knew what tagged VLANs were, then they probably wouldn't be asking questions here smile

I'll try to make one thing clear. Some of the advice offered previously has been about routers with dua moml-WAN ports. These are easy to deploy. However what happens with these is that any particular session (e.g. TCP session to fetch a web page) goes over one or other link - both inbound and outbound traffic for that session. This may be useful if there are several people in a household who are using the Internet simultaneously, and to balance their usage between them.

However this *can't* be used to combine bandwidth for a single session (e.g. a single large download), nor to use one link for upload and the other link for download as part of the same session. I think this is why the OP wants some sort of VPN solution, where two VPN connections are connected to some remote VPN node, and traffic is load-balanced between them.

Unfortunately, I don't think this is going to work well.

From my experience, probably the thing most likely to work would be two L2TP sessions with PPP-multilink across them, since this is the same technology used for "bonding" discrete PPP sessions. You need an L2TP termination point at the other end. AAISP offer an L2TP service for £10 per month, but I don't know if it supports multilink. Plus, you need a router which would do L2TP and multilink (possibly their "firebrick" device can do this), and you need to understand how to configure L2TP and multilink.

Maybe some VPN supplier offers a packaged solution for bonding that's easy to deploy. In which case, they'll also advise on what device or software is needed at the client side, to work with their VPN.

But to be honest, whatever you do, I don't think it will work well. You can't really combine two bad links to make one good link. You *can* combine two similar good links to make one good link with twice the throughput. FTTC and 4G have very different characteristics; if you divide your traffic between FTTC and 4G and find performance problems, it will be pretty much impossible to debug. TCP in particular can get very unhappy when packets arrive out-of-order, which will be the case when dividing packets between two links with very different latencies.

I think in this situation, multi-WAN with FTTC as primary and 4G as failover (or FTTC primary for some users and 4G primary for others) is simpler and easier to troubleshoot.


Your rather arrogant and dismissive comment set the scene.
You are indeed wrong. You can use this to combine two poor connections into one good one.
Standard User hoopla
(committed) Sat 20-Feb-21 12:15:31
Print Post

Re: Combine connections using Pi


[re: Davey_H] [link to this post]
 
In reply to a post by Davey_H:
Are you thinking of OpenMPTCProuter?

You can certainly run it on a RasPi
Update: I set it up and it seemed to work OK. Then I had to wait for the FTTC to arrive. That's started working and the results are every bit as good as I'd hoped.

Speedtest.net reports the latency as the latency of the fttc connection, the download speed is about 85% of the two separate download speeds combined, and the upload speed is more like 90% of the two upload speeds combined.

TBB speedtest reports even higher speeds (pretty much 100% of the combined speeds, up and down). Even for the single thread download it's significantly faster than the FTTC sync, but also reports higher latency.

I'm more than pleased with the results.
Standard User Davey_H
(regular) Sun 21-Feb-21 05:03:50
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
Excellent result.

Is this using your RasPi 3 or 4?
Standard User Pheasant
(committed) Sun 21-Feb-21 11:51:11
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
Thats great to hear. Nice work!

My Broadband Speed Test
Standard User hoopla
(committed) Thu 25-Feb-21 19:33:22
Print Post

Re: Combine connections using Pi


[re: Davey_H] [link to this post]
 
In reply to a post by Davey_H:
Excellent result.

Is this using your RasPi 3 or 4?
This is with a 4.
I found the Pi4 before the fttc went live. It was on the floor, right next to my desk. I'd looked all over for it!

As I feared, they reconnected the fttc to the cabinet 1.2 km away, rather than installing a new line to the cabinet 200 metres away, so the sync is 29.57 down, 6.95 up.

This combined with 4G gives me 14ms, 46.93 down, 41.31 up:
https://www.speedtest.net/my-result/d/ca29ffb7-fe44-...
or
My Broadband Speed Test

Edited by hoopla (Thu 25-Feb-21 19:43:29)

Standard User wifigeek
(knowledge is power) Thu 25-Feb-21 22:28:26
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
this is what mine looks like with 2x 4g

https://www.speedtest.net/result/10994989504.png

it really is a pretty decent solution when the masts dont go down. was down to one mast for a good couple of weeks there
Standard User hoopla
(committed) Sat 27-Feb-21 13:12:46
Print Post

Re: Combine connections using Pi


[re: wifigeek] [link to this post]
 
In reply to a post by wifigeek:
this is what mine looks like with 2x 4g

https://www.speedtest.net/result/10994989504.png

it really is a pretty decent solution when the masts don't go down. was down to one mast for a good couple of weeks there
I wish I could get it that good! We used to have really good speeds from EE, but the mast we used was switched off for some reason. Three used the same site, but they came back on again there about a year later. EE didn't

But today I got this, which is good enough for my needs.
speedtest.net
or (later)
My Broadband Speed Test

Edited by hoopla (Sat 27-Feb-21 17:42:55)

Standard User ft247
(regular) Sun 14-Mar-21 19:14:20
Print Post

Re: Combine connections using Pi


[re: hoopla] [link to this post]
 
In reply to a post by hoopla:
Speedtest.net reports the latency as the latency of the fttc connection, the download speed is about 85% of the two separate download speeds combined, and the upload speed is more like 90% of the two upload speeds combined.

I'm more than pleased with the results.


As am I, not quite believing it would be any good I bonded a 75/15 Plusnet FTTC and a 350/35 Virgin connection to an AWS endpoint. The Pi4 is not bothered by the workload and the results are in line with what's discussed above.

If I needed to put real volume through it I'd look for a VPS provider with lower data transfer costs though.
Pages in this thread: 1 | 2 | 3 | 4 | (show all)   Print Thread

Jump to