How to match part of agent's vendor specific suboption

scott_stone at trendmicro.com scott_stone at trendmicro.com
Mon Oct 10 00:21:48 UTC 2011


I'm using a similar statement to match PXE clients (to differentiate from when installed systems boot - the PXE boot rom sends a specific client option, and we had out different settings to these clients... works on dhcp 3.0.x and 4.2.x (tested) - seems similar to what you want, it might help.. here's the config block (actual IP replaced with 1.2.3.4 in this example):

 

class "PXE" {

        match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";

        filename "pxelinux.0";

        option vendor-class-identifier "PXEClient";

        vendor-option-space PXE;

        option PXE.mtftp-ip 0.0.0.0;

        next-server 1.2.3.4;

}

 

sounds like you might need the 'option' keyword before 'agent' to match what you're looking for?

 

====================

Scott Stone <scott_stone at trendmicro.com>

Manager, DCS-RD

Trend Micro, Inc. http://www.trendmicro.com

 

From: dhcp-users-bounces+scott_stone=trendmicro.com at lists.isc.org [mailto:dhcp-users-bounces+scott_stone=trendmicro.com at lists.isc.org] On Behalf Of Eduardo Ferreira Juca de Castro
Sent: Sunday, October 09, 2011 12:07 PM
To: dhcp-users at lists.isc.org
Subject: How to match part of agent's vendor specific suboption

 

Hi,

 

I need to assign addresses based on a ssid information carried on agent's (option 82) vendor specific suboption.

Do do so I defined classes this way:

 

class "myClass" {

   match if substring(agent,60,5) = "SSID1";

}

and used it in pool statements but nothing happens.

 

I also tried to log things to see waht are beeing decoded but again nothing happens.

 

if option dhcp-message-type = 1 {

    log(info,concat("option82-suboption9: ",binary-to-ascii(16,8,"",substring(agent,60,5))));

}

 

I'm using ISC DHCP 4.2.1.

Anyone can help me with this?

 

TIA

 

Regards,




Eduardo F. J. de Castro

CPqD - Telecommunications and IT R&D Center


TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20111009/638cb04c/attachment.html>


More information about the dhcp-users mailing list