I have several sites with several subnets. Each site has a Domain Controller running DNS. I want to have the client computers/devices query for arecord.domain.local from the local DNS server for that site.

The DNS Servers records are replicated to all sites. Each site has the same records.

The devices are on different subnets and only have access to the local site DC. Right now, I have Round Robin and Netmask Ordering enabled. However, because the devices are on a different subnet to the DC, it does not appear to work for those devices.

I would like the A Record for the local site returned when a device at the local site queries arecord.domain.local

Are there any thoughts on how this can be done with Windows Server 2012 r2?

Domain Controllers:


DNS A Records:
arecord.domain.local >
arecord.domain.local >
arecord.domain.local >


  • The devices at each local site would usually have the IP address of the local DNS server handed out via DHCP or set statically. So, why doesn't this work? – Appleoddity Sep 20 '17 at 4:17
  • Not sure why it is not working then. You are correct and each device does have the DNS server address of the local server. I am going to make sure there are no other DNS servers set for those devices. – Ross Sep 21 '17 at 3:42
  • There is an A Record for each of the servers in DNS: arecord.domain.local > arecord.domain.local > arecord.domain.local > – Ross Sep 21 '17 at 3:50
  • 1
    Just to better understand your question. Are all the DNS servers replicated with the same records? Is your problem that you want the A record for the local site returned when a computer at the localsite queries for arecord.domain.local? Your question doesn't really say that. You only suggest you want the computers at each site to use the local DNS server for that site. – Appleoddity Sep 21 '17 at 4:09
  • @Appleoddity, yes. I will edit the question to reflect that detail. – Ross Sep 21 '17 at 22:01

This is done by modifying the LocalNetPriorityNetMask settings. It tells your DNS server which networks are local to itself. Unfortunately, it is "Subnet Mask" based, and you aren't using logical subnet boundaries with your .10, .20, .30 convention. So, it's not a perfect solution, but you might be able to make it work depending on the true network addresses you are using.

First of all, here is information on using LocalNetPriority and LocalNetPriorityNetmask. It can be partially configured via the DNS management console, command line and/or with group policy by adding/modifying the registry keys here: HKLM\SYSTEM\CurrentControlSet\Services\DNS\Parameters\LocalNetPriority HKLM\SYSTEM\CurrentControlSet\Services\DNS\Parameters\LocalNetPriorityNetMask

Configuring Subnet Prioritization

Description of the Netmask Ordering principal

The LocalNetPriorityNetmask is more akin to a Cisco Wildcard mask. i.e. It is inverted. So, in your case an example would be to change LocalNetPriorityNetMask to use a subnet mask of /21 ( e.g. 0x000007FF

This would place systems in the following IP ranges on the "same" local network as far as DNS is concerned: - -

This covers two of your examples. But the 3rd one we fall apart. If we continue with this netmask across all our DNS servers then we get the following IP range: -

This doesn't cover both IP addresses you provided at the .30 location. Unfortunately, you would have to increase the size of your LocalNetPriorityNetMask to /18 to cover the .30 and .32 IP addresses and this unfortunately would include the entire range -

So, you can see this breaks down because your IP addressing scheme does not follow logical subnet boundaries. You'll have to see what you can do to make this work. But, the above information is how it is done.

  • I figured as much, that is why LocalNetPriority did not work. I will try as you suggested with LocalNetPriorityNetMask and a larger subnet mask to increase the range. I am going to change the IP addressing to 10.x.x.x to give me some more wiggle room. I will update when I get this going. – Ross Sep 23 '17 at 21:48
  • I have changed my IP Addressing to 10.31.x.x. I set the LocalNetPriorityNetMask to but I may be misunderstanding the use of this. Dnscmd /Config /LocalNetPriorityNetMask 0x0000ffff. This stopped LocalNetPriority from working on any subnets and round robin is working. – Ross Sep 25 '17 at 3:18
  • If you have a DNS server with multiple A records for the same host for instance (host A; host A; host A and you have LocalNetPriorityNetMask configured to 0x0000ffff. Then any computer with the IP address in the range 10.31.x.x that queries that DNS server will receive a round-robin response of ONLY the 2 IP addresses: and will never be returned because the computer making the query does not reside within that network. – Appleoddity Sep 25 '17 at 3:21
  • I am beginning to suspect a multi-homed DNS server may be the solution. I will need to see if there is any other solution. – Ross Sep 25 '17 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.