RecapDifficulty: Intermediate1 min

Recap: DNS

A tree of servers, a record per kind of answer, and a TTL that decides when a change is seen.

DNS turns names into addresses through a hierarchy of servers and a great deal of caching.

  • Resolution goes from a stub resolver to a recursive resolver, which asks a root server, a top-level domain server and the authoritative server in turn.
  • Records each hold one kind of answer: A and AAAA addresses, CNAME aliases, MX mail servers, TXT text and NS delegations.
  • A CNAME must stand alone at its name, so it cannot sit at a domain's root.
  • The TTL sets how long any cache may keep an answer; a change takes up to one TTL to reach everyone.
  • Transport: UDP on port 53, TCP for truncated answers and zone transfers, and DoH or DoT for privacy.
  • dig shows the answer, its remaining TTL and the server that gave it.
The resolution path, with the caches marked