Jump to content

Double internet connection set up

Verrierr
Go to solution Solved by FliesLikeABrick,

Another point... if this ISP is inherently reliable - why add another ISP instead of just switch to a second one?  Or are you expecting them both to be WISPs  (wireless ISPs), and both be unreliable?

 

The software and configuration required will be extremely dependent on the VPN provider and how they want to do it.  It would almost surely require that you use a computer as your router instead of a normal router.  Note that this would of course increase your latency to everything on the Internet.  The amount depends on how far you are from the VPN provider.

 

If you wanted to get adventurous, you could do it yourself.  Here's a list of general pointers/topics involved, roughly in this order.  This would probably cost about the same as using a service from someone, but you would learn a lot more -- if you're prepared to and want to:

- Set up a linux computer as your router at home.  It will need at least 2 interfaces, but 3 if you realistically wanted a second ISP later on.  You can find various tutorials for Linux installation and learn about that on your own, for the router side you'd want to read about iptables, how routing works (at least a very basic understanding).  There's a tutorial I used 10 years ago when first doing this, but I can't find that specific one. If you google about how to use Linux as a router you'll probably find enough guidance.

- Rent a VPS or cheap dedicated servers (start with Linode or similar)

- Install and configure openvpn and quagga on your home "router" server as well as the VPS

- The VPS would essentially be set up with  an iptables ruleset like your home router, since traffic would go through it too

 

What you would be doing is establishing openvpn connections from your home router to the hosted VPS.  This is what OpenVPN is for.  Quagga is a routing protocol suite, to allow for dynamic routing.  The home linux machine would be using OSPF (a routing protocol) to talk to the VPS router over two different VPN tunnels.  You could set one as primary and one as backup.. Whenever one goes down (Internet goes down for the Internet connection that that tunnel is using), OSPF would detect the failure and start using the other one.

 

The connection would not drop like it would for other solutions because:

- Your IP address on the Internet would appear as the IP address of the VPS server.  This is because all traffic is coming through there

- If you bought a box that let you use two ISPs at home, your IP address on the Internet would depend on which ISP you were using at a given time.

- By routing through the VPS, the Network Address Translation is taking place on the VPS.  This allows it to use the VPS IP as your source IP for either ISP.  As a result, it doesn't need to change when failing over and existing connections would not be broken.

 

There are a few substantial caveats, especially if using this for gaming:

- Your latency to any sites/servers -- most notably realtime things such as games, voice chats, etc -- would be increased by at least the amount of time from you to the VPS server

- The fastest that this thing would detect and fail over is roughly 3 seconds (the OSPF default is 40 seconds).  You may be able to find a BFD (Bidirectional Forwarding Detection) implementation for Linux that works with Quagga, but this is beyond what I've ever cared to implement on Linux  - I haven't needed fast reconvergence (reconvergence is the name for detection of failure, and use of a different path)

 

Linux, OpenVPN, and Quagga are fairly well-documented and there are tons of tutorials.  This specific use case may or may not be common enough that you'll find guids to help use them to solve this problem/need.  These technologies together start to blur the line between what is a network device, versus what is a server.  If you're interested in this kind of thing or the technologies involved, there is a ton to learn and it can quickly become a hobby or career

Hi everybody,

so I've been stuck with a pretty unstable internet connection for the past few weeks and it's been giving me a lot of headaches. It's not really that bad when it's just browsing/downloading stuff because it's instability mainly manifests in huge ping spikes (the highest I saw was around 22k ms) for a few seconds, which makes online gaming impossible. I've been wondering if there's anyway I could set it up so that I can dynamically switch to the connection tethered from my phone (which hovers at around 100 ms) when those spikes happen. I suppose I'd have to use a VPN to cheat the game server into thinking that I'm not changing my IP address every time a spike happens and then some kind of software that would choose which connection to use at any given time? Does anyone have any idea if it's possible at all and then how to actually make this work?

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Verrierr said:

Hi everybody,

so I've been stuck with a pretty unstable internet connection for the past few weeks and it's been giving me a lot of headaches. It's not really that bad when it's just browsing/downloading stuff because it's instability mainly manifests in huge ping spikes (the highest I saw was around 22k ms) for a few seconds, which makes online gaming impossible. I've been wondering if there's anyway I could set it up so that I can dynamically switch to the connection tethered from my phone (which hovers at around 100 ms) when those spikes happen. I suppose I'd have to use a VPN to cheat the game server into thinking that I'm not changing my IP address every time a spike happens and then some kind of software that would choose which connection to use at any given time? Does anyone have any idea if it's possible at all and then how to actually make this work?

I don't believe this is possible, on multiple levels:

1. If you just straight up had connection switching, you'd immediately disconnect from the Server/Game during a switch.

2. If you used a VPN so that your connection to the server had the same IP, you'd still disconnect from the VPN SERVER during a connection switch.

 

Can you tell me what your ISP plan is? Download and Upload speeds please. Also what technology is it (DOCSIS 3.0 over Coaxial Cable, VDSL over phone lines, ADSL2+ over phone lines, etc).

 

Basically, if you're having huge ping spikes, you should call your ISP and have them diagnose your line. Could be line instability or faulty equipment on their end.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

Your best choice is to put effort into working with your ISP to get the issue fixed.  Call them, follow up, provide the information they need including going through the initial "stupid" script that you think is worthless.  Call, follow-up, escalate, provide information, repeat.

 

What Dalek said is mostly correct.  Technically though you can have dual connections via a VPN server where it switches more seamlessly - a router that keeps two VPN connections open at once, one over each connection -- but your typical/usual VPN services won't offer this.  This is more common for folks to do themselves with a server in a datacenter, a server at home acting as a router, and OSPF or another protocol managing the failover.

Link to comment
Share on other sites

Link to post
Share on other sites

16 minutes ago, dalekphalm said:

I don't believe this is possible, on multiple levels:

1. If you just straight up had connection switching, you'd immediately disconnect from the Server/Game during a switch.

2. If you used a VPN so that your connection to the server had the same IP, you'd still disconnect from the VPN SERVER during a connection switch.

 

Can you tell me what your ISP plan is? Download and Upload speeds please. Also what technology is it (DOCSIS 3.0 over Coaxial Cable, VDSL over phone lines, ADSL2+ over phone lines, etc).

 

Basically, if you're having huge ping spikes, you should call your ISP and have them diagnose your line. Could be line instability or faulty equipment on their end.

 

4 minutes ago, FliesLikeABrick said:

Your best choice is to put effort into working with your ISP to get the issue fixed.  Call them, follow up, provide the information they need including going through the initial "stupid" script that you think is worthless.  Call, follow-up, escalate, provide information, repeat.

Nothing to be done about the ISP, since it's like a small company (in a village) that delivers internet with radio waves apparently and the issue is their total bandwidth is just too small to handle everything being thrown at them during usage spikes (and bad weather :D). Don't ask me why anyone agrees to such conditions, I'm not the owner of this deal and I suggested a change numerous times.

 

4 minutes ago, FliesLikeABrick said:

What Dalek said is mostly correct.  Technically though you can have dual connections via a VPN server where it switches more seamlessly - a router that keeps two VPN connections open at once, one over each connection -- but your typical/usual VPN services won't offer this.  This is more common for folks to do themselves with a server in a datacenter, a server at home acting as a router, and OSPF or another protocol managing the failover.

This is exactly what I was thinking I could try setting up. You said typical vpn service won't support this but is it possible to find one that does?

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, FliesLikeABrick said:

Sorry, I don't know of any (but I haven't looked either)

Let's assume I looked and found. Do you think what I have in mind is possible from software point of view?

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, FliesLikeABrick said:

Sorry, I don't know of any (but I haven't looked either)

I also wonder whether there would still be a connection drop w/ the game server during the switchover.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, dalekphalm said:

I also wonder whether there would still be a connection drop w/ the game server during the switchover.

I'm wondering about that myself but I'm pretty sure I won't now until I try. It probably also depends on the VPN server provider  and their set up.

Link to comment
Share on other sites

Link to post
Share on other sites

Another point... if this ISP is inherently reliable - why add another ISP instead of just switch to a second one?  Or are you expecting them both to be WISPs  (wireless ISPs), and both be unreliable?

 

The software and configuration required will be extremely dependent on the VPN provider and how they want to do it.  It would almost surely require that you use a computer as your router instead of a normal router.  Note that this would of course increase your latency to everything on the Internet.  The amount depends on how far you are from the VPN provider.

 

If you wanted to get adventurous, you could do it yourself.  Here's a list of general pointers/topics involved, roughly in this order.  This would probably cost about the same as using a service from someone, but you would learn a lot more -- if you're prepared to and want to:

- Set up a linux computer as your router at home.  It will need at least 2 interfaces, but 3 if you realistically wanted a second ISP later on.  You can find various tutorials for Linux installation and learn about that on your own, for the router side you'd want to read about iptables, how routing works (at least a very basic understanding).  There's a tutorial I used 10 years ago when first doing this, but I can't find that specific one. If you google about how to use Linux as a router you'll probably find enough guidance.

- Rent a VPS or cheap dedicated servers (start with Linode or similar)

- Install and configure openvpn and quagga on your home "router" server as well as the VPS

- The VPS would essentially be set up with  an iptables ruleset like your home router, since traffic would go through it too

 

What you would be doing is establishing openvpn connections from your home router to the hosted VPS.  This is what OpenVPN is for.  Quagga is a routing protocol suite, to allow for dynamic routing.  The home linux machine would be using OSPF (a routing protocol) to talk to the VPS router over two different VPN tunnels.  You could set one as primary and one as backup.. Whenever one goes down (Internet goes down for the Internet connection that that tunnel is using), OSPF would detect the failure and start using the other one.

 

The connection would not drop like it would for other solutions because:

- Your IP address on the Internet would appear as the IP address of the VPS server.  This is because all traffic is coming through there

- If you bought a box that let you use two ISPs at home, your IP address on the Internet would depend on which ISP you were using at a given time.

- By routing through the VPS, the Network Address Translation is taking place on the VPS.  This allows it to use the VPS IP as your source IP for either ISP.  As a result, it doesn't need to change when failing over and existing connections would not be broken.

 

There are a few substantial caveats, especially if using this for gaming:

- Your latency to any sites/servers -- most notably realtime things such as games, voice chats, etc -- would be increased by at least the amount of time from you to the VPS server

- The fastest that this thing would detect and fail over is roughly 3 seconds (the OSPF default is 40 seconds).  You may be able to find a BFD (Bidirectional Forwarding Detection) implementation for Linux that works with Quagga, but this is beyond what I've ever cared to implement on Linux  - I haven't needed fast reconvergence (reconvergence is the name for detection of failure, and use of a different path)

 

Linux, OpenVPN, and Quagga are fairly well-documented and there are tons of tutorials.  This specific use case may or may not be common enough that you'll find guids to help use them to solve this problem/need.  These technologies together start to blur the line between what is a network device, versus what is a server.  If you're interested in this kind of thing or the technologies involved, there is a ton to learn and it can quickly become a hobby or career

Link to comment
Share on other sites

Link to post
Share on other sites

19 hours ago, FliesLikeABrick said:

 

Another point... if this ISP is inherently reliable - why add another ISP instead of just switch to a second one?  Or are you expecting them both to be WISPs  (wireless ISPs), and both be unreliable?

 

I did say that it is not my call for the mine ISP, and the second one is just a connection tethered from my phone. Anyway, thank you for taking the time to give me lots of useful information. As far as actually implementing this solution goes, I'm probably going to do it as long as it turns out that additional latency from using VPS doesn't make the project completely pointless.

Link to comment
Share on other sites

Link to post
Share on other sites

20 hours ago, FliesLikeABrick said:

Your latency to any sites/servers -- most notably realtime things such as games, voice chats, etc -- would be increased by at least the amount of time from you to the VPS server

By the way, this isn't entirely true since the VPS can actually be very close to the game server in which case I may very well see close to no latency increase at all.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Verrierr said:

By the way, this isn't entirely true since the VPS can actually be very close to the game server in which case I may very well see close to no latency increase at all.

No, it is entirely true. You just said the same thing as him, but in a different way.

 

When using a VPS or a VPN, your latency is increased (at minimum) by exactly the amount of latency between you and the VPN/VPS server.

 

Yes, the server might be close to your final destination. If that's the case, total latency might not increase much, this is true. But latency WILL increase, unless they're hosting the Game Server in the same Data Centre as your VPS.

 

So again, the increased latency might be very small, but it will exist in some form, which is all that @FliesLikeABrick was saying.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

24 minutes ago, dalekphalm said:

No, it is entirely true. You just said the same thing as him, but in a different way.

 

When using a VPS or a VPN, your latency is increased (at minimum) by exactly the amount of latency between you and the VPN/VPS server.

 

Yes, the server might be close to your final destination. If that's the case, total latency might not increase much, this is true. But latency WILL increase, unless they're hosting the Game Server in the same Data Centre as your VPS.

 

So again, the increased latency might be very small, but it will exist in some form, which is all that @FliesLikeABrick was saying.

I do understand that increased latency will happen, that's not what I'm arguing about.

I stand by my statement that it's wrong to say that it will increase at minimum for the amount of latency between me and VPS. Let me give you a simple example. Let's assume the latency between me and the game server is 40 ms, the latency between me and the VPS server is 30 ms, and the latency between game server and VPS is 20 ms. My total latency when using VPS will be 50 ms which is 10 ms more over my latency without VPS which was assumed to be 40 ms. And yet you said that it will increase by at least 30 ms in this example, which I believe to be wrong.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Verrierr said:

I do understand that increased latency will happen, that's not what I'm arguing about.

I stand by my statement that it's wrong to say that it will increase at minimum for the amount of latency between me and VPS. Let me give you a simple example. Let's assume the latency between me and the game server is 40 ms, the latency between me and the VPS server is 30 ms, and the latency between game server and VPS is 20 ms. My total latency when using VPS will be 50 ms which is 10 ms more over my latency without VPS which was assumed to be 40 ms. And yet you said that it will increase by at least 30 ms in this example, which I believe to be wrong.

I'll concede the point. In this example, yes, the total will not increase that much.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×