- Advertisement -
pCloud Ad

The Dynamic Host Configuration Protocol (DHCP) is a standardized network protocol used on Internet Protocol (IP) networks for dynamically distributing network configuration parameters, such as IP addresses for interfaces and services. With DHCP, computers request IP addresses and networking parameters automatically from a DHCP server, reducing the need for a network administrator or a user to configure these settings manually.
In this article will explain how to install and configure DHCP server on Ubuntu server 14.04+.

Install DHCP server on Ubuntu Server 14.04/14.10/15.04

To install a DHCP server on Ubuntu Server 14.04/14.10/15.04 enter the following command:

[php]# sudo apt-get install isc-dhcp-server -y[/php]

Configure DHCP Server

The DHCP server is not difficult to configure. After installing, open /etc/default/isc-dhcp-server file:

[php]# sudo nano /etc/default/isc-dhcp-server[/php]

and assign the network interface:

- Advertisement -


First, we need to define to below values in dhcpd.conf file located in /etc/dhcp/ directory.
Example scenario:

[php]Network :
Range : ( Starting IP ) – ( Ending IP )
Gateway :
Primary DNS :
Sec DNS :[/php]

[php]# sudo nano /etc/dhcp/dhcpd.conf[/php]

and add the below code after making changes as per your network values.

[php]# option definitions common to all supported networks…
default-lease-time 600;
max-lease-time 7200;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

subnet netmask { #network
range; # Range
option domain-name-servers,; #Pri DNS , Sec DNS
option domain-name “demodomain.com”; #Domain name
option routers; #Gateway
option broadcast-address; #Broadcast
default-lease-time 600;
max-lease-time 7200;

After making all the changes you want, save and close the configuration file. Restart the dhcp service by using the following command:

[php]# sudo service isc-dhcp-server restart[/php]

That’s it. DHCP server is up and ready.


- Advertisement -
Rumble Ad