How a name is resolved
There is no list of every domain name anywhere. No machine has one, and no machine could keep one current. DNS answers a question nobody holds the answer to, by asking three servers that each hold one piece of it.
Read a name right to left and you are reading a path down a tree:
www.example.com. ^ the root (the trailing dot, almost never typed) ^^^ the top-level domain: who runs .com ^^^^^^^ the domain: delegated by .com to its owner^^^ a name inside that owner's zoneEach dot is a place the tree may have been handed to somebody else. A
zone is one such slice, and every boundary between two of them is where a referral happens.
Recursive at the top, iterative below
Your machine asks one question and waits. The resolver does the walking:
it asks the root, which does not know the answer and says who does; it asks the
.com servers, which do not know either and say who does; it asks the
authoritative server, which finally answers.
| Asked | Knows the answer? | What comes back |
|---|---|---|
| Root server | No, and never | A referral to the TLD servers |
| TLD server | No | A referral to the zone’s servers |
| Authoritative | Yes | The record, with a TTL |
A referral carries addresses as well as names — otherwise resolving ns1.example.com
would require resolving ns1.example.com. Those extra records are called glue, and they
are what stops the whole system from being circular.
The transport underneath
A lookup is normally one UDP datagram out and one back — no connection, no handshake, no teardown. That is the same exchange you watched in track 1, seen from the other side:
Key takeaways
- The namespace is a tree read right to left, cut into zones, and every zone boundary is a delegation to somebody else.
- Your machine asks one recursive question; the resolver asks as many iterative ones as the walk requires.
- The root never answers with data. It answers with a referral, which is why thirteen addresses can serve everyone.
- Glue records carry the addresses of nameservers inside a referral, which is what keeps delegation from being circular.
- A lookup is normally one UDP datagram each way; an oversized answer sets the truncated flag and is re-asked over TCP.