DHCP Server Configuration on CentOS 8

By | September 2, 2020

Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Internet Protocol networks to dynamically assign network configuration such as IP address, Subnet Mask, Domain Name, DNS Server IP Address for computer system on the network.

DHCP Server Installation

1. Installing the DHCP server package using the command dnf -y install dhcp-server

2. Edit the DHCP server configuration file at /etc/dhcp/dhcpd.conf

3. Following is the content of DHCP server configuration, replace them with your own information and save the configuration file.

4. Now start the DHPC server service and enable it to startup the service at the system boot.

5. Also add the firewall rule for DHCP inbound traffic and reload the firewall ACL

DHCP Verification

6. Let go to configure the client host (cent-client) to obtain the IP Address via DHCP by enabling BOOTPROTO=”dhcp”

7. To make sure the client network adapter is refreshed, restart the Network Manger service.

8. Now verify the IP address on the client host, it is obtaining IP address which is in the range of IP address scope we configured in DHCP server configuration.

9. Once the IP address is assigned to a client machine, we can also verify the lease on DHCP server side. View the lease records in /var/lib/dhcpd/dhcpd.leases

We have done installing and configuring DHCP Server on CentOS 8. 

Leave a Reply

Your email address will not be published. Required fields are marked *