You can configure a DHCP server using the configuration file /etc/dhcpd.conf.
DHCP also uses the file /var/lib/dhcp/dhcpd.leases to store the client lease database.
The first step in configuring a DHCP server is to create the configuration file that stores the network information for the clients. Global options can be declared for all clients, or options can be declared for each client system.
The configuration file can contain any extra tabs or blank lines for easier formatting. The keywords are not case-sensitive and lines beginning with a hash mark (#) are considered comments.
To use the recommended mode, add the following line to the top of the configuration file:
ddns-update-style interim;
Read the dhcpd.conf man page for details about the different modes.
Some parameters must start with the option keyword and are referred to as options. Options configure DHCP options; whereas, parameters configure values that are not optional or control how the DHCP server behaves.
Parameters (including options) declared before a section enclosed in curly brackets {} are considered global parameters. Global parameters apply to all the sections below it.
Note
If you change the configuration file, the changes will not take effect until you restart the DHCP daemon with the command service dhcpd restart.The following is an example of a DHCP configuration on a Red Hat Linux server.
For Wireless AP Subnet
subnet 10.209.0.0 netmask 255.255.255.0 {
option routers 10.209.0.2; ### This is the network‘s default gateway address.
option subnet-mask 255.255.255.0
option domain-name xyznetworks.ca
option domain-name servers 192.168.1.3, 207.236, 176.11
range 10.209.0.3 10.209.0.40;
default-lease-time 7200000 ###The figures are in seconds.
## SLP option 78 for Extreme Wireless APs in a Centralized site.
option slp-directory-agent true 10.209.0.1, 10.209.0.3;
authoritative;