Appendix D. A dhcpd ReferenceThis 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, dhcpd. To fully understand how to configure and use dhcpd in realistic network environments, see the tutorial and sample configuration files in Chapter 9, "Local Network Services". The information in this appendix is based on the version of dhcpd available at this writing. 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. D.1. Compiling dhcpdThe source code for dhcpd can be obtained through the ISC web site at http://www.isc.org or via anonymous FTP at ftp://ftp.isc.org/isc/dhcp. The name of the compressed tar file will change as new versions are released. However, the latest release should be stored as dhcp-latest.tar.gz. Download, gunzip, and untar the file: > ftp ftp.isc.org Connected to pub1.bryant.vix.com. 220 pub1.bryant.vix.com FTP server ready. Name (ftp.isc.org:craig): anonymous 331 Guest login ok, send your complete email address as password. 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 dhcp-latest.tar.gz 200 PORT command successful. 150 Opening BINARY mode data connection for dhcp-latest.tar.gz 226 Transfer complete. 181892 bytes received in 17 secs (10 Kbytes/sec) ftp> quit 221 Goodbye. > gunzip dhcp-latest.tar.gz > tar -xvf dhcp-latest.tar drwxrwxr-x mellon/engsrc 0 2001-10-05 00:22:41 dhcp-3.0/ drwxrwxr-x mellon/engsrc 0 2001-10-05 00:22:32 dhcp-3.0/doc/ ... -rw-rw-r-- mellon/engsrc 150274 2001-08-23 12:25:51 dhcp-3.0/server/failover.c -rw-rw-r-- mellon/engsrc 67711 2001-08-23 12:30:58 dhcp-3.0/server/mdb.c -rw-rw-r-- mellon/engsrc 62087 2001-06-21 22:28:51 dhcp-3.0/server/omapi.c -rw-rw-r-- mellon/engsrc 7612 2001-06-21 22:31:39 dhcp-3.0/server/salloc.c -rw-rw-r-- mellon/engsrc 34248 2001-06-21 22:35:08 dhcp-3.0/server/stables.c drwxrwxr-x mellon/engsrc 0 2001-10-05 00:22:42 dhcp-3.0/tests/ drwxrwxr-x mellon/engsrc 0 2001-10-05 00:22:42 dhcp-3.0/tests/failover/ -rw-rw-r-- mellon/engsrc 3585 2001-05-31 16:16:05 dhcp-3.0/tests/failover/dhcp-1.cf -rw-rw-r-- mellon/engsrc 3463 2001-05-31 16:16:06 dhcp-3.0/tests/failover/dhcp-2.cf -rwxrwxr-x mellon/engsrc 537 2001-05-31 16:16:07 dhcp-3.0/tests/failover/new-failover Change to the newly created directory and run configure. configure determines the type of Unix system you're running and creates the correct akefile 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 dhcp-3.0 # ./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 if 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 dhcp-server@fugue.com 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. 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. Old systems with the Linux 2.0.0 kernel are an excellent example of this. To successfully run dhcpd on one of these old systems, add the following entry to the /etc/hosts table: 255.255.255.255 all-ones Next, 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, add the following code to a 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 The information needed to complete these extra configuration steps is clearly defined in the README file. Read it before you try to run dhcpd. Of course, this is not required for current versions of Linux, but it provides a good example of the type of special configuration that is sometimes required. Copyright © 2002 O'Reilly & Associates. All rights reserved. |
|