Windows – DNS priority for computers/devices in different subnets, Server 2012 r2 domain

active-directorydomain-name-systeminternal-dnswindowswindows-server-2012-r2

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:

Subnet: 255.255.255.0

IP: 192.168.10.1

IP: 192.168.20.1

IP: 192.168.30.1

Devices:

Subnet: 255.255.255.0

IP: 192.168.12.1

IP: 192.168.22.1

IP: 192.168.32.1

DNS A Records:

arecord.domain.local > 192.168.10.1

arecord.domain.local > 192.168.20.1

arecord.domain.local > 192.168.30.1

Thanks

Best Answer

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 (255.255.248.0) e.g. 0x000007FF

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

192.168.8.0 - 192.168.15.255

192.168.16.0 - 192.168.23.0

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:

192.168.24.0 - 192.168.31.255

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 192.168.0.0 - 192.168.63.255.

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.

Related Topic