SV: Combining Classes
"Jóhann B. Guðmundsson"
johannbg at hi.is
Tue Mar 6 23:29:55 UTC 2007
Lars Jacobsen wrote:
>> "Jóhann B. Guðmundsson" wrote:
>> What about !=TV-STB ?
>>
>>
> Eeemmmmm, as an expression or what ? If so please explain ?
>
> Or do you miss some info it in my explanation ? Because I do have a
> dedicated pool for the STB, where I want to allow only member of the new 3.
> combined class.
>
> /Lars
>
>
>
I guess I was way off my heads ( some how I had your AND and OR stuck in
my head when I replied )
been to much doing bash scripts these days.. :)
New to these class things so I took A look
So If I get these "classes" right..
then.
#
class "class-1" {
match option user-class; # match string ?
}
subclass "class-1" "TV-STB1"; # TV-STB1 match to string1 ?
class "class-2" {
match option user-class; #match string ?
}
subclass "class-2" "TV-STB2"; # TV-STB2 match to string to 2
subnet 10.x.x.x netmask 255.x.x.x {
#Pool for TV-STB1
pool {
allow members of "class-1";
range 10.228.1.x 10.228.1.x;
option .....
}
# Pool for TV-STB2
pool {
allow members of "class-2";
range 10.228.2.x 10.228.2.x;
option ........
}
# Default goes to consumer pc
pool }
range dynamic-bootp ;
deny members of "class-1";
deny members of "class-2";
Maybe what you are trying to achive can be done with more subclass
decloration for the same class?
So instead of trying to combine classess adding another subclass for the
same class might do the trick..
man dhcpd.conf
SUBCLASSES
In addition to classes, it is possible to declare
subclasses. A subclass is a class with the same name as a regular
class, but with a specific submatch expression which is
hashed for quick matching. This is essentially a speed hack -
the main difference between five classes with match expressions and one
class with five subclasses is that it will
be quicker to find the subclasses. Subclasses work as follows:
class "allocation-class-1" {
match pick-first-value (option dhcp-client-identifier, hardware);
}
class "allocation-class-2" {
match pick-first-value (option dhcp-client-identifier, hardware);
}
subclass "allocation-class-1" 1:8:0:2b:4c:39:ad;
subclass "allocation-class-2" 1:8:0:2b:a9:cc:e3;
subclass "allocation-class-1" 1:0:0:c4:aa:29:44; <--second
instance for the same allocation class
subnet 10.0.0.0 netmask 255.255.255.0 {
pool {
allow members of "allocation-class-1"; <-- members of that
class only defined once
range 10.0.0.11 10.0.0.50;
}
pool {
allow members of "allocation-class-2";
range 10.0.0.51 10.0.0.100;
}
}
I would like to know what your overall dhcp scheme looks like so I could
get
picture of what kind of dhcp scenes your dealing with on day to day
bases ( total number of clients ( to see how large it is ) how many dhcp
servers your
running for these number of clients and are you using failover? etc etc.
curios in what kind of scenario you would be defninig so many classess.
Best regards
Jóhann B.
--
Jóhann B. Guðmundsson. RHCE,CCSA
Unix Kerfistjóri.
Kerfistjórn.
Reiknistofnun Háskóla Íslands.
Tæknigarði, Dunhaga 5. Rafpóstur: johannbg at hi.is
107 Reykjavík. Sími: 525-4267
Ísland. Bréfasími: 552-8801
Johann B. Gudmundsson. RHCE,CCSA
Unix System Engineer.
IT Management.
Reiknistofnun University of Iceland.
Taeknigardi, Dunhaga 5. Email: johannbg at hi.is
IS-107 Reykjavik. Phone: +354-525-4267
Iceland. Fax: +354-552-8801
More information about the dhcp-users
mailing list