Hello.
I have defined domain name server option in subnets configuration.
I need to override dns servers for a part of clients.
These clients was separated by option 60.
I created client class with matching by option 60.
In client class I have defined other dns servers.
In logs I see that client was matched to my client class but client receives 
dns from subnet config, not from client class config.

This means that subnet options have higher priority than client class?
If options defined in subnets remains, how can I override them with client 
class? Is there a way to create client class with higher priority?
Config:
"Dhcp4": {
"client-classes":
[
        {
        "name": "ClinetsSec",
        "test": "option[60].hex == 0x736563646E73",
        "option-data":
                [
                {
                "name": "domain-name-servers",
                "code": 6,
                "space": "dhcp4",
                "csv-format": true,
                "data": "192.168.30.21,192.168.30.22"
                }
                ]
        }
],
...
Backend config...

Shared network and subnet in it created with api
curl -X POST -H "Content-Type: application/json" -d '{"command": 
"remote-network4-set","arguments":{"shared-networks": [{"name": 
"TestShared"}],"remote": {"type": "mysql"},"server-tags": [ "all" ]}, 
"service": [ "dhcp4" ]}'  http://127.0.0.1:8000/

curl -X POST -H "Content-Type: application/json" -d '{"command": 
"remote-subnet4-set","arguments":{"subnets": [{"id": 2,"subnet": 
"192.168.0.0/24<http://192.168.0.0/24>","shared-network-name": 
"TestShared","pools": [ { "pool": "192.168.0.50-192.168.0.254" } 
],"rebind-timer":18900,"renew-timer":10800,"valid-lifetime":21600,"option-data":
 [ {"name": "routers","data": 
"192.168.0.12"},{"name":"domain-name-servers","data":"8.8.8.8,8.8.4.4"}]}],"remote":
 {"type": "mysql"},"server-tags": [ "all" ]}, "service": [ "dhcp4" ]}'  
http://127.0.0.1:8000/

I see in logs that client matched to class ALL, unknown, VENDOR...and ClinetsSec
But dns servers in offer are not from client class, they are from pool config



Orange Restricted
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.
-- 
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to