I use dhcp3-server to serve addresses to the 4 enet ports on my gigE card in my linux box. The interfaces are eth1 to eth4 and are addressed 192.168.x.0 whefre x = 1,2,3,4.

How may I get dhcp3-server to tell me the addresses it has assigned and, if possible, the MACs of the devices it sees on one of those networks?

link|improve this question
Check /var/log/messages. – becomingwisest Jan 17 at 17:21
feedback

migrated from stackoverflow.com Jan 17 at 17:10

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 0 down vote accepted

dhcpd3 uses something called "leases" file where that information is stored, a common path is to find it as /var/lib/dhcp3/dhclient.leases.

Example output from this file:

lease 192.168.100.183 {
  starts 2 2012/01/17 17:52:37;
  ends 2 2012/01/17 18:02:37;
  binding state active;
  next binding state free;
  hardware ethernet 00:0c:29:79:ff:1b;
  client-hostname "ubuntubox";

}

Check manual page for the file at: http://linux.die.net/man/5/dhcpd.leases

link|improve this answer
Thanks! I finally found the right man page and found this information also. – Wes Miller Jan 18 at 18:29
feedback

Generally, any server program such as this would output this information to its log file, normally /var/log/message/<service name>.log or else /var/log/<service name>/*.log

I'm myself using dnsmasq, which gives messages like these:

gong dnsmasq[19510]: DHCPINFORM(eth1) 10.0.4.23 00:0c:29:0b:0e:15 
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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