Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
I want to put together a router that has an AP interface along with two WLAN interfaces that will act as a load balanced WAN connection. It seems it would ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2012
    Posts
    8

    Question Dual WiFi "wan" + AP router?


    I want to put together a router that has an AP interface along with two WLAN interfaces that will act as a load balanced WAN connection. It seems it would be easy, but I have one question. How do I deal with 2 AP that are 2 physically different networks, but used the same subnet? IE, both use 192.168.1.0/24 address on the LAN side.
    xIQSv.jpg (bigger version: @ i.imgur.com / xIQSv.png)

  2. #2
    Linux Newbie reginaldperrin's Avatar
    Join Date
    Oct 2010
    Location
    Christchurch, New Zealand
    Posts
    123
    Hi
    I have tried to set up a similar network: "two WLAN interfaces that will act as a load balanced WAN connection". This would be something that the operating system would handle on an automatic basis, rather than something that could be easily done by a user.
    My experience is that the network connection manager, which is controlled directly by the OS, will NOT attempt to "load balance", even though there may be two or more valid and viable connections.
    You will most likely find that one connection is given priority, and is selected by the OS as such.
    My research at the time was around wireless network speed measurement, and I found that managing such a thing as above would be generally too much of a computational load. I looked into something very much like what you describe, and quickly discarded it. Few, if any, users require such a connection. Thus, a "feature" like you seem to want, has simply not been built into regular OSs. You would have to rewrite the part of the OS which does this.
    Good luck in that case!

    "How do I deal with 2 AP that are 2 physically different networks, but used the same subnet?"
    This is a seperate question. If you have two APs, with two radio devices on the computer, then the OS should have no issue with connecting to them. For example, device one connects to AP 1 on 2.445 GHz, device two connects to AP 2 on 2.475 GHz. The subnets on each AP is not an issue as they are seperate networks at this point.

    If you connect the two APs together further down the line via network cables and a switch, and they are on the same subnet, then, if I have understood your question correctly, all that should happen is that computers will "see" each other and be able to communicate. There is no problem with being on the same subnet here.
    My university uses a similar set up. They have many APs servicing a large building, but they want the connected computers to be able to talk.

    If the APs are operating on the same frequency, perhaps in an attempt to boost speeds, you will only get interference on each, and contention for the airwaves, resulting in a lower overall speed.

    Hope this helps

  3. #3
    Just Joined!
    Join Date
    Jan 2012
    Posts
    8
    Yeah - The load balancing wan connections is fairly simple.

    AP1 and AP2 will not be talking to each other via the LAN, since they are physically different, not shared with each other because there would be IP conflicts.

    How does frequency and subnets correlate? The problem I see is that if both AP's have IP 192.168.1.1, you'll end up routing issues based on your ARP table.

    After a little bit of digging, I think I might be possible to virtualize the WLAN interfaces with Linux Containers (LXC) use some sort of bride setup. Of the configs I saw today, they looked to be transparent bridges and would introduce the same ARP table issue.

    I'll have to see if I can do a NAT of some sort.

    Thoughts?

  4. #4
    Linux Newbie reginaldperrin's Avatar
    Join Date
    Oct 2010
    Location
    Christchurch, New Zealand
    Posts
    123
    Looking at your image again, I can't seem to work out what it is that you're trying to do.
    I thought it seemed similar to something I was trying to do last year, but now, I'm not so sure.
    Are you trying to get some sort of circular traffic route?
    What reason do you have for insisting that the two APs have the same IP address?

    Cheers
    Last edited by reginaldperrin; 01-18-2012 at 06:48 AM. Reason: spelling

  5. #5
    Just Joined!
    Join Date
    Jan 2012
    Posts
    8
    OK - let me give you a scenario:
    I'm a college student, living in an apartment with a room mate or 2. We have laptops, cell phones, game console, etc. 2 apartment neighbors said "Sure, you can use our WiFi!". I want to connect to both APs and use their bandwidth (one being on ISP A, and the other being on ISP B), but not wanting to suck up all the bandwidth of one neighbor, I want to load balancing between two. This will be outward established connections, no inbound created connection (IE, web servers, ssh, etc.). I will only be talking to the AP - 192.168.1.1 on each network.

    Sort of what the "slurpr" was going to do.
    Last edited by ellisgl; 01-18-2012 at 07:22 PM. Reason: adding example.

  6. #6
    Just Joined!
    Join Date
    Jan 2012
    Posts
    8
    Maybe this is a better diagram... wifinetdiagram2.jpg

  7. #7
    Linux Newbie reginaldperrin's Avatar
    Join Date
    Oct 2010
    Location
    Christchurch, New Zealand
    Posts
    123
    Aha! Now things are much clearer.
    The first thing that comes to mind in terms of solving this problem, is the issue of load balancing.
    I don't see any reason that subnets should be a worry, and the connections to two different APs shouldn't be a problem at all. What might be a problem is the issue of ensuring that you don't use more from one neighbour than the other.
    You have nice neighbours too, by the sound of it!
    At any rate, I would consider the difficulty of trying to send exactly equal amounts of packets down each line. Is it so critically important to get them exactly even?

    Perhaps it might be easier simply to have a script which connects to your two APs in an alternating fashion, maybe time-limited for each?
    Of course, you do not want to interrupt any network traffic in mid-stream, so it might be so much simpler to connect, say, to each AP on alternating mornings (or 12-hour blocks)?

    On average, it would seem reasonable to expect the usage to be approximately even over a length of time.

    So, I always try to keep to the KISS principle, and simplicity still applies in the software and computing world.
    You could keep things really simple with a single wireless connection to AP1 on day 1, then on day 2, the automated script would disconnect from AP1 and connect to AP2.
    This would eliminate issues with dual wireless connections and dual devices.
    You could even do this manually, if script writing is not a strength.

    It would be really nice from a purist point of view to get the connections EXACTLY even, and have EXACTLY the same total packet size crossing each, and it might even make a really decent whole-term software project. However, it is highly complicated, and, from your description, it doesn't appear to be critical that things are exact. So, maybe a fuzzier, not-so-exact solution (as perhaps above) is better.

    I suppose you just have to ask yourself, how important is it to achieve exactness? A solution like that above which I thought up in only 30 seconds may suffice.

    Hope this helps.

  8. #8
    Just Joined!
    Join Date
    Jan 2012
    Posts
    8
    That would be one way, but misses what I'm looking to fully accomplish. There are other ways of doing this, E.g. use cheap Open/DD-WRT routers to NAT the WIFI connection to a copper ethernet to seperate subnet or run full stack VMs and bridge the network to the main os. Of course, these two become a big pain to manage, so that's why I was thinking about using LXC, but can not find any examples that show this type of configuration (or I'm totally missing it). Basically if you can get the networking (connection handling and NAT) with in the LXC then bridge the NAT, I'm thinking that would work. Most examples I found look to be transparent bridging, which will still end up with ARP table issues.

    Basically this is a challenge I setup for myself to see this type of setup can be created with ease of configuration.

  9. #9
    Linux Newbie reginaldperrin's Avatar
    Join Date
    Oct 2010
    Location
    Christchurch, New Zealand
    Posts
    123
    You'll still need something to count the packets on each, and throttle or drop them if they are unbalanced.
    This will mean some sort of software in the middle, monitoring what is going on.
    This will slow the network somewhat, especially if the software is arbitrarily dropping packets to maintain an even flow.
    This is beyond my scope of knowledge for specific software solutions, but I wish you good luck.
    I hope the final solution isn't too complicated.

    Cheers

  10. #10
    Just Joined!
    Join Date
    Jan 2012
    Posts
    8
    Load balancing the WAN is easy. The hard part is figuring out how not to jack up the ARP tables. Once this is figured out, I might create a full tutorial =)

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •