TCP/IP Network Administration

TCP/IP Network AdministrationSearch this book
Previous: C.3 Zone File RecordsAppendix DNext: D.2 The dhcpd Command

D. A dhcpd Reference

Compiling dhcpd
The dhcpd Command
The dhcpd.conf Configuration File

This appendix covers the syntax of the dhcpd command and the dhcpd.conf configuration file. It is a reference to the Internet Software Consortium (ISC) Dynamic Host Configuration Protocol (DHCP) server, ISC dhcpd. To fully understand how to configure and use dhcpd in realistic network environments, see the tutorial and sample configuration files in Chapter 9, Configuring Network Servers .

dhcpd is under development. The information in this appendix is based on Beta Release 5 Patch Level 16. As a beta release, this software is bound to be upgraded and changed. Refer to the Web page for the most recent information about dhcpd. And remember, a DHCP implementation from another vendor will probably be configured in a completely different manner.

D.1 Compiling dhcpd

The source code for dhcpd can be obtained through the ISC Web site at or via anonymous FTP at The compressed tar file at the time of this writing was DHCPD-BETA-5.16.tar.gz, though this name will change as new versions are released. Download, gunzip, and untar the file:

> ftp
Connected to
220 FTP server ready.
Name ( anonymous
331 Guest login ok, send your complete email address as password.
230 Guest login ok, access restrictions apply.
ftp> cd isc/dhcp
250 CWD command successful.
ftp> binary
200 Type set to I.
ftp> get DHCPD-BETA-5.16.tar.gz
200 PORT command successful.
150 Opening BINARY mode data connection for DHCPD-BETA-5.16.tar.gz
226 Transfer complete.
181892 bytes received in 17 secs (10 Kbytes/sec)
ftp> quit
221 Goodbye.
> gunzip DHCPD-BETA-5.16.tar.gz
> tar -xvf DHCPD-BETA-5.16.tar
DHCPD-BETA-5.16/includes/ DHCPD-BETA-5.16/includes/netinet/ DHCPD-BETA-5.16/includes/netinet/if_ether.h DHCPD-BETA-5.16/includes/netinet/ip.h DHCPD-BETA-5.16/includes/netinet/udp.h

Change to the newly created directory, DHCPD-BETA-5.16 in the example, and run configure. configure determines the type of UNIX system you're running and creates the correct Makefile for that system. If configure cannot determine what version of UNIX you're running, you must build your own Makefile by hand. Next, type make to compile the daemon. Finally, copy the daemon and the manpages to the correct directories:

# cd DHCPD-BETA-5.16
# configure
System Type: linux
# make
cc -g      -c dhcpd.c -o dhcpd.o
cc -g      -c dhcp.c -o dhcp.o
cc -g      -c bootp.c -o bootp.o
nroff -man dhcpd.conf.5 >dhcpd.conf.cat5 # make install

The DHCP daemon should compile without errors. If you get compile errors or configure cannot determine your system configuration, you should consider abandoning the compile and notifying the support group. Join the support group mailing list by going to Once you join, send mail to the mailing list describing your configuration and the exact problem you have. The list is read by most of the people using dhcpd. Someone may have already solved your problem.

Simply installing dhcpd may not be all that is required. Remember, dhcpd is beta software. Read the README file very carefully. dhcpd runs on a wide variety of systems, including OSF/1, most recent BSD derivatives, Solaris, and Linux. It runs best on OSF/1 and BSD. On other systems it may have some limitations. For example, on both Solaris and Linux it can support only one network interface. dhcpd also may require some system-specific configuration. Our sample Linux 2.0.0 system is an excellent example of this. To successfully run dhcpd we had to add the following entry to the /etc/hosts table:		all-ones

And we had to add a specific route for the limited broadcast address,

# route add -host all-ones dev eth0

To reinstall the limited broadcast address in the kernel routing table after each boot, we added the following code to the /etc/rc.d/rc.inet2 startup script:

# Install the limited broadcast route and start DHCP
  if [ -f /etc/dhcpd.conf ]; then
    echo -n " dhcpd"
    route add -host all-ones dev eth0

The information needed to complete these extra configuration steps was clearly defined in the README file. Read it before you try to run dhcpd.

Previous: C.3 Zone File RecordsTCP/IP Network AdministrationNext: D.2 The dhcpd Command
C.3 Zone File RecordsBook IndexD.2 The dhcpd Command