Architecture

This section describes the major components that make up Dfs and explains how they work. At the end is a list of improvements over Dfs 4. x .

Block Diagrams

Figure 17.2 shows the components that make up the Dfs console, service, and client in Windows 2000.

Cc962136.DSDB02(en-us,TechNet.10).gif

Figure 17.2 Dfs Architecture for Windows 2000

The Dfs administrative console can be located on any Windows 2000–based computer, not necessarily the same one as the server or the client. Its binary files include the following:

  • Dfsgui.msc and Dfsui.dll, which implement the Dfs snap-in.

  • Netapi32.dll, which contains the NetDfs xxx administrative functions, including the following:

    • NetDfsAdd, which adds a new Dfs link or adds a shared folder to an existing link.

    • NetDfsEnum, which enumerates and returns information about all Dfs links.

    • NetDfsGetInfo, which returns information about a specific Dfs link.

    • NetDfsRemove, which removes a share from a link. It removes the link itself if the share is the last associated with the specified link.

    • NetDfsSetInfo, which associates information with a link.

    • NetDfsGetClientInfo, which returns client-cached information about a specific link.

    • NetDfsSetClientInfo, which associates information with a client's cached copy of a link.

    For more information about the Dfs APIs, see the MSDN Platform Software Development Kit (SDK) link on the Web Resources page at https://windows.microsoft.com/windows2000/reskit/webresources .

The Dfs service resides on the Dfs server where the root is located. Its binary files include the following:

  • Dfssvc.exe, which provides server-side support for NetDfs xxx APIs that configure and maintain the Dfs topology. Dfs service can be started or stopped by using a net start   dfs or a net stop   dfs command.

  • Dfs.sys, which is the kernel component of the Active Directory or registry-based configuration that is maintained by Dfssvc.exe. It translates the Dfs configuration into responses for Dfs clients.

Binary files on the Dfs client include the following:

  • Mup.sys, which implements Dfs client support and redirector selection. "Mup" stands for multiple UNC provider.

  • Rdr.sys, which handles communications to the Dfs server and Windows-based file servers that use the Server Message Block (SMB) protocol.

  • Nwrdr.sys, which handles communications to non-Windows-based file servers that use NetWare Core Protocol (NCP).

Figure 17.3 shows the components that make up the Dfs-aware client for Windows 95 or Windows 98.

Cc962136.DSDB03(en-us,TechNet.10).gif

Figure 17.3 Dfs Client Architecture for Windows 95 and Windows 98

Binary files on the Dfs client for Windows 95 and Windows 98 include the following:

  • Dfs.vxd, which implements Dfs client support.

  • Vredir.vxd, which is the SMB redirector for Windows 95 and Windows 98.

How Dfs Works

As shown in Figure 17.4, the bulk of the Dfs code resides in four files: Netapi32.dll and Mup.sys on the client, and Dfssvc.exe and Dfs.sys on the server. Netapi32.dll contains the NetDfs xxx APIs that make remote administration of Dfs servers possible. The Dfs console uses remote procedure calls (RPCs) to communicate with the Dfs server. The server and the client use SMB protocol to communicate.

Cc962136.DSDB04(en-us,TechNet.10).gif

Figure   17.4 Core Dfs Files and Communication Protocols

When a user on a Dfs client requests access to a shared folder, the Dfs client intercepts the request and checks the local cache for a valid referral containing the UNC for the requested shared folder. If one is found, the user is referred to the specified shared folder transparently.

If the target shared folder has never been requested before or if the data in the cache for it has expired, the Dfs client asks the Dfs server for a referral. The Dfs server looks in the PKT and returns a referral to the client.

If the referral contains a replica set, the server uses the IP address of the client to determine the site in which the client resides. It then randomizes the list of replicas, giving preference to those located in the same site as the client. The client receives the referral and connects to the first available server in the randomly ordered list using the appropriate protocol.

The referral is stored in the local PKT cache and locked. If the TTL has not expired, the client always selects the first replica on the list. If a failover occurs, the client walks down the list for an available replica. If no replicas are available, the client gets a new replica list from the Dfs server.

Windows 2000 Improvements of Dfs 4. x

Dfs server enhancements include the following:

  • The Dfs service is installed automatically with Windows 2000.

  • The Dfs service can be paused and stopped, but not removed from the administrative console.

  • Dfs is integrated into the Active Directory namespace for domain-based Dfs.

  • Dfs roots hosted by more than one domain controller eliminate the root as a single point of failure.

  • Support for the File Replication service to permit automatic replication of file changes between Dfs replicas.

  • The Dfs administrative tool is now graphical by way of MMC.

  • Status flags indicate the availability of replicas.

  • Dfs links can connect to other links on other Windows 2000–based servers without a fresh referral.

  • The expiration (TTL) of referrals that are cached by Dfs clients is configurable on links in the Dfs namespace.

  • Dynamic configuration of the Dfs topology — that is, you do not need to restart the server when adding or removing Dfs roots.

  • Support for Cluster service.

Client improvements in Dfs depend on the host platform.

Windows 95    The Dfs-aware client is available and can be downloaded. However, it can negotiate referrals only for SMB volumes. All other volumes appear as empty directories. Similarly, the net use command cannot be used beyond the share level.

Windows 98    The Dfs-aware client is built in, but it is subject to the same limitations as those cited for Windows 95.

Windows NT 4.0    A built-in Dfs-aware client supports connections to non-SMB volumes such as NetWare, NFS, and NCP, and allows deep net use commands. This is also true for Windows 2000–based clients.

Windows 2000    Built-in Dfs-aware clients select replicas based on site location. If two replicas are located in different sites, the client prefers the local replica. If the replicas are on the same site, one is chosen randomly. The clients also support links to non-SMB volumes and deep net use commands.

Windows 2000–based clients also contain a shell extension to Windows Explorer that lets you see all the referrals for a Dfs link, select a referral for a Dfs link, and refresh the referral cache for a Dfs link.