1

I have a corporate network with two sites. Each site has its own domain controller with dns service and both domain controllers are servicing the same company.net domain. We have an mpls network set up between the sites, so it is effectively the same network, but on different ip ranges. One site's ip range is 10.1.1.. the other one is 10.1.6... The domain controllers are talking to each other and there are no sub-domains have been set up, hence both sites are in the company.net domain, no distinguishable difference on the sites' naming apart from the local ip addresses.

I'm experimenting with file servers and replication on this setup and what I'm trying to do is the following: Set up a file server on site 1 under the name fileserv1. Set up another, identical file server on site 2 under the name fileserv2. Replicate all data between the two servers via DFS replication both ways so get an identical dataset on both servers. So far it is done and working.

Now I want to set up a redirection for all users so that under a common server name (e.g. Fileserv) they access the server respective to their site.

E.g. They access the server Fileserv on site 1, then it redirects them to fileserv1. When they access Fileserv on site 2, it redirects them to fileserv2.

The DHCP settings (via a dhcp server) pointing the primary dns server the local one on each site, so the users on all sites will use their local dns server as primary. I could create an A record on each DNS servers specifying the two different servers, but the two dns servers are talking to each other replicating the records.

If I add two Fileserv A records to the dns one for each servers' ip addresses, I believe it will do a round robin redirection which will be independent from the current site.

What are my options here to achieve what I'm trying to do? Messing with the dns configuration? Logon scripts? Anything else? What is the best practice in a scenario described above?

Basically I want each sites to have a local copy of all data on the file servers to reduce access times, but I want the users to be able to access them via a common name letting the network back-end sorting out which server to be used based on the user's current location.

It is a vmware environment, virtual file servers, running Windows Server 2012 R2 Datacenter. The servers are experimental servers at the moment, nothing is live on them.

Daniel
  • 6,780
  • 5
  • 31
  • 60
dscharge
  • 113
  • 3

2 Answers2

3

DNS would be the wrong way to do this. If you have Server 2012 R2 you should be looking at using DFS and namespaces. https://technet.microsoft.com/en-GB/library/dn281957.aspx

This effectively does what you want. You create a namespace and add a file server from each location. Your share location is then namespace, and users will be pointed at their local server.

You will need to have separate AD sites configured in Active directory to get this to work correctly.

Drifter104
  • 3,693
  • 2
  • 22
  • 39
  • Thanks. I remember reading that article you linked in, but if the answer is there I missed it. I will have to read it again. Also I probably will have to look into the AD sites, because I believe they have not been set properly. – dscharge May 29 '15 at 09:09
  • 1
    This might give you a better idea https://mizitechinfo.wordpress.com/2013/08/21/step-by-step-deploy-dfs-in-windows-server-2012-r2/ – Drifter104 May 29 '15 at 09:11
2

The answer to your question is Subnet Priorization.

If the resolver receives multiple A resource records from a DNS server, and some have IP addresses from networks to which the computer is directly connected to, the resolver orders those resource records first. This reduces network traffic across subnets by forcing computers to connect to network resources that are closer to them.

Basically, you just need to add multiple A-records pointing to the same domain name and the server will reorder them in a way that the client will get the ip address to the closest ressource first.

But as Michael Lewis already pointed out, a better approach would be to use DFS to its fullest, since you are already using it.

Replicate all data between the two servers via DFS replication both ways so get an identical dataset on both servers. So far it is done and working.
[…]
Now I want to set up a redirection for all users so that under a common server name (e.g. Fileserv) they access the server respective to their site.

This is exactly what DFS does, and you are already using it. Set up a folder and create two folder targets on the respective sites.

  • Folder "My Share"
    • Target 2: \\fileserv1\myshare
    • Target 2: \\fileserv2\myshare

Done ...

Daniel
  • 6,780
  • 5
  • 31
  • 60
  • Thank you. The Subnet Prioritization was what I was looking for. However, as you and Michael Lewis pointed out, DFS seems to be a better solution so I will read up on it more. – dscharge May 29 '15 at 10:12