• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

KEA. Same IP, multiple reservations for IPv6

Scheduled Pinned Locked Moved CE 2.8.0 Development Snapshots
5 Posts 2 Posters 182 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    Taurus42
    last edited by Apr 8, 2025, 1:21 PM

    Hi,

    Just installed 2.8 beta and tried switching to Kea DHCP as I see some long awaited functionality in this release. Mainly the registration of lease names in DHCP for both IPv4 and IPv6.

    In my current setup I use ISC DHCP and create reservations and assign the host name. On some servers I need an alias and as I haven't found a way to solve that in Unbound I instead create a separate reservation for the same IP but with a dummy MAC / DUID.

    When switching to KEA I got an error in the DHCP6 part saying that there are multiple reservations for the same IP.
    This shows up the system log:

    1	/services_dhcpv6.php: The command '/usr/local/sbin/kea-dhcp6 -t /usr/local/etc/kea/kea-dhcp6.conf' returned exit code '1', the output was '2025-04-08 13:58:25.101 INFO [kea-dhcp6.hosts/91765.0x18cbdf012000] HOSTS_BACKENDS_REGISTERED the following host backend types are available: 2025-04-08 13:58:25.102 WARN [kea-dhcp6.dhcpsrv/91765.0x18cbdf012000] DHCPSRV_MT_DISABLED_QUEUE_CONTROL disabling dhcp queue control when multi-threading is enabled. 2025-04-08 13:58:25.103 WARN [kea-dhcp6.dhcp6/91765.0x18cbdf012000] DHCP6_RESERVATIONS_LOOKUP_FIRST_ENABLED Multi-threading is enabled and host reservations lookup is always performed first. 2025-04-08 13:58:25.107 INFO [kea-dhcp6.hooks/91765.0x18cbdf012000] HOOKS_LIBRARY_CLOSED hooks library /usr/local/lib/kea/hooks/libdhcp_lease_cmds.so successfully closed 2025-04-08 13:58:25.110 INFO [kea-dhcp6.hooks/91765.0x18cbdf012000] HOOKS_LIBRARY_CLOSED hooks library /usr/local/lib/kea/hooks/libdhcp_lease_options.so successfully closed 2025-04-08 13:58:25.112 INFO [kea-dhcp6.hooks/91765.0x18cbdf012000] HOOKS_LIBRARY_CLOSED hooks library /usr/local/lib/kea/hooks/libdhcp_run_script.so successfully closed 2025-04-08 13:58:25.114 INFO [kea-dhcp6.dhcpsrv/91765.0x18cbdf012000] DHCPSRV_CFGMGR_NEW_SUBNET6 a new subnet has been added to configuration: 2001:xyz:xyz:a300::/64 with params: valid-lifetime=7200, rapid-commit is false 2025-04-08 13:58:25.119 ERROR [kea-dhcp6.dhcp6/91765.0x18cbdf012000] DHCP6_PARSER_FAIL failed to create or run parser for configuration element subnet6: failed to add address reservation for host using the HW address '(null) and DUID '01:01:01:01:01:01:01:01:01:01:01:01:01:02' to the IPv6 subnet id '1' for address/prefix 2001:xyz:xyz:a300::45: There's already reservation for this address/prefix Error encountered: failed to add address reservation for host using the HW address '(null) and DUID '01:01:01:01:01:01:01:01:01:01:01:01:01:02' to the IPv6 subnet id '1' for address/prefix 2001:xyz:xyz:a300::45: There's already reservation for this address/prefix'
    

    The IPv4 portion seems to work fine though.

    Regards

    1 Reply Last reply Reply Quote 0
    • M
      marcosm Netgate
      last edited by marcosm Apr 8, 2025, 1:36 PM Apr 8, 2025, 1:36 PM

      Doing that isn't good practice and likely will not be supported. Use host overrides in DNS Resolver to assign multiple hostnames to the same address.

      T 1 Reply Last reply Apr 8, 2025, 2:01 PM Reply Quote 0
      • T
        Taurus42 @marcosm
        last edited by Apr 8, 2025, 2:01 PM

        @marcosm The same issue has already been solved for IPv4: https://redmine.pfsense.org/issues/13256

        I would like to use host overrides but the downside is that I would need to hardcode the IP for the server and then add my aliases. In DHCP I can just assign the host-part of the IP and it will automatically be updated if my ISP decides to assign me a new IPv6 prefix.

        Or better would be to be able to create a host override as an alias that points to a host coming from DHCP.

        1 Reply Last reply Reply Quote 0
        • M
          marcosm Netgate
          last edited by Apr 8, 2025, 10:12 PM

          I don't think it's possible with Kea, at least I'm not seeing a way to do it in the docs. A host override alias would essentially be a CNAME but Unbound won't resolve it for local-data (which is what host overrides use). Perhaps kea2unbound could allow for registering multiple hostnames to a client - @cmcdonald would know better. Sounds like a feature request though - you can open one on redmine, see: https://redmine.pfsense.org/issues/15650

          T 1 Reply Last reply Apr 9, 2025, 6:25 AM Reply Quote 1
          • T
            Taurus42 @marcosm
            last edited by Apr 9, 2025, 6:25 AM

            @marcosm Thanks.
            Yes, I have tried doing an override in the custom config of unbound but the result is as you say. Did a DNS Lookup from the GUI and it showed only a CNAME. From a client the query failed.

            I will look into making a request.

            1 Reply Last reply Reply Quote 0
            4 out of 5
            • First post
              4/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received