Operation Manual

This simple conguration le should be sufcient to get the DHCP server to assign IP
addresses in the network. Make sure that a semicolon is inserted at the end of each line,
because otherwise dhcpd is not started.
The sample le can be divided into three sections. The rst one denes how many
seconds an IP address is leased to a requesting client by default
(default-lease-time) before it should apply for renewal. This section also in-
cludes a statement of the maximum period for which a machine may keep an IP address
assigned by the DHCP server without applying for renewal (max-lease-time).
In the second part, some basic network parameters are dened on a global level:
The line option domain-name denes the default domain of your network.
With the entry option domain-name-servers, specify up to three values
for the DNS servers used to resolve IP addresses into hostnames and vice versa.
Ideally, congure a name server on your machine or somewhere else in your network
before setting up DHCP. That name server should also dene a hostname for each
dynamic address and vice versa. To learn how to congure your own name server,
read Chapter 23, The Domain Name System (page 373).
The line option broadcast-address denes the broadcast address the re-
questing client should use.
With option routers, set where the server should send data packets that
cannot be delivered to a host on the local network (according to the source and
target host address and the subnet mask provided). In most cases, especially in
smaller networks, this router is identical to the Internet gateway.
With option subnet-mask, specify the netmask assigned to clients.
The last section of the le denes a network, including a subnet mask. To nish,
specify the address range that the DHCP daemon should use to assign IP addresses to
interested clients. In Example 24.1, “The Conguration File /etc/dhcpd.conf” (page 404),
clients may be given any address between 192.168.2.10 and 192.168.2.20 as
well as 192.168.2.100 and 192.168.2.200.
After editing these few lines, you should be able to activate the DHCP daemon with
the command rcdhcpd start. It will be ready for use immediately. Use the command
rcdhcpd check-syntax to perform a brief syntax check. If you encounter any
DHCP 405