Distributed File System: Namespace Site Discovery and Target Questions

Updated: August 3, 2011

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2

This FAQ answers questions about namespace site discovery and target selection in Distributed File System (DFS) namespaces. For other questions, see DFS Namespaces: Frequently Asked Questions.

Site Discovery and Target Selection Questions

What is DFS site discovery?

Site discovery, also called site awareness, is the process that DFS uses to determine which site a namespace server (root target), folder (link) target, or client computer belongs to. A site is one or more TCP/IP subnets as defined in Active Directory. DFS uses this site information to determine the order in which to order the targets in a referral.

Detailed information about the site discovery process is described in the section How Site Discovery Works in the DFS Technical Reference.

Questions for Windows ServerĀ 2003

How does DFS target selection work?

In Windows Server 2003, DFS offers three methods of target selection: default target selection, restricted same-site target selection, and least expensive target selection (also called site-costing).

Default Target Selection

By default, DFS lists referrals in the following order:

  • Link or root targets in the same site as that of the client. Within this set, DFS lists the targets randomly.

  • Link or root targets in sites other than that of the client. Within this set, DFS lists the targets randomly.

Essentially, the client connects to a target in its site if a target is available. If no targets are available in the client's site, the client connects to a random target outside its site regardless of the bandwidth cost, connection speed, or the target server's processing load.

Restricted Same-site Target Selection

By using Dfsutil.exe with the /InSite parameter, you can limit client access to only those targets that are in the same site as the client. You enable this feature on a DFS root or on individual links in the namespace. If you enable this feature on the root, referrals for any link in the namespace return only targets that are in the same site as the client. If this functionality is disabled on the root, the individual settings on each link are used.

When using this feature, plan to have at least one target (or at least two targets, for fault tolerance) in every site, and plan to monitor servers to make sure they are online and accessible. If no same-site targets exist, clients in that site are denied access to the data in the namespace.

The /InSite parameter takes effect after you stop and restart the DFS service on each root server or when the service reads the DFS metadata, which happens every hour by default. Also, note that the /InSite parameter does not work for links that point to a domain-based DFS namespace (this type of link is known as an interlink). As a result, clients can access a target outside of the client's site if the interlink points to a domain-based DFS namespace.

Least Expensive Target Selection (Site-costing)

If you create a stand-alone or domain-based DFS root on a server running Windows Server 2003, and the domain controller acting as the Intersite Topology Generator (ISTG) is also running Windows Server 2003, you can use the /SiteCosting parameter in Dfsutil.exe to enable DFS to choose an alternate target based on connection cost if no same-site targets are available.

Windows Server 2003 uses the site and costing information in Active Directory to determine whether sites are linked by inexpensive, high-speed links or by expensive wide area network (WAN) links.

When site-costing is not available, the default target selection method is used instead as in the following situations:

  • When a stand-alone DFS namespace is hosted on a server that is not part of any domain.

  • When the root server is running Microsoft Windows 2000.

  • When the closest domain controller acting as the ISTG is running Windows 2000 Server. This situation occurs when the only domain controllers running Windows 2000 Server are in the site of the DFS root server, or when no domain controllers are in the site of the DFS root server, and the closest site with at least one domain controller has only Windows 2000 Server domain controllers in that site. The closest site is defined in Active Directory.

If you plan to enable site-costing, review the following factors:

  • Site-costing is enabled on a per-namespace basis.

  • The ISTG role is given automatically to the domain controller running Windows Server 2003 if domain controllers running Windows 2000 Server and Windows Server 2003 exist in a site.

  • Site-costing is affected when you have a mix of root servers running Windows 2000 and Windows Server 2003.

How do target selection and site discovery differ in Windows 2000 Server and Windows Server 2003?

Target selection in Windows 2000 Server is limited to default target selection and restricted same-site target selection, whereas Windows Server 2003 additionally supports least expensive target selection (site-costing).

Site discovery in Windows 2000 Server differs from site discovery in Windows Server 2003 in a number of ways:

  • Root servers running Windows 2000 query the link target server to determine what site that target is in. Link target servers running Microsoft Windows NT 4.0 do not support this query and do not return a site name. Therefore, no site information is available for any link target on a server running Windows NT 4.0. Root servers running Windows Server 2003 use the IP address of the link target server to determine site membership, so Windows Server 2003 root servers can correctly determine the site membership of any DFS link target.

  • In Windows 2000, DFS maintains static site information. After the site information for a particular target is known, DFS uses that information indefinitely, regardless of any changes to the site information of the target. If you move a target to another site, you must remove the target from the namespace, and then add it back to update the site information. To do this, see Knowledge Base article 260857, DFS Site Information Is Not Updated When You Move Server to a New Active Directory Site. In Windows Server 2003, if you move a target from one site to another, the site information for that target is updated within 25 hours.

How do I enable least expensive target selection (site-costing) in DFS?

You use the command-line tool Dfsutil.exe that is included in the Windows Server 2003 Support Tools. Use the following syntax:

Dfsutil /Root:<RootName>/SiteCosting /Enable

You can run this command from any computer running Windows XP or Windows Server 2003 where the Windows Server 2003 Support Tools are installed. For example, to enable least expensive target selection on the \\Contoso.com\Public namespace, at the command prompt type:

Dfsutil /Root:\\Contoso.com\Public /SiteCosting /Enable

For more information about using Dfsutil.exe, see Dfsutil Overview in Windows Support Tools Help.

How does the RestrictAnonymous registry entry affect site discovery?

Root servers that run Windows 2000 Server or Windows Server 2003 and that are not domain controllers cannot determine a DFS client computer's site when the restrictanonymous registry entry is set to 2 on domain controllers running Windows 2000 Server. (This registry entry is located at HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa.) As a result, these DFS root servers sort targets in link referrals and root referrals randomly, regardless of the namespace type (stand-alone or domain-based), target selection method, or client operating system.