Setting up DHCP Server

We need DHCP to dish out IP Addresses to our VM’s.

  • Install dhcp on our LabX Server

    yum -y install dhcp

  • Modify /etc/dhcp/dhcpd.conf

log-facility local6;

# This is our only DHCP server

#ddns-updates off;
#ddns-update-style none;

default-lease-time 3600; #1h
max-lease-time 86400; #1 day
update-static-leases on;
one-lease-per-client on;

option dhcp-server-identifier;

# DNS config
option domain-name "";
option domain-name-servers;
option ntp-servers;
option smtp-server;

# Define a LAN subnet with the following items:
#   - Netmask to use
#   - The IP range to distribute to clients
#   - The broadcast address to use
subnet netmask {
  option subnet-mask;
  option broadcast-address;
  • Start dhcpd

    systemctl start dhcpd

  • Enable dhcpd on boot

    systemctl enable dhcpd

Written on November 18, 2015