Option 82 log agent.remote-id
Tom Greaser
tgreaser at hsc.wvu.edu
Mon May 12 13:04:26 UTC 2008
Thanks Glenn I just got that myself.. I can be VERY VERY slow sometimes..
Sorry if i was a pain ..
I do know now that I cannot do anymore with the output for my logs . (after re reading dhcp-eval )
>>> Glenn Satchell <Glenn.Satchell at uniq.com.au> 05/12/08 8:56 AM >>>
>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,
6))));
>}
>
>
>
>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
68:73:63:2d:32:32
>
>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
>
Hi Tom,
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)));
}
regards,
-glenn
More information about the dhcp-users
mailing list