I have not found a way to prioritize A Records in Windows DNS, but setting them as primary and secondary DNS servers in DHCP or in the NIC may work?
can this be done with Windows DNS?
Hi All,
We have DNS round robin set with two different IPs below on windows 2016 DNS servers. Is it possible to set 10.1.1.1
to be used always first?
app1 10.1.1.1
app1 10.2.2.2
Thank you for the help!
3 answers
Sort by: Most helpful
-
-
Gary Reynolds 9,591 Reputation points
2022-04-27T03:02:08.47+00:00 Hi @Matt
You haven't mentioned why the service has two IP address and in what scenario would like the second IP address to be returned. You could look at the DNS Policies which are available in Windows 2016 and later, but this does have limited in capability. Have a look at this page.
The DNS Policies doesn't provide a health check capability to return the other IP address in case the first IP address is not available. You will need to purchase a 3rd party load-balancer to do that, or you could use Azure DNS to do the same for cloud based services.
Gary.
-
Limitless Technology 39,811 Reputation points
2022-04-27T09:00:35.31+00:00 Hello
Thank you for your question and reaching out.
I can understand you wish to set priorities in DNS having same hostname with different ips.
You can try to see if it works in your scenario
- Service (SRV) records provide information on available services for your systems. A SRV record has a unique system for naming.
Priority – This acts the same way as the MX Level / preference in the MX record. The lower the number in the priority field, the more desirable the associated target. 0 is the highest priority (lowest number).
Weight – Allows the zone administrators to distribute load to multiple targets (load balance) - Use DNS Policy : When you have deployed multiple instances of an application, you can use DNS policy to balance the traffic load between the different application instances, thereby dynamically allocating the traffic load for the application.
https://learn.microsoft.com/en-us/windows-server/networking/dns/deploy/app-lb
--------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept as answer--
- Service (SRV) records provide information on available services for your systems. A SRV record has a unique system for naming.