DNS (1): Names to Addresses
You can remember a name like www.example.com; a router cannot route to a word. The Domain Name System (DNS) is the distributed phone book that translates human names into the IP addresses the network actually uses — and it does it without any single database holding everything.
The DNS problem, and a distributed client–server service
Networks route on numbers. Every device is found by its IP address — 93.184.216.34 (IPv4) or a long hexadecimal IPv6 address — but people are terrible at remembering numbers and excellent at remembering names. The DNS problem is that mismatch: humans use names, networks use IP addresses.
www.example.com) to the IP addresses (like 93.184.216.34) that routers need. It is defined by RFC 1034 (concepts) and RFC 1035 (implementation).Why distributed? A single central database holding every name on the Internet would be a single point of failure, would need to be copied to every client, and would be an unmanageable bottleneck. Instead, the name space is split into zones, each zone is owned by a different organisation, and each organisation runs authoritative name servers for its own zones. No one server knows everything — but together they can answer anything.
DNS is classic client–server. The resolver is the client side: it asks questions. The name server is the server side: it answers. On a typical PC the stub resolver (inside the operating system) sends each query to a local DNS server — usually your home router (acting as a DNS forwarder) or your ISP’s resolver, sometimes a public one such as 8.8.8.8.
| Role | Who | What it does |
|---|---|---|
| Stub resolver | Inside your OS / app | Formats each query and sends it to the configured DNS server |
| Recursive resolver | ISP / public / corporate server | Does the full search on your behalf and returns the final answer |
| Root / TLD / authoritative servers | IANA, registry operators, domain owners | Respond to iterative queries with referrals or final answers |
The three layers: root, TLD, authoritative
Think of the DNS hierarchy as a tree. Reading a name from right to left climbs the tree from the most general to the most specific. For www.example.com. the FQDN (fully qualified, ending in a dot) has the label chain www → example → com → <root>.
- Root servers. The root zone is the very top: just a list of the authoritative servers for every top-level domain. There are 13 root-server identities, named
a.root-servers.netthroughm.root-servers.net. They do not knowexample.com; they know who serves .com (and .org, .net, and every other TLD). - TLD servers. Top-Level Domain servers (for
.com,.org,.net, and country codes like.uk) know the authoritative servers for every second-level domain inside them. A.comTLD server does not knowwww.example.com; it knows who is authoritative for example.com. - Authoritative servers. The domain owner runs these (or pays a hosting company). They hold the actual records for the zone and give the final, definitive answer — for example “A record for www.example.com is 93.184.216.34”.
Resolution flow for www.example.com
Here is the complete journey, in order. Step through it and watch the query type change from recursive at the client edge to iterative between the servers.
Steps 2–4 are iterative queries: each server answers the resolver with the next best thing it knows, and the resolver follows up. Step 1 (and the final delivery) are recursive: the client asks the resolver to do the whole job and return one answer.
Recursive vs iterative queries
| Query type | Meaning | Who sends it |
|---|---|---|
| Recursive | “Do everything, come back with the final answer.” The server must not respond with a referral. | Client resolver → recursive DNS server |
| Iterative | “Give me the best answer you have now; if it’s a referral, I’ll ask the next server myself.” | Recursive resolver → root, TLD, authoritative servers |
Caching, TTL, and redundancy
DNS would collapse under its own load if every query travelled the whole tree. Resolvers therefore cache every answer and referral they receive, inside their TTL window. Move the slider and watch what a second lookup costs.
A server serving a successful lookup sets the query’s TTL (a countdown remaining; the authoritative server fixes values like 300 seconds); for a cache to serve a cached record, it must use the (possibly decremented) TTL. Every DNS server at every level caches:
- The resolver caches the final A record, so a second user asking for
www.example.comgets an instant answer with no new tree walk. - Resolvers also cache referrals — “.com is served by those servers for some time” — so they often skip the root layer entirely for subsequent lookups.
- TTL (Time To Live) is how long in seconds a cached record may be reused; when it expires, the entry is discarded and must be fetched again. Long TTL = less load but slow updates; short TTL = fast changes but more queries.
Redundancy: 13 root identities and anycast
The root is the single most load-bearing part of DNS, so it is built for redundancy at two levels:
- Thirteen identities. The root zone lists exactly 13 server names,
athroughm(a.root-servers.net…m.root-servers.net), operated by 12 independent organisations under ICANN’s oversight. Any single one can answer a root query. - Anycast. Each identity is not one computer — it is tuned as many servers, distributed around the world, all advertising the same IP addresses. Routers send a user to the nearest instance. The famous “13 root servers” therefore exist as hundreds — in fact over a thousand — physical machines. If a host kills one instance, the others absorb the traffic.
TTL servers and authoritative zones are likewise replicated: every authoritative zone is required (RFC 1034/1035) to have more than one name server, and the resolver moves on to the next NS if one fails. This redundancy is why DNS almost never “goes down” globally.
URL vs hostname vs FQDN
Three strings the exam loves to splice apart. Pick one below and see how it is named.
| Term | What it is | Example |
|---|---|---|
| URL | The full locator: scheme + authority + path. | https://www.example.com/index.html |
| FQDN | The Fully Qualified Domain Name: the complete, absolute name ending with the root dot; no scheme, no path. | www.example.com. |
| Hostname | One label of the FQDN (worst, the leftmost), for example “www”; colloquially people say “hostname” for the whole name. | www (a label), or loosely www.example.com |
www.example.com.); the URL adds the scheme and path (https://…). If a question gives three strings and asks which DNS would resolve, DNS resolves the FQDN, not the URL or bare hostname.Review
Check what you have learned with these review questions.
Sources & references
- Mockapetris, P. RFC 1034: Domain Names — Concepts and Facilities (1987), defines the name space, delegation, and authoritative zones. rfc-editor.org/rfc/rfc1034.
- Mockapetris, P. RFC 1035: Domain Names — Implementation and Specification (1987), defines message format, port 53 transport, and resource records. rfc-editor.org/rfc/rfc1035.
- IANA. Root Servers (the A to M identities and the root zone). iana.org/domains/root/servers.
- Hoffman, P., Sullivan, A. & Fujiwara, K. RFC 7719: DNS Terminology (2019), authoritative definitions of resolver, recursive, iterative and FQDN. rfc-editor.org/rfc/rfc7719.
- Cisco. CCNA (200-301) Exam Topics, IP Services — DNS. cisco.com.
Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.