Option 82 log agent.remote-id
Glenn.Satchell at uniq.com.au
Mon May 12 12:56:33 UTC 2008
>Date: Mon, 12 May 2008 07:24:38 -0400
>From: "Tom Greaser" <tgreaser at hsc.wvu.edu>
>To: <dhcp-users at isc.org>
>Subject: Re: Option 82 log agent.remote-id
>just wanted to put a notice that the agent remote id should be 12 no 6 like
in last post agent.remote-id, 2, 12)
>>>> "Tom Greaser" <tgreaser at hsc.wvu.edu> 05/12/08 5:59 AM >>>
>I seem to have found the exact config statement needed to log the remote id..
> if exists agent.remote-id
> log ( info, concat( "DHCPAGENT for lease of ", binary-to-ascii (10, 8,
".", leased-address), " on agent ",
> binary-to-ascii(16, 8, ":", substring( option agent.remote-id, 2,
>However dhcp isnt seeing the ascii info.. its just putting hex.. here is what
my logs show
>May 12 05:53:30 pippin dhcpd: DHCPAGENT for lease of 10.3.3.16 on agent
>wireshark does show hsc-2260 (option 82 info) ..
>Again.. can anyone point me in the right direction.. ?? I know your all way
smarter than I .....
>and i know a ton of other people out there are begging to do this.. well ok i
know of only 1.. ME.. lol
It's doing exactly what you asked it to do, turn a "binary"
sequence into a string of base 16 numbers spearated by ':'.
That may have been appropriate in the example you copied it
from because in that case it may not have been plain text.
If it's already a text string then just use it as is:
if exists agent.remote-id
log ( info, concat( "DHCPAGENT for lease of ",
binary-to-ascii (10, 8, ".", leased-address), " on agent ",
substring(option agent.remote-id, 2, 6)));
More information about the dhcp-users