Thanks Glenn,<div><br></div><div>But I need to match a vendor specific suboption. The ones you listed isn't in the packet.</div><div>I'll handle just one vendor dhcp relay though, so I know the order the suboptions are packed.</div>
<div>If I can't use the global agent how to get access to the vendor specific suboptions?</div><div><br></div><div>[]<br clear="all"><div>Eduardo F. Jucá de Castro</div><div>CPqD - Gerência de Serviços e Aplicações Multimídia</div>
<div>Tel.: +55 19 3705-7238 / Fax: +55 19 3705-5868</div><div>Cel.: +55 19 9603-4624</div><div><a href="mailto:jucah@cpqd.com.br" target="_blank">jucah@cpqd.com.br</a></div><div><a href="http://www.cpqd.com.br" target="_blank">www.cpqd.com.br</a></div>
<div></div><br>
<br><br><div class="gmail_quote">2011/10/9 Glenn Satchell <span dir="ltr"><<a href="mailto:glenn.satchell@uniq.com.au">glenn.satchell@uniq.com.au</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
See man dhcp-options, I think you need to specify one of<br>
<br>
option agent.circuit-id<br>
option agent.remote-id<br>
option agent.DOCSIS-device-class<br>
option agent.link-selection<br>
<br>
You definitely need the "option" key word, otherwise it uses a variable<br>
named "agent" which is probably null.<br>
<br>
Using substring on the whole agent field may not extract it correctly, as<br>
the order of packing in the sub options could vary.<br>
<br>
regards,<br>
-glenn<br>
<div><div></div><div class="h5"><br>
> I'm using a similar statement to match PXE clients (to differentiate from<br>
> when installed systems boot - the PXE boot rom sends a specific client<br>
> option, and we had out different settings to these clients... works on<br>
> dhcp 3.0.x and 4.2.x (tested) - seems similar to what you want, it might<br>
> help.. here's the config block (actual IP replaced with 1.2.3.4 in this<br>
> example):<br>
><br>
><br>
><br>
> class "PXE" {<br>
> match if substring(option vendor-class-identifier, 0, 9) =<br>
> "PXEClient";<br>
> filename "pxelinux.0"<br>
> option vendor-class-identifier "PXEClient";<br>
> vendor-option-space PXE;<br>
> option PXE.mtftp-ip 0.0.0.0;<br>
> next-server 1.2.3.4;<br>
> }<br>
><br>
> sounds like you might need the 'option' keyword before 'agent' to match<br>
> what you're looking for?<br>
><br>
><br>
><br>
> ====================<br>
><br>
> Scott Stone <<a href="mailto:scott_stone@trendmicro.com">scott_stone@trendmicro.com</a>><br>
> Manager, DCS-RD<br>
> Trend Micro, Inc. <a href="http://www.trendmicro.com" target="_blank">http://www.trendmicro.com</a><br>
><br>
><br>
><br>
> From: dhcp-users-bounces+scott_stone=<a href="mailto:trendmicro.com@lists.isc.org">trendmicro.com@lists.isc.org</a><br>
> [mailto:<a href="mailto:dhcp-users-bounces%2Bscott_stone">dhcp-users-bounces+scott_stone</a>=<a href="mailto:trendmicro.com@lists.isc.org">trendmicro.com@lists.isc.org</a>] On<br>
> Behalf Of Eduardo Ferreira Juca de Castro<br>
> Sent: Sunday, October 09, 2011 12:07 PM<br>
> To: <a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
> Subject: How to match part of agent's vendor specific suboption<br>
><br>
><br>
><br>
> Hi,<br>
><br>
><br>
><br>
> I need to assign addresses based on a ssid information carried on agent's<br>
> (option 82) vendor specific suboption.<br>
><br>
> Do do so I defined classes this way:<br>
><br>
> class "myClass" {<br>
> match if substring(agent,60,5) = "SSID1";<br>
> }<br>
><br>
> and used it in pool statements but nothing happens.<br>
><br>
> I also tried to log things to see waht are beeing decoded but again<br>
> nothing happens.<br>
><br>
> if option dhcp-message-type = 1 {<br>
><br>
> log(info,concat("option82-suboption9:<br>
> ",binary-to-ascii(16,8,"",substring(agent,60,5))));<br>
><br>
> }<br>
><br>
><br>
><br>
> I'm using ISC DHCP 4.2.1.<br>
><br>
> Anyone can help me with this?<br>
><br>
><br>
><br>
> TIA<br>
><br>
><br>
><br>
> Regards,<br>
><br>
><br>
><br>
><br>
> Eduardo F. J. de Castro<br>
><br>
> CPqD - Telecommunications and IT R&D Center<br>
><br>
><br>
> TREND MICRO EMAIL NOTICE<br>
> The information contained in this email and any attachments is<br>
> confidential and may be subject to copyright or other intellectual<br>
> property protection. If you are not the intended recipient, you are not<br>
> authorized to use or disclose this information, and we request that you<br>
> notify us by reply mail or telephone and delete the original message from<br>
> your mail system.<br>
</div></div>> _______________________________________________<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" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
<br>
<br>
_______________________________________________<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" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
</blockquote></div><br></div>