Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I sometimes configure routers with my laptop and use connection sharing with Network manager and so my laptop acts as DHCP server. I then need to connect (via ssh usually) to the servers that are DHCP clients. Is there a simple way to find out the adresses they leased?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You can check your DHCP lease file (in the case of dhcp isc server /var/lib/dhcp/dhcpd.leases ), the DHCP log, or the Network Manager log (depending the distribution could be /var/log/syslog, /var/log/NetworkManager*, etc.).

The format of these leases could be in the form of:

lease 192.168.42.1 {
starts 0 2000/01/30 08:02:54;
ends 5 2000/02/04 08:02:54;
hardware ethernet
   00:50:04:53:D5:57;
uid 01:00:50:04:53:D5:57;
client-hostname "PC0097";
}

Of course, this may vary the implementation, but any ISC DHCP based implementation should be like this.

share|improve this answer
    
Hm, I am on Ubuntu. Networkmanager log indeed goes to /var/log/syslog but I cannot find the leases there. I found /var/lib/misc/dnsmasq.leases that works though. Thanks for the pointer! –  sup Oct 4 '13 at 19:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.