Linux - Server This 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.
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.
|
 |
12-01-2009, 11:47 AM
|
#1
|
LQ Newbie
Registered: Nov 2008
Posts: 9
Rep:
|
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;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.31;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
allow unknown-clients;
# HP LaserJet 1200N
host LaserJet1200 {
hardware ethernet 00:01:e6:90:9c:61;
fixed-address 192.168.1.50;
}
}
Can anyone help me?
I have read the documentation for dhcpd and dhcpd.conf, but I just can't figure out what is wrong.
Best regards
Peter
|
|
|
12-01-2009, 11:58 AM
|
#2
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
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.
|
|
1 members found this post helpful.
|
12-01-2009, 12:16 PM
|
#3
|
LQ Newbie
Registered: Nov 2008
Posts: 9
Original Poster
Rep:
|
I tried copying the option domain-name-servers line into the subnet section and restarted dhcpd.
It doesn't seem to change anything. :-(
/Peter
|
|
|
12-01-2009, 12:22 PM
|
#4
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
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}}
Sasha
|
|
1 members found this post helpful.
|
12-01-2009, 01:00 PM
|
#5
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
On my firewall machine, It's using isc-dhcpd version 3.1.2 and here's the stuff in my .conf file:
Code:
boot-unknown-clients false;
ddns-update-style none;
one-lease-per-client true;
ping-check false;
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
# this is for eth0 connected desktop
default-lease-time 3600;
max-lease-time 7300;
option routers 192.168.0.10;
group {
option domain-name-servers 192.168.0.10;
use-host-decl-names true;
host darkstarssi {
option host-name "darkstarssi";
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.0.30; }
}
}
... and so on, more subnets below....
Each NIC has a SUBNET clause, containing a GROUP clause, which contains HOST clause(s).
I hope this helps. It looks similar, but a different layout a bit than yours. Maybe try doing it this way?
NOTE: I am running DNS server right on that machine too; if you are not, then obviously you'll be wanting to give some external nameserver address
Best of luck,
Sasha
Last edited by GrapefruiTgirl; 12-01-2009 at 01:03 PM.
|
|
1 members found this post helpful.
|
12-01-2009, 02:39 PM
|
#6
|
LQ Newbie
Registered: Nov 2008
Posts: 9
Original Poster
Rep:
|
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.
After changes my dhcpd.conf looks like this:
# Local Network
ddns-update-style none;
authoritative;
option domain-name "example.org";
option domain-name-servers 194.239.134.83, 193.162.153.164;
log-facility local7;
option ip-forwarding off;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.32 192.168.1.49;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
allow unknown-clients;
group {
option domain-name-servers 194.239.134.83 , 193.162.153.164;
# HP LaserJet 1200N
host LaserJet1200 {
hardware ethernet 00:01:e6:90:9c:61;
fixed-address 192.168.1.50;
}
}
}
subnet 80.197.49.128 netmask 255.255.255.128 {
}
/Peter
|
|
|
12-01-2009, 03:18 PM
|
#7
|
LQ Newbie
Registered: Nov 2008
Posts: 9
Original Poster
Rep:
|
Problem Solved!!!
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
|
|
|
12-01-2009, 03:59 PM
|
#8
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
Quote:
Originally Posted by Peter_Karlsen
Problem Solved!!!
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.
Best regards,
Sasha
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 06:21 AM.
|
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
|
|