Tech_Interview_Prep

DNS & DHCP

How devices get an IP address automatically, and how domain names get resolved into one.

What it is

DHCP automatically assigns IP addresses (and other network configuration) to devices joining a network; DNS resolves human-readable domain names into the IP addresses actually needed to route traffic — two foundational, often-invisible protocols most networking depends on.

Key points

  • DHCP lease process: a device requests an address, the DHCP server offers one from its available pool, and the device receives it for a lease duration — without DHCP, every device would need manual IP configuration, which doesn't scale.
  • DNS resolution chain: a query typically walks from a local resolver up through root, TLD, and authoritative name servers — understanding this chain is what makes DNS propagation delays and misconfigurations debuggable.
  • DNS caching and TTL: resolvers cache results for a time-to-live period set by the domain owner — a low TTL enables fast changes (e.g. during a migration) at the cost of more frequent lookups; a high TTL reduces load but slows how fast changes propagate.
  • Both protocols are extremely high-leverage failure points — when "the whole application is down" turns out to be a DNS or DHCP issue, it usually explains why it looked like everything failed at once.