The server normally stores its lease database in a specific directory that varies from
system to system. You can use the
-lf switch to specify a different filename and
location for the lease database. All temporary filenames are also based on the speci-
fied name and directory.
When the server runs in the background as a daemon, it creates a file into which it
saves its process ID. This file is normally stored in the
/var/run or /etc directory,
again depending on the operating system. You can use the
-pf switch to specify a
different filename and directory.
The DHCP server does not continue to operate if it finds errors in the configuration
file because any errors could result in it badly misconfiguring clients on the network.
Therefore, after making changes to the configuration file, it’s a very good idea to
make sure that it’s correct before installing it. You can do this with the
-t switch.
The server tests the specified configuration file and prints error messages if it finds
errors. The exit status is zero if no errors exist, and nonzero if errors exist. Thus, shell
scripts and human users can use the
-t switch.
The DHCP server might operate incorrectly if you make changes to the lease data-
base while it is stopped and those changes are not correct. After making changes to
the configuration file, you should check that it is correct before installing it. You can
do this with the
-T switch; the server tests the specified configuration file and lease
file and prints error messages if it finds errors. The exit status is zero if no errors exist
and nonzero if errors exist.
The server normally prints a startup message with the version number, the copyright
information, and some information on how to contact the ISC. After you have seen
this information once, you probably don’t need to see it again (besides, it can make
the system startup messages look messy). To prevent this message from printing, you
use the
-q switch.
If you are having a problem with DHCP and want to be able to provide a tracefile so
that the problem can be reproduced in a controlled way, you can do this by starting
the DHCP server with the
-tf switch, which takes a filename as an argument. The
file must not exist when you start the server. The server logs to the tracefile as long
as it is running, and if the error you are trying to find occurs while the server is
logging to the tracefile, you have captured the error. In current versions of the ISC
DHCP server, tracefile logging does not work properly with failover, although a trace
file from a failover server can be useful for debugging problems not related to
failover. To play back a tracefile, use the
-play switch, followed by the name of the
file. When you are playing back a tracefile, you must specify the name of a lease file
to write to, and this lease file should not be your usual lease file because the lease file
will contain the results of the server trace playback, not your current lease database.
CHAPTER 14 The ISC DHCP Server246
018 3273 CH14 10/3/02 5:02 PM Page 246