How to Find The IP Address Of A DHCP server

As you may know, The Dynamic Host Configuration Protocol (DHCP) is a standardized networking protocol used on Internet Protocol (IP) networks for dynamically distributing network configuration parameters, such as IP addresses for interfaces and services. With DHCP computers request IP addresses and networking parameters automatically from a DHCP server, reducing the need for a network administrator or a user from having to configure these settings manually.

So in essence when you enable DHCP on your machine, it sends a message to the network to discover DHCP servers on it. Once it gets confirmation from an available one, it finalizes a request for the lease of an IP address. If you want to find the IP address of a DHCP server used for configuring a particular interface on your Linux machine there are two ways.

First way

The easy way is to simply check the DHCP lease information from a file in:


To do that, simply type:

$ cat /var/lib/dhcp/dhclient.eth0.leases

The output should be something like:

lease {

  interface "eth0";


  option subnet-mask;

  option time-offset 0;

  option routers;

  option dhcp-lease-time 86399;

  option dhcp-message-type 5;

  option domain-name-servers,;

  option dhcp-server-identifier;

  option broadcast-address;

  option host-name "new-host-3";

  option domain-name "home";

  renew 5 2014/03/17 13:06:24;

  rebind 6 2014/03/18 00:22:01;

  expire 6 2014/03/18 03:22:01;


The lease file contains a lot of information as you can see, such as DHCP lease time and expiration time. The IP address of a DHCP server is shown in the “dhcp-server-identifier” field.

You should be aware that depending on your Linux distribution the file may be located elsewhere:



Second way

Examine the log files in /var/log/ by typing:


The output:

/var/log/syslog:Mar 17 23:22:02 debian dhclient: DHCPOFFER from

The IP is clearly visible.