[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dhcp-server
Subject:    SV: Class selection ekspression
From:       "Lars Jacobsen" <lj () sydfynsel ! dk>
Date:       2006-03-15 12:26:56
Message-ID: 08A1B725F3F85D428938CC20C48AD2FF52CD5D () sefexch ! SEF ! local
[Download RAW message or body]

I read the man pages several times without luck... 
But now i found out how to use AN/OR:
match if (subbstring (option agent.circuit-id,5,2) = 01)OR(subbstring (option \
agent.circuit-id,5,2) = 16) ; Now how do I change the equal signs to greather than \
and less than (> <) so that I don't have to make 16 OR´s 

And yes I would like to use subclasses (or the spawn with function) Just cant figure \
out how.... Now I tried the:

subclass "Class1" agent.circuit-id;

That didn't work.  So I tried this instead:

subclass "Class1" (match if subbstring (option agent.circuit-id,5,2) = 01);

That didn't work either. The 

subclass "Class1" 01;

Does seem to work (at least the server will start without errors) but does it match \
the criteria ?


/Lars


-----Oprindelig meddelelse-----
Fra: dhcp-users-bounce@isc.org [mailto:dhcp-users-bounce@isc.org] På vegne af Simon \
                Hobson
Sendt: 15. marts 2006 10:12
Til: dhcp-users@isc.org
Emne: Re: Class selection ekspression

Lars Jacobsen wrote:

> Thanks but this still does not give me answer on how to make a class 
> match where two (or more) conditions is true.
> My RID/CID is also unique but part of it is sequential and that is 
> what I want to make a (sub)class selection on.
> RID/CID = 2102011 or 2102021 or 2102031 ... 2102161 all have to end 
> up in class one.
> RID/CID = 2102171 or 2102181 or 2102191 ... 2102321 all have to end 
> up in class two.
> RID/CID = 2102331 or 2102341 or 2102351 ... 2102481 all have to end 
> up in class tree.
> I have no problem making an exact match based on the RID/CID.

You can use logical operators (ie AND, OR) in expressions, I think 
it's in 'man dhcp-eval'.

Also, have you considered subclassing ? There's a section (including 
example) in 'man dhcpd.conf' - just replace all references to MAC 
addresses with RID/CID. IIRC, it's said to be more efficient than 
large "if x or y or z or ..." constructs due to hashing.

Simon


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic