Loggin option 82 AID and CID

Blake Griffin blake at ccfargo.com
Tue Jun 29 15:18:11 UTC 2010


Is there anyway to filter that out without having to know the exact
substring size?

-----Original Message-----
From: dhcp-users-bounces+blake=ccfargo.com at lists.isc.org
[mailto:dhcp-users-bounces+blake=ccfargo.com at lists.isc.org] On Behalf Of
Glenn Satchell
Sent: Monday, June 28, 2010 9:15 PM
To: Users of ISC DHCP
Subject: Re: Loggin option 82 AID and CID

Hi Blake

There could be a null or unprintable char in the remote-id or agent-id 
strings. You could test this by using binary-to-ascii to decode that 
string so you could see all the values, eg:

pick-first-value(binary-to-ascii(8,8,":", option agent.remote-id),
"---"),

Remote-id and agent-id are defined by the forwarding equipment, and do 
not have to be printable ascii strings.

regards,
-glenn

On 06/29/10 11:38, Blake Griffin wrote:
> Ran into a problem logging AID and CID information using the
following:
>
> on commit
>
> {
>
> log (info, concat(
>
> "==> STB Lease ",binary-to-ascii(10, 8, ".", leased-address),
>
> " from MAC ",binary-to-ascii(16,8,":",substring(hardware,1,6)),
>
> " (",pick-first-value(option host-name,"---"),")",
>
> " assigned to AID: ",pick-first-value(option agent.remote-id,"---"),
>
> " CID: ",pick-first-value(option agent.circuit-id,"---"),
>
> " has committed"
>
> ));
>
> }
>
> This should result in a log message like this:
>
> ==> DATA Lease 206.10.75.27 from MAC 0:30:18:b0:dd:74 (AMBER-NEW)
> assigned to AID: N1-2-8-1-1-OntEth1-1 CID: n1-1-vb11-464-vlan10 has
> committed
>
> However it does not. It ends after the AID entry unless I put in a
> substring statement with the exact number of characters. I then also
> have to do this for the CID as well to get the whole statement. The
> problem with this is that I believe the agent.remote-id and
> agent.circuit-id are variable. Can anyone explain to me this behavior
> and give me any direction on correcting it?
>
> Thanks,
>
> Blake
>
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users



More information about the dhcp-users mailing list