+ Post New Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 31
Wireless Networks Thread, Multiple Gateways in Technical; ...
  1. #1

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,772
    Thank Post
    1,308
    Thanked 804 Times in 698 Posts
    Rep Power
    247

    Multiple Gateways

    Hello All,

    We have two (actually, half-a-dozen, long story...) ADSL connections on our network. We are only using one at the moment. We would like to have the benefit of using the bandwidth from both. This implies having two gateways on the network - say 10.0.0.1 and 10.0.0.2.

    The simplest way I could think of to make use of these two gateways was to have DHCP (running on Ubuntu) do "round robin" gateway assignment. So, the first computer switched on in the morning gets assigned gateway 10.0.0.1, the second 10.0.0.2, the third 10.0.0.1, etc. There doesn't, however, seem to be an option in dhcpd.conf for this - in fact, searching Google, no DHCP implementation seems to do this. Is this because it's a silly idea and I'm missing some important aspect of networking theory or practice here? It's a crude load-balancing scheme, of course, but it strikes me as being acceptable on our smallish network.

    Also, the man page for dhcpd.conf doesn't actually mention a "gateway" option, although it does mention a routers option. It seems to imply that I can give a list of routers to a DHCP client, in order of preference.

    - Is the "routers" option equivalent to the functionality of "gateway" in this context, or in general?
    - Does this option provide for fail-over - if one gateway fails, should a client machine automatically figure that out and use the alternative? Does that happen in a reasonable time (seconds?), or would it be quicker for the user to reboot the machine and get assigned a working gateway?

    As I type this, I realise that one (very...) crude way of doing round-robin-ish DHCP would be to have a script modify dhcpd.conf and restart dhcpd every few seconds. That certainly sounds like a bad idea (would some clients get DHCP timeouts, or would they actually keep trying until answered by a restarted dhcpd?).

    Right, so that covers outgoing connections. We also have our web server on-site, which it would nice to be able to have more incoming bandwidth for. At the moment our web server is plugged in to the router (actually, it's not, it's a virtual machine and plugged in to a bridged network connection, but that's a hopefully minor detail), but I would plan to move it inside the firewall. Therefore, we would have two gateway machines, both port-forwarding port 80 to the same web server inside the network. We would like some (say, 60%, bigger bandwidth on one connection) requests to come in via one connection, the rest (40%) to come in on the other.

    Is there anything we need to do internally, on our network, to enable this, or is this functionality entirely implemented by a DNS provider doing round-robin DNS for us? This can definatly be done, but at a bit of a cost - around £120 a month from a quick initial look on Google. Can anyone recommend a good DNS provider that can provide round-robin DNS? Am I correct in thinking that the above setup would work as I imagine?

    --
    David Hicks

  2. #2

    Join Date
    Jan 2007
    Posts
    425
    Thank Post
    7
    Thanked 32 Times in 27 Posts
    Rep Power
    22
    As far as your DNS issue goes... you can use one any DNS provider for round-robin.. just add two entries for say, www.school.county.sch.uk would have an A entry for 212.122.39.2 AND 9.8.7.2 or whatever your two ips are.

    As for the multiple gateways.. you would be best buying a load balancing router to handle this for you. There's a number of these here:

    Load Balancer, Balancing Routers | Broadbandbuyer.co.uk

    They exist on the LAN as one IP address and can load balance between the two connections, or just one if one connection falls over etc.

    Kyle

  3. Thanks to kylewilliamson from:

    dhicks (17th November 2009)

  4. #3

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,772
    Thank Post
    1,308
    Thanked 804 Times in 698 Posts
    Rep Power
    247
    Quote Originally Posted by kylewilliamson View Post
    you can use one any DNS provider for round-robin.. just add two entries for say, www.school.county.sch.uk would have an A entry for 212.122.39.2 AND 9.8.7.2 or whatever your two ips are.
    Okay, thanks, I'll look in to that.

    They exist on the LAN as one IP address and can load balance between the two connections, or just one if one connection falls over etc.
    Okay, thanks. Just thought: I could have a script periodically check /var/db/dhcpd.leases and rewrite dhcpd.conf with fixed settings for each known MAC address, then restart dhcpd. Every hour or so should be fine. It'd take a day or so for all the PCs in the school to be distributed between the two gateways. Would that work?

    Kyle[/QUOTE]

  5. #4

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,159
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    125
    Just looking at the man page for dhcpd.conf, I think there's no reason you can't give out different gateways for different groups of machines.

    I think you would do this in "group" sections which then specify a particular set of hosts (by MAC address)

    Don't know how well this would balance things but I'd guess if you split each of your physical groups of machines and allocate half/half then it would be a reasonable starting point.

    You just need to remember you've done this - one day, one router is going to go down and half the machines in a classroom won't have web access and you'll be tearing your hair out wondering why :-)

  6. Thanks to srochford from:

    dhicks (17th November 2009)

  7. #5
    fawkers's Avatar
    Join Date
    Jun 2007
    Location
    Southend
    Posts
    193
    Thank Post
    32
    Thanked 22 Times in 21 Posts
    Blog Entries
    2
    Rep Power
    32
    hi

    I found the following website How To: Load Balancing & Failover With Dual/ Multi WAN / ADSL / Cable Connections on Linux which if your looking for a cheap (free) soultion might we worth a look.

    .Adam

  8. Thanks to fawkers from:

    dhicks (17th November 2009)

  9. #6

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    10,053
    Thank Post
    3,585
    Thanked 1,123 Times in 1,025 Posts
    Rep Power
    377

  10. 2 Thanks to mac_shinobi:

    dhicks (17th November 2009), fawkers (17th November 2009)

  11. #7

    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    6,069
    Thank Post
    902
    Thanked 1,013 Times in 825 Posts
    Blog Entries
    9
    Rep Power
    350
    Okay, maybe I'm missing something here but I don't think you need to set multiple gateways in DHCP.

    Surely you should have a Linux box running as a 'gateway server' with a NIC exposed to your LAN (the gateway IP in DHCP) and both ADSL connections connected to this server.

    All the loadbalancing and round robin stuff is then taken care of in routing tables on this server?

  12. #8

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,772
    Thank Post
    1,308
    Thanked 804 Times in 698 Posts
    Rep Power
    247
    Quote Originally Posted by srochford View Post
    Don't know how well this would balance things but I'd guess if you split each of your physical groups of machines and allocate half/half then it would be a reasonable starting point.
    It sounds reasonable, doesn't it? I'm sure there's queue theory research people out there who could point good reasons why, exactly, it's a bad idea, but I can't think of anything wrong with the idea at the moment. I've just realised I have a list of all machines, along with MAC addresses and room locations, in the script I use for reimaging, so I could adapt that to rewrite dhcpd.conf.

    You just need to remember you've done this - one day, one router is going to go down and half the machines in a classroom won't have web access and you'll be tearing your hair out wondering why
    Ah, but should this be taken care of with the "routers" option in dhcpd.conf, which lets me define multiple routers for a client, in order of preference? So I could actually assign both routers (gateways - are they the same thing?) to all clients, just switch the order.

    --
    David Hicks

  13. #9

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,772
    Thank Post
    1,308
    Thanked 804 Times in 698 Posts
    Rep Power
    247
    Quote Originally Posted by tmcd35 View Post
    Surely you should have a Linux box running as a 'gateway server' with a NIC exposed to your LAN (the gateway IP in DHCP) and both ADSL connections connected to this server.
    Sorry, neglected to say that the ADSL connections are at opposite ends of the building, so plugging them in to one machine isn't practical. I suppose I could set up a VLAN (so just the two ADSL routers and the gateway machine would be connected to the VLAN), but that would use up the somewhat limited capacity in our switches. If I was particularly cunning, with multiple gateways I could have each machine asssigned to the gateway physically nearest to it, cutting down lag time.

    --
    David Hicks

  14. #10
    mjs_mjs's Avatar
    Join Date
    Jan 2009
    Location
    bexleyheath, london
    Posts
    1,021
    Thank Post
    37
    Thanked 111 Times in 95 Posts
    Rep Power
    38
    Quote Originally Posted by tmcd35 View Post
    Okay, maybe I'm missing something here but I don't think you need to set multiple gateways in DHCP.

    Surely you should have a Linux box running as a 'gateway server' with a NIC exposed to your LAN (the gateway IP in DHCP) and both ADSL connections connected to this server.

    All the loadbalancing and round robin stuff is then taken care of in routing tables on this server?
    Indeed a good way to go, but still has the issue of not being redundant enough. By having one gateway you have a single point of faliure. It's possible to have multiple gateways on an XP machine. But i'm not sure if you can script that. On DHCP within windows server 2003 it's possible to have multiple gateways, they're called routers, setting 003.

    A Gateway is a Router, or has the same function as a router.
    Last edited by mjs_mjs; 17th November 2009 at 10:55 AM. Reason: spelling mistake

  15. #11

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    18,529
    Thank Post
    527
    Thanked 2,648 Times in 2,049 Posts
    Blog Entries
    24
    Rep Power
    925
    I would probably look at setting up 2 routers (one on each ADSL connection), then a third router which does the load balancing between those 2. This would allow for redundancy and would allow for the geographical spread you have.

    True, it'd require 3 routers, but it would provide redundancy and load-balancing, without having to fiddle with DHCP.

    Just ordinary ADSL routers on the lines, and something like this for the load-balancing: http://www.dlink.com/products/?pid=452
    Last edited by localzuk; 17th November 2009 at 10:59 AM.

  16. Thanks to localzuk from:

    dhicks (17th November 2009)

  17. #12

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,772
    Thank Post
    1,308
    Thanked 804 Times in 698 Posts
    Rep Power
    247
    Quote Originally Posted by mac_shinobi View Post
    adsl bonding?
    The ADSL connections are physically seperated, and I get the impressions that needs support from the ISP, which comes at a price.

    --
    David Hicks

  18. #13

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    In dhcpd.conf you can provide multiple routers, but most clients use them in order and cache routes so if you're going for fail-over there will be a gap when the first one disappears.

  19. Thanks to powdarrmonkey from:

    dhicks (17th November 2009)

  20. #14

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    Quote Originally Posted by dhicks View Post
    The ADSL connections are physically seperated, and I get the impressions that needs support from the ISP, which comes at a price.

    --
    David Hicks
    Correct.

  21. Thanks to powdarrmonkey from:

    dhicks (17th November 2009)

  22. #15
    mjs_mjs's Avatar
    Join Date
    Jan 2009
    Location
    bexleyheath, london
    Posts
    1,021
    Thank Post
    37
    Thanked 111 Times in 95 Posts
    Rep Power
    38
    Quote Originally Posted by localzuk View Post
    I would probably look at setting up 2 routers (one on each ADSL connection), then a third router which does the load balancing between those 2. This would allow for redundancy and would allow for the geographical spread you have.

    True, it'd require 3 routers, but it would provide redundancy and load-balancing, without having to fiddle with DHCP.
    Second that.

    i've re-read your origonal post and would do somthing like this.
    adsl 1 -> 10.0.0.1
    adsl 2 -> 10.0.0.2
    load balencer -> 10.0.0.3

    then set up DHCP to the following order;
    10.0.0.3
    10.0.0.2
    10.0.0.1

    depending on your ADSL modems/routers you could get away with just a machine for a load balancer.

    In dhcpd.conf you can provide multiple routers, but most clients use them in order and cache routes so if you're going for fail-over there will be a gap when the first one disappears.
    hence you need a load balencer.

    what modems/routers are you using?
    Last edited by mjs_mjs; 17th November 2009 at 11:03 AM. Reason: error in html.

  23. Thanks to mjs_mjs from:

    dhicks (17th November 2009)



SHARE:
+ Post New Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Multiple monitors
    By chikulanikader in forum Hardware
    Replies: 13
    Last Post: 9th June 2009, 01:37 PM
  2. [CLOSED] Bug/Error: multiple log in
    By leco in forum EduGeek.net Site Problems
    Replies: 6
    Last Post: 18th April 2009, 08:34 PM
  3. Multiple monitors
    By netadmin in forum Windows
    Replies: 9
    Last Post: 25th January 2007, 01:41 AM
  4. Default gateways and proxy server
    By snakepottery in forum Windows
    Replies: 8
    Last Post: 21st November 2005, 03:57 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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