[Kea-users] assigning pools based on DHCPv4 relay id
Lexi Winter
lexi at le-fay.org
Tue Sep 1 12:46:16 UTC 2026
hello,
i'm using Kea to serve a single IPv4 network, which we'll call
192.0.2.64/26. this network is presented as a single /26 to clients,
but it's routed internally, which means clients on a specific switch
need to be allocated IP addresses from a pool containing the addresses
routed to that switch. the switches use a standard DHCP relay to
forward requests to Kea.
in diagram form:
[Kea] ------- [wireless controller]
/ \ 192.0.2.88/29,
/ \ 192.0.2.96/27
/ \
/ \
[switch 1] [switch 2]
192.0.2.66/32, 192.0.2.68/32,
192.0.2.70/32 192.0.2.80/32
so for example, if Kea receives a request from the wireless DHCP relay,
it needs to allocate an address from either the /29 or /27 network
routed to the wireless controller. in some cases, like the other two
switches, the addresses are not contiguous and might be represented as
a set of /32 prefixes.
i tried to do this with a client class, like this:
"client-classes": [
{
"name": "wireless",
"test": "relay4[2].hex == 'wireless'"
}
],
// ...
"subnet4": [
{
"id": 1,
"subnet": "192.0.2.64/26",
"pools": [
{
"pool": "192.0.2.88 - 192.0.2.126",
"client-classes": [ "wireless" ]
}
],
}
],
however this doesn't seem to work; Windows in particular is very unhappy
with this configuration and never acquires its initial lease.
i think what happens is the initial address allocation via the relay
works fine, but when the client sends a unicast request directly to Kea,
it's no longer a member of the "wireless" class and Kea has no pool for
it to use.
is there another way to do this? i'm considering using a separate
subnet for each pool and overriding the netmask in the response, but
having a separate subnet for every /32 prefix doesn't seem like a
very clean way to do this.
thanks in advance for any advice.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 265 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20260901/f624ffdb/attachment.sig>
More information about the Kea-users
mailing list