Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kea DHCP Not honoring the order of the list of DNS ip's that shuld be provided to DHCP Clients #8421

Open
2 tasks done
ArturRuta opened this issue Mar 7, 2025 · 0 comments
Labels
support Community support

Comments

@ArturRuta
Copy link

ArturRuta commented Mar 7, 2025

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

When Kea DHCP is configured to serve a list of DNS IP's (primary & fallback) instead of just a single IP the order in which the ip's are entered is not honored. Instead the IPs are sorted in ascending order.

Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)

To Reproduce

  1. Go To Services --> Kea DHCP --> Kea DHCPv4 --> Select the tab Subnets
  2. Select for configuration any subnet serviced by key (as a sample 192.168.5.0/24)
  3. Verify that the option "Autocollect option data" is unchecked (we are going to explicitely set the desired ip for the DNS's)
  4. In the DNS servers field enter the desired values. As a sample 192.168.5.20 (that vould be a pihole dns) and 192.168.5.1 (that would be the unbound dns in opnsense itself which is used as fallback in case pihole is not available). Note that the values are entered in this order: 192.168.5.20 192.168.5.1 This is done so that pihole should be the primary dns for the clients and unbound the fallback one.
  5. Save and Apply
  6. Error 1: If we open again the configuration of the subnet we can see that the ip's have been reordered and are listed as 192.168.5.1 192.168.5.20
  7. Error 2: If we have a client in the subnet release and renew its configuration we see that it has received 192.168.5.1 as first DNS and 192.168.5.20 as second
    Therefore it becomes impossible to configure dhcp to serve a configuration where a dns in the lan is the main one and have unbound be the backup one.

Expected behavior
The order of the list of ip's to be served as DNS should be honored as entered. They should not be reordered.

Describe alternatives you considered
For the time beign I'm stuck with giving the DHCP clients just one DNS (the pihole) and keeping manual configuration for the ones where I cannot risc lack of service if pihole is inavailable.

Screenshots

I believe it's not necessary with the explanations given, but if you think it can be of use I'll provide them

Relevant log files

Not applicable.

Additional context

The issue can be reproduced at will. It's not transient.
Also, I guess this effect can be due to the GUI collecting the info and reordering it before passing it for saving...but of course it's only a guess, it may as well bee how kea stores or retrieves it.

Environment

OPNsense 25.1.2 (amd64)
Intel® I7-1355U
Network Intel® I226-V

Thank you a lot for helping.

@AdSchellevis AdSchellevis added the support Community support label Mar 7, 2025
@AdSchellevis AdSchellevis transferred this issue from opnsense/src Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Community support
Development

No branches or pull requests

2 participants