6.2.3. Starting and Stopping the Server
When the DHCP server is started for the first time, it fails unless the dhcpd.leases
file exists. Use the command touch /var/lib/dhcpd/dhcpd.leases
to create the file if it does not exist.
If the same server is also running BIND as a DNS server, this step is not necessary, as starting the named
service automatically checks for a dhcpd.leases
file.
If more than one network interface is attached to the system, but the DHCP server should only be started on one of the interfaces, configure the DHCP server to start only on that device. In /etc/sysconfig/dhcpd
, add the name of the interface to the list of DHCPDARGS
:
This is useful for a firewall machine with two network cards. One network card can be configured as a DHCP client to retrieve an IP address to the Internet. The other network card can be used as a DHCP server for the internal network behind the firewall. Specifying only the network card connected to the internal network makes the system more secure because users can not connect to the daemon via the Internet.