[Kea-users] Client Classification question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] Client Classification question

Satish Patel
Folks,

My requirement is to classify client based on their hostname and
assign specific range of IP to those servers, example my hostname is
web01 and db01 and i want web01 get specific range of IP address and
db01 get specific range. I am trying to create following filter but
somehow its not working or i am doing something wrong, If i am wrong
then what is the right identifier i should use to parse hostname and
create filter


"client-classes": [
        {

            "name": "web",
            "test": "substr(client-fqdn.name, 0, 3)) == 'web'"
        }
    ],


Getting Error

INFO/keactrl: Starting /usr/local/sbin/kea-dhcp4 -c
/usr/local/etc/kea/kea-dhcp4.conf
2018-06-02 21:09:07.294 ERROR [kea-dhcp4.dhcp4/13875] DHCP4_INIT_FAIL
failed to initialize Kea server: configuration error using file
'/usr/local/etc/kea/kea-dhcp4.conf': expression:
[substr(client-fqdn.name, 0, 3)) == 'web'] error: <string>:1.1:
Invalid character: s at (/usr/local/etc/kea/kea-dhcp4.conf:235:14)
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Client Classification question

Francis Dupont
> [substr(client-fqdn.name, 0, 3)) == 'web'] error: <string>:1.1:
> Invalid character: s at (/usr/local/etc/kea/kea-dhcp4.conf:235:14)

=> substr is not recognized (it is substring). BTW there are other
syntax errors, for instance the extra closing parenthesis.
And for the option it is option[<code/name>].hex ...

Regards

Francis Dupont <[hidden email]>
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users