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 http://www.isc.org/dhcp.html for the most recent information about dhcpd. And remember, a DHCP implementation from another vendor will probably be configured in a completely different manner.
The source code for dhcpd can be obtained through the ISC Web site at www.isc.org or via anonymous FTP at ftp://ftp.isc.org/isc/dhcp. 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 ftp.isc.orgConnected to pub1.bryant.vix.com. 220 pub1.bryant.vix.com FTP server ready. Name (ftp.isc.org:craig):
anonymous331 Guest login ok, send your complete email address as password. Password: 230 Guest login ok, access restrictions apply. ftp>
cd isc/dhcp250 CWD command successful. ftp>
binary200 Type set to I. ftp>
get DHCPD-BETA-5.16.tar.gz200 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>
quit221 Goodbye. >
tar -xvf DHCPD-BETA-5.16.tarDHCPD-BETA-5.16/ DHCPD-BETA-5.16/cf/ DHCPD-BETA-5.16/cf/alphaosf.h DHCPD-BETA-5.16/cf/bsdos.h DHCPD-BETA-5.16/cf/freebsd.h .
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:
configureSystem Type: linux #
makecc -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 #
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 http://www.fugue.com/dhcp. Once you join, send mail to the [email protected] 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:
And we had to add a specific route for the limited broadcast address, 255.255.255.255:
# 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 /usr/sbin/dhcpd fi