View on GitHub

cs-concepts

Understanding computer science concepts

Domain Name Systems (DNS)

DNS translates domain names to IP addresses so browsers can load Internet resources. [domain.com -> IP address]

Process of translation and lookup is called DNS resolution.

Basic DNS resolution steps:

  1. Browser checks in computer’s local DNS cache database for that domain name. Found? Skip to step 6. Not Found? Continue.
  2. Browser (www.example.com) -> DNS recursive resolver
  3. The resolver queries a DNS root nameserver. Root server responds to resolvers address of Top Level Domain (TLD) DNS server - like .com, .net - which stores information about its domains.
  4. Resolver makes request to .com TLD server. It responds to resolver with IP address of domain’s nameserver (example.com)
  5. Resolver sends a query to domain’s nameserver. It returns IP address of the domain to resolver.
  6. DNS Resolver responds to web browser with the IP address.
  7. Browser makes http request to IP address. Server at that IP returns web page to browser.

DNS server types

  1. Recursive resolver server
  2. Root name server - [reponds with .com .net server IP]
  3. TLD (Top Level Domain) server - [responds with domain.com IP]
  4. Authoritative name server - [reponds with server IP that will handle the request]

Common DNS records:

  1. A record - IPv4 address of a domain
  2. AAA record - IPv6 address of a domain
  3. CNAME record - forwards one domain or subdomain to another domain
  4. TXT record - lets an admin store text notes in the record

DNS caching

DNS security

Common attacks using DNS:

References: