PROTOCOL FIELD GUIDE
How DNS works
Resolve a domain through recursive and authoritative servers. Read query IDs, question names, record types, referrals and cache lifetimes.
- Default port
- 53
- Transport / carrier
- UDP / TCP
- Category
- application
1. Ask the recursive resolver
The client sends an A question for an IPv4 address. An AAAA question asks for IPv6; MX and TXT request other record types.
2. Follow the root referral
On a cache miss, the resolver asks a root server. The root returns a referral toward the responsible top-level domain, not the final website address.
3. Ask the TLD servers
The top-level domain points to the domain’s authoritative name servers. Glue addresses can help reach those servers.
4. Receive the authoritative answer
The authoritative server returns the requested record or a negative answer. The resolver caches according to DNS TTL rules.
5. Reuse the cache
A later lookup may be answered locally until the TTL expires. TCP is supported too; DNS is not restricted to UDP.
Protocol relationships
Protocols cooperate across layers. Compare the neighboring lessons to distinguish addressing, delivery, application semantics and encryption.
Standards and editorial method
Written and implemented independently by NavSprout. Lessons summarize public protocol standards using synthetic documentation addresses and fictional credentials. Consult the standards for complete wire formats and normative behavior.
RFC 1034 ↗ RFC 1035 ↗