Low Orbit Flux Logo 2 D

Setup ISC DHCP Server on Ubuntu

In this guide we are going to show you how to setup an ISC DHCP server on Ubuntu Linux. This has been tested on Ubuntu 20.04.

You can install the package for the ISC DHCP Server like this:

sudo apt update  
sudo apt install isc-dhcp-server

This is an example of how the man configuration file could be setup. In this example we show you how to specify a range of possible IPs that can be assigned to hosts. You can actually specify multiple ranges as shown below. We also show how you can explicitly map a MAC address to an IP address. Note that and are googles DNS servers which I generally prefer over any ISP’s DNS servers because they are more trustable. You should probably use these unless you are running your own DNS server.

vi /etc/dhcp/dhcpd.conf
option domain-name "example.org"; option domain-name-servers,; default-lease-time 600; max-lease-time 7200; ddns-update-style none; authoritative; subnet netmask { option routers; option subnet-mask; option broadcast-address; option domain-name-servers; default-lease-time 86400; max-lease-time 86400; range; range; host test1 { hardware ethernet 08:00:27:85:AE:C9; fixed-address; } }

Specify the interface to use like this. Swap the interface name for the interface name on your system. At one point I specified a bridge interface that was used for KVM on the same host ( br0 ).

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

You can restart the service like this:

sudo service isc-dhcp-server restart

You can check the logs like this:

journalctl -u isc-dhcp-server

You can see current leases in this file. This seems to be for dynamically allocated addressses and not for statically configured addresss that have been explicitly mapped to a MAC address.

cat /var/lib/dhcp/dhcpd.leases