DNS

Work in Progress

Concept

Domain Name System(DNS)

  • locate the end host the app wants to communicate with
  • translates hostname <-> IP address
  • uses UDP

Resource records(RR)

name    value    type    TTL
TypeStands forName entryValue entry
AaddresshostnameIP address
NSname server, for a domaindomain
ie. nus.edu.sg
hostname of DNS server
ie. ns2.nus.edu.sg
CNAMEcanonical name, alias for a real namealias
ie. www.comp.nus.edu.sg
real name
ie. www0.comp.nus.edu.sg
MXmail exchangeemail domain
ie. @nus.edu.sg
hostname of mail server

DNS servers

  • distributed and hierarhical

DNS_hierarchy.png

Root servers

  • 13 worldwide

Top level domain(TLD) servers

  • highest domain, ie. .com, .org, .net
  • country domains, ie. .sg, .fr

Authorirative servers

  • organization’s own DNS server
  • hostnames for internal hosts, that can be accessed from outside

Local DNS server

  • ISP, organization levels
  • caching:
    • may be out of date (best effort), won’t propagate changes until expiry
    • expire after some time (TTL)
  • queries:
    • recursive: root makes the request for you
    • iterative: root returns next DNS server, you request