How DNS works

Networking Fundamentals · lesson 10 of 17 · 12 min

  • How DNS works
  • DNS (Domain Name System) translates human-readable domain names (

Tech Camp for Kids.com ) into IP addresses ( 104.21.5.200 ). It is a distributed, hierarchical database. DNS resolution process 1. Local cache: your device checks its DNS cache first. 2. Recursive resolver: your ISP or configured DNS server (e.g. 8.8.8.8) handles the query on your behalf. 3. Root nameserver: knows where to find TLD nameservers (.com, .org, .edu). 4. TLD nameserver: knows the authoritative nameserver for the domain. 5. Authoritative nameserver: holds the actual DNS records and returns the answer. Common DNS record types A: maps a hostname to an IPv4 address. AAAA: maps a hostname to an IPv6 address. MX: mail exchange — where to deliver email for the domain. CNAME: alias — points one hostname to another. TXT: arbitrary text — used for SPF, DKIM, domain verification. DNS security: DNS queries are plaintext by default — anyone on the network can see what sites you visit. DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt DNS queries. DNSSEC adds cryptographic signatures to prevent DNS spoofing.

DNS quiz

An attacker poisons a recursive resolver’s cache to return a malicious IP for a bank’s domain. What attack is this?

  • DNS amplification
  • DNS cache poisoning
  • DNS tunneling
  • BGP hijacking

Answer: DNS cache poisoning
DNS cache poisoning injects false records into a resolver’s cache, redirecting users to attacker-controlled servers.

Which DNS record type specifies the mail server for a domain?

  • A
  • CNAME
  • MX
  • TXT

Answer: MX
MX (Mail Exchange) records tell email servers where to deliver mail for a domain.


Previous lesson: Default gateway and routing tables
Back to Networking Fundamentals
Next lesson: DHCP and IP assignment