Lab 2.2 - Install OKD Cluster - Setup DHCP Server

1. Install dhcp-server package on bastion host

dnf install dhcp-server -y

2. Configure DHCP Leases

mv /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak
vim /etc/dhcp/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
allow booting;
allow bootp;
allow unknown-clients;

# internal subnet for my DHCP Server
subnet 10.6X.6X.0 netmask {
range 10.6X.6X.200 10.6X.6X.210;
option domain-name-servers 10.6X.6X.3;
option routers 10.6X.6X.1;
option broadcast-address 10.6X.6X.255;
default-lease-time 600;
max-lease-time 7200;

host { hardware ethernet 52:54:00:f5:90:ad; fixed-address 10.6X.6X.4; }

host { hardware ethernet 52:54:00:e4:72:ae; fixed-address 10.6X.6X.5; }
host { hardware ethernet 52:54:00:21:29:c9; fixed-address 10.6X.6X.6; }
host { hardware ethernet 52:54:00:12:c3:e1; fixed-address 10.6X.6X.7; }

host { hardware ethernet 52:54:00:79:95:86; fixed-address 10.6X.6X.8; }
host { hardware ethernet 52:54:00:0e:0a:db; fixed-address 10.6X.6X.9; }

deny unknown-clients;

![](/media/markdownx/145af491-dfdb-46ae-a1ab-1a28bab1b34c.png)# IP of PXE Server
next-server 10.6X.6X.3;
if exists user-class and option user-class = "iPXE" {

filename "";

} else {

filename "undionly.kpxe";


NOTE: Change the MAC Adresses with your own.

3. Restart and enable dhcp service

systemctl enable dhcpd
systemctl restart dhcpd
systemctl status dhcpd

4. Set firewall

firewall-cmd --add-service=dhcp --permanent
firewall-cmd --reload

Daftar Materi