NetworkTools
Sign In
1DNS2DHCP3HTTP4SNMP5NTP6Syslog
← Back to Application Layer

Learning Objectives

  • Explain the role of DNS in translating domain names to IP addresses
  • Identify the major DNS record types and their purposes
  • Trace the steps in a recursive DNS resolution
  • Understand how caching improves DNS performance

The Phonebook of the Internet

Every device on the internet is reached by an IP address. But humans don't remember strings of numbers — we remember names like google.com or github.com. The Domain Name System (DNS) bridges this gap. It translates human-readable domain names into machine-readable IP addresses.

Without DNS, you'd browse the web by typing 142.250.80.46 instead of google.com. DNS works transparently in the background, resolving billions of queries every day with near-instant speed.

DNS Resolution

DNS Record Types

DNS records come in several types, each serving a different purpose. The most common ones are A (IPv4 address), AAAA (IPv6 address), CNAME (alias), MX (mail server), TXT (arbitrary text), and NS (nameserver).

Match each DNS record type with its primary function.

Left
matches to
Right
Left
matches to
Right
Left
matches to
Right
Left
matches to
Right
Left
matches to
Right
Left
matches to
Right
Attempts: 0

How DNS Resolution Works

When you type a domain into your browser, the operating system first checks its local hosts file (/etc/hosts on Linux/macOS, C:\Windows\System32\drivers\etc\hosts on Windows). If no match is found, it sends the query to the DNS resolver configured on your network interface.

Your ISP or a public resolver like Google (8.8.8.8) or Cloudflare (1.1.1.1) receives the query. If the resolver doesn't have the answer cached, it begins a recursive lookup starting at the root zone. There are 13 logical root server zones (operated by organizations like Verisign, ICANN, and NASA) that know where to find every Top-Level Domain (TLD) server.

The resolver asks the root which servers handle .com, then asks the .com TLD servers where example.com is delegated, and finally asks example.com's authoritative nameservers for the actual IP address. The answer is then cached at every level — your browser, OS, and resolver all store the result for the record's Time-To-Live (TTL) duration.

Caching and Performance

DNS caching is what makes the system fast. Without caching, every single request would traverse the full resolution chain. TTL values range from 30 seconds (for load-balanced services) to 86400 seconds (24 hours) for stable records. When a resolver caches a response, it serves subsequent queries directly from cache for the TTL duration. This drastically reduces latency and offloads authoritative servers.

What is the correct order of servers contacted in a recursive DNS resolution starting from an empty cache?

Which DNS record type is used to point one domain to another domain (not an IP address)?

Key Takeaways

  • DNS translates human-readable domain names into IP addresses
  • Resolution follows a hierarchical chain: Root → TLD → Authoritative nameserver
  • Record types (A, AAAA, CNAME, MX, NS, TXT) serve different purposes
  • Caching at every level makes DNS fast — TTL controls cache duration
  • Public resolvers like 8.8.8.8 and 1.1.1.1 handle billions of queries daily
NextDHCP