[CentOS] seeing which IP is your DHCP server

Erik Laxdal elaxdal at ECE.UVic.CA
Fri Jul 20 01:29:56 UTC 2007

Rogelio Bastardo wrote:
> If I am on a CentOS box (or any other nix box, I guess), what is the
> easiest way to easily see the dhcp server?  (Like in MS Windows, one
> can run "ipconfig /all" and see which IP is the DHCP server)

For CentOS 5, the command:

      grep dhcp-server-identifier /var/lib/dhclient/dhclient-eth0.leases

or for CentOS 4, the command:

      grep dhcp-server-identifier /var/lib/dhcp/dhclient-eth0.leases

will list the dhcp server(s) that the system recently got its IP address 
from.  The most recent dhcp renewal should be at the bottom of the list.


More information about the CentOS mailing list