23.2.3. Starting and Stopping the Server
dhcpd.leasesfile exists. Use the command
touch /var/lib/dhcpd/dhcpd.leasesto create the file if it does not exist.
namedservice automatically checks for a
/sbin/service dhcpd start. To stop the DHCP server, use the command
/sbin/service dhcpd stop.
/etc/sysconfig/dhcpd, add the name of the interface to the list of
# Command line options here DHCPDARGS=eth0
-p <portnum>— Specifies the UDP port number on which
dhcpdshould listen. The default is port 67. The DHCP server transmits responses to the DHCP clients at a port number one greater than the UDP port specified. For example, if the default port 67 is used, the server listens on port 67 for requests and responses to the client on port 68. If a port is specified here and the DHCP relay agent is used, the same port on which the DHCP relay agent should listen must be specified. Refer to Section 23.2.4, “DHCP Relay Agent” for details.
-f— Runs the daemon as a foreground process. This is mostly used for debugging.
-d— Logs the DHCP server daemon to the standard error descriptor. This is mostly used for debugging. If this is not specified, the log is written to
-cf <filename>— Specifies the location of the configuration file. The default location is
-lf <filename>— Specifies the location of the lease database file. If a lease database file already exists, it is very important that the same file be used every time the DHCP server is started. It is strongly recommended that this option only be used for debugging purposes on non-production machines. The default location is
-q— Do not print the entire copyright message when starting the daemon.