DNS: From Concept to Implementation

DNS: From Concept to Implementation
Photo by Christina @ wocintechchat.com on Unsplash

General Overview

The Domain Name System (DNS) is the system that translates human‑readable domain names (e.g., example.com) into numeric IP addresses that machines can understand (e.g., 93.184.216.34). Without this abstraction layer, every user would have to memorize strings of numbers to reach a website or any other network service, which would be impractical at scale.

In practice, DNS works like a distributed, hierarchical, and resilient directory capable of answering billions of queries each day worldwide.

💡
DNS is the invisible pillar that makes modern navigation possible. Its hierarchical design, multitude of record types, and delegation mechanism (root → TLD → domain) deliver flexibility, scalability, and robustness. The RFC standards, maintained by the IETF, ensure controlled evolution (IPv6, DNSSEC, DoH/DoT) while preserving backward compatibility.

History: Creation Date and Creator

EventDateAuthor / Publication
First DNS specificationOctober 1983Paul V. Mockapetris, RFC 882 “Domain Names – Concepts and Facilities”
Implementation and specificationNovember 1983Paul V. Mockapetris, RFC 883 “Domain Names – Implementation and Specification”
Modern standardisation (RFC 1034/1035)November 1987Paul V. Mockapetris, RFC 1034 “Domain Names – Concepts and Facilities”, RFC 1035 “Domain Names – Implementation and Specification”

These documents laid the foundations of the hierarchical architecture, the iterative resolution model, and the various record types.


Why DNS?

  1. Readability – Humans remember words far better than numbers.
  2. Scalability – A single centralized directory would be a single point of failure; DNS spreads the load across thousands of servers.
  3. Flexibility – DNS records allow multiple services (web, mail, cloud, etc.) to point to different IP addresses, and they can be changed without touching client configurations.
  4. Redundancy & Fault Tolerance – Hierarchy and replication keep the system running even if a server or link goes down.

Core Principles

Hierarchical Architecture

root (.) → root name servers
      └─ TLD (com, org, net, fr, …) → TLD name servers
            └─ Second‑level domain (example.com) → authoritative name servers
                  └─ Sub‑domains (www.example.com, mail.example.com)
  • Root servers – 13 logical sets (a–m) distributed globally, each using Anycast to provide many physical instances.
  • TLD servers – Manage top‑level domains such as .com.fr.
  • Authoritative servers – Hold the definitive records for a domain (e.g., example.com).

Query Resolution

  1. Client (recursive resolver) contacts its local resolver (usually supplied by the ISP or a public DNS provider).
  2. If the resolver has no cached answer, it starts an iterative resolution:
    • Query a root server → receives the addresses of the relevant TLD servers.
    • Query the appropriate TLD server → receives the authoritative servers for the domain.
    • Query the authoritative server → receives the requested record.
  3. The resolver returns the answer to the client and caches it for the duration indicated by the TTL.

IPv4 and IPv6 in DNS

RecordDescriptionExample
AIPv4 address (32 bits)93.184.216.34
AAAAIPv6 address (128 bits)2606:2800:220:1:248:1893:25c8:1946
PTRReverse mapping (IP → name) – used for reverse lookups for both IPv4 and IPv6.34.216.184.93.in‑addr.arpa. (IPv4) / 6.4.9.1.c8.5c.52.89.3.91.84.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. (IPv6)

DNS was designed from the start to support both address families. Today most zones publish both A and AAAA records so that IPv4 and IPv6 clients can resolve the same name.


DNS Record Types (Packets)

TypePrimary FunctionTypical Use
AIPv4 addressWebsites, servers
AAAAIPv6 addressWebsites, IPv6 servers
CNAMECanonical aliasSub‑domain redirection
MXMail ExchangeMail servers
NSName ServerDeclares authoritative servers for a zone
SOAStart of AuthorityZone metadata (serial, refresh, retry, expire, minimum TTL)
TXTFree‑form textSPF/DKIM, domain verification
SRVService locatorService discovery (e.g., _sip._tcp.example.com)
PTRPointer (reverse)Reverse DNS lookup
DSDelegation SignerDNSSEC trust chain
DNSKEYPublic key (DNSSEC)Cryptographic validation
CAACertification Authority AuthorizationControls which CAs may issue TLS certificates

These records are defined in RFC 1035 and later extensions (e.g., RFC 7208 for SPF, RFC 8659 for CAA).


Role of Root Servers

  • Why this design?
    • Robustness – Limiting the number of entry points (13 logical sets) reduces synchronization risk while providing massive geographic redundancy via Anycast.
    • Performance – Root servers sit in high‑capacity data centers, ensuring minimal latency for the first resolution step.
    • Centralised management – The Root Server Management System (operated by ICANN) keeps the list of TLD server addresses consistent and up‑to‑date.
  • Current composition (2025) – 13 identifiers (A‑M), each potentially representing dozens of physical machines, totaling well over a thousand servers worldwide.
  • Major operators – Verisign, University of Maryland, NASA, RIPE NCC, JPRS, among others.

Registrars and Registries

LevelRoleExample Actors
RegistrarCommercial interface where domain owners register, renew, or modify zones.Gandi, OVHcloud, Namecheap, Proton Domains (via Proton)
RegistryOrganisation responsible for the technical operation of a TLD (zone updates, policy enforcement).Verisign (.com/.net), AFNIC (.fr), PIR (.org)
ICANNGlobal coordinating authority overseeing policies for registries and registrars.

Process – The owner purchases a domain from a registrar, which forwards the request to the registry of the chosen TLD. The registry updates the TLD zone, adding NS records that point to the domain’s authoritative name servers.


Key Standards and RFCs

RFC #TitleMain Subject
882Domain Names – Concepts and FacilitiesFirst DNS description
883Domain Names – Implementation and SpecificationInitial implementation details
1034Domain Names – Concepts and FacilitiesHierarchical architecture
1035Domain Names – Implementation and SpecificationMessage formats, record types
1912DNS Security Extensions (DNSSEC)Cryptographic authentication
2181Clarifications to the DNS SpecificationResponse validation rules
2308Negative Caching of DNS Queries (NXDOMAIN)Handling of negative cache entries
2671DNS Extensions to Support IPv6 (AAAA)IPv6 support
4033DNS Transport over TCP – Avoiding FragmentationUsing TCP for large responses
7208Sender Policy Framework (SPF) for Authorising Use of DomainsTXT‑record SPF
8659Certification Authority Authorization (CAA) Resource RecordCAA records
8802DNS over HTTPS (DoH)Privacy for DNS queries
8914DNS over TLS (DoT)Secure DNS transport

These documents form the normative backbone of the protocol and are periodically updated by the IETF.


Full Flow Synopsis (Example)

  1. User types www.example.com into a browser.
  2. Local resolver checks its cache. No entry → it initiates a recursive resolution.
  3. Query the root server (.) → receives the addresses of the .com TLD servers.
  4. Query a .com TLD server → receives the authoritative servers for example.com.
  5. Query the authoritative server → obtains the A (or AAAA) record for www.example.com.
  6. Resolver returns the IP address to the client and caches it for the TTL indicated in the SOA.
  7. Browser opens a TCP/HTTPS connection to the received IP address.

References

  1. Mockapetris, P. V. (1983). Domain Names – Concepts and Facilities, RFC 882.
  2. Mockapetris, P. V. (1983). Domain Names – Implementation and Specification, RFC 883.
  3. Mockapetris, P. V. (1987). Domain Names – Concepts and Facilities, RFC 1034.
  4. Mockapetris, P. V. (1987). Domain Names – Implementation and Specification, RFC 1035.
  5. Internet Engineering Task Force (IETF). (1995). DNS Security Extensions, RFC 1912.
  6. IETF. (2005). DNS Extensions to Support IPv6, RFC 2671.
  7. IETF. (2016). DNS over HTTPS (DoH), RFC 8484.
  8. IETF. (2020). DNS over TLS (DoT), RFC 7858.
  9. ICANN. Root Server System Overview. Available at https://www.icann.org/resources/pages/root-servers-2012-02-25-en.
  10. AFNIC. Gestion des domaines .fr. Available at https://www.afnic.fr.

Read more