•5 min read•Protocols & Networking
DNS Resolution Explained
#DNS#Networking#Infrastructure
DNS (Domain Name System) is the phonebook of the internet. It translates human-readable names (example.com) into IP addresses (93.184.216.34).
The Hierarchy
- Stub Resolver: Your computer's local cache.
- Recursive Resolver: Usually your ISP or Google (8.8.8.8). It does the legwork.
- Root Servers (.): The 13 logical servers at the top of the chain. They know where
.com,.org, etc., live. - TLD Servers (.com): They know where
example.comlives. - Authoritative Nameservers: The actual server that holds the IP for
example.com.
The Query Flow
- You: "Where is example.com?"
- Recursive: "I don't know. Hey Root, where is .com?"
- Root: "Go ask the .com TLD server at this IP."
- Recursive: "Hey .com TLD, where is example.com?"
- TLD: "Go ask the Authoritative Server at this IP."
- Recursive: "Hey Authoritative Server, what is the IP for example.com?"
- Authoritative: "It's 93.184.216.34."
- Recursive: "Here you go, user."
Security Implications
DNS was designed without security.
- DNS Spoofing: An attacker replies faster than the real server.
- DNS Tunneling: Exfiltrating data via DNS queries (since DNS is rarely blocked).
DNSSEC adds cryptographic signatures to records to prevent spoofing, but adoption is complicated.