Ubuntu DHCP Server

ubuntu-logo32In this post I will be describing setting up Ubuntu 14.04 LTS as a DHCP server.

The steps in this guide have been tested on a clean install of Ubuntu 14.04 LTS server, but should be applicable to most Debian based distributions (Linux Mint etc).

For more information on the DHCP protocol have a look at my previous post “Fundementals: DHCP“.

DHCP server config

We will be using the Internet Systems Consortium (ISC) DHCP server package available from the default Ubuntu repositories. To install the package issue the following command:

Now that we have the package installed, we need to tell it which interface it should listen for DHCP requests on. To do this we need to edit the /etc/default/isc-dhcp-server file and specify the interfaces as follows:

Sample output of /etc/default/isc-dhcp-server:

Next, we need to edit the /etc/dhcp/dhcpd.conf file, to include the DNS servers, Gateway, Subnet, Subnet mask etc. We will also make the DHCP server the primary server on the network by setting it to be authoritative:

Set the DNS servers for the network, in this case I will be using Googles DNS servers ( and This is a global setting for all supported networks.

Setup the subnet, subnet mask, gateway, scope of addresses for the network you want to lease to clients. At this stage you can also specify separate DNS servers from those assigned globally.

We will be configuring the server to use the following information:

  • Subnet:
  • Subnet mask:
  • Scope (range): to
  • DNS servers: and
  • Domain: routingloops.co.uk
  • Gateway (router):
  • Broadcast address:

Sample output of the /etc/dhcp/dhcpd.conf file:

Lastly we will restart the DHCP daemon so it will use the new config:



Leave a Reply