[Kea-users] Vendor Options for Ubiquiti Unifi
brendan kearney
bpk678 at gmail.com
Mon Feb 12 21:58:22 UTC 2024
List members,
i am migrating to Kea from DHCPd, and have some configs for Unifi
gear. as i understand it, these settings make adopting new equipment
easier, so i am trying to translate from old to new.
in my dhcpd.conf i have the following:
# UBNT stuff
option space ubnt;
option ubnt.unifi-address code 1 = ip-address;
class "ubnt" {
match if substring (option vendor-class-identifier, 0, 4) = "ubnt";
option vendor-class-identifier "ubnt";
vendor-option-space ubnt;
}
subnet 192.168.248.0 netmask 255.255.255.0 {
option ubnt.unifi-address 192.168.248.1;
...
}
in kea, i am not sure how to write code this up. my best hacks at
this are not working, and i am hoping someone can help with insight.
what i have is below, but does not work. i think there may be a few
issues, and i have not been able to find good examples to compare
against.
"option-data": [
{ "name": "dhcp4.vendor-encapsulated-options", "code": 43,
"space": "dhcp4", "data": "192.168.248.1" }
],
...
"client-classes": [
{"name": "unifi", "test": "option vendor-class-identifier, 0, 4"},
...
],
...
"subnet4": [
{ "id": 248,
"subnet": "192.168.248.0/24",
"relay": { "ip-addresses": [ "192.168.248.254" ] },
"pools": [
{ "pool": "192.168.248.50 - 192.168.248.74",
"client-class": "primary-proxied" },
{ "pool": "192.168.248.75 - 192.168.248.99",
"client-class": "secondary-proxied" },
{ "pool": "192.168.248.100 - 192.168.248.124",
"client-class": "primary-unproxied" },
{ "pool": "192.168.248.125 - 192.168.248.149",
"client-class": "secondary-unproxied" },
{ "pool": "192.168.248.150 - 192.168.248.174",
"client-class": "primary-unknown" },
{ "pool": "192.168.248.175 - 192.168.248.199",
"client-class": "secondary-unknown" }
],
"option-data": [
{ "name": "routers", "data": "192.168.248.254" },
{ "name": "unifi", "data": "192.168.248.1" }
]
},
...
]
can any insight be provided? i would appreciate any input.
thank you,
brendan kearney
More information about the Kea-users
mailing list