DNS Architecture in Windows Server | Microsoft Learn
DNS is a hierarchical distributed database and an associated set of protocols that define:
-
A mechanism for querying and updating the database
-
A mechanism for replicating the information in the database among servers
-
A schema of the database
DNS host names reside in a database that can be distributed among multiple servers, decreasing the load on any one server, and provide the ability to administer this naming system on a per-partition basis. DNS supports hierarchical names and allows registration of various data types in addition to host name-to-IP address mapping used in HOSTS files. The DNS database is distributed, allowing it to both scale up and scale out, meaning performance isn't degraded when more servers are added.
The original DNS was based on Request for Comment (RFC) 1035 (Domain Names–Implementation and Specification). Other RFCs describe DNS security, implementation, and administrative issues later augmented the original design specifications.
The RFCs used in the Windows Server operating systems are:
-
Domain names - concepts and facilities RFC 1034
-
Domain names - implementation and specification RFC 1035
-
DNS Extensions to support IP version 6 RFC 1886
-
A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY) RFC 1996
-
Incremental Zone Transfer in DNS RFC 1995
-
Dynamic Updates in the Domain Name System (DNS UPDATE)RFC 2136
-
Negative Caching of DNS Queries (DNS NCACHE) RFC 2308
-
Resource Records for the DNS Security Extensions RFC 4034
-
Protocol Modifications for the DNS Security Extensions RFC 4035
-
A DNS RR for specifying the location of services (DNS SRV) RFC 2052
DNS domain names
DNS is implemented as a hierarchical and distributed database containing various types of data, including host names and domain names. The names in a DNS database form a hierarchical tree structure called the domain namespace. Domain names consist of individual labels separated by dots, for example: mydomain.contoso.com.
A fully qualified domain name (FQDN) uniquely identifies the host’s position within the DNS hierarchical tree. The FQDN specifies a list of names separated by dots in the path from the referenced host to the root. The following figure shows an example of a DNS tree with a host called mydomain within the contoso.com domain. The FQDN for the host would be mydomain.contoso.com.
Understanding the DNS domain namespace
The DNS domain namespace, as shown in the preceding figure, is based on the concept of a tree of named domains. Each level of the tree can represent a branch or a leaf. A branch is a level where more than one name is used to identify a collection of named resources. A leaf represents a single name used once at that level to indicate a specific resource.
DNS Domain Name Hierarchy
DNS clients and servers use queries as the method of resolving names in the tree to specific types of resource information. This information is provided by DNS servers in query responses to DNS clients that then extract the information and pass it to a requesting program for resolving the queried name. In the process of resolving a name, DNS servers often function as DNS clients, querying other servers in order to fully resolve a queried name.
For example, Contoso is assigned authority by the Internet root servers for its own part of the DNS domain namespace tree on the Internet, that is, contoso.com. Resolving a name outside of the contoso.com namespace requires Contoso DNS servers to query other DNS servers, such as the root servers.
How the DNS domain namespace is organized
Any DNS domain name used in the tree is technically a domain. However most DNS discussions identify names in one of five ways, based on the level and the way a name is commonly used. For example, the DNS domain name registered to Contoso (contoso.com) is known as a second-level domain. The name has two parts (known as labels) that indicate it's located two levels below the root or top of the tree. Most DNS domain names have two or more labels, each of which indicates a new level in the tree. Periods are used in names to separate labels.
The following table describes the five categories of DNS domain names by their function in the namespace, along with an example of each name type.
| Name type | Description | Example |
| --- | --- | --- |
| Root domain | The top of the tree, representing an unnamed level; it's sometimes shown as two empty quotation marks (""), indicating a null value. When used in a DNS domain name, it's stated by a trailing period (.) to designate that the name is located at the root or highest level of the domain hierarchy. In this instance, the DNS domain name is considered to be complete and points to an exact location in the tree of names. Names stated this way are FQDNs. A single period (.) or a period used at the end of a name, such as example.contoso.com. | A single period (.) or a period used at the end of a name, such as example.contoso.com. |
| Top-level Domain (TLD) | A name used to indicate a country or region or the type of organization using a name. | .com, which indicates a name registered to a business for commercial use on the Internet. |
| Second-level domain | Variable-length names registered to an individual or organization for use on the Internet. These names are always based on an appropriate top-level domain, depending on the type of organization or geographic location where a name is used. | contoso.com. is the second-level domain name registered to Contoso by the Internet DNS domain name registrar. |
| Subdomain | Other names that an organization can create that are derived from the registered second-level domain name. Subdomains include names added to grow the DNS tree of names in an organization and divide it into departments or geographic locations. | example.contoso.com. is a subdomain assigned by Contoso for use in documentation example names. |
| Host or resource name | Names that represent a leaf in the DNS tree of names and identify a specific resource. Typically, the left-most label of a DNS domain name identifies a specific computer on the network. For example, if a name at this level is used in a host (A) resource record, it's used to look up the IP address of computer based on its host name. | host-a.example.contoso.com. The first label (host-a) is the DNS host name for a specific computer on the network. |
DNS and Internet domains
Internet registration authorities manage the Domain Name System. The registration authorities are responsible for maintaining top-level domains assigned by organization and by country/region. These domain names follow the International Standard for country codes (ISO 3166). There are hundreds of top-level-domain names available for use by the public. The following table shows a few common TLDs, as well example two-letter abbreviations used for countries and regions.
| DNS Domain Name | Type of Organization |
| --- | --- |
| .com | Commercial organizations |
| .edu | Educational institutions |
| .org | Non-profit organizations |
| .net | Networks (the backbone of the Internet) |
| .gov | Nonmilitary government organizations |
| .mil | Military government organizations |
| .arpa | Reverse DNS |
| .xx | Two-letter country codes (for example, .us, .au, .ca., .fr) |
DNS resource records
DNS resource records contain the information that a zone maintains about the resources (such as hosts) that the zone contains. A typical resource record consists of the:
-
Name (host) of the resource record.
-
Information about how long the resource record can remain in the cache.
-
Resource record type, such as a host (A) resource record.
-
Data that's specific to the record type, such as the hosts IPv4 address.
You can add resource records directly, or they can be added automatically when Windows-based, Dynamic Host Configuration Protocol (DHCP) enabled clients join a network using dynamic update.
Types of resource records
Common resource records include:
| Resource record type | Description |
| --- | --- |
| Host (A, AAAA) records | Maps a hostname to an IP address. |
| Alias (CNAME) records | Forward an alias domain name or subdomain to another primary or canonical name. Alias (CNAME) resource records are also termed canonical name resource records. With these records, you can use more than one DNS name to point to a single host. |
| Mail exchanger (MX) records | Specifies the name of a computer that exchanges or forwards mail. E-mail applications use the mail exchanger (MX) resource record to locate a mail server based on a DNS domain name in the destination address for the e-mail recipient of a message. If multiple mail exchanger (MX) resource records exist, the DNS Client service attempts to contact mail servers in the order of preference from lowest value (highest priority) to highest value (lowest priority). |
| Pointer (PTR) records | Used by reverse DNS lookups to map an IP address to domain. Pointer (PTR) resource records support the reverse lookup process, based on zones that are created and rooted in the in-addr.arpa domain. You need to have the appropriate reverse lookup zone present on your DNS server to create a PTR record that maps an IP address to a specific hostname. |
| Service location (SRV) records | Specifies the host, port, and protocol for a service. Service location (SRV) resource records are required when clients use DNS to locate location services such as Active Directory domain controllers. |
| Name server (NS) records | Specifies the authoritative name servers for a domain. |
| Text (TXT) record | Enables the publication of text in a DNS record. Text records let you add text information that is returned by querying DNS. TXT records are often used to authenticate ownership of DNS zones. |
| Delegation name (DNAME) record | Provides an alias for a domain, like a CNAME record, but includes all subdomains. |
| Start of authority (SOA) record | Provides authoritative information about a DNS zone. The SOA record includes primary name server, contact of DNS zone administrator, refresh information, and other information. |
Time-to-Live for resource records
The Time-to-Live (TTL) value in a resource record indicates a length of time used by other DNS servers to determine how long to cache information for a record before expiring and discarding it. For example, most resource records created by the DNS Server service inherit the minimum (default) TTL of one hour from the start of authority (SOA) resource record, which prevents extended caching by other DNS servers.
A DNS client resolver caches the responses it receives when it resolves DNS queries. These cached responses can then be used to answer later queries for the same information. The cached data, however, has a limited lifetime specified in the TTL parameter returned with the response data. TTL ensures that the DNS server doesn't keep information for so long that it becomes out of date. TTL for the cache can be set on the DNS database (for each individual resource record, by specifying the TTL field of the record and per zone through the minimum TTL field of the SOA record) and on the DNS client resolver side by specifying the maximum TTL the resolver allows to cache the resource records.
There are two competing factors to consider when setting the TTL. The first is the accuracy of the cached information, and the second is the utilization of the DNS servers and the amount of network traffic. If the TTL is short, then the likelihood of having old information is reduced considerably, but it increases utilization of DNS servers and network traffic, because the DNS client must query DNS servers for the expired data the next time it's requested. If the TTL is long, the cached responses could become outdated, meaning the resolver could give false answers to queries. At the same time, a long TTL decreases utilization of DNS servers and reduces network traffic because the DNS client answers queries using its cached data.
If a query is answered with an entry from cache, the TTL of the entry is also passed with the response. This way the resolvers that receive the response know how long the entry is valid. The resolvers honor the TTL from the responding server; they don't reset it based on their own TTL. So, entries truly expire rather than live in perpetuity as they move from DNS server to DNS server with an updated TTL.
Note
In general, never configure the TTL to zero. The difference between a setting of 0 or 60 is minimal to the accuracy of the record, but when the TTL is set to 0, there's a significant impact on DNS server performance because the DNS server is constantly querying for the expired data.

