port] [-f] [-d] [-cf
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:
Runs dhcpd in foreground mode. By default, dhcpd runs as a background daemon process. Use -f when dhcpd is started from inittab on a System V UNIX system.
Lists the interfaces on which dhcpd should listen for BOOTREQUEST
packets. This is a whitespace-separated list of interface names.
dhcpd ec0 ec1 wd0 tells dhcpd to listen to
interfaces ec0, ec1, and wd0. Normally this argument is not required.
In most cases dhcpd locates all installed interfaces and eliminates
the non-broadcast interfaces automatically. Use this argument only if
it appears that dhcpd is failing to locate the correct interfaces.
All of the remaining command-line arguments are used for debugging or testing:
Causes dhcpd to listen to a non-standard port. The well-known port for DHCP is 67. Changing it means that clients cannot talk to the server. On rare occasions this is done during testing.
Routes error messages to stderr. Normally error messages are written via syslog with facility set to DAEMON.
Causes dhcpd to read the configuration from the file identified
config-file instead of from dhcpd.conf. Use this only
to test a new configuration before it is installed in dhcpd.conf.
Use the standard file for production.
Causes dhcpd to write the address lease information to the file
lease-file instead of to dhcpd.leases. Use this
only for testing. Changing the name of the lease file could cause dynamic
addresses to be misallocated. Use this argument with caution.
# kill -TERM 'cat /var/run/dhcpd.pid'
dhcpd uses three files. dhcpd writes its PID to /var/run/dhcpd.pid. It maintains a record of dynamic address leases in /var/db/dhcpd.leases, and dhcpd 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.