Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jan 17 '12 at 17:10

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

    
Check /var/log/messages. –  becomingwisest Jan 17 '12 at 17:21

2 Answers 2

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

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

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 
share|improve this answer

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.