Author Topic: Multi WAN  (Read 14520 times)

Offline TheGreatVirus

  • Contributor
  • ***
  • Posts: 12
Multi WAN
« on: May 12, 2010, 09:32:25 am »
Please add multi WAN support! I use multiple WAN connections daily and being able to assign threads to a different WAN connection wold make this app AMAZING on so many levels! Please consider it!

Offline Ascathon

  • Contributor
  • ***
  • Posts: 608
    • vandenekker.com
Re: Multi WAN
« Reply #1 on: May 12, 2010, 10:25:55 am »
Can't you try modifying your OS or router? Play with the routing tables.
Save the Whales - Harpoon a Honda

Offline TheGreatVirus

  • Contributor
  • ***
  • Posts: 12
Re: Multi WAN
« Reply #2 on: May 14, 2010, 03:41:18 am »
would it not be cooler to just add it into the application?

Offline olddog

  • Contributor
  • ***
  • Posts: 4
Re: Multi WAN
« Reply #3 on: June 21, 2010, 01:03:15 am »
this would be great.
there are some good newsreader out there, but not one has this ability.
got 2 connections myself.

would be great if alt.binz could use 10 connections from one router and 10 from the second one.
shared account or even 2 accounts.

this could speed up downloads.

you can't modify your os or router that way.
« Last Edit: June 21, 2010, 01:06:26 am by olddog »

Offline GuntherDW

  • Contributor
  • ***
  • Posts: 3
Re: Multi WAN
« Reply #4 on: June 24, 2010, 12:02:08 pm »
That's because an application doesn't have to need to know how to get to some point.
multi-wan routers aren't built for something like that either.

You can more or less "force" to use the 2 connections if you have a spare pc, and setup a static route to the server on that one, while you use the other route on your computer.

But yet again multi-wan routers aren't made for that purpose, they (90% of the time) send traffic with the same destination IP over the same line. It would wreak havoc otherwise. (go look up how TCP works.)
If you have 2 computers in your network with their own PPPoE/internet connection, then it becomes a whole different story.

If you have 2 seperate usenet accounts on separate providers it's actually quite easy.
Check the ranges on the servers, and just setup your multi-wan router with those as static routes. (if you're able to that is, but i guess it would be a shame to publish a multi-wan router w/o any type of ruleset capability)

Offline TheGreatVirus

  • Contributor
  • ***
  • Posts: 12
Re: Multi WAN
« Reply #5 on: February 01, 2011, 05:47:06 pm »
Is their any chance we can get this feature? I have been waiting for over a year now...

Offline Rdl

  • Administrator
  • *****
  • Posts: 4073
Re: Multi WAN
« Reply #6 on: February 01, 2011, 06:11:50 pm »
I'm not sure it's even possible

Offline TheGreatVirus

  • Contributor
  • ***
  • Posts: 12
Re: Multi WAN
« Reply #7 on: February 01, 2011, 08:05:37 pm »
Anything is possible.

Simply tie (assign) some of the threads to a different adapter.

I have coded apps in the past to support the ability to select an adapter for net use.

An example would be 10 threads to one adapter and 10 to another.

Newsgroups would be one the few things this would be Ok with as it downloads in chunks.

Offline Rdl

  • Administrator
  • *****
  • Posts: 4073
Re: Multi WAN
« Reply #8 on: February 01, 2011, 09:53:30 pm »
I don't think binding to different adapter will do the job. I don't see how would it be possible without messing with routes.

Offline Rdl

  • Administrator
  • *****
  • Posts: 4073
Re: Multi WAN
« Reply #9 on: February 01, 2011, 09:54:55 pm »
I have coded apps in the past to support the ability to select an adapter for net use.
Please point me to or send me example of such application.

Offline wizziwig

  • Contributor
  • ***
  • Posts: 14
Re: Multi WAN
« Reply #10 on: August 25, 2016, 11:45:40 pm »
Bumping this feature request.

The backend is actually quite simple to implement.  Most of the work would be in the UI to assign specific NIC cards to each server.

When you call bind() on the socket, you pass the local address associated with a specific network card.  All traffic for that socket will then travel through this specific network card.  You typically need to assign a different Newsgroup provider account per network card because otherwise they will think you're sharing accounts due to traffic coming from different IP addresses.

The user will handle the rest.  He will assign each network card to a specific router/gateway for each ISP.  I do this right now.  I have one internal NIC assigned to one ISP and a second USB Ethernet adapter assigned to another ISP.  It would be great if altbinz allowed me to download from serverA over one network adapter and download from serverB on the other adapter.

Offline dabrown

  • Contributor
  • ***
  • Posts: 88
Re: Multi WAN
« Reply #11 on: August 29, 2016, 06:52:08 pm »
I know this is a tricky feature, probably not as easily implemented as what has been suggested, but I'd definitely add my support to it as well.

I currently have two ADSL connections (for reasons too complicated to get into at the moment) and having Multi-WAN support would definitely be useful, but of course, it only works with News Servers which accept two separate IP addresses, so maybe a block account with some providers or if you are lucky, maybe you can use one account with two IP addresses (rare, but possible).

At the moment, I have two separate computers set up with Alt.Binz, one connected to each ADSL modem/router/gateway so I can download via both connections - not ideal, but it works for the moment. 

I'd rather have some way of load balancing across two modems - from a laptop that could be achieved using Wireless on one and Wired LAN on the other I guess.

I'll defer to rdl to see whether he thinks it is even possible to implement, but I'd definitely find it useful.

Thanks in advance.  Cheers.

Offline Rdl

  • Administrator
  • *****
  • Posts: 4073
Re: Multi WAN
« Reply #12 on: August 29, 2016, 07:45:21 pm »
I'm still waiting for someone to point me to application that is able to receive from 2 network adapters...

Offline dabrown

  • Contributor
  • ***
  • Posts: 88
Re: Multi WAN
« Reply #13 on: August 29, 2016, 09:14:10 pm »
Actually rdl you have a good point

People interested in load balancing could have a look at these options I've researched below:

A networking engineer colleague of mine suggested Zeroshell WAN balancing:
http://www.zeroshell.net/listing/internet_load_balancing.pdf

zeroshell looks the most promising and have a good look at the PDF I've linked as it has an excellent example of the type of situation many people are talking about - two different WANs with a load balancer in the middle.

My colleague also mentioned ClearOS as a possible solution.

He suggested that might be the easiest to set up if I didn't want to outlay any money on new routing hardware to test load balancing (and for testing, just re-purpose an old pc or find the cheapest SFF pc with two NICs).


Here's another software solution I found while researching:
ForceBindIP
https://r1ch.net/projects/forcebindip

Here's some practical example here with links to GUI front ends:
https://www.raymond.cc/blog/bind-windows-application-to-specific-network-adapter-with-forcebindip/

But that only works if you want to bind *one* particular application to a particular IP address - this wouldn't work for what people are suggesting - you'd need two instances of Alt-Binz running, each bound to a different IP and I think that very much defeats the original request.  However, it might suit someone who wants to force all their NSP traffic down one WAN and general browsing down another.

- a another way might be to use Windows' own route tables:

Found online here: http://superuser.com/questions/224783/how-to-take-advantage-of-two-internet-connections-wifi-wired

Quote
e.g. If you have a big download and you check that it is coming from a server whose IP address is 10.10.10.199 then add a route in windows routing table as

route delete 0.0.0.0
route add 10.10.10.0 mask 255.0.0.0 10.2.1.1 metric 10
route add 0.0.0.0 mask 0.0.0.0 192.168.15.1 metric 20

First line will remove your default route. i.e Windows will not forward packets via one interface.

Second line tells it to route all traffic destined for 10.10.10.X here X can be any number between 0-255 to go through interface whose IP is 10.2.1.1. It will also give it a metric of 10 (lower the metric the more preferred that route is).

Third line adds a default gateway. Route all the traffic which you cant find any route command through this interface. It will pass rest of all traffic through 192.168.15.1 interface.

Using the example above, providing you have two separate ethernet adapters (and the key here would be, could you use the WiFi *AND* the LAN port on a laptop at the same time?), make sure the two different modems have different IP subnets ranges.

Using this solution, potentially you could add a route for each Newshost's server - but it doesn't give you any fine control - only by the metric number, the lower the number, the more preferred the route will be.


I also found another piece of software called iNetFusion which *might* achieve a similar result, but I'd have to look at it further, and it's not free.

http://www.clusterlinks.com
http://www.clusterlinks.com/features


Also as I eluded to at the start, a load balancing router will do the job, but there's no way to specify which packets go up which path without adding static routes - which shouldn't be too difficult - again, not a Alt.binz specific solution, but you might be able to add route tables so that one news host routes up one WAN in preference to another.

I've been looking at a Ubiqiti Edgerouter Lite which will load balance two WANs - but I've had no practical experience with it.

This example below, shows a TP Link TL-R480T+ Router which can combine up to four WANs:

http://www.techkhoji.com/how-to-combine-multiple-internet-connections/

One important thing to consider - a re-purposed PC is going to cost you real $$ in terms of power cost - as an example, my colleague suggested the following:

Quote
If you work on around 130w for a desktop machine (the older they are, typically the more power they consume) at an average rate of AUD$0.28 cents per kWh (that's about average here in my state, but varies all over AU, and of course all over the world) that = ~$320/year to run.  An Edgerouter Lite at 5w works out to around $12/year - or about $1 month."

So he makes a good point here, re-purposing an old PC to run ClearOS, Zeroshell or another type desktop PC solution, is going to be expensive in terms of power consumption, where as a dedicated Load Balancing capable router such as the TP Link I mentioned or the Edgerouter Lite, is going to be much cheaper.

I know this doesn't help the thread specifically, but at least I'm looking into some options.  ;)

Regards.

Offline dabrown

  • Contributor
  • ***
  • Posts: 88
Re: Multi WAN
« Reply #14 on: August 30, 2016, 12:12:57 am »
I'm not sure whether this helps rdl, but my colleague found this:

https://github.com/falahati/NetworkAdapterSelector

Quote
Both parts of the solution are in pure C# using EasyHook library and SharpShell framework. It was a little experiment to see how stable is EasyHook and how SharpShell can perform in terms of performance.


Tested by a colleague of mine using Arch Linux:

Quote
simple test code(linux(should work on windows))
import socket
s = socket.socket()
s.bind((get_ip_address('eth0'),0))
s.connect(('http://www.google.com/',80))
forced it through eth0 on test 1
then I reran and forced it through wlan0

I'm not sure whether it will be compatible with your existing code, but maybe it is worth investigating?

He is happy to discuss directly with you on irc if you like.

Cheers.