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
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 192.168.200.10 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