Configure DHCP on Linux

Instructions on how to start a DHCP server in Linux using Ubuntu.


1 – Linux machine, in this case running Ubuntu 14.04

2 – Superuser privileges or root

Steps to Configure DHCP on Linux

1 – Install DHCP server by typing

$ sudo apt-get install isc-dhcp-server

2 – Allow some time for the installation to complete.

3 – Once it has completed, type

$ sudo nano /etc/dhcp/dhcpd.conf

This is the configuration file and there are a lot of scenarios pre populated here

4 – Locate option domain-name “” and replace example with your domain, if this is what you require.

5 – Locate option domain-name-servers example.local and replace example with the search domain of your choice.

6 – Also, look for the command #authoritative. Uncomment this as this will be the official DHCP server for your network.

7 – Finally, you need to add these settings for you local LAN. In most cases you will be able to find an example configuration and use that.

subnet netmask

option routers; # this is the router address for your network

option domain-name-servers;

option domain-name “”; # replace with something for your network}

8 – Once you have done all this type $ sudo service isc-dhcp-server restart.

9 – Test by attaching a computer set to DHCP to check that it receives the address and that the options are correct.
For example, DNS = and Router =