March 7, 2019

How does DNS work?

Everybody uses DNS with a basic web-browser; professionally, I’ve used DNS with typical command line tools like curl. But I never fully understood how it works. Here’s a brief review.

Reading: How Domain Name Servers Work.

Notes:

  • DNS stands for “Domain Name System”, a protocol within the TCP/IP protocol suite
  • the purpose of DNS is to convert domain names to an IP address
  • computers use IP addresses to communicate over the network
  • humans use domain names to access resources through various client tools (eg. Firefox)
  • users connecto to a domain name server (aka domain server or name server) that manages a database of mappings from domain to IP
  • the process for looking up an IP from DNS is called “DNS resolution”
  • modems or routers usually provide configuration of DNS servers for use during resolution

I’m not particularly interested in the business logic of DNS servers (for now), so I’ve skipped much of that section in the article. The real useful part for me comes from the dictionary of terms usually seen on a provider like Cloudflare:

  • A (host) record maps IP to hostname
  • CNAME (canonical) record aliases a domain, redirecting to a host
  • MX (mail exchange) record maps email traffic to specific mailserver server
  • NS (name server) record (“basically”) tells other DNS servers that this server is ultimate SOA

The SOA or start of authority managed internally by providers like Cloudflare. For my purposes, I don’t need to know much about it, but I’ll add it to my list of questions.

Content by © Jared Davis 2019-2020
Theme by © Emir Ribic 2017-2020

Powered by Hugo & Kiss.