DNS Architecture in Windows Server | Mic·续

Zones and delegation

A DNS database can be partitioned into multiple zones. A zone is a portion of the DNS database that contains the resource records with the owner names belonging to the contiguous portion of the DNS namespace. Zone files are maintained on DNS servers. A single DNS server can be configured to host zero, one, or multiple zones.

Each zone is anchored at a specific domain name referred to as the zone’s root domain. A zone contains information about all names that end with the zone’s root domain name. A DNS server is considered authoritative for a name if it loads the zone containing that name. The first record in any zone file is a Start of Authority (SOA) resource record. The SOA resource record identifies a primary DNS name server for the zone as the best source of information for the data within that zone. The SOA also acts as an entity processing the updates for the zone.

A name within a zone can also be delegated to a different zone that's hosted on a different DNS server. Delegation is a process of assigning responsibility for a portion of a DNS namespace to a DNS server owned by a separate entity. This separate entity can be another organization, department, or workgroup within your company. Such delegation is represented by the NS resource record that specifies the delegated zone and the DNS name of the server authoritative for that zone. Delegating across multiple zones was part of the original design goal of DNS.

To learn more about the types and replication of DNS zones, see DNS zones.

Reasons to delegate a DNS namespace include:

  • A need to delegate management of a DNS domain to many organizations or departments within an organization.

  • A need to distribute the load of maintaining one large DNS database among multiple DNS servers to improve the name resolution performance and create a DNS fault-tolerant environment.

  • A need to allow for a host’s organizational affiliation by including the host in appropriate domains. The name server (NS) resource records facilitate delegation by identifying DNS servers for each zone and the NS resource records appear in all zones. Whenever a DNS server needs to cross a delegation in order to resolve a name, it refers to the NS resource records for DNS servers in the target zone.

The following image shows how management of the contoso.com domain is delegated across two zones, contoso.com and mydomain.contoso.com.

The diagram illustrates the hierarchical structure of DNS zone delegation, further delegating to contoso.com and mydomain.contoso.com.

Note

If multiple NS records exist for a delegated zone identifying multiple DNS servers available for querying, the Windows Server DNS Server service will be able to select the closest DNS server based on the roundtrip intervals measured over time for every DNS server.

DNS service architecture

The following diagram illustrates the DNS Client service architecture in its name resolution and update operations in the Windows client and Windows Server. Name resolution architecture is demonstrated using a client application and updates are represented by the DHCP client.

A diagram illustrating the DNS Client service architecture in its name resolution and update operations in the Windows client and Windows Server.

The following diagram illustrates the DNS Server service architecture with its administration tools and the Windows Management Instrumentation (WMI) interface in Windows Server.

A diagram illustrating the DNS Server service architecture in Windows Server.

The following sections describe the DNS query process and how DNS updates are handled.

DNS queries

DNS queries can be sent from a DNS client (resolver) to a DNS server, or between two DNS servers.

A DNS query is merely a request for DNS resource records of a specified resource record type with a specified DNS name. For example, a DNS query can request all resource records of type A (host) with a specified DNS name.

There are two types of DNS queries that can be sent to a DNS server:

  • Recursive: A recursive query forces a DNS server to respond to a request with either a failure or a success response. DNS clients (resolvers) typically make recursive queries. With a recursive query, the DNS server must contact any other DNS servers it needs to resolve the request. When it receives a successful response from the other DNS server (or servers), it then sends a response to the DNS client. The recursive query is the typical query type used by a resolver querying a DNS server and by a DNS server querying its forwarder, which is another DNS server configured to handle requests forwarded to it.

When a DNS server processes a recursive query and the query can't be resolved from local data (local zone files or cache of previous queries), the recursive query must be escalated to a root DNS server. Each standards-based implementation of DNS includes a cache file (or root server hints) that contains entries for the root DNS servers of the Internet domains. (If the DNS server is configured with a forwarder, the forwarder is used before a root server is used.)

  • Iterative: An iterative query is one in which the DNS server is expected to respond with the best local information it has, based on what the DNS server knows from local zone files or from caching. This response is also known as a referral if the DNS server isn't authoritative for the name. If a DNS server doesn't have any local information that can answer the query, it simply sends a negative response. A DNS server makes this type of query as it tries to find names outside of its local domain (or domains) (when it isn't configured with a forwarder). It might have to query outside DNS servers in an attempt to resolve the name.

The following figure shows an example of both types of queries.

The diagram shows how multiple queries were used to determine the IP address for www.contoso.com.

The diagram shows how multiple queries were used to determine the IP address for www.contoso.com. The query sequence is described as follows:

  1. Recursive query for www.contoso.com (A resource record).

  2. Iterative query for www.contoso.com (A resource record).

  3. Referral to the .com name server (NS resource records, for .com); for simplicity, iterative A queries by the DNS server to resolve the IP addresses of the Host names of the name server’s returned by other DNS servers have been omitted.

  4. Iterative query for www.contoso.com (A resource record).

  5. Referral to the contoso.com name server (NS resource record, for contoso.com).

  6. Iterative query for www.contoso.com (A resource record).

  7. Answer to the iterative query from contoso.com server (The www.contoso.com IP address).

  8. Answer to the original recursive query from local DNS server to resolver (The www.contoso.com IP address).

Update DNS

Resource records often change as computers, servers, and devices are added to or removed from the network. The implementation of DNS in Windows Server supports both static and dynamic updates of the DNS database.

Resource records can be added to an existing zone using the Add-DNSServerResourceRecord PowerShell command. Some common resource record types have other PowerShell commands where you don't need to specify the resource record type. You can also add resource records using the DNS Manager console. See Managing DNS resource records for guidance on working with resource records, including creating and modifying existing resource records of all types.

Unicode character support

When DNS was introduced as part of RFC 1035, names were limited to using uppercase and lowercase letters (A-Z, a-z), numbers (0-9), and hyphens (-). In addition, the first character of the DNS name can be a number and names must be encoded and represented using US-ASCII-based characters. For use of DNS in international settings, this requirement creates significant limitations where extended character sets are used for local naming standards. The Windows Server DNS service provides enhanced support, beyond the RFC 1035 specification, for UTF-8 characters.

What is UTF-8?

UTF-8 is the recommended character set for protocols evolving beyond the use of ASCII. The UTF-8 protocol provides for support of extended ASCII characters and translation of UCS-2, a 16-bit Unicode character set that encompasses most of the world’s writing systems. UTF-8 enables a far greater range of names than can be achieved using ASCII or extended ASCII encoding for character data.

Computers running Windows Server 2008 are UTF-8 aware. Meaning that when UTF-8-encoded characters are received or used as data by the server, the server can load and store this data in its zones. Although Windows-based DNS servers are UTF-8 aware, they remain compatible with other DNS servers that use traditional US-ASCII data encoding and current DNS standards.

How the DNS service implements UTF-8

To provide standards compatibility and interoperability with other DNS implementations, the DNS service uses uniform downcasing of any received character data. In this process, the DNS service converts all uppercase characters used in standard US-ASCII data to lowercase equivalent data for the following reasons:

  • To maintain compatibility with current and existing DNS standards.

  • To provide interoperability with DNS server implementations that don't recognize or support UTF-8 encoding.

To understand why uniform downcasing was chosen, several related points must first be considered from the current revised Internet standards for DNS. Several key points in the standards pertain directly to how character data is to be handled between DNS servers and other servers and clients. Key points include:

  • Any binary string can be used in a DNS name. (RFC 2181)

  • DNS servers must be able to compare names in a case-insensitive way. (RFC 1035)

  • The original case for character data should be preserved whenever possible as the data is entered into the system. (RFC 1035)

Because case insensitivity is a required part of the core DNS standard and case preservation is an optional recommendation, uniform downcasing was chosen to provide an effective standards-compliant solution. By downcasing UTF-8 encoded names before transmission, other DNS servers (which aren't UTF-8 aware) are able to receive and perform successful binary comparisons of the data and obtain the desired results.

Considerations for interoperability with UTF-8

The DNS Server service can be set to allow or block the use of UTF-8 characters for each server. Some DNS servers that don't support UTF-8 might accept zones with UTF-8 names but could have trouble saving or reloading those names. Be careful when transferring zones with UTF-8 names to servers that don't support UTF-8.

Some protocols place restrictions on the characters allowed in a name. In addition, names that are intended to be globally visible (RFC 1958) should contain ASCII-only characters, as recommended in RFC 1123.

Using UTF-8 to transform Unicode characters is invisible to users. However, you can see UTF-8-encoded characters if you use Network Monitor or a similar tool to analyze DNS traffic.

In addition to DNS server support for the UTF-8 encoding format, the client resolver defaults to using the UTF-8 character encoding format.

Names encoded in UTF-8 format must not exceed the size limits clarified in RFC 2181, which specifies a maximum of 63 octets per label and 255 octets per name. Character count is insufficient to determine size because some UTF-8 characters exceed one octet in length.

The UTF-8 encoding protocol adapts to use with existing DNS protocol implementations that expect US-ASCII characters because representation of US-ASCII characters in UTF-8 is identical, byte for byte, to the US-ASCII representation. DNS client or server implementations that don't recognize UTF-8 characters always encode names in the US-ASCII format. The DNS Server service is able to correctly interpret those names.

The DNS service can configure name checking to allow or restrict the use of UTF-8 characters in DNS data.

By default, multibyte UTF-8 name checking is used, allowing the greatest tolerance when the DNS service processes characters. Multibyte UTF-8 name checking is the preferred name-checking method for most privately operated DNS servers that aren't providing name service for Internet hosts.