LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-11-2003, 07:51 PM   #1
330Pilot
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Rep: Reputation: 0
2 dhcp servers, 1 network...


My current setup consists of 3 machines (2 Linux, 1 Windows XP), all connected through a Linksys router. The linksys router has DHCP enabled and all 3 computers can pickup ip addresses from the linksys router.

what i am trying to do is allow one linux machine to pickup an ip address from the other linux machine rather then the linksys router. here is what i have done so far:

1. added the MAC address of the linux machine that is going to pickup an ip address to the filter list of my linksys router (so as to not send an ip from the linksys)

2. dhcpd.conf script looks as follows:
# Configuration file for ISC dhcpd v3.0

not authoritative;
ddns-update-style none; # required for ISC v3.0

shared-network testingnet {
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.150 192.168.1.160;
ping-check true;
deny unknown-clients;
deny duplicates;
}
}

group {

default-lease-time 21600;
max-lease-time 21600;
use-host-decl-names on;

option domain-name "local";
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option root-path "192.168.1.101:/opt/ltsp/i386";

host ws001 {
hardware ethernet XX:XX:XX:XX;
filename "lts/vmlinuz-2.4.22-ltsp-1";
always-broadcast on;
}

} # group

I removed the MAC address fyi. 192.168.1.1 is my linksys router's ip address on gthe 192.168.1.0 subnet.

3. started the dhcp service.
4. tested the service by checiking the messages.log and making sure the router was seeing a DHCPREQUEST...

The problem is, the linux box will only detect the dhcp from the other linux box about 1 in 5 or 6 times. The other times it fails to detect the dhcp server...

any ideas how to get the dhcp server to force the linux box to pickup an ip address from it, rather then get confused with the linksys router?

any help would be appreciated.

330
 
Old 10-11-2003, 11:56 PM   #2
sidmark-2850
Member
 
Registered: Aug 2003
Posts: 133

Rep: Reputation: 15
I had a similar situation and I just ended up disabling the router's dhcp server. I normally check the router's status page to see whether the info has changed. If it did, I changed the dhcp server's info to match. The only difference in my situation is that the clients always got IP info from the linux dhcp server even though both dhcp servers were running. The clients would only get the router's dhcp info only if the linux dhcp was turned off.
 
Old 10-12-2003, 01:01 PM   #3
330Pilot
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by sidmark-2850
I had a similar situation and I just ended up disabling the router's dhcp server. I normally check the router's status page to see whether the info has changed. If it did, I changed the dhcp server's info to match. The only difference in my situation is that the clients always got IP info from the linux dhcp server even though both dhcp servers were running. The clients would only get the router's dhcp info only if the linux dhcp was turned off.
Your problem would be nice in my scenario =)

I do belive thats that the "non authoritative" line is for in the dhcpd.conf, it does resolve the issue of the linux dhcp server taking over the entire network.

Last edited by 330Pilot; 10-12-2003 at 01:03 PM.
 
Old 10-12-2003, 01:43 PM   #4
EyesOnly
Member
 
Registered: Aug 2003
Location: The Netherlands
Distribution: SlackWare
Posts: 202

Rep: Reputation: 30
OK here is what I know of it:

if a client is looking for a DHCP server, it will use the server which responded the fastest on his request. So in the case of 330pilot, the router was faster than the linux pc (most of the time anyway). in the case of sidmark-2850 the linux pc was faster than the router.

As far as I know there is no way of telling a client which DHCP server to use. It will always pick the one which answered the fastest to his request.
 
Old 10-12-2003, 03:38 PM   #5
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
just a thought.....

the pc has to go through the router to get to the linux dhcp server?
 
Old 10-12-2003, 05:10 PM   #6
sidmark-2850
Member
 
Registered: Aug 2003
Posts: 133

Rep: Reputation: 15
330Pilot, I have a linksys router and am in the exact situation. I do not have the "non authoritative" statement in my dhcpd.conf file. Double checking, I have both dhcp servers on right now and I always get the IP from the linux box unless it is turned off. That is the only time I get the address from the router. The dhcp server is plugged directly to the router's ports and I have a hub plugged to the router's uplink port. I sometimes have problems with a machine plugged to the hub as it won't get an address from either dhcp server. I ended up configuring it statically, which really sucks. That machine has a really long cable though. I am not sure about the length, but it communicates just fine with the other machines on the network. The other machines plugged to the hub have shorter cables and there is no issue with obtaining addressed. Play around with the authoritative statements and see whether that makes a difference.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Two DHCP Servers mesh2005 Linux - Networking 3 10-16-2005 06:26 AM
DHCP problems - multiple DHCP servers sat86 Linux - Networking 4 10-02-2005 06:43 AM
2 DHCP servers on a network olefemmy Linux - Networking 2 11-19-2004 11:27 AM
running servers with DHCP??? wiredX Linux - Security 4 07-14-2003 05:01 AM
Changing DHCP servers albean Linux - Networking 1 12-10-2002 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration