<div dir="ltr">I have adjusted my statement to account for the binary to ACSII conversion. I'll test and report back if I run into any problems. </div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 4, 2016 at 7:01 PM, Glenn Satchell <span dir="ltr"><<a href="mailto:glenn.satchell@uniq.com.au" target="_blank">glenn.satchell@uniq.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There may be non-ascii characters in your option agent.circuit-id, so try<br>
a suitable binary-to-ascii() around it. If there is a non-ascii or null it<br>
won't print anything.<br>
<br>
The parenthesis around a variable make no difference, they just control<br>
order of parameters.<br>
<br>
regards,<br>
-glenn<br>
<span class=""><br>
On Wed, October 5, 2016 3:49 am, project722 wrote:<br>
> Hmmm.. OK here is the log for the test client.<br>
><br>
> Oct  4 11:39:20 dhcpd: Lease for X.X.X.X with circuit-id<br>
><br>
> That's all it said.<br>
><br>
> I know that my ACL class for circuit id works as it was allowed to get an<br>
> IP address.<br>
><br>
> The log line reported back the correct IP so I know that the<br>
><br>
> "Lease for ", binary-to-ascii (10, 8, ".", leased-address),<br>
><br>
> Line in my logging clause works.<br>
><br>
</span>> But why did it stop there? Do I need to remove the parenthesis around<br>
<div class="HOEnZb"><div class="h5">> "option agent.circuit-id" since I am not using parenthesis in my ACL<br>
> class?<br>
><br>
> On Tue, Oct 4, 2016 at 11:25 AM, project722 <<a href="mailto:project722@gmail.com">project722@gmail.com</a>> wrote:<br>
><br>
>> Alfred - thanks but your setup is much more complex than mine.<br>
>><br>
>> Alex, I have put in the changes as you suggested and it passed<br>
>> validation.<br>
>> I'll report back what the logs look like or if I have any further<br>
>> problems.<br>
>><br>
>> Thanks!<br>
>><br>
>> On Tue, Oct 4, 2016 at 11:12 AM, Alex Moen <<a href="mailto:alexm@ndtel.com">alexm@ndtel.com</a>> wrote:<br>
>><br>
>>> Just comparing with mine, it seems that the "option agent.circuit-id"<br>
>>> needs to be in parens.  And, I don't know the use of the<br>
>>> "(leased-address)"<br>
>>> is.  So, try this:<br>
>>><br>
>>> ------------------------------<wbr>-----------------------<br>
>>> ## Option 82 Class<br>
>>> class "myvendor" {<br>
>>> match if option agent.circuit-id = 00:04:00:6b:00:84;<br>
>>> }<br>
>>><br>
>>> # Test Option 82 logging<br>
>>> if exists agent.circuit-id<br>
>>> {<br>
>>> log (info, concat(<br>
>>>     "Lease for ", binary-to-ascii (10, 8, ".", leased-address),<br>
>>>     " with circuit-id ", (option agent.circuit-id),<br>
>>>     " is assigned using Option82"<br>
>>>     ));<br>
>>> }<br>
>>><br>
>>> pool {<br>
>>>                 allow members of "myvendor";<br>
>>>                 range x.x.x.x x.x.x.x;<br>
>>>         }<br>
>>> ------------------------------<wbr>-----------------------<br>
>>><br>
>>> This should give you a line that looks something like:<br>
>>><br>
>>> Lease for 192.168.0.10 with circuit-id Ethernet 5 is assigned using<br>
>>> Option82<br>
>>><br>
>>> Obviously, your circuit-id will most likely be something other than<br>
>>> "Ethernet 5", but you get the idea.<br>
>>><br>
>>> If I'm way off base, someone please correct me!<br>
>>><br>
>>> Good luck,<br>
>>><br>
>>> Alex<br>
>>><br>
>>><br>
>>><br>
>>> On 10/04/2016 10:27 AM, project722 wrote:<br>
>>><br>
>>>> Hello DHCP experts! We are implementing Option 82 in our network and I<br>
>>>> am just scratching the surface of how to setup my server. I have<br>
>>>> successfully created my first Option 82 ACL based on the agent circuit<br>
>>>> ID<br>
>>>> that is contained in the packet, now I just need guidance on how I get<br>
>>>> the<br>
>>>> Option 82 data into the logs. Here is my O82 setup on the server:<br>
>>>><br>
>>>> ## Option 82 Class<br>
>>>> class "myvendor" {<br>
>>>> match if option agent.circuit-id = 00:04:00:6b:00:84;<br>
>>>> }<br>
>>>><br>
>>>> # Test Option 82 logging<br>
>>>> if exists agent.circuit-id<br>
>>>> {<br>
>>>> log (info, concat( "Lease for ", option agent.circuit-id<br>
>>>> (leased-address), "is an address assigned using Option82"));<br>
>>>> }<br>
>>>><br>
>>>> pool {<br>
>>>>                 allow members of "myvendor";<br>
>>>>                 range x.x.x.x x.x.x.x;<br>
>>>>         }<br>
>>>><br>
>>>> The problem I am having is when I go to check the conf before<br>
>>>> restarting<br>
>>>> dhcpd I am getting the error:<br>
>>>><br>
>>>> etc/dhcp/dhcpd.conf line 135: right parenthesis expected.<br>
>>>> log (info, concat( "Lease for ", option agent.circuit-id (<br>
>>>> ^<br>
>>>> Can anyone tell me what I am doing wrong and how to fix this error?<br>
>>>><br>
>>>><br>
>>>> ______________________________<wbr>_________________<br>
>>>> dhcp-users mailing list<br>
>>>> <a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
>>>> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a><br>
>>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Alex Moen<br>
>>> NSTII<br>
>>> Calix System Specialist<br>
>>> North Dakota Telephone Company<br>
>>> <a href="tel:701-662-6481" value="+17016626481">701-662-6481</a><br>
>>><br>
>>> ______________________________<wbr>_________________<br>
>>> dhcp-users mailing list<br>
>>> <a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
>>> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a><br>
>>><br>
>><br>
>><br>
> ______________________________<wbr>_________________<br>
> dhcp-users mailing list<br>
> <a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a><br>
</div></div></blockquote></div><br></div>