The Internet's Hidden Backbone

How DNS Works

Every click, every page load, every API call begins with a DNS lookup. Explore the distributed system that translates names to numbers β€” interactively.

4.3T queries / day
< 100ms uncached lookup
2,016 root instances
386.9M registered domains
Scroll to explore

01 β€” The Resolution Chain

From domain name to IP address

When you type a URL, your device triggers a multi-hop lookup that bounces between up to 4 different server types. Click each step to trace the packet.

πŸ’» Browser
recursive query (RD=1)
πŸ”„ Recursive Resolver
iterative query (RD=0)
🌐 Root Server
πŸ“‹ Authoritative NS
final answer (AA=1)
🏒 TLD Server (.com)
referral + glue

02 β€” Record Types

The building blocks of every zone

DNS zones are made of records. Click any card to see a real-world example and how the record is structured.


03 β€” TTL Countdown

Watch caches expire in real time

TTL (Time To Live) controls how long each layer caches a DNS response. Start the simulation to see all four cache layers count down simultaneously.

⚑ Simulation runs at 60Γ— speed. Browser ignores TTL and uses its own 60s cap.


04 β€” "Propagation" Myth

It's really just caches expiring

DNS doesn't "propagate" β€” there's no broadcast. Each resolver independently caches the record and waits for its TTL to expire. Watch 24 resolvers worldwide update at different times.

Record change: 93.184.216.34 β†’ 198.51.100.42
Ready

05 β€” Packet Inspector

Inside a DNS message

Every DNS exchange is a fixed-format message. Toggle between query and response to see exactly what's on the wire.

Header
Transaction ID0xA1B2
FlagsQR=0 (Query) | OPCODE=0 (Standard) | RD=1 (Recursion Desired)
Questions1
Answers0
Authority0
Additional1 (EDNS0 OPT)
Question Section
QNAMEwww.example.com
QTYPEA (1)
QCLASSIN (1)
Additional β€” EDNS0 OPT
UDP Payload Size1232
DO (DNSSEC OK)1
Header
Transaction ID0xA1B2 (matches query)
FlagsQR=1 (Response) | AA=1 (Authoritative) | RD=1 | RA=1 | RCODE=0 (No Error)
Questions1
Answers1
Authority0
Additional1 (EDNS0 OPT)
Answer Section
NAMEwww.example.com
TYPEA (1)
CLASSIN (1)
TTL3600 seconds
RDLENGTH4 bytes
RDATA93.184.216.34
DNS query for www.example.com β€” 43 bytes UDP payload
OffsetHexASCII 0000A1 B2 01 00 00 01 00 00........ 000800 00 00 01 03 77 77 77....Β·www 001007 65 78 61 6D 70 6C 65Β·example 001803 63 6F 6D 00 00 01 00Β·com.... 002001 00 00 29 04 D0 00 00...).... 002880 00 00 00....
A1 B2 = Transaction ID  |  cyan = QNAME (length-prefixed labels)  |  orange = QTYPE(A) + QCLASS(IN)

06 β€” Attack Surface

When DNS goes wrong

DNS was designed in 1983 with no built-in authentication. These three attack classes exploit that trust.

Cache Poisoning

Critical

An attacker races to inject forged responses matching the 16-bit Transaction ID before the legitimate answer arrives. The 2008 Kaminsky attack targeted random subdomains (never cached) to get unlimited attempts, injecting rogue NS records to hijack entire zones.

Fix: source port randomization (16β†’32 bit entropy) + DNSSEC validation

Amplification DDoS

Critical

Small queries with spoofed source IPs sent to open resolvers generate 28–54Γ— larger responses, flooding the victim. The 2016 Dyn attack (1.2 Tbps via Mirai botnet) knocked Twitter, Reddit, and Netflix offline simultaneously.

Fix: BCP38 ingress filtering + response rate limiting + RFC 8482 minimal ANY

DNS Tunneling

High

Arbitrary data encoded in subdomain labels (base32 upstream) and TXT records (base64 downstream). Low throughput but nearly invisible β€” the SolarWinds SUNBURST attack used DNS-based command and control.

Fix: query entropy analysis + anomalous subdomain length detection + ML classifiers
The Defense Stack
DNSSEC
Cryptographic signatures prove data integrity end-to-end from root to domain
DoH / DoT
Encrypt the last mile between client and resolver (port 443 / port 853)
RPKI + BCP38
Block IP spoofing at network edge, preventing amplification source forgery
Response Rate Limiting
Caps identical responses per second to throttle amplification attempts