Setting up a DHCP server on Ubuntu 12.04 (Precise Pangolin) server

This is my updated installation log of how I installed and configured a DHCP server on the Ubuntu 12.04 Precise Pangolin server.

If you are using an older version of Ubuntu then you might want to check out the old guide that was written for Ubuntu 8.04.

1: Make sure that the latest version is installed:

sudo apt-get install isc-dhcp-server

Note: Don’t be alarmed if the startup fails; that’s because you haven’t configured it yet.

2.1: Enable the DCHP server on your network interface (in my case eth0):

sudo nano /etc/default/isc-dhcp-server

2.2: Set INTERFACES=”” to the name of the network interface that you want to enable the DHCP server on:


3.1: Edit the DHCP server configuration:

sudo nano /etc/dhcp/dhcpd.conf

3.2: The contents of my configuration file, for me the comments already in the file was what I needed to make the necessary changes:

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "home.lan";
option domain-name-servers ubuntu.home.lan;

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.

# This is a very basic subnet declaration.
subnet netmask {
  option routers router.home.lan;

4: Restart the DHCP server (it should now start without problems):

sudo service isc-dhcp-server restart

Done 🙂


1 thought on “Setting up a DHCP server on Ubuntu 12.04 (Precise Pangolin) server

  1. Pingback: Cable router selection - Page 2

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.