DHCP server configuration

This is a bare minimum guide to setup a DHCP server.

1. Install the dhcp package:

yum install dhcp

2. Replace the /etc/dhcpd.conf with the following:

ddns-update-style interim;
ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {
authoritative;

option routers 192.168.1.1;
option subnet-mask 255.255.255.0;

option domain-name "domain.com";
option domain-name-servers 192.168.1.5;

option time-offset -18000; # Eastern Standard Time

range dynamic-bootp 192.168.1.32 192.168.1.47;
default-lease-time 21600;
max-lease-time 43200;
}

3. Alter the values as needed.
4. Set the server to start on boot:

/sbin/chkconfig dhcpd on

5. Start the server:

/sbin/service dhcpd start

6. Review /var/log/messages for any errors.

Make sure you have port 67/udp open if you are using a host-based firewall.

Advertisements