Problems using class match by user-option
Sven Schumacher
schumacher at tfd.uni-hannover.de
Thu Dec 7 12:58:45 UTC 2017
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20171207/e6c9d545/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4971 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20171207/e6c9d545/attachment-0001.bin>
More information about the dhcp-users
mailing list