Sub topic 10
The DNS Hierarchy: Root, TLD, and Authoritative Servers
Assume that you know IP addresses, UDP, client-server communication, and the layered network model. This chapter focuses on how DNS organizes names and delegates responsibility. Detailed query resolution and caching come next.
Why DNS Uses a Hierarchy
The Domain Name System (DNS) maps human-readable domain names to data such as IP addresses. A domain name is read from right to left:
www.cs.example.eduThe rightmost label, edu, is the top-level domain (TLD). The next label, example, identifies a domain registered under that TLD. The leftmost label, www, is a host or service name inside that domain.
DNS is distributed. No single server stores every domain name. Instead, responsibility is divided among levels of servers.
| Level | Example | Main responsibility |
|---|---|---|
| Root | `.` | Directs queries to the correct TLD servers |
| TLD | `.edu` | Directs queries to authoritative servers for domains under `edu` |
| Authoritative | `example.edu` | Stores the actual records for the domain |
The complete name technically ends with a root label:
www.cs.example.edu.The final dot represents the root of the DNS tree. Most applications omit it because the root is normally understood.
Root Name Servers
Root name servers are responsible for the root zone. The root zone does not normally contain the IP address of every host. Instead, it contains delegation information for TLDs such as:
- Generic TLDs:
.com,.org, and.edu - Country-code TLDs:
.in,.uk, and.jp - Newer TLDs such as
.devand.museum
A root server can answer, in effect, “I do not manage example.edu, but the .edu TLD servers can help you.”
There are a small number of root server identities, conventionally named a.root-servers.net through m.root-servers.net. Each identity is served by multiple physical instances using anycast. Anycast allows the same address to be announced from several locations, so a client usually reaches a nearby instance.
TLD Name Servers
A TLD name server manages the TLD zone. For a query about example.edu, an edu server does not usually return the address of www.cs.example.edu. It returns a delegation for example.edu.
That delegation identifies the authoritative name servers for the domain. It may also include glue records: address records supplied by a parent zone when the child name server's name lies inside the child domain.
For example, if example.edu uses ns1.example.edu, the resolver needs an address for ns1.example.edu before it can contact that server. The parent zone can provide this address as glue.
Authoritative Name Servers
An authoritative name server is a server that has official data for a zone. A zone is an administratively managed portion of the DNS tree. The authoritative server for example.edu can store records such as:
A: an IPv4 addressAAAA: an IPv6 addressMX: a mail serverNS: authoritative name serversCNAME: an alias for another name
The authoritative server does not need to ask the root or TLD servers for records in its own zone. It is the source of authority for those records.
GATE Problem Pattern
When a question gives a name such as a.b.example.com, identify the labels from right to left:
.is the root.comis the TLD.example.comis the registered domain and may be a delegated zone.b.example.commay be a separate delegated subdomain.a.b.example.comis the host or service name being queried.
Do not assume that every label has its own server. A zone can contain many labels, and delegation occurs only where the domain owner creates a zone boundary.
Exercise
Which DNS server is the authoritative source for an A record in the zone example.org: a root server, an org TLD server, or an authoritative server for example.org?
Show answer
The authoritative server for example.org. Root and TLD servers provide delegation information, not the final record.