Overview
-
Define: a distributed, hierarchical database
-
Run on UDP
-
Hierarchy:
-
Three classes of DNS servers:
- root server
- TLD (Top-level domain) server
- authoritative server
Resource record (RR)
-
A resource record is a four-tuple that contains the following fields:
(Name, Value, Type, TTL)
Type
A
: provides the standard hostname-to-IP address mapping (IPv4)Name
: a hostnameValue
: IP for the hostname
AAAA
(IPv6)CNAME
:Value
is a canonical hostname for the alias hostnameName
NS
:Name
: a domainValue
: the hostname of an authoritative DNS server for this domain
name | type | value |
---|---|---|
bu.edu | A (IPv4) | 127.128.3.10 |
bu.edu | AAAA (IPv6) | |
www.akamai.com | CNAME | www.akami.com.edgekey.net |
bu.edu | NS | ns1.bu.edu |
DNS server categories
DNS root nameserver
- Provide:
(.edu, NS, TLD)
(TLD, A, TLD-IP)
- Job: maintain information for all the domain names that share a common domain extension (.com, .xyz, .net)
TLD nameserver
- Provide (edu TLD server):
(bu.edu, NS, auth)
(auth, A, auth-IP)
Authoritative nameserver
- Run and Maintain by universities and organizations which hold mapping from hosts to IP addresses
- Provide:
(bu.edu, A, bu.edu-IP)
DNS name resolution
- once (any) name server learns mapping, it caches mapping
- cache entries timeout (disappear) after some time (TTL)
🟡 Attention
DNS procedure: 问路但不带路
🔴 Caution
Why DNS system sends back both the
NS
record and theA
record?Because IP changes frequently while the domain name never changes.
It is more caching efficient, since including both the
NS
andA
records helps reduce the number of query. By receiving the both, it is more efficient to updateA
records.