How to install and configure isc-dhcp-server

Although Ubuntu still supports isc-dhcp-server, this software is no longer supported by its vendor. It has been replaced by Kea.

In this guide we show how to install and configure isc-dhcp-server, which installs the dynamic host configuration protocol daemon, dhcpd. For isc-kea instructions, refer to this guide instead.

Install isc-dhcp-server

At a terminal prompt, enter the following command to install isc-dhcp-server:

sudo apt install isc-dhcp-server

You can find diagnostic messages from dhcpd in syslog.

Configure isc-dhcp-server

You will probably need to change the default configuration by editing /etc/dhcp/dhcpd.conf to suit your needs and particular configuration.

Most commonly, what you want to do is assign an IP address randomly. This can be done with /etc/dhcp/dhcpd.conf settings as follows:

# minimal sample /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
subnet netmask {
 option routers;
 option domain-name-servers,;
 option domain-name "mydomain.example";

This will result in the DHCP server giving clients an IP address from the range - It will lease an IP address for 600 seconds if the client doesn’t ask for a specific time frame. Otherwise the maximum (allowed) lease will be 7200 seconds. The server will also “advise” the client to use as the default-gateway and and as its DNS servers.

You also may need to edit /etc/default/isc-dhcp-server to specify the interfaces dhcpd should listen to.


After changing the config files you need to restart the dhcpd service:

sudo systemctl restart isc-dhcp-server.service

Further reading


I think, the correct dhcpd.conf settings is:

#Genere Settings

#Disallow rogue DHCP server (see above)
# Definition of the first (only) subnet
subnet netmask {
interface eth4;
#Lease time in seconds (default: default 43200, max 86500)
default-lease-time 3600;
max-lease-time 7200;
option domain-name “ubuntuusers.home”;
option domain-name-servers;
option broadcast-address;
option subnet-mask;
option routers;

Hi @falcothethore, thanks for taking the time to leave us a comment :slight_smile:

I don’t quite understand if you’re suggesting an improvement we could make to the minimal dhcpd.conf that we provided in the documentation, or if you are asking for help with the custom configuration you’re using. Please could you clarify? Many thanks! :slight_smile: