Red Hat LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE Manual page 125

Hide thumbs Also See for LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE:
Table of Contents

Advertisement

Section 12.2:Configuring a DHCP Server
You can use the sample configuration file in Red Hat Linux 7.2 as a starting
point and then add your own custom configuration options to it. Copy it to
its proper location with the command
cp
/usr/share/doc/dhcp- <version-number> /dhcpd.conf.sample
/etc/dhcpd.conf
(where <version-number> is the DHCP version you are using).
For a complete list of option statements and what they do, refer to the dhcp-options man page.
12.2.2 Lease Database
On the DHCP server, the file /var/lib/dhcp/dhcpd.leases stores the DHCP client lease
database. This file should not be modified by hand. DHCP lease information for each recently as-
signed IP address is automatically stored in the lease database. The information includes the length
of the lease, to whom the IP address has been assigned, the start and end dates for the lease, and the
MAC address of the network interface card that was used to retreive the lease.
All times in the lease database are in Greenwich Mean Time (GMT), not local time.
The first time you start the DHCP service, it will fail unless the lease database exists. Use the command
touch /var/lib/dhcpd.leases to create the file before starting the server for the first time.
Once the file exists and the server has been started, do not try to create a new lease database file.
The lease database is recreated from time to time so that it is not too large. First, all known leases are
saved in a temporary lease database. The dhcpd.leases file is renamed dhcpd.leases~, and
the temporary lease database is written to dhcpd.leases.
The DHCP daemon could be killed or the system could crash after the lease database has been renamed
to the backup file but before the new file has been written. If this happens, there is no dhcpd.leases
file that is required to start the service. Do not create a new lease file if this occurs. If you do, all the old
leases will be lost and cause many problems. The correct solution is to rename the dhcpd.leases~
backup file to dhcpd.leases and then start the daemon.
Tip
125

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linux 7.2

Table of Contents