Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-11-2003, 07:51 PM
|
#1
|
LQ Newbie
Registered: Sep 2003
Posts: 7
Rep:
|
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
|
|
|
10-11-2003, 11:56 PM
|
#2
|
Member
Registered: Aug 2003
Posts: 133
Rep:
|
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.
|
|
|
10-12-2003, 01:01 PM
|
#3
|
LQ Newbie
Registered: Sep 2003
Posts: 7
Original Poster
Rep:
|
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.
|
|
|
10-12-2003, 01:43 PM
|
#4
|
Member
Registered: Aug 2003
Location: The Netherlands
Distribution: SlackWare
Posts: 202
Rep:
|
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.
|
|
|
10-12-2003, 03:38 PM
|
#5
|
Member
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266
Rep:
|
just a thought.....
the pc has to go through the router to get to the linux dhcp server?
|
|
|
10-12-2003, 05:10 PM
|
#6
|
Member
Registered: Aug 2003
Posts: 133
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 11:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|