Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're using a Windows DNS/AD Environment on 2008 R2, I've been searching and would like to know if there's a way to implicitly have DNS serve an IP for a host based on its AD Site?

Subnet Prioritization/Anycast would help, but we have some IP ranges that would not automatically choose the correct host.

Any suggestions?

share|improve this question
Can you describe what services this is for or what the actual problem that you're trying to solve is? DNS might not be the best way to solve whatever problem it is that you're trying to solve. Do you actually plan on having multiple hosts with the same name? – MDMarra Feb 17 '13 at 22:39
We're using it for a few different services but in this case its primarily to do with SharePoint. We have a mobile system with a static IP range that serves the SharePoint site when active but isn't used by the wider group. We have one DNS name for three separate SharePoint sites which should be displayed to different groups based on location. In addition with that mobile lab it runs one of those sites as a replica with async repping depending on requirements. That probably adds more questions than answers but kind of explains what were doing. – Ben Bowman Feb 17 '13 at 23:21
Why would you ever do this though? Of you need separate sites you should use separate names. – MDMarra Feb 18 '13 at 0:05
From a technical standpoint I would prefer not to do it. It's a requirement which has been placed on the project. – Ben Bowman Feb 18 '13 at 0:13

The Microsoft DNS server doesn't have this capability. I'd echo what @MDMarra says in his comment-- tell us what you're really trying to do.

You could use BIND's "views" functionality to do this, but that would be a bit of a hack (to me).

Windows clients contain code to determine their site and locate domain controllers based on their site. In particular, Group Policy processing is "site aware" and group policy objects can be linked to sites. Anticipating your needs a bit, perhaps, you could use a GPO linked to a site to set environment variables on clients, allowing programs running on the client to become "site aware" without having to re-implement the algorithm Windows to determine the client's site.

share|improve this answer
I was thinking it might be for file services, in which case DFS referrals would be super easy as well – MDMarra Feb 17 '13 at 23:11
DFS we've got down pat, that's working flawlessly. I had a feeling that DNS wasn't able to but I was hoping that Forward Lookup Zone > > _Sites > Location_A would have some kind of functionality where an entry in there was specific for that location. The best definition of what were doing that I can think of is simulation of one system with another that is different but doesn't appear to be that way to the end users. It's a fairly unusual request and has kept me busy for a while – Ben Bowman Feb 17 '13 at 23:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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