•Whether to merely test the configuration
•Whether to be verbose on startup
•Whether to save a trace file
•Whether to play back a trace file
•Whether to check the lease database for correctness
• The interface or interfaces on which the server should listen
You can specify interfaces directly on the command line. You must specify the other
parameters by using command-line switches. A switch consists of the
- character
followed by a letter or keyword. Some switches are followed by arguments, in which
case the switch and the argument are separated by a space character.
The
-p switch indicates the UDP port on which the server should listen. If this
switch is specified, the server uses the next higher port number as its source port.
DHCP specifies that the server should always listen on port 67 and transmit on port
68. If the
-p 67 switch is given (or if no -p switch is given), the server uses ports 67
and 68. In general use, it is never appropriate to use the
-p switch, but it can be very
useful for debugging or benchmarking.
The
-f switch indicates that the server should operate normally but should not fork
a subprocess and exit to the invoking process. Normally, if you just type
dhcpd, the
DHCP server prints a startup message and then appears to exit, at which point you
receive a shell prompt. However, what actually happens is that the server started a
child process that then detaches itself from the terminal and runs in the background,
while the parent process (the one you started when you typed the command) exits.
The
-f switch causes the server to remain attached to the terminal and run in the
foreground, and it is useful in situations in which you are invoking the DHCP server
from
/etc/inittab (this is a UNIX System V concept and may or may not even be
possible on the version of the operating system you are running).
The
-d switch tells the server to run in the foreground, as with the -f switch, but in
addition to logging all its output to the syslog daemon, the server logs all its output
to the terminal. This can be very useful when you are debugging the server; you
invoke it with the
-d switch the command line and watch as it configures (or fails to
configure) a client. If you are reporting a bug on the
dhcp-server mailing list, you
are always asked for the server output, and using the
-d switch is the easiest way to
get it.
The DHCP server normally looks for its configuration file in
/etc/dhcpd.conf. If you
are testing, or simply don’t want your configuration file to be stored in
/etc, you
can override this by using the
-cf switch, followed by the filename that you prefer.
Invoking the ISC DHCP Server 245
018 3273 CH14 10/3/02 5:02 PM Page 245