Logging PXE requests

Ragnar Kjørstad dhcp at ragnark.vestdata.no
Mon Nov 20 17:37:01 UTC 2006


Hi

I'd like to log all PXE requests from systems without leases. 

Ideally I'd like to query the DHCP server via OMAPI for a list of DHCP
requests for which we had no free leases, but as far as I can see there
is no support for doing this with OMAPI.

Another option is to just log the events through the logging subsystem.
By default it is logging things like:
dhcpd: DHCPDISCOVER from 00:0c:29:d4:92:00 via eth1: network 10.1/16: no free leases

but I would like to know if this is a PXE request or not.

I've tried with:
if option dhcp-message-type = 1 {
  if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
    log (info, concat("PXE Discovery: ", binary-to-ascii (16, 8, ":", hardware)));
  }
}

in the global scope, but this only works for requests that match a host
entry (or presumably a pool). 


Is there anyway to customize the logging of requests for which there
were no leases? I'm using dhcp-3.0.1-58 from RHEL4U4.

-- 
Ragnar Kjørstad
Software Engineer
Scali - http://www.scali.com
Scaling the Linux Datacenter


More information about the dhcp-users mailing list