The point of no return

DHCP Server Configuration

Dynamic Host Configuration Protocol (DHCP) is network protocol for automatically assigning TCP/IP information to client machines. Each DHCP client connect to the centrally-located DHCP server that returns the client’s network configuration including IP address, gateway, and DNS servers. The DHCP server maintains a database of available IP addresses and configuration information.

DHCP clients are responsible for renewing their IP address before that interval has expired, and must stop using the address once the interval has expired, if they have not been able to renew it.DHCP is used for IPv4 and IPv6. While both versions serve the same purpose, the details of the protocol for IPv4 and IPv6 are sufficiently different that they may be considered separate protocols.

yum install dhcp

A freshly installed dhcpd will contain a sample configuration files /etc/dhcpd.conf and /etc/dhcp6c.conf, but 1st let us change the configuration file directory to “/etc/dhcp” and set the DHCP interface of server. To do that you should edit “/etc/sysconfig/dhcpd” file as shown below.

/etc/sysconfig/dhcpd
DHCPD_IFACE="eth1"
DHCPDARGS="-cf /etc/dhcp/dhcpd.conf"
/etc/dhcp/dhcpd.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
ddns-update-style none;
deny bootp;
authoritative;
 
subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.1 192.168.1.250;
        option subnet-mask 255.255.255.0;
        option domain-name "foo-bar.com";
        option routers 192.168.1.254;
        option domain-name-servers 212.x.y.z;
        default-lease-time 60000;
        max-lease-time 144000;
 
        host ariabox {
        hardware ethernet 18:A9:05:75:C1:05;
        fixed-address  192.168.1.253;
        }
}