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
authoritative;
#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 dhcp.gracie.net;
# DNS config
option domain-name "gracie.net";
option domain-name-servers dns.gracie.net;
option ntp-servers ntp.gracie.net;
option smtp-server smtp.gracie.net;
# Define a LAN subnet with the following items:
# - Netmask to use
# - The IP range to distribute to clients
# - The broadcast address to use
#
subnet 192.168.88.0 netmask 255.255.255.0 {
range 192.168.88.100 192.168.88.254;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.88.255;
}
-
Start dhcpd
systemctl start dhcpd
-
Enable dhcpd on boot
systemctl enable dhcpd
Written on November 18, 2015