The Internet Systems Consortium (ISC) Dynamic Host Configuration Protocol (DHCP) server is free, open-source, and easy to install. Both enterprises and small networks have used ISC DHCP in production for many years.

ISC DHCP can issue both IPv4 and IPv6 addresses and support address reservation, boot-p, DDNS, VOIP configurations, and failover. ISC DHCP has been around since 1999 and is available free for download but runs only on BSD, Solaris, and Linux.

I won’t go into all of the benefits of different DHCP platforms such as Windows Server, Cisco routers, or firewalls, as choosing a platform usually comes down to personal preference. Most implementations of DHCP provide the same functions, but I’ve become fond of the way ISC DHCP provides rock-solid service as well as flexibility.

If you have a Cisco router issuing IP addresses to 12 different VLANs, you might want to consider a dedicated DHCP server to free up resources. Another benefit of ISC DHCP is that you won’t have to manually set static IP addresses on your servers; you only need to pre-populate the dhcpd.config file with a client’s MAC address once. Being proficient with editors such as vim or Nano helps in this regard. Tasks like commenting out old hardware addresses, providing a server a new static address, or managing your IP scopes are a breeze with only an SSH session.

In this guide, I’ll demonstrate how to locate your current DHCP server and then install and set up an ISC DHCP server. We’ll then move on to gaining control of your new DHCP server, best practices, monitoring the logs, and setting up static address reservations.

Find existing DHCP servers

Networks can get large, and sometimes it’s not readily apparent which DHCP server is running on your network. Before you install a new DHCP server, you have to make sure that no other DHCP server is running to avoid conflicts.

If you suspect rogue DHCP servers, I recommend reading Michael’s instructions, or you can download and run the Microsoft Rogue DHCP Server Detection tool. Either of these tools will also identify the authoritative DHCP server on your network.

On Windows 10, to find your DHCP server, right-click on the Start Button and click Network Connections. Next, right-click on the primary Ethernet adapter and click Status, then the Details button. Here you will find the IPv4 DHCP Server address.

Find the DHCP server on Windows 10

Find the DHCP server on Windows 10

If you want to find the IP address of a DHCP server used for configuring a particular interface on Ubuntu/Linux, there are two ways of doing this:

The easy way is to simply view the DHCP lease information from the following file, where ‘ens34’ is the adapter’s identity:

sudo less /var/lib/dhcp/dhclient.ens34.leases

You’ll have something similar to the following returned:

Ubuntu DHCP lease file data

Ubuntu DHCP lease file data

I like this method because I can see my lease-time, renew, rebind, and expire dates. We can tell that our dhcp-server-identifier is

Another way is to examine the log files in /var/log/ by typing the following:

sudo grep -R "DHCPOFFER" /var/log/*

Here’s what this returns:

Ubuntu grep DHCP leases

Ubuntu grep DHCP leases

Here you may notice that two NICs have received IP addresses (.54 and .55) from

Install and configure ISC DHCP

The installation of an ISC DHCP server is pretty straightforward on Ubuntu and can be accomplished with this command:

sudo apt-get install isc-dhcp-server

Once the service has been installed, we’ll first want to tell the server which interface to use for serving requests. Do this by entering the interface’s names between quotes at the bottom of the file /etc/default/isc-dhcp-server. For example:

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

You could also include the wlan0 interface. For example:

Define the DHCP service interface

Define the DHCP service interface

In this file, we can also find the default location of our dhcpd.conf file which is /etc/dhcp/dhcpd.conf. We need to edit our dhcpd.conf file, so change directory to the /etc/dhcp directory. For practice, let’s first make a copy of the default file in the same directory with the command cp:

sudo cp dhcpd.conf dhcpd.conf.orig

Now open the config file with your file editor of choice and take a look at the different default settings.

The default dhcpd.config provides comments and examples for all possible functions. However, I’ve provided a simplified dhcpd.conf file here to add a little clarity about lease times.

 ## /etc/dhcpd/dhcpd.conf
 ## ISC DHCPD Configuration file
 #   1             86400
 #   2             172800
 #   3             259200
 #   4             345600
 #   5             432000
 #   6             518400
 # {{{ Global Definitions (Common to all networks)
 # send logs to default /var/log/dhcp/dhcpd.log
 log-facility local7;
 #set options
 option domain-name "";
 option domain-search "";
 option domain-name-servers,;
 option subnet-mask;
 default-lease-time 345600;
 max-lease-time 518400;
 allow bootp;
 allow booting;
 # dynamic dns
 ddns-update-style none;
 update-static-leases on;
 ## Primary Subnet and pool
 subnet netmask {
     option domain-name "";
     option broadcast-address;
     option routers;
  # {{{ Client Pools
     # Known clients get this pool.
     pool {
         # WINS server address and info for microsoft win 3x,9x & NT
         option netbios-name-servers;
         option netbios-dd-server;
         option netbios-node-type 8;
         default-lease-time 345600;
         max-lease-time 518400;
         allow unknown clients;

In the example dhcpd.conf file, the option log-facility local7; sets the default log file location according to how you define logging in /etc/rsyslog.d/. In my case, I created the file /etc/rsyslog.d/10-dhcpd.conf and added the following line:

local7.* /var/log/dhcp/dhcpd.log

Now records of all DHCP requests and leases are added to the dhcpd.log. We’ll go further into logging later.

The rest of the options should look familiar: we set our global options and then move on to our primary subnet and pool. We can include any number of VLANs or networks in this file, as defined by subnet, each with their own address pools. You can tell that the primary AD domain controller is, my pfSense is, and the address pool is through We’ll go over how to pre-define and set static addresses according to MAC addresses shortly.

Set up reservations with MAC addresses

In order to set up a host with a static address, under the subnet section in which you want the device to be defined, just add the following few lines to dhcpd.conf:

host exec-hplj4525 {
 hardware ethernet 00:KK:HD:66:55:9B;

Now when the device with the MAC address 00:KK:HD:66:55:9B powers on, because it’s set to DHCP, the printer will only be issued the IP address This is a very useful tool when provisioning new equipment, switches, and printers.

In a similar fashion, you can add if statements to the configuration file for hooking VOIP phones or hardware addresses with a particular pattern to your controllers, set additional options, and define VLANs for those devices.

Get status/start/stop/restart ISC DHCP

There are four commands I use regularly to control the ISC DHCP server:

sudo service isc-dhcp-server status
sudo service isc-dhcp-server restart
sudo service isc-dhcp-server start
sudo service isc-dhcp-server stop

The status command provides troubleshooting information in the event you have misconfigured the dhcpd.conf file; otherwise you should see your service is running with output similar to the following:

ISC DHCP server status

ISC DHCP server status

Monitor server and logs with ccze

When adding devices to your network, especially IoT devices, network cameras, or other headless devices, it’s nice to see what hits your DHCP server and when. Also, looking at log files in the standard green font can be monotonous. To make things a little easier and more colorful, I like to use my favorite utility, ccze. Ccze is great for colorizing logs, ruby, and Apache as well as of course DHCP logs. Install ccze on Ubuntu with this command:

sudo apt-get install ccze

Now use the tail -f command to watch the logs as they run with something like the following command:

tail -f /var/log/dhcp/dhcpd.log | ccze

You can also add the –A flag and pipe the output to other commands such as grep. In the following example, I will get only results where the last four digits of the MAC address, 02:1c:29:3a:85:ca (85:ca), are output to the screen.

Subscribe to 4sysops newsletter!

Using grep and ccze to find an address

Using grep and ccze to find an address


ISC DHCP server has been around for a long time, and many different enterprises use it because of its flexibility. If you haven’t tried DHCP on Linux, you should know that the set up is not that difficult, and you may become inspired to take ISC DHCP server even further than what I have demonstrated here.


Leave a reply

Please enclose code in pre tags

Your email address will not be published.


© 4sysops 2006 - 2023


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account