Custom DHCP Logging

Glenn Satchell Glenn.Satchell at uniq.com.au
Thu Mar 13 11:29:35 UTC 2008


Nah, it's just like that to confuse windows dhcp admins who look at the
config file :)

Original post:

    http://marc.info/?l=dhcp-server&m=105689607527110&w=2

regards,
-glenn

>Date: Wed, 12 Mar 2008 16:20:14 -0500
>From: Blake Hudson <blake at ispn.net>
>To: dhcp-users at isc.org
>Subject: Re: Custom DHCP Logging
>
>Thanks, that does the trick. I'm surprised it is so convoluted to log 
>something as basic to the DHCP process as the MAC address.
>
>-------- Original Message  --------
>Subject: Re: Custom DHCP Logging
>From: Andre Mamitzsch <andre at mamitzsch.de>
>To: dhcp-users at isc.org
>Date: Wednesday, March 12, 2008 4:03:50 PM
>> >> Notice that any fields in the mac address that had leading zeroes 
>> are now missing them. This makes matching difficult when looking 
>> through the logs.
>>
>> Here is the logging method we are using:
>>
>> log(info,
>> concat("DHCPEXTLOG for ",
>> binary-to-ascii(10,8, ".", leased-address), " leased to ",
>> concat (suffix (concat
>> ("0", binary-to-ascii (16, 8, "", substring( hardware, 1, 1))),2),
>> ":",
>> suffix (concat
>> ("0", binary-to-ascii (16, 8, "",substring( hardware, 2, 1))),2),
>> ":",
>> suffix (concat
>> ("0", binary-to-ascii (16, 8, "", substring( hardware, 3, 1))),2),
>> ":",
>> suffix (concat
>> ("0", binary-to-ascii (16, 8, "", substring( hardware, 4, 1))),2),
>> ":",
>> suffix (concat
>> ("0", binary-to-ascii (16, 8, "", substring( hardware, 5, 1))),2),
>> ":",
>> suffix (concat
>> ("0", binary-to-ascii (16, 8, "", substring( hardware, 6, 1))),2),
>> " via bridge ",
>> concat (suffix (concat
>> ("0", binary-to-ascii (16, 8, "", substring(option agent.remote-id, 0, 
>> 1))),2),
>> ":",
>> suffix (concat
>> ("0", binary-to-ascii (16, 8, "",substring(option agent.remote-id, 1, 
>> 1))),2),
>> ":",
>> suffix (concat
>> ("0", binary-to-ascii (16, 8, "", substring(option agent.remote-id, 2, 
>> 1))),2),
>> ":",
>> suffix (concat
>> ("0", binary-to-ascii (16, 8, "", substring(option agent.remote-id, 3, 
>> 1))),2),
>> ":",
>> suffix (concat
>> ("0", binary-to-ascii (16, 8, "", substring(option agent.remote-id, 4, 
>> 1))),2),
>> ":",
>> suffix (concat
>> ("0", binary-to-ascii (16, 8, "", substring(option agent.remote-id, 5, 
>> 1))),2),
>> " using vendor-identifier ",
>> option vendor-class-identifier,
>> "Modem Typ"
>> )
>> )));
>> }
>>
>> Regards,
>>
>> Andre
>>


More information about the dhcp-users mailing list