DNS Hierarchy & Resolution
Read this concept as one more decision made about a packet in flight. The widget below lets you change the inputs and watch the consequence instead of memorising the rule.
Why it matters
Name resolution turns a human-readable host into an IP address before any connection can be addressed. The distributed hierarchy and caching mean the visible traffic is often only a small part of the full lookup.
On the wire
A resolver sends a UDP query on port 53 containing a QNAME encoded as length-prefixed labels, a QTYPE, and a recursion-desired bit. Replies carry answer records with TTLs, and a large response sets the truncation bit to force a retry over TCP.
When it breaks
An expired or wrong cached record sends clients to an old address until the TTL runs out. A firewall that drops UDP 53 makes every lookup time out, while a spoofed reply can redirect a name until the certificate check fails.
Handshake stepper
Send each message in order; drop one to see a timeout-driven retransmission.
Each message costs roughly one delay
Each step carries state the next one depends on, so ordering matters.