DFS | Site Links, Server Target Prioritization & Reference Info

DFS Setup and Configuration Notes

I like DFS, the main issue I found is setting it up, tailoring it to your needs, debugging and configuring which can be a bit troublesome. I’ve spent a while trying to implement and tweak it for a large scale network (17 x Sites using DFS-N & DFS-R) I’ve list a number of articles/URLs which have proven useful on my DFS internet travels…

“Pre-Seed DFS Share Data”

I thought that using the built in DFS replication would be the best way to do this but it’s not. It is recommended to use tools to manually copy data and pre-seed as it is faster, robocopy is the weapon of choice for this:

Robocopy Command to Pre-Seed DFS Share Data:

robocopy.exe "\\srv01\e$\rf01" "d:\rf01" /e /b /copyall /r:6 /w:5 /MT:64 /xd DfsrPrivate /tee /log:c:\temp\preseedsrv02.log


“Correctly configuring the DFS Staging Folder and Conflict and Deleted Folder”

At a minimum, the staging folder quota should be at least the size of the 32 largest files in the replicated folder.

Powershell Command to find total size of 32 largest files (output in GB):

(Get-ChildItem <replicatedfolderpath> -recurse –force | Sort-Object length -descending | select-object -first 32 | measure-object -property length -sum).sum /1gb


“DFS Referral” 

A referral is an ordered list of DFS link targets that client computers receive from a domain controller or DFS namespace when a client computer accesses the DFS namespace or a DFS link with link targets. After the client computer receives the referral, the client computer attempts to access the first DFS link target in the list.

  1. If the DFS link target is not available, the client computer attempts to access the next target.
  2. DFS link targets in the client’s site are always listed first in a referral.
  3. DFS link targets outside of the client’s site are listed according to the ordering method you specify on the DFS namespace.
  4. DFS links inherit the DFS link target ordering method you specify for the DFS namespace. However, you can override the ordering method specified on the DFS namespace for specific DFS links.

Useful Commands

List of commands which are helpful for debugging and resolving DFS referral errors, i.e. checking the logon server clients are picking up information from, checking namespace replication is occurring, DFS service is enabled and Integrity of the information.

Check Local Logon Server:



set l

List DC’s in Domain:

nltest /dclist:domain.com

Check namespace configuration:

DFSDiag /TestDFSConfig /DFSRoot:&lt;namespace&gt; DFSDiag /TestDFSConfig /DFSRoot:\\Contoso.com\MyNamespace 

Check individual namespace configuration and integrity

DFSDiag /TestDFSIntegrity /DFSRoot:&lt;DFS root path&gt; [/Recurse] [/Full]
DFSDiag /TestDFSIntegrity /DFSRoot:\\Contoso.com\MyNamespace /Recurse /Full[/text]</pre>
<strong>Check referral responses:</strong>
<pre>DFSDiag /TestReferral /DFSPath:&lt;DFS path for getting referrals&gt; [/Full]
DFSDiag /TestReferral /DFSPath:\\Contoso.com\MyNamespace /Full

Show DFS Referral Target:

dfsutil /pktinfo



Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.