If the client keeps changing it DUID the Kea server has no way to tell
whether it is the same client that gets back or a different client.
That's why it would offer a different IP address assuming it is a
different client.
Having said that, the DUID is a client unique identifier and SHOULD be
stable as the DHCPv6 spec says:
https://datatracker.ietf.org/doc/html/rfc8415#section-11
"
That is, the DUID used by a
client or server SHOULD NOT change over time if at all possible; for
example, a device's DUID should not change as a result of a change in
the device's network hardware or changes to virtual interfaces (e.g.,
logical PPP (over Ethernet) interfaces that may come and go in
Customer Premises Equipment routers)."
Marcin
On 29.11.2024 10:45, Marek Greško wrote:
Hello,
I found out the problem source. It seems it is not achievable what I am trying
to do. It works for the first time. The kea matches the DUID-LL and creates
lease with full DUID. Then when the DUID changes, when the client tries to get
the ip address, kea finds out the reservation address is already assigned to
different DUID and offers IPv6 address from the pool then. So it seems the
concept of storing reservations into the leases is not very mature. Or am I
missing something? Is there some way to overcome the issue?
Thanks
Marek
Sent with Proton Mail secure email.
On Friday, November 29th, 2024 at 10:04, Marcin Siodelski <mar...@isc.org>
wrote:
Marek,
Have you configured MAC sources correctly? Since you're using MAC
address as host identifier you should also instruct the server where to
get the client's MAC address from. This is achieved by listing MAC
sources as described here:
https://kea.readthedocs.io/en/kea-2.6.1/arm/dhcp6-srv.html#mac-hardware-addresses-in-dhcpv6
Note that one of the sources can be DUID-LL. So you can do this:
"mac-sources": [ "duid" ]
If nothing else you should also just be able to specify DUID-LL directly:
{
"hostname": "host",
"duid": "03:01:01:02:03:04:05:06",
"ip-addresses": [ "fc00::7" ]
}
I am not sure what exactly is changing in this client's DUID, though.
Isn't DUID-LL stable for this client?
Kind Regards,
Marcin Siodelski
ISC
On 29.11.2024 09:10, Marek Greško via Kea-users wrote:
Hello,
I have working kea dhcpv6 setup. I am struggling with one problem. All
my devices get correct IPv6 addresses from reservations by matching
DUID. But one of the devices in the network have changing DUID, only
the DUID-LL part is constant, so I tried to match on DUID-LL. I am
convinced it was working before, but I cannot verify now. Nowadays I
observe the device is getting the IPv6 address from pool. Not from the
reservations.
My config contains:
"host-reservation-identifiers": ["duid", "hw-address"],
and the reservation itself:
{
"hostname": "host",
"hw-address": "01:02:03:04:05:06",
"ip-addresses": [ "fc00::7" ]
}
The addresses are example one, not the real. What could be the
problem? I tried to delete the lease from the leases file and restart
the kea, so it is not the lease before reservation problem, but the
lease was again offered from the pool.
Thanks
Marek
--
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