Hi :)
I've just installed a redhat 9 on my system, in order to use a dhcp server. I've selected the appropriated package before the installation.
The problem is that there are no dhcpd.conf in /etc...
So, i've tried to create my own one which looks like:
(my redhat server uses )
subnet netmask
{
ddns-update-style ad-hoc;
option subnet-mask ;
option time-offset -18000;
range
}

with this configuration, i'm unable to start my dhcp server. An error message appears, saying that I must had a line says "ddns-update-style ad-hoc", and well, that's what's I've done :-|

If someone could help me, that would be great ;)

@++

Dani AI

Generated

A few concise, practical clarifications for the thread (especially the ddns error and the “always the last IP” symptom noted by ).

The ddns-update-style complaint usually means that the ddns-update-style setting is not in the global (outer) scope of dhcpd.conf. That statement is evaluated once after the file is parsed, so it must appear outside any subnet/group braces — putting it inside a subnet will still trigger the “You must add a ddns-update-style statement” error. (kb.isc.org)

The “client always gets .19 (the last address)” behaviour is not a Red Hat bug so much as how modern ISC dhcpd chooses addresses: the server builds the available-address list from a hash table, so allocation order is not guaranteed or predictable (older releases behaved differently). In short, you can’t rely on range order to control which address is handed out. ’s observation about Windows vs *nix is a useful rule-of-thumb, but the definitive explanation is the hash/lookup behavior in newer ISC dhcpd. (manpages.debian.org)

If a specific client must have a predictable address, use a host declaration (fixed-address keyed to the client MAC) so dhcpd will always assign that address. If experimenting with ranges, be careful editing the lease DB — dhcpd keeps a log-structured leases file and it must exist before the daemon starts (back it up before changing it). To check and debug the daemon, run a syntax test and examine the leases/logs: (manpages.debian.org)

rpm -qa | grep -i dhcp
find / -name dhcpd.conf 2>/dev/null
touch /var/lib/dhcpd/dhcpd.leases    # only if missing; backup first
dhcpd -t -cf /etc/dhcpd.conf         # syntax test
service dhcpd start
chkconfig dhcpd on
tail -f /var/log/messages | grep dhcpd

For startup errors the config syntax test above and reading the lease file/log messages will show the exact cause; the Red Hat docs linked earlier in the thread are a good walkthrough, but the man pages and ISC docs explain the ddns and allocation details used here. (dell.com)

Recommended Answers

All 6 Replies

Member Avatar for Member #2466

There's your answer. Enjoy!

Thanks for the link, i've found what was wrong.
My DHCP server is now working, but there is still something strange... Only the last IP adress available is given.
For example, my range is // , but my client always get 192.168.0.19.
I've read the official redhat page, but I can't find the reason of that...
Thanks for help ;)

@++

Member Avatar for Member #2466

Thanks for the link, i've found what was wrong.
My DHCP server is now working, but there is still something strange... Only the last IP adress available is given.
For example, my range is // , but my client always get 192.168.0.19.
I've read the official redhat page, but I can't find the reason of that...
Thanks for help ;)

@++

Try for some dhcp help. Perhaps there's an explanation in this how to.

Windows DHCP servers start out with the lowest number in the pool - *nix boxes start off with the highest number in the pool.

There's your answer. Enjoy!

I have the same problem and I have tried to access the link for answer. But the link does not work. Can you help me again?

I have the same problem and I have tried to access the link for answer. But the link does not work. Can you help me again?

Does this work?
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/s1-dhcp-configuring-server.html
If not, try this:
http://www.google.com/search?q=dhcp+configuring+server+redhat
and click on this first hit.

Edit: and WHY do you bump a year-old thread? It's normal for old links to be dead... Google is your friend.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.