Re: [Kea-users] Kea-DHCPv6: No static reservations available

2025-12-03 Thread Darren Ankney
Hi Christoph,

On Tue, Dec 2, 2025 at 9:07 PM Christoph Markert  wrote:
>
> Hi Darren,
>
> please find the log attached. You can see that after around 6min KEA uses the 
> defined hostname.
> Could you please elaborate a bit more on the prefix delegation part. Why 
> would I need it?

You probably don't need it unless this is some kind of router with a
network behind it that needs subnet assignment.  Prefix delegation
(IA_PD) is meant to distribute one or more subnets for use as an
"inside" network since NAT, generally speaking, is not used in IPv6
(at least not in the same way it was in IPv4).  You can read all of
the details about it here:
https://datatracker.ietf.org/doc/html/rfc8415#section-6.3  It is safe
to not configure a prefix delegation subnet.  You would know if you
needed to.

I see what happened here though I don't know why.  Initially when your
client obtained the ip address (IA_NA) via a full SARR
(solicit->advertise->request->reply).  It did ask for an IA_PD during
this time as well.  During the advertise, Kea sent back a blank FQDN.
During the Reply, Kea generated a dynamic hostname and returned this
in option 39 after first logging about a partial FQDN in incoming
option 39.

Sometime later, the client asks for only an IA_PD and does not include
option 39 (FQDN).  Therefore, Kea does not complain about the FQDN
being partial.  Kea sends back the correct hostname as created with
the reservation + the qualifying suffix.  A subsequent full SARR
sometime later results in Kea again sending the correct FQDN again.

I do not know the reason for this behavior; why it failed on the
initial SARR.  I had a look at
https://www.rfc-editor.org/rfc/rfc4704.html which describes option 39,
and expected server and client behavior but nothing jumped out at me.
It may be correct behavior based on a subtle reading of the RFC, or it
may be a bug.

In any case, I guess it works after a short time...  If you think it
is a bug perhaps you could open an issue in Gitlab:
https://gitlab.isc.org/isc-projects/kea/-/issues

Thank you,
Darren Ankney
-- 
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.
[email protected]


Re: [Kea-users] Kea-DHCPv6: No static reservations available

2025-12-02 Thread Christoph Markert
Hi Darren,

please find the log attached. You can see that after around 6min KEA uses
the defined hostname.
Could you please elaborate a bit more on the prefix delegation part. Why
would I need it?

Thank you.
Best,
C.


Am Mi., 3. Dez. 2025 um 08:20 Uhr schrieb :

> Send Kea-users mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.isc.org/mailman/listinfo/kea-users
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Kea-users digest..."
>
>
> Today's Topics:
>
>1. Re: Kea-DHCPv6: No static reservations available (Darren Ankney)
>2. KEA HA failover - dhcpv6 particularly (Aaron Gould)
>3. Re: KEA HA failover - dhcpv6 particularly (Darren Ankney)
>
>
> --
>
> Message: 1
> Date: Tue, 2 Dec 2025 15:23:45 -0500
> From: Darren Ankney 
> To: "Kea user's list" 
> Subject: Re: [Kea-users] Kea-DHCPv6: No static reservations available
> Message-ID:
>  [email protected]>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi Christoph,
>
> Looking at your configuration, I note that there are no dynamic pools.
> I notice your client is reserved address fd00:192:168:3::3 I further
> notice that there is no prefix delegation configured and none reserved
> for the client.  The log messages of
> ALLOC_ENGINE_V6_ALLOC_NO_LEASES_HR correspond to the client asking for
> a prefix delegation (IA_PD) but not receiving one as noted in the logs
> here:
>
> msg_type=SOLICIT (1), trans_id=0xaeccc3,
> options:
> [...]
> type=00025(IA_PD), len=00012: iaid=1448103320, t1=0, t2=0
>
> and in the response:
>
> msg_type=ADVERTISE (2), trans_id=0xaeccc3,
> [...]
> type=00025(IA_PD), len=00056: iaid=1448103320, t1=0, t2=0,
> options:
> type=00013, len=00040: NoPrefixAvail(6) "Sorry, no prefixes could
> be allocated."
>
> The reservation is clearly used for the IA_NA (fd00:192:168:3::3) or
> the client would not receive an IP address at all.
>
> As far as the failure of hostname, that is a separate issue.
> According to your ddns settings, you should be replacing the hostname
> supplied by the client and it should use the one found in your
> reservation. You said it eventually obtains the correct hostname.  Can
> you send the logs showing this?
>
> Thank you,
> Darren Ankney
>
> On Mon, Dec 1, 2025 at 5:27?PM Christoph Markert 
> wrote:
> >
> > Hi Darren,
> >
> > please find my configuration below:
> > {
> >
> > "Dhcp6":
> > {
> > "dhcp-ddns": {
> > "enable-updates": true
> > },
> > "ddns-replace-client-name": "always",
> > "ddns-generated-prefix": "v6",
> > "ddns-qualifying-suffix": "local.markert.live",
> > "ddns-override-client-update": true,
> > "ddns-override-no-update": true,
> >
> > "hostname-char-set": "[^A-Za-z0-9.-]",
> > "hostname-char-replacement": "x",
> > "client-classes": [
> > {
> > "name": "Default",
> > "test": "not (option[1].hex == '0x0002AB11D087EFD048F95BBD')",
> > "option-data":
> > [
> > {
> > "name": "dns-servers",
> > "data": "fd00:192:168:3::1"
> > },
> > {
> > "name": "domain-search",
> > "data": "local.markert.live"
> > }
> > ]
> > }
> > ],
> > "loggers": [
> > {
> > "name": "kea-dhcp6",
> > "severity": "DEBUG",
> > "debuglevel": 99,
> > "output_options": [
> > {
> > "output": "kea-dhcp6.log",
> > "maxver": 10
> > }
> > ]
> > },
> > {
> > "name": "kea-dhcp6.dhcpsrv",
> > "severity": "DEBUG",
> > "debuglevel": 99,
> > "output_options": [
> > {
> > "output": "dhcp6-dhcpsrv.log",
> > "maxver": 10
> > }
> > ]
> > },
> >
> > {
> > "n

Re: [Kea-users] Kea-DHCPv6: No static reservations available

2025-12-02 Thread Darren Ankney
Hi Christoph,

Looking at your configuration, I note that there are no dynamic pools.
I notice your client is reserved address fd00:192:168:3::3 I further
notice that there is no prefix delegation configured and none reserved
for the client.  The log messages of
ALLOC_ENGINE_V6_ALLOC_NO_LEASES_HR correspond to the client asking for
a prefix delegation (IA_PD) but not receiving one as noted in the logs
here:

msg_type=SOLICIT (1), trans_id=0xaeccc3,
options:
[...]
type=00025(IA_PD), len=00012: iaid=1448103320, t1=0, t2=0

and in the response:

msg_type=ADVERTISE (2), trans_id=0xaeccc3,
[...]
type=00025(IA_PD), len=00056: iaid=1448103320, t1=0, t2=0,
options:
type=00013, len=00040: NoPrefixAvail(6) "Sorry, no prefixes could
be allocated."

The reservation is clearly used for the IA_NA (fd00:192:168:3::3) or
the client would not receive an IP address at all.

As far as the failure of hostname, that is a separate issue.
According to your ddns settings, you should be replacing the hostname
supplied by the client and it should use the one found in your
reservation. You said it eventually obtains the correct hostname.  Can
you send the logs showing this?

Thank you,
Darren Ankney

On Mon, Dec 1, 2025 at 5:27 PM Christoph Markert  wrote:
>
> Hi Darren,
>
> please find my configuration below:
> {
>
> "Dhcp6":
> {
> "dhcp-ddns": {
> "enable-updates": true
> },
> "ddns-replace-client-name": "always",
> "ddns-generated-prefix": "v6",
> "ddns-qualifying-suffix": "local.markert.live",
> "ddns-override-client-update": true,
> "ddns-override-no-update": true,
>
> "hostname-char-set": "[^A-Za-z0-9.-]",
> "hostname-char-replacement": "x",
> "client-classes": [
> {
> "name": "Default",
> "test": "not (option[1].hex == '0x0002AB11D087EFD048F95BBD')",
> "option-data":
> [
> {
> "name": "dns-servers",
> "data": "fd00:192:168:3::1"
> },
> {
> "name": "domain-search",
> "data": "local.markert.live"
> }
> ]
> }
> ],
> "loggers": [
> {
> "name": "kea-dhcp6",
> "severity": "DEBUG",
> "debuglevel": 99,
> "output_options": [
> {
> "output": "kea-dhcp6.log",
> "maxver": 10
> }
> ]
> },
> {
> "name": "kea-dhcp6.dhcpsrv",
> "severity": "DEBUG",
> "debuglevel": 99,
> "output_options": [
> {
> "output": "dhcp6-dhcpsrv.log",
> "maxver": 10
> }
> ]
> },
>
> {
> "name": "kea-dhcp6.leases",
> "severity": "DEBUG",
> "debuglevel": 99,
> "output_options": [
> {
> "output": "dhcp6-leases.log",
> "maxver": 10
> }
> ]
> }
> ],
> "interfaces-config":
> {
> "interfaces": ["enp2s0"], // This is the internal interface
> "service-sockets-max-retries": 10,
> "service-sockets-retry-wait-time": 3000
> },
> "lease-database":
> {
> "type": "memfile",
> "persist": true,
> "name": "kea-leases6.csv",
> "lfc-interval": 3600
> },
>
> "renew-timer": 15840,
> "rebind-timer": 27720,
> "valid-lifetime": 31680,
> "shared-networks":
> [
> {
> # Name of the shared network. It may be an arbitrary string
> # and it must be unique among all shared networks.
> "name": "markert-live-local",
>
> # The subnet selector can be specified at the shared-network level.
> # Subnets from this shared network will be selected for directly
> # connected clients sending requests to the server's "enp2s0" interface.
> "interface": "enp2s0",
>
> # This starts a list of subnets in this shared network.
> # There are two subnets in this example.
> "subnet6":
> [
>
> {
> // Internal ID to identify subnet internally
> "id": 19216810,
> // Subnet for fd00:192:168:0::/48 - static IPs (usable host IP range: 
> fd00:192:168:0::1 - fd00:192:168:0::)
> "subnet": "fd00:192:168:0::/48",
> // Add DHCP IPv6 Pool
> "pools":
> [ ],
> // Add reservations here for subnet
> "reservations":
> [
> {
> "duid": "00:02:00:00:ab:11:d0:87:ef:d0:48:f9:5b:bd",
> "ip-addresses": [ "fd00:192:168:0::1" ],
> "hostname": "v6-vmhomeserver"
> }
> ],
> // Additional information for subnet
> "option-data":
> [
> {
> "name": "dns-servers",
> "data": "fd00:192:168:3::1"
> },
> {
> "name": "domain-search",
> "data": "local.markert.live"
> }
> ]
> },
> {
> "id": 1921681,
> // Subnet for fd00:192:168:1::/48 - static IPs (usable host IP range: 
> fd00:192:168:1::1 - fd00:192:168:1::)
> "subnet": "fd00:192:168:1::/48",
> "client-class": "Default",
> // Add DHCP IPv6 Pool
> "pools":
> [ ],
> // Add reservations here for subnet
> "reservations":
> [
> {
> "hw-address": "52:54:00:74:f6:13",
> "ip-addresses": [ "fd00:192:168:1::1" ],
> "hostname": "v6-vmhomeserver"
> }
> ]
> },
> {
> "id": 1921682,
> // Subnet for fd00:192:168:2::/48 - static IPs (usable host IP range: 
> fd00:192:168:2::1 - fd00:192:168:2::)
> "subnet": "fd00:192:168:2::/48",
> "client-class": "Default",
> // Add DHCP IPv6 Pool
> "pools":
> [ ],
> // Add reservations here for subnet
> "reservations":
> [
> {
> "hw-address": "52:54:00:74:f6:13",
> "ip-addresses": [ "fd00:192:168:2::1" ],
> "hostname": "v6-vmhomeserver"
> }
> ]
> // Additional information for subnet
> //"option-data":
> },
> {
> "id": 1921683,
> // Subnet for fd00:192:168:3::/48 - static 

Re: [Kea-users] Kea-DHCPv6: No static reservations available

2025-12-01 Thread Christoph Markert
; tsig2-key
> >> zone iot.example.com
> >>
> >> view 3
> >> tsig3-key
> >> zone iot.example.com
> >>
> >> #kea ddns
> >> "ddns-domains": [
> >> {
> >> "name": "iot.example.com.",
> >> "key-names": [
> >> "tsig1-key",
> >> "tsig2-key",
> >> "tsig3-key"
> >> ],
> >> "dns-servers": [
> >> { "ip-address": "10.1.1.1" }
> >> ]
> >> }
> >> ]
> >>
> >> "ddns-domains": [
> >> {
> >> "name": "1.2.10.in-addr.arpa.",
> >> "key-names": [
> >> "tsig1-key",
> >> "tsig2-key",
> >> "tsig3-key"
> >> ],
> >> "dns-servers": [
> >> { "ip-address": "10.1.1.1" }
> >> ]
> >> } ]
> >>
> >> Thank you,
> >>
> >> Ben
> >
> > --
> > Peter Davies
> > Support Engineer
> > Internet Systems Corporation
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> https://lists.isc.org/pipermail/kea-users/attachments/20251125/83101705/attachment-0001.htm
> >
>
> --
>
> Message: 2
> Date: Tue, 25 Nov 2025 10:36:26 -0500
> From: Darren Ankney 
> To: "Kea user's list" 
> Subject: Re: [Kea-users] The client class design in newer kea versions
> - 3.0.0
> Message-ID:
> <
> cakabwhjufhdm5e5bxo7dzrj_eev_axebgmlsqp1ve0qvvks...@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> Kea will evaluate all classes.  It won't stop when a match is
> encountered.  Clients can be members of multiple classes.  It will be
> difficult to help without seeing your configuration, logs and a packet
> capture of the client that is not matching the class.
>
> Thank you,
> Darren Ankney
>
> On Fri, Nov 21, 2025 at 3:50?PM [email protected]
>  wrote:
> >
> > Hello everyone,
> >
> > Last year, I tested on kea 2.6.2 with two different client classes
> Client_class1 and Client_class2 with similar configurations but slightly
> different, then I found my devices couldn?t match the Client_class2 even it
> should match all the criteria. Some other kea users told me that it was
> because I defined the Client_class1 configuration first then the
> Client_class2 configuration. So when the device came online, kea detects it
> match the criteria of Client_class1 first, so it won?t check the rest of
> similar client classes.
> >
> > I am wondering if you have made some improvement on this and allow kea
> to match the most satisfying client class instead of the 1st defined one?
> Thank you.
> >
> >
> >
> >
> >
> >
> >
> > Best Regards,
> >
> >
> >
> > --
> > 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.
> > [email protected]
>
>
> --
>
> Message: 3
> Date: Tue, 25 Nov 2025 10:57:37 -0500
> From: Darren Ankney 
> To: "Kea user's list" 
> Subject: Re: [Kea-users] Kea-DHCPv6: No static reservations available
> Message-ID:
>  [email protected]>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi Christoph,
>
> Please can you share your configuration?  Whether Kea replaces
> hostnames, generates dynamic hostnames and / or honors the clients
> wishes from the flags in option 39 (all described here:
> https://kea.readthedocs.io/en/stable/arm/dhcp6-srv.html#ddns-for-dhcpv6)
> depend on several settings in the configuration.  Option 39 flags and
> their meanings are described in the ARM
> (
> https://kea.readthedocs.io/en/stable/arm/dhcp6-srv.html#when-does-the-kea-dhcp6-server-generate-a-ddns-request
> )
> and in RFC4704 (https://datatracker.ietf.org/doc/html/rfc4704).  There
> does seem to be some strange behavior here, but without additional
> information it is impossible to say what is happening and whether is
> *should* be.
>
> As for the log messages, this one "no static reservations available"
> is "ALLOC_ENGINE_V6_ALLOC_UNRESERVED" which is described here:
>
> https://kea.readthedocs.io/en/stable/kea-messages.html#alloc-engine-v6-alloc-unreserved
> and this one &q

Re: [Kea-users] Kea-DHCPv6: No static reservations available

2025-11-25 Thread Darren Ankney
Hi Christoph,

Please can you share your configuration?  Whether Kea replaces
hostnames, generates dynamic hostnames and / or honors the clients
wishes from the flags in option 39 (all described here:
https://kea.readthedocs.io/en/stable/arm/dhcp6-srv.html#ddns-for-dhcpv6)
depend on several settings in the configuration.  Option 39 flags and
their meanings are described in the ARM
(https://kea.readthedocs.io/en/stable/arm/dhcp6-srv.html#when-does-the-kea-dhcp6-server-generate-a-ddns-request)
and in RFC4704 (https://datatracker.ietf.org/doc/html/rfc4704).  There
does seem to be some strange behavior here, but without additional
information it is impossible to say what is happening and whether is
*should* be.

As for the log messages, this one "no static reservations available"
is "ALLOC_ENGINE_V6_ALLOC_UNRESERVED" which is described here:
https://kea.readthedocs.io/en/stable/kea-messages.html#alloc-engine-v6-alloc-unreserved
and this one "no leases found but reservations" is
"ALLOC_ENGINE_V6_ALLOC_NO_LEASES_HR" and is described here:
https://kea.readthedocs.io/en/stable/kea-messages.html#alloc-engine-v6-alloc-no-leases-hr

As for the reason for these messages, I could only guess without
seeing the full configuration.

Thank you,
Darren Ankney

On Sun, Nov 23, 2025 at 11:43 PM Christoph Markert  wrote:
>
> Hi there,
>
> I do observe a strange behaviour since a while now on KEA DHCPv6 (dual stack 
> with KEA DHCP v4 as well, but the problem does not occur on v4!). Kea version 
> is 2.6.3
> Within my v6 configuration file, I do have the following entry:
> 
> // VMDatabaseServer
> {
> //"hw-address": "52:54:00:ef:57:d9",
> "duid": "00:03:00:01:52:54:00:ef:57:d9",
> "ip-addresses": [ "fd00:192:168:3::3" ],
> "hostname": "v6-vmdatabaseserver"
> //"option-data":
>
> },
>
> 
>
> When restarting VMDatabaseServer, it doesn't get the hostname 
> 'v6-vmdatabaseserver' assigned, but 
> 'v6-fd00-192-168-3--3.local.markert.live.' Kea assigns the correct IPv6 
> address ,but it doesn't recognize the hostname. I don't understand why Kea 
> states the following messages in the log: 'no leases found but reservations' 
> / 'no static reservations available'.
>
> Here is the kea-dhcp6.log file excerpt:
> 2025-11-24 03:53:47.522 DEBUG [kea-dhcp6.packets/2314.140128965162944] 
> DHCP6_BUFFER_RECEIVED received buffer from fe80::5054:ff:feef:57d9:546 to 
> ff02::1:2:0 over interface enp2s0
> 2025-11-24 03:53:47.523 DEBUG [kea-dhcp6.options/2314.140128923162304] 
> DHCP6_BUFFER_UNPACK parsing buffer received from fe80::5054:ff:feef:57d9 to 
> ff02::1:2 over interface enp2s0
> 2025-11-24 03:53:47.523 INFO  [kea-dhcp6.dhcp6/2314.140128923162304] 
> DHCP6_QUERY_LABEL received query: duid=[00:03:00:01:52:54:00:ef:57:d9], [no 
> hwaddr info], tid=0xa4e486
> 2025-11-24 03:53:47.524 DEBUG [kea-dhcp6.eval/2314.140128923162304] 
> EVAL_DEBUG_OPTION duid=[00:03:00:01:52:54:00:ef:57:d9], [no hwaddr info], 
> tid=0xa4e486: Pushing option 1 with value 0x00030001525400EF57D9
> 2025-11-24 03:53:47.524 DEBUG [kea-dhcp6.eval/2314.140128923162304] 
> EVAL_DEBUG_STRING duid=[00:03:00:01:52:54:00:ef:57:d9], [no hwaddr info], 
> tid=0xa4e486: Pushing text string '0x0002AB11D087EFD048F95BBD'
> 2025-11-24 03:53:47.524 DEBUG [kea-dhcp6.eval/2314.140128923162304] 
> EVAL_DEBUG_EQUAL duid=[00:03:00:01:52:54:00:ef:57:d9], [no hwaddr info], 
> tid=0xa4e486: Popping 
> 0x307830303032303030304142313144303837454644303438463935424244 and 
> 0x00030001525400EF57D9 pushing result 'false'
> 2025-11-24 03:53:47.524 DEBUG [kea-dhcp6.eval/2314.140128923162304] 
> EVAL_DEBUG_NOT duid=[00:03:00:01:52:54:00:ef:57:d9], [no hwaddr info], 
> tid=0xa4e486: Popping 'false' pushing 'true'
> 2025-11-24 03:53:47.525 INFO  [kea-dhcp6.packets/2314.140128923162304] 
> DHCP6_PACKET_RECEIVED duid=[00:03:00:01:52:54:00:ef:57:d9], [no hwaddr info], 
> tid=0xa4e486: RELEASE (type 8) received from fe80::5054:ff:feef:57d9 to 
> ff02::1:2 on interface enp2s0
> 2025-11-24 03:53:47.525 DEBUG [kea-dhcp6.packets/2314.140128923162304] 
> DHCP6_QUERY_DATA duid=[00:03:00:01:52:54:00:ef:57:d9], [no hwaddr info], 
> tid=0xa4e486, packet details: local_address=[ff02::1:2]:0, 
> remote_address=[fe80::5054:ff:feef:57d9]:546,
> msg_type=RELEASE (8), trans_id=0xa4e486,
> options:
>   type=1, len=00010: 00:03:00:01:52:54:00:ef:57:d9
>   type=2, len=00014: 00:01:00:01:2f:25:a8:ed:52:54:00:16:67:1d
>   type=3(IA_NA), len=00040: iaid=1448103320, t1=0, t2=0,
> options:
> type=5(IAADDR), len=00024: address=fd00:192:168:3::3, 
> preferred-lft=0, valid-lft=0
>   type=8, len=2: 27332 (uint16)
> No relays traversed.
>
> 2025-11-24 03:53:47.526 DEBUG [kea-dhcp6.packets/2314.140128923162304] 
> DHCP6_SUBNET_SELECTED duid=[00:03:00:01:52:54:00:ef:57:d9], [no hwaddr info], 
> tid=0xa4e486: the subnet with ID 1921681 was selected for client assignments
> 2025-11-24 03:53:47.526 DEBUG [kea-dhcp6.packets/2314.140128923162304] 
> DHCP6_SUBNET_DATA duid=[00:03: