Problems using class match by user-option

Sten Carlsen stenc at s-carlsen.dk
Thu Dec 7 16:18:30 UTC 2017


I have been using this setup for a long time, even using 5 different
classes with different routers , one with no internet access and one for
unknown hosts for isolation.

The only place to use the hardware address is in the subclass statement
where you can add e.g. dns-name if needed. I put this into an include file.

I have a few host statements for things that need a fixed address,
referring to the DNS lookup of the name.

It was the easiest solution I could find. Recommended.


On 07/12/2017 13:58, Sven Schumacher wrote:
> Am 07.12.2017 um 13:48 schrieb Bill Shirley:
>> Class/subclass would better fit your needs:
> Yes of course... but I didn't want to specify the mac-address twice.
> More comfortable would be to add a option to  the already existing
> groups of hosts:
>
> group { # guests
>     option tfd-scope-identifier "gaeste";
>     host test1 {
>        hardware ethernet aa:bb:cc:dd:ee:ff;
>     }
>     host test2 {
>        hardware ethernet bb:cc:dd:ee:ff:aa;
>     }
> }
>
>
>
>> #      -------------
>> class "gaeste" {   
>>   match hardware;
>>   option routers 10.69.0.251;    # can set the routers here or in
>> "gaste" pool
>> }
>> # MAC address is preceded by '1:' indicating ethernet
>> subclass "gaeste"    1:aa:bb:cc:dd:ee:ff;    # test1
>> #      -------------
>>
>> #      -------------
>> class "subnet2" {
>>   match hardware;
>> }
>> subclass "subnet2"    1:bb:cc:dd:ee:ff:aa;    # test2
>> subclass "subnet2"    1:cc:dd:ee:ff:aa:bb    { # test3 - can have
>> additional settings
> this way I would have to add the MAC-address twice (one time for the
> subclass and one time for the host)
>
>> #host test1 {
>> # hardware ethernet aa:bb:cc:dd:ee:ff;
>> # option tfd-scope-identifier "gaeste";
>> #}
>> #host test2 {
>> # hardware ethernet bb:cc:dd:ee:ff:aa;
>> #}
>>
>> Host declarations are global and should not be inside any
>> other structure except 'group'.  Pools should be inside subnet
>> declarations.
> The pool-declarations are in a shared-network, but even changing this,
> so that the pool-declaration are in the corresponding
> subnet-declarations, doesn't help.
>>
>> There are other ways to do class matches:
>> class "10.mobile_device" {
>>     match if (
>>         option host-name ~~ "dhcpcd"
>>         or option host-name ~~ "android"
>>         or option vendor-class-identifier ~~ "android"
>>         or option host-name ~~ "samsung-sm"
>>         or option host-name ~~ "iphone"
>>         or option host-name ~~ "ipod"
>>         or option host-name ~~ "ipad"
>>         or option host-name ~~ "watch"
>>     );
> It seems to me, that class matches doesn't work with config-options,
> only with options :(
> I tried once to use "option host-name " instead of my "config-option
> tfd-scope-identifier" and then the class was assigned.
>
> Thanks so far
>
> Sven
>
>
> -- 
> Sven Schumacher - Systemadministrator Tel: (0511)762-2753
> Leibniz Universitaet Hannover
> Institut für Turbomaschinen und Fluid-Dynamik       - TFD
> Appelstraße 9 - 30167 Hannover
> Institut für Kraftwerkstechnik und Wärmeübertragung - IKW
> Callinstraße 36 - 30167 Hannover
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-- 
Best regards

Sten Carlsen

No improvements come from shouting:

       "MALE BOVINE MANURE!!!" 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20171207/63be396d/attachment.html>


More information about the dhcp-users mailing list