Problems using class match by user-option
Bill Shirley
bill at c3po.polymerindustries.biz
Thu Dec 7 15:09:37 UTC 2017
You don't need to define the hosts unless there is more to your config
than you've shared. Code it once as a subclass declaration.
Did you not notice that I commented our the host statements?
Bill
On 12/7/2017 7:58 AM, 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20171207/5934b00c/attachment.html>
More information about the dhcp-users
mailing list