2

in my setup ISC DHCPD 4.3.1 hands out ip addresses only to list of pre-defined hosts, whose mac <> ip association is explicitly entered in the config file.

once in a while there'll be DHCP request coming from a host that is not listed in the config. in logs i see:

May 23 08:29:33 myserver dhcpd: DHCPDISCOVER from 51:24:30:1a:27:ce via eth0.201: network 10.1.10.0/24: no free leases

how can i convince the DHCPD to log the host-name provided by the host trying to obtain the ipv4 address?

i've tried these, just to see if i can get any additional logging, defined both in global scope or subnet but neither gave me any entry in the log:

if not (known or static) {
 log(error, 
  concat("client is neither known nor static ", binary-to-ascii (16, 8, ":",substring (hardware, 1, 6))  ));
}

log (error,
  concat ("Lease request from ",
  binary-to-ascii(16, 8, ":",substring(hardware,1, 6)))
);

logging of that type works fine for known hosts, but looks like handling of the "no free leases" event happens before any logging action is taken.

thanks in advance for help!

pQd
  • 29,561
  • 5
  • 64
  • 106
  • Have you considered using something like packetbeat to obtain insight into you your DHCP (and other) operations? Alternatively, give it a small pool with an isolated network config and very short lease? – Cameron Kerr May 23 '17 at 08:43
  • 1
    @CameronKerr - thanks for the suggestion. i can get the host name from the packet captures done with tcpdump. i'm just curious if it's possible to get it just with dhcpd, without any additional tools. – pQd May 23 '17 at 08:45

0 Answers0