Need vendor class identifier advice

Peter Rathlev peter at
Wed Sep 18 12:07:53 UTC 2013

On Tue, 2013-09-17 at 23:52 -0700, Doug Barton wrote:
> On 09/17/2013 10:30 PM, Peter Rathlev wrote:
> > Regexp matching is expensive though. The most efficient way is probably
> > the two-class (with subclassing) approach with two allow statements.
> Actually they are deny statements ... I'm wondering if that affects the 
> calculations regarding efficiency? Every non-phone client will be 
> passing through the deny classes for every non-phone subnet (the vast 
> majority of both).

The expensive part is finding out what class(es) a given client belongs
to; actually allowing/denying it is the smaller part of the job. So I
still think two denies is the most effective way.

I'm not sure which of the following two is the most efficient though:

    class "A" {
        match substring (option X, 0, 8);
    subclass "A" "whatever";

 --- or ---

    class "A" {
        match if substring (option X, 0, 8) = "whatever";

I would think they're equally efficient, both being much more efficient
than a regexp match. And it's probably slightly more efficient having
two of these classes and two allow/deny statements than having one
compound class with a boolean "or".

Normally disk I/O is much more of a worry than CPU cycles though. :-)


More information about the dhcp-users mailing list