Understanding the Domain Name System (DNS)

  • DNS, short for Domain Name System, is a hierarchical naming system connecting domain names to IP addresses.
  • Components: DNS consists of three key parts: the namespace, name servers, and resolvers.
  • Namespace: The DNS namespace is composed of domains, including root and top-level domains (TLDs) like .com, .edu, etc.
  • Second Level Domains: These include names like Yahoo, Amazon, and PBS. LinkedIn is also a second-level domain.
  • Subdomains: Situated under second-level domains, subdomains are versatile and can be structured deeply.
  • Name Servers: Used for query distribution within DNS namespace, each containing data about specific domains.
  • Resolvers: Client-side programs generating DNS queries; they initiate resolution processes.
  • Resolution Process: Query begins inside DNS namespace, can start at ISP or specific DNS server. If needed, queries are forwarded until resolved.
  • Referrals: Resolvers manage query referrals, processing requests even from unrelated clients.
  • DNS Caching: Servers store resolved host names and IP addresses to expedite future queries.
  • Time to Live (TTL): Cached data has a lifespan; entries are deleted after a set time.
  • Query Types: DNS queries are classified into three types: recursive, iterative, and non-recursive.
  • Recursive Query: DNS server handles entire resolution process; caches and forwards as needed.
  • Iterative Query: DNS server sends query to other servers, compiles responses, and returns results.
  • Non-Recursive Query: Resolver already has answer, either from cache or authoritative server.
  • DNS Request Flow: Client query sent to ISP, which sends a recursive query to root server. Root server directs ISP to relevant domain server. The process continues iteratively until resolution, ensuring users access desired websites.