regexp or substring match

David W. Hankins dhankins at isc.org
Wed Jul 21 00:01:21 UTC 2010


On Tue, Jul 20, 2010 at 02:58:46PM -0400, Adam Moffett wrote:
> If I can do that, is there a way to match only the first 3 bytes of the MAC 
> address, so that I'm assigning a certain ethernet vendor code to a class?

You can assign class membership based upon anything present in the
client packet at the time of reception.

So in this case you could either;

    match if substring(hardware, 0, 3) = a:0:3e;

or;

    match if binary-to-ascii(hardware, 16, 8, ":") ~= "^a:0:3e:.*";


If the client sends a vendor-class-identifier that's also a (more
typical) option.

-- 
David W. Hankins	BIND 10 needs more DHCP voices.
Software Engineer		There just aren't enough in our heads.
Internet Systems Consortium, Inc.		http://bind10.isc.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20100720/f0cc00d8/attachment.bin>


More information about the dhcp-users mailing list