logging the lease time *sent* to clients in an "on commit" block
Phil Mayers
p.mayers at imperial.ac.uk
Mon May 21 12:50:31 UTC 2007
Niall O'Reilly wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> On 18 May 2007, at 16:44, Phil Mayers wrote:
>
>> What syntax can I use to get the ACTUAL IP address lease time (option
>> 51) the server sends to the client? We have a need to do detailed
>> logging of leases handed out including the lease time.
>
> Why use an "on commit" action to duplicate what dhcpd is already
> writing to the leases file?
>
> Parsing the leases file "offline" at regular intervals can't be
> much more difficult than doing the same with your logs, and avoids
> extra processing during allocation or renewal of each lease.
Well, thanks for the suggestion but that's not really what I'm looking
for, for two reasons:
1. the leases file doesn't list fixed addresses
2. I'm looking for <20 seconds turnaround time between the lease
granted and it making it into the logging system.
There are loads of ways to work around this; since I'm generating the
DHCP configs and our config is simple enough that lease times are
dependent on IP address only, I could dump a mapping of IP -> leasetime
at config generation time; but it seems silly that the "on commit" has
access to all the info except that.
Does anyone know if it's possible or not?
More information about the dhcp-users
mailing list