The dhcpd Command

The syntax of the dhcpd command is:

dhcpd [-p port] [-f] [-d] [-cf config-file] [-lf lease-file] [if0 [ifn]] 

dhcpd usually is run without any command-line arguments. Most of the arguments are used only when testing and debugging. Two of the command-line arguments handle special configuration requirements:

All of the remaining command-line arguments are used for debugging or testing:

Kill the dhcpd daemon with the SIGTERM signal. The process ID (PID) of the dhcpd daemon is found in the /var/run/dhcpd.pid file. For example:

# kill -TERM 'cat /var/run/dhcpd.pid'

dhcpd uses three files. It writes its PID to /var/run/dhcpd.pid, maintains a record of dynamic address leases in /var/db/dhcpd.leases, and reads its configuration from /etc/dhcpd.conf. These last two files are created by you. Create an empty lease file before you run dhcpd the first time, e.g., touch /var/db/dhcpd.leases. Create a configuration and store it in dhcpd.conf.