Datasheet
“main” (Installation and Administration) — 2004/6/25 — 13:29 — page 516 — #542
i
i
i
i
i
i
i
i
21.11.3 The DHCP Server dhcpd
The core of any DHCP system is the dynamic host configuration proto-
col daemon. This server leases addresses and watches how they are used,
according to the settings defined in the configuration file /etc/dhcpd.
conf. By changing the parameters and values in this file, a system admin-
istrator can influence the program’s behavior in numerous ways. Look at
the basic sample /etc/dhcpd.conf file in Example 21.30.
Example 21.30: The Configuration File /etc/dhcpd.conf
default-lease-time 600; # 10 minutes
max-lease-time 7200; # 2 hours
option domain-name "kosmos.all";
option domain-name-servers 192.168.1.1, 192.168.1.2;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option subnet-mask 255.255.255.0;
subnet 192.168.1.0 netmask 255.255.255.0
{
range 192.168.1.10 192.168.1.20;
range 192.168.1.100 192.168.1.200;
}
This simple configuration file should be sufficient to get the DHCP server
to assign IP addresses in the network. Make sure a semicolon is inserted at
the end of each line, because otherwise dhcpd will not be started.
The above sample file can be divided into three sections. The first one de-
fines how many seconds an IP address is leased to a requesting host by de-
fault (default-lease-time) before it should apply for renewal. The sec-
tion also includes 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 defined on a global
level:
The line option domain-name defines the default domain of your
network.
516 21.11. DHCP










