Skip to the content ForoHackers
Log inJoin

DNS: start here

DNS
#667 · Ophuscado · · Report

The Domain Name System turns names people can remember into the records machines need: addresses, mail servers, verification text. It is a distributed, hierarchical database queried billions of times a day, and when it breaks, everything looks broken at once.

Key concepts

  • Hierarchy and delegation: the root delegates to top-level domains, which delegate to zones run by their owners.
  • Resolution: a stub resolver asks a recursive resolver, which walks root, TLD and authoritative servers and caches the answer.
  • Records: A and AAAA for addresses, CNAME for aliases, MX for mail, NS for delegation, TXT for free text.
  • Caching and TTL: every answer carries a time to live; caching makes DNS fast and changes slow to spread.
  • DNSSEC: signatures that let a resolver check an answer was not altered.

Vocabulary

  • Zone: the part of the namespace one set of servers is responsible for.
  • Authoritative server: the one that holds the real data for a zone.
  • Recursive resolver: the server that does the lookup work for clients.
  • Glue record: an address given with a delegation so a name server can be found.
  • NXDOMAIN: the answer meaning the name does not exist.

What to study, in order

  1. Query names with dig and read each section of the reply.
  2. Trace a lookup from the root down by asking each server in turn.
  3. Run your own authoritative server and a resolver on a lab network, with a zone you write by hand.
  4. Capture DNS traffic and see UDP, TCP fallback and the encrypted transports.
  5. Study TTLs and caching behaviour, then how DNSSEC signs and validates a zone.

Related tags

#tcp-ip #network-administration #email-servers #network-security

Log in or join to reply.