3.3.5.4 Receiving a sysvol Referral Request

The domain name in the referral request MUST be either a domain in the current forest or a domain in another trusted forest. The DFS server MUST fail sysvol referral requests with other domain names with a STATUS_NOT_FOUND (0xC0000225) return code.

The DFS server MUST determine the list of DCs for the domain name specified in the sysvol referral request from directory services and then generate a list of DCs to return in the referral response that MUST be in either of the following forms, where <dcname> is a DC in the domain specified in the first path component of the referral request:

  • "\<dcname>\SYSVOL" if the second component of referral request path is "SYSVOL".

  • "\<dcname>\NETLOGON" if the second component of referral request path is "NETLOGON".

The format of the <dcname> returned MUST correspond to the format of the domain name in the referral request.

  • If the request contains a fully qualified domain name, the response MUST contain fully qualified DC host names.

  • If the request contains a NetBIOS domain name, the response MUST contain NetBIOS DC host names.

A server MUST fail referral requests with more than two path components with a STATUS_NOT_FOUND (0xC0000225) return code.

Servers MAY support DFS referral site costing for sysvol referral requests.<40>

After the candidate list of targets is available, the server SHOULD do the following:

  • From the IP address of the client, determine the site of the client, as specified in [MS-NRPC], section 3.5.4.3.8.

  • From the first path component of a target (the host name), determine its site via its IP address, as specified in [MS-NRPC] section 3.5.4.3.8.

  • If the server supports DFS referral site costing, and site costing is enabled for the DFS namespace, determine the site cost from the client's site to the target's site as specified in [MS-DRSR] section 4.1.16 <41>

The server MUST sort the targets as follows:

  • If DFS referral site costing is disabled or not supported, sort the targets based on the site location as specified in section 3.2.1.1.

  • If DFS referral site costing is enabled<42>, sort the targets based on the site cost as specified in section 3.2.1.2.

If SelfFirst is enabled, the server MUST place itself at the top of the sysvol referral response.

The server MUST initialize the RESP_GET_DFS_REFERRAL referral header as follows for the response.

  • The PathConsumed field MUST be set to length in bytes of the DFS referral request path.

  • The NumberOfReferrals field MUST be set to the number of complete DFS referral entries that can be returned in the response buffer provided by the DFS referral request. The server MAY silently drop targets that will not fit in the buffer. However, if the buffer size is insufficient to return even one referral entry, the server MUST fail the request with STATUS_BUFFER_OVERFLOW (0x80000005).

  • If the MaxReferralLevel field in the request is 1, the ReferralServers and StorageServers fields MUST be set to 1. Otherwise, the ReferralServers field MUST be set to 0 and the StorageServers field MUST be set to 1.

  • For DFS referral version 3 responses, the TargetFailback field MUST be set to 0. For DFS referral version 4 responses, the TargetFailback field MAY be set to 1.<43>

  • All other fields SHOULD be set to 0.

The server MUST add one referral entry structure for each target returned. The server MUST initialize each referral entry as follows:

  • The VersionNumber field MUST be set to the minimum of the highest DFS referral version supported by the server and the value specified in the MaxReferralLevel field of REQ_GET_DFS_REFERRAL.

  • The Size field MUST be set to the total size of the referral entry in bytes. The Size field of a referral entry structure MUST include the size, in bytes, of all immediately following strings so that a client can find the next referral entry in the message. The Size field of a referral entry structure MUST NOT include the size of referenced strings located after the last referral entry in the message.

  • The NameListReferral field MUST be set to 0.

  • For a version 4 DFS referral response, the TargetSetBoundary MUST be set to 1 if the target is the first target of a target set, and MUST be set to 0 if the target is other than the first target of a target set.

  • The TimeToLive field SHOULD be set to a nonzero time-out value in seconds.<44> When there is more than one referral entry, the TimeToLive field of each referral entry MUST be the same.

  • The DFSPathOffset field MUST be set to the offset in bytes from the beginning of the referral entry to the string that contains the DFS referral request path.

  • The DFSAlternatePathOffset field MUST be set to the offset in bytes from the beginning of the referral entry to the string that contains the DFS referral request path. This path MAY either be the same as the path as pointed to by the DFSPathOffset field or be an 8.3 name. In the former case, the string that is referenced MAY be the same as that in the DFSPathOffset field or a duplicate copy.<45>.

  • The NetworkAddressOffset field MUST be set to the offset in bytes from the beginning of the referral entry to the string that contains the target.

  • All other fields MUST be set to 0.