DHCP Server and Basic Configurations

Pasan Karunasekara
MS Club of SLIIT
Published in
3 min readDec 23, 2021

There are three main server types we can see in the cyber world those are,

  1. DHCP Server
  2. DNS Server
  3. Proxy Server

DHCP

  1. What is DHCP?

DHCP is dynamic host configuration protocol DHCP is a standardized networking protocol used on Internet protocol networks for dynamically distributing network configuration parameters such as IP address for Interfaces and services.

Computers with DHCP can Request network parameters from server. Then server is going to provide requested details automatically. DHCP works on Client server model.

2.How DHCP works

DHCP massages

3. Steps to Configure DHCP in Linux

Install DHCP Server

To install DHCP need to enter following command in Linux terminal

yum install -y dhcp

Installing DHCP interface

Configure DHCP settings

First have to go inside of the sysconfig file

vi/etc/sysconfig/dhcpd

Then have to configure network interfaces to do that can use following command in that command the eth0 must be the correct ID according to users Linux machine To find that can use nmtui command and go to active connections there will be the all eth numbers

DHCPDARGS=eth0(this eth is changing to user to user)

sample of the edited file text of DHCPDARGS
nmtui interface

After those configuration have to configure the dhcpd.conf file in that file have two main configurations

1.edit the domain-name

2.edit the domain name servers

have to define subnet range of IP addresses domain and domain name servers

dhcpd.conf file

Then user can start the DHCP server to start,

service dhcpd start

To check the dhcp status can use following command,

systemctl status dhcpd

checked dhcp status active and running

Hope this article is useful and give a clear idea about the dhcp configurations Thank you!

--

--