[SOLVED] Re: How to match part of agent's vendor specific suboption

Eduardo Ferreira Juca de Castro jucah at cpqd.com.br
Thu Oct 13 11:25:15 UTC 2011

Thanks Mark and again Glenn,

Actually I had already captured packets with tcpdump but wasn't
understanding what's going on.
Mark was right. There isn't suboptions codes but a raw list of values inside
the enterprise code.
So, for documentation and help for others, the code that worked is:

option space vendor1;
option vendor1-encapsulation code 82 = encapsulate vendor1;
option vendor1.circuit-id code 1 = text;
option vendor1.raw code 9 = text;

class "CLASS1" {
   match if ((substring(option vendor1.circuit-id,2,10) = "SSID1") or
(substring(option vendor1.raw,55,5) = "SSID1"));

Note that when the whole code 82 is encapsulated this way, the standard
circuit-id is avaliable only in the new space defined.

Eduardo F. Jucá de Castro
CPqD - Gerência de Serviços e Aplicações Multimídia
Tel.: +55 19 3705-7238 / Fax: +55 19 3705-5868
Cel.: +55 19 9603-4624
jucah at cpqd.com.br

2011/10/11 Marc Perea <marccp at srttel.com>

>  Hi Eduardo,
> I've been listening to this conversation and I'll offer what I can as help.
> I use option 82 for matching, and as has been mentioned by Glenn, I'm not
> sure that you're receiving option 82 the way you think you are. Rather than
> troubleshoot from the server, setting up option spaces and configuring for
> the way you'd like it to work and then having nothing to go off of if it
> doesn't work, I'd recommend working from the other end - fire up a
> wireshark, tcpdump or tethereal and inspect what you expect.
> It could be that what you think or have been told to expect in options
> isn't actually encoded the way you hope. A packet dump will tell you what
> options are being sent for sure so that you don't have to guess.
> Is it possible the vendor is using the vendor code option, and
> encapsulating sub-options (82 maybe) inside of the VSO?
> What you are listing doesn't sound to me like standard option 82
> information. I log the following, for example:
> if exists agent.circuit-id {
>         log(info,concat(binary-to-ascii(10,8,".",leased-address)," OFFERED
> TO AGENT.CIRCUIT-ID => ",option agent.circuit-id));
> }
> if exists agent.remote-id {
>        log(info,concat("Grrr, problem here - REMOTE-ID => ",option
> agent.remote-id));
> }
> I suspect if you look at the actual packet, you'll see exactly what is
> going on. HTH.
> --Marc
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20111013/0f50c999/attachment.html>

More information about the dhcp-users mailing list