DNS
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
| Type | Stands for | Name entry | Value entry |
|---|---|---|---|
| A | address | hostname | IP address |
| NS | name server, for a domain | domain ie. nus.edu.sg | hostname of DNS server ie. ns2.nus.edu.sg |
| CNAME | canonical name, alias for a real name | alias ie. www.comp.nus.edu.sg | real name ie. www0.comp.nus.edu.sg |
| MX | mail exchange | email domain ie. @ nus.edu.sg | hostname of mail server |
DNS servers
- distributed and hierarhical

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