dhicks Posted November 16, 2009 Posted November 16, 2009 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
kylewilliamson Posted November 16, 2009 Posted November 16, 2009 As far as your DNS issue goes... you can use one any DNS provider for round-robin.. just add two entries for say, http://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 1
dhicks Posted November 17, 2009 Author Posted November 17, 2009 you can use one any DNS provider for round-robin.. just add two entries for say, http://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
srochford Posted November 17, 2009 Posted November 17, 2009 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 :-) 1
fawkers Posted November 17, 2009 Posted November 17, 2009 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 1
mac_shinobi Posted November 17, 2009 Posted November 17, 2009 adsl bonding ? Automated Home - ADSL Bonding - How To and Review 2
tmcd35 Posted November 17, 2009 Posted November 17, 2009 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?
dhicks Posted November 17, 2009 Author Posted November 17, 2009 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
dhicks Posted November 17, 2009 Author Posted November 17, 2009 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
mjs_mjs Posted November 17, 2009 Posted November 17, 2009 (edited) 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. Edited November 17, 2009 by mjs_mjs spelling mistake
localzuk Posted November 17, 2009 Posted November 17, 2009 (edited) 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 Edited November 17, 2009 by localzuk 1
dhicks Posted November 17, 2009 Author Posted November 17, 2009 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
powdarrmonkey Posted November 17, 2009 Posted November 17, 2009 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. 1
powdarrmonkey Posted November 17, 2009 Posted November 17, 2009 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. 1
mjs_mjs Posted November 17, 2009 Posted November 17, 2009 (edited) 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? Edited November 17, 2009 by mjs_mjs error in html. 1
teejay Posted November 17, 2009 Posted November 17, 2009 (edited) Quite simple really, school uses one, ICT Technical use the rest:D Seriously though, I would look at agregating the links through some kind of firewall/router. Yes it will cost you a network port to set up the VLAN, but it also means if a section of the school doing something that needs extra bandwidth then they will get it. You good also look at implementing QOS. Wouldn't it actually be more cost effective to have a higher capacity leased line, especially if you are doing your own hosting and need good uplink speed. Edited November 17, 2009 by teejay 1
tmcd35 Posted November 17, 2009 Posted November 17, 2009 I take it each ADSL modem has an RJ45 link directly onto the LAN with their own IP? How about giving the modems IP's not in your regular range, say 192.168.1.1/255.255.255.0 and 192.168.2.1/255.255.255.0. and then setting up a VM with three NIC's. NIC 1 on your standar IP range used as the default gateway for your network. NIC 2 on the 192.168.1.x Lan with a default gateway to the 192.168.1.1 modem and NIC 3 on the 192.168.2.x Lan with a defailt gateway to the 192.168.2.1 modem. Then set the routing table on the gateway server between the three networks. 1
dhicks Posted November 17, 2009 Author Posted November 17, 2009 Seriously though, I would look at agregating the links through some kind of firewall/router. Yes it will cost you a network port to set up the VLAN Our network is a bit of a bodge job, with switches daisy-chained around the building. I aim to avoid having traffic going back-and-forth too much, we only have single cat5 cables between most switches, we don't have any backbone bandwidth to spare. Wouldn't it actually be more cost effective to have a higher capacity leased line, especially if you are doing your own hosting and need good uplink speed. Yes, but that costs money :-) -- David Hicks
dhicks Posted November 17, 2009 Author Posted November 17, 2009 How about giving the modems IP's not in your regular range, say 192.168.1.1/255.255.255.0 and 192.168.2.1/255.255.255.0. But then we'd have two un-filtered gateways on our network, and pupils (and staff) are allowed to bring their own machines in. -- David Hicks
dhicks Posted November 17, 2009 Author Posted November 17, 2009 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. Curses. It would make for better-than-nothing failover, I suppose - if one Internet connection conks out then we'd have to get people to reboot their machines for them to be given the address of the second gateway via DHCP. -- David Hicks
tmcd35 Posted November 17, 2009 Posted November 17, 2009 But then we'd have two un-filtered gateways on our network, and pupils (and staff) are allowed to bring their own machines in. -- David Hicks Okay, do your switched support VLANs? VLAN the port the routers (and their un-filtered networks) are plugged into on their switch and assign the gatewat servers 2 outgoing nics to the same VLAN. If memory serves you don't have to VLAN the the connnections in between. The traffic will run over your existing back bones but only VLAN tagged traffic can comminicate with those four ports on the network. (Possibly two physical ports and 2 on a virtual switch).
dhicks Posted November 17, 2009 Author Posted November 17, 2009 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 sounds most like the proper answer - it sounds like how a network is supposed to be designed. So, my options (if I've got the right idea here) include buying a switch or router to replace the central switch (dell PowerConnect 2724) we have at the moment. This would need to be at least a 16-port switch, maybe 24. Anybody any recommendations? This strikes me as something that will cost money... Another option would be setting up a router off of our existing switch. We could use a small PC for that, maybe even have multiple network interfaces connected to the switch. My concern is that this adds yet another hop in our network, potentially slowing things down. -- David Hicks
teejay Posted November 17, 2009 Posted November 17, 2009 Our network is a bit of a bodge job, with switches daisy-chained around the building. I aim to avoid having traffic going back-and-forth too much, we only have single cat5 cables between most switches, we don't have any backbone bandwidth to spare. Yes, but that costs money :-) -- David Hicks Yes but having 6 ADSL lines costs money as well, plus you're not going to get the performance you expect as they will all be going back to the same exchange which will cause contention issues as they will be sharing the same bandwidth. Have you got quotes for leased lines or SDSL?
mac_shinobi Posted November 17, 2009 Posted November 17, 2009 Yes but having 6 ADSL lines costs money as well, plus you're not going to get the performance you expect as they will all be going back to the same exchange which will cause contention issues as they will be sharing the same bandwidth. Have you got quotes for leased lines or SDSL? Or Cable ( which may mean virgin media ) assuming there is cable in your area ? Also your question mentions ADSL - is this ADSL 2+ from someone like BeThere - http://www.bethere.co.uk or cerberus networks - http://www.cerberusnetworks.co.uk/rt_home.html
dhicks Posted November 17, 2009 Author Posted November 17, 2009 Okay, do your switched support VLANs? Our network is a bit of a bodge job, with switches daisy-chained around the building. I aim to avoid having traffic going back-and-forth too much, we only have single cat5 cables between most switches, we don't have any backbone bandwidth to spare. If memory serves you don't have to VLAN the the connnections in between. The traffic will run over your existing back bones but only VLAN tagged traffic can comminicate with those four ports on the network. (Possibly two physical ports and 2 on a virtual switch). Problem is the machines in the prep IT room, for instance, would have to send traffic to the router over a 1GB link, then have it sent straight back again the other way over the same 1GB link - it would double the load on our network, which is probably overloaded as it is. -- David Hicks
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now