Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106525 - Sample dhcpd.conf has serious problems
Summary: Sample dhcpd.conf has serious problems
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Camille Huot (RETIRED)
URL: http://www.gentoo.org/doc/en/diskless...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-19 07:20 UTC by Rabbe Fogelholm
Modified: 2006-10-30 08:59 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Sample dhcpd config file (dhcpd.conf,2.16 KB, text/plain)
2005-09-20 05:59 UTC, Rabbe Fogelholm
Details
diskless-howto.xml.patch (diskless-howto.xml.patch,6.05 KB, patch)
2006-02-11 08:48 UTC, nm (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rabbe Fogelholm 2005-09-19 07:20:23 UTC
In the September 16 version of "Diskless Nodes with Gentoo" the sample
dhcpd.conf file has serious problems.

First of all, the pool { } clause is incorrect and causes the startup of dhcpd
to fail with the message "Pool declaration with no address range".

That said, the pool declaration is not really important to the desired
functionality.  It may be a good idea to just remove it.

Second, in the class "pxeclients"  {} clause the line 'option
vendor-class-identifier "PXEClient"' is somehow harmful (at least with my NIC
which is Intel 82557/8/9 Ethernet Pro 100). Network boot does not work for me
unless I comment it out. When the line is present there will still be DHCP Offer
and DHCP ACK messages but for some reason no TFTP action takes place.

This problem was quite hard to debug, actually my way to get around it was to
set up a Knoppix machine and run its "terminal server" application, which is
based on diskless boot and works "out of the box".

The Knoppix dhcpd.conf is a lot simpler, and I think maybe it would be a good
idea to give a minimalistic example in the Gentoo guide too. Or even two
examples, one for PXE and another for Etherboot.

If there is interest I can come back with a suggestion.
Comment 1 Shyam Mani (RETIRED) gentoo-dev 2005-09-20 01:14:54 UTC
Sure, if there is an issue with the existing dhcpd.conf, please do suggest
methods to test/verify and solutions to solve the same and we'll be happy to
include them.
Comment 2 Rabbe Fogelholm 2005-09-20 05:59:57 UTC
Created attachment 68853 [details]
Sample dhcpd config file

This is a proposed minimalistic dhcpd config file. I think this is better for a
newcomer as well as an experienced administrator. The newcomer will feel more
at ease if there are fewer details, and the experienced administrator won't
like the fancy config file either--she will write her own anyway, consulting
the manpages.

The file works for me with PXE NICs and a recently installed Gentoo box.

The text that follows Code Listing 3.6 will still be valid, except for one
sentence that should be dropped: "The host-name option ... of a particular
slave".
Comment 3 nm (RETIRED) gentoo-dev 2006-02-11 08:48:22 UTC
Created attachment 79504 [details, diff]
diskless-howto.xml.patch

The patch as requested. rabbe, you're sure this works? Can anyone else double check this? Thanks.
Comment 4 Rabbe Fogelholm 2006-02-12 13:51:24 UTC
(In reply to comment #3)
Well, I am optimistic, the proposed config file was taken from a working setup. Then again, an independent check would always be good.
Comment 5 Rabbe Fogelholm 2006-03-16 13:09:16 UTC
(In reply to comment #3)

I have done some more testing now, this time using a 2006.0 stage3 system (manually installed in the classical way). Results are the same as before.

With the sample dhcpd.conf (code listing 3.6 of Diskless Nodes with Gentoo, February 13, 2006 version) there is a stopping error when doing `/etc/init.d/dhcp start'. The error is logged in /var/log/messages and goes

dhcpd: /etc/dhcp/dhcpd.conf line 58: pool declaration with no address range
dhcpd: Pool declarations must always contain at least one range statement
dhcpd: Configuration file errors encountered -- exiting

The sample dhcpd.conf attached to this bug report works for me.

So, my suggestion is to replace the dhcpd.conf in the February 13 version with the attached dhcpd.conf, since it fixes the error and also for the reason of less complexity.
Comment 6 Eilif Muller 2006-04-01 09:59:52 UTC
(In reply to comment #5)

I just worked through the diskless howto and experienced the same error:
"Pool declaration with no address range"

I fixed it by changing the pool block in /etc/dhcp/dhcpd.conf to:


  pool {
    max-lease-time 86400;
    default-lease-time 86400;
    range 192.168.8.1 192.168.8.20;
    # This prevents unlisted machines from getting an IP
    deny unknown-clients;
  }

i.e. adding a range.  Some fix of at least this sort should be made ASAP to the howto.

cheers, e.




> (In reply to comment #3)
> 
> I have done some more testing now, this time using a 2006.0 stage3 system
> (manually installed in the classical way). Results are the same as before.
> 
> With the sample dhcpd.conf (code listing 3.6 of Diskless Nodes with Gentoo,
> February 13, 2006 version) there is a stopping error when doing
> `/etc/init.d/dhcp start'. The error is logged in /var/log/messages and goes
> 
> dhcpd: /etc/dhcp/dhcpd.conf line 58: pool declaration with no address range
> dhcpd: Pool declarations must always contain at least one range statement
> dhcpd: Configuration file errors encountered -- exiting
> 
> The sample dhcpd.conf attached to this bug report works for me.
> 
> So, my suggestion is to replace the dhcpd.conf in the February 13 version with
> the attached dhcpd.conf, since it fixes the error and also for the reason of
> less complexity.
> 

Comment 7 Camille Huot (RETIRED) gentoo-dev 2006-10-30 08:59:29 UTC
I've updated the dhcpd.conf sample file using your suggestion. Thank you.