cancel
Showing results for 
Search instead for 
Did you mean: 

DHCP Servers.

seanbranagh
Grafter
Posts: 1,236
Registered: ‎02-08-2007

DHCP Servers.

My network exists spanning 2 houses almost a mile apart as pictured. My house on the left has a DHCP server running in the router. My friends house on the right has now got an ADSL connection and a Netgear DG834G in place of one of the Dlink access points in the picture. Is there anyway I can have 2 seperate DHCP servers, the one in my house assigning the default gateway as the router in my house for the computers in my house and one in his house assigning the default gateway for his computers as the router in his house? All computers need to remain on the same network for file sharing. I know I can just use static IP's as I currently do but it would be nice to have the option for DHCP also.
16 REPLIES 16
KenA
Grafter
Posts: 92
Registered: ‎28-08-2007

Re: DHCP Servers.

Hi
I'm not so familiar with these routers, but the theory follows.  You might need to upgrade one or both.
You should set up a Virtual Private Network (VPN) connection between the two routers, configuring one to dial the other to establish the VPN link. 
Each subnet can be different - e.g. one house DHCP addresses are 192.168.1.x, the other 192.168.2.x - you configure that in the router, or they can be on the same subnet.  If you choose the same subnet, then cofigure the DHCP range in both routers so that they don't overlap, and also make sure the two routers have different local addresses.
chillypenguin
Grafter
Posts: 4,729
Registered: ‎04-04-2007

Re: DHCP Servers.

Having two DHCP servers on one network if fine as long as the IP address in their ranges do not overlap. The issue you will have is that either server could issue the IP address, but they will give there gateway IP address. So you could end up accessing the internet via your friends internet connection. If you place a firewall between the two networks (which is a good idea anyway) and block ports 67-68 that should stop lease requests, between the two locations.
http://www.comptechdoc.org/independent/networking/guide/netdhcp.html
seanbranagh
Grafter
Posts: 1,236
Registered: ‎02-08-2007

Re: DHCP Servers.

That sounds like the best option. I knew I could run two DHCP servers but didn't know how to stop eachother using eachothers connection. I am currently not using my Cisco 837. Using Ethernet 0 and Ethernet 2 I should be able to use this as the firewall? Just put it between my switch and the access point at my end that forms the wireless bridge?
samuria
Grafter
Posts: 1,581
Thanks: 3
Registered: ‎13-04-2007

Re: DHCP Servers.

The chances are it will work ok but not guaranteed. When an O/S start up it looks for a dhcp server and 99 time out of a hundred it broadcasts and picks up the nearest server. So in theory it should get a reply from the local dhcp first and therefore log on with that one. You can keep them both on the same range just dont let them overlap. So if router one was sending out 10.0.0.2-10.0.0.45 you can use the second one on 10.0.0.46-10.0.0.100.
depending on the router you may be able to block certain mac's so other cant get a lease
Full info on DHCP is at
http://www.dhcp-handbook.com/dhcp_faq.html 
chillypenguin
Grafter
Posts: 4,729
Registered: ‎04-04-2007

Re: DHCP Servers.

A quick google on the Cisco 837, shows it as a ADSL router, does it have a Ethernet connection on the WAN side?
seanbranagh
Grafter
Posts: 1,236
Registered: ‎02-08-2007

Re: DHCP Servers.

The 837 has and adsl connection and 4 ethernet ports. Port 4 can be used as Ethernet 2 and the other ports as Ethernet 0 so in answer to the question it does have an ethernet connection on the wan side if you set it up that way. It could be used as a cable router. Being a Cisco it will do pretty much anything you want so long as you know a little Cisco IOS.
chillypenguin
Grafter
Posts: 4,729
Registered: ‎04-04-2007

Re: DHCP Servers.

As both networks are on the same subnet then it is not technically a router/firewall but a `bridge` that is required.
This article may be helpfull;
http://www.faqs.org/docs/Linux-HOWTO/Ethernet-Bridge-netfilter-HOWTO.html#SETUP_Linux_brctl
I am not sure if you will be able to setup filtered bridging on the Cisco, but it should be possible on your Linux server, with an additional network card.
chillypenguin
Grafter
Posts: 4,729
Registered: ‎04-04-2007

Re: DHCP Servers.

Another update;
brctl is in the Centos repository; as `bridge-utils`
seanbranagh
Grafter
Posts: 1,236
Registered: ‎02-08-2007

Re: DHCP Servers.

Noticed something interesting now that I have 2 Netgear DG834 ADSL connections on the network (One is a DG834G). My friends connects slightly faster than mine despite being almost a mile further from the exchange. Stats pictured with mine on the right.
As for a firewall/bridge I was having a look through webmin on my Linux server, can I not just use iptables to block 67-68 on a second connection going to the wireless bridge when I get round to installing the card?
jelv
Seasoned Hero
Posts: 26,785
Thanks: 971
Fixes: 10
Registered: ‎10-04-2007

Re: DHCP Servers.

With those noise margins you like like you are both going to have loads of problems!
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
chillypenguin
Grafter
Posts: 4,729
Registered: ‎04-04-2007

Re: DHCP Servers.

Quote from: Sean
As for a firewall/bridge I was having a look through webmin on my Linux server, can I not just use iptables to block 67-68 on a second connection going to the wireless bridge when I get round to installing the card?

Should work, don't forget to bridge the two cards together. And the rules will need to be applied to the right  interface.
chillypenguin
Grafter
Posts: 4,729
Registered: ‎04-04-2007

Re: DHCP Servers.

Sean
Have you had a chance to try this yet?
seanbranagh
Grafter
Posts: 1,236
Registered: ‎02-08-2007

Re: DHCP Servers.

Was working on a website much of the week and had to go on a day training course to Southampton which obviously travelling from here that took the entire day. Will hopefully get time next week. I want to get the website all finished first as it is paid work and I want to get paid Grin
I will definitely post about how I get on with this when I do it.
seanbranagh
Grafter
Posts: 1,236
Registered: ‎02-08-2007

Re: DHCP Servers.

I finally got round to installing the second card and connecting it to the Dlink bridge and therefore to everything in my friends house. I have set up the second interface in webmin and called it eth1
The linux server now has the following:
eth0 192.168.10.39
eth1 192.168.10.69
I cannot see anything on the otherside of the eth1 connection. How do I forward all traffic between the 2? Do I need to set up as a bridge or a router?
I need everything to stay on the same network.