[GH-ISSUE #1016] Dynamic configuration of DNS server addresses #590

Open
opened 2026-03-15 23:20:12 +03:00 by kerem · 2 comments
Owner

Originally created by @chunyingw on GitHub (Feb 4, 2020).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1016

Ben,

Do we have a way to update the DNS server addresses for AsyncResolver at runtime ? Ex. for each query, it could use different DNS servers if no record is found in the cache.

My use case is that the resolver service could learn DNS server address from different sources such as DHCP client, NDP and default ones. So the DNS server addresses are updated dynamically.

I did a code search and did not find an obvious way to do that or I miss something?

Originally created by @chunyingw on GitHub (Feb 4, 2020). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1016 Ben, Do we have a way to update the DNS server addresses for AsyncResolver at runtime ? Ex. for each query, it could use different DNS servers if no record is found in the cache. My use case is that the resolver service could learn DNS server address from different sources such as DHCP client, NDP and default ones. So the DNS server addresses are updated dynamically. I did a code search and did not find an obvious way to do that or I miss something?
Author
Owner

@bluejekyll commented on GitHub (Feb 9, 2020):

No, we currently don't support this. I've wanted to do this, I think it will be needed for things like changing networks etc.

I don't currently have a design for it as I think it's a somewhat complex and possibly OS specific operation. My guess is that we want to have a high-level API that can be called to perform the update, and then each OS can have a wrapper that would update the connections via whatever mechanism it needs to implement...

<!-- gh-comment-id:583895735 --> @bluejekyll commented on GitHub (Feb 9, 2020): No, we currently don't support this. I've wanted to do this, I think it will be needed for things like changing networks etc. I don't currently have a design for it as I think it's a somewhat complex and possibly OS specific operation. My guess is that we want to have a high-level API that can be called to perform the update, and then each OS can have a wrapper that would update the connections via whatever mechanism it needs to implement...
Author
Owner

@chunyingw commented on GitHub (Feb 10, 2020):

Thanks for the response, Ben.

As a temporary workaround for me, whenever the DNS name server address configuration update, a new AsyncResolver instance will be created. Meanwhile I may look into how to make dynamic configuration of DNS name servers work for trust-dns-resolver.

<!-- gh-comment-id:584111926 --> @chunyingw commented on GitHub (Feb 10, 2020): Thanks for the response, Ben. As a temporary workaround for me, whenever the DNS name server address configuration update, a new AsyncResolver instance will be created. Meanwhile I may look into how to make dynamic configuration of DNS name servers work for trust-dns-resolver.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#590
No description provided.