Domain Name Systems

Table of Contents

1 How DNS works:

When a request is made from the browser1, 2, 3:

  1. Browser checks its own cache
  2. Browser asks OS, OS checks its own cache
  3. OS asks Resolver (DNS recursive resolver):
    • Domain Name Server in network setting
    • Usually provided by ISP, or 1.1.1.1 or google's 8.8.8.8
  4. Resolver checks local cache, if not present contacts root nameserver
  5. root server returns Top Level Domain (TLD) DNS Server to the resolver
    • TLD: .com, .org
  6. Resolver contacts TLD, TLD returns IP of domain's nameserver
    • Example: nameserver of example.com
    • Nameservers are also called as authoritative name server because they don't need to ask for IP to any other server
    • Multiple nameservers for load balancing, fault tolerance
  7. Resolver contacts the Nameserver (NS), NS returns IP of example.com
    • If query is for subdomain, then authoritative nameserver will give IP of additional authoritative nameserver
  8. Resolver returns IP to the OS, OS to the browser
  9. Browser contacts the website

1.1 Authoritative DNS vs Recursive DNS Resolver

  • Recursive resolver is at the beginning of the DNS query
  • Authoritative nameserver is at the end of the DNS query

1.2 In Short

  • -> contacts
  • <- returns
  • Table:

    Requester Server Request Response
    User Browser goto example.com  
    Browser OS IP of example.com  
    OS Resolver IP of example.com  
    Resolver root IP of .com IP of .com TLD
    Resolver .com TLD IP of example.com IP of NS of example.com
    Resolver NS IP of example.com IP of example.com
    OS Resolver   IP of example.com
    Browser IP HTTP request 200 OK

2 TODO DNS Records4

Name Details
A  
AAAA  
CNAME  
MS  

Footnotes:

Author: Anurag Peshne

Created: 2019-03-22 Fri 22:13

Emacs 26.1 (Org mode 9.2.1)

Validate