[SOLVED] dhcpd not giving deafult gateway and dns to clients
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
dhcpd not giving deafult gateway and dns to clients
Hi
I have some problems getting my dhcp server to function properly.
My setup is as follows:
Fedora Core 11 running as a server/internet gateway.
I have two NICs. eth0 connected to the internet and eth1 connected to my local network.
Firewall is configured with shorewall. It appears to work OK.
dhcpd does not seem to work correctly. I would like dhcpd to hand out ip addresses, default gateway and dns servers to all clients who connect to my local network.
Right now it appears that it only hands out an ip address.
my dhcpd.conf is as follows:
# Local Network
ddns-update-style none;
authoritative;
option domain-name "example.org";
option domain-name-servers 194.239.134.83, 193.162.153.164;
If I remember correctly, you want to move (or copy) the option domain-name-servers 194.239.134.83, 193.162.153.164; line into the subnet {} section as well as having it in the global section. That, along with the routers option *should* allow the DNS information to get propagated to the client machine. You may also want/need to do this in the host{} entries, if you are having trouble there. (sorry, forgot the host{} is INSIDE the subnet{} so that should not be needed.
If this doesn't work for you, and nobody else has verified that this is correct (or not, and given better advice) I'll dig into my firewall/DNS machine and see what I put in my dhcpd.conf for you -- it worked fine for me, but I do remember way back when I set it up, something to this effect, and a little fiddling.
Keep us posted
Sasha
Last edited by GrapefruiTgirl; 12-01-2009 at 12:03 PM.
OK, later today (few hours) I will have a look at my dhcpd.conf file on my firewall machine if you haven't got this sorted by that time, and see what jumps out.
One thing I do recall, is that a Windows machine on my LAN here refused to accept DNS and routing information from my Linux machine until one of two things: change the dhcpcd client version on the Win machine, or downgrade the dhcpd version on the firewall machine. After that everything was peachy. Some versions of dhcpd servers + dhcpcd clients to not play well together, especially when the client is Windows. {{ just something to keep in mind, in case you have Win machine(s) on the LAN}}
I tried adding a subnet for eth0. And a few other things. Still no luck
eth0 is connected to my ISP, and I have no control over which IP I get assigned. Could this end up being a problem?
Is the option domain-name needed for my dhcp server to work? I don't have a domain name anyway.
I removed dhcpd version 4.1
Then I downloaded, compiled and installed dhcpd version 3.1.3
The dhcp.conf is the same, but now it works!!
Thanks a lot Sasha for your fast responses and good ideas. I wouldn't have solved it without your help.
/Peter
Bango!! You know what!? Above, where I mentioned that I had to downgrade my DHCP server before the client would listen to it? SAME PROBLEM -- I had upgraded to version 4.xx and nothing would work (on the Windows machine anyhow). I was stumped. After downgrading to 3.1.2 again, it instantly worked great all around.
dunno what it is with version 4.x..
Anyhow, that's great glad you got it fixed. And if it is, you can mark this thread [solved] if you like, using the Thread Tools menu near the top of the thread.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.