logging lease expiration time

Peter Rathlev peter at rathlev.dk
Thu Sep 26 21:43:26 UTC 2013

On Thu, 2013-09-26 at 19:38 +1000, tom wrote:
>  log (info, concat(IP=", binary-to-ascii (10, 8, ".", leased-address),
>                     " max-lease-time=", $SOMETHING_HERE));
> PS: It's really unclear what log() can read. It looks like it's only 
> able to read values/options from a DHCP packet. I understand that it's 
> probably uncommon to log config values though...
> Any thoughts ?

Unable to test it myself right now, but could you try "config-option
default-lease-time", cf. man dhcp-eval?

That the actual lease time can differ from both default-lease-time and
max-lease-time depending on what the client asks for. Parsing
dhcp.leases is probably the best bet even though it's a pain.


More information about the dhcp-users mailing list