Session Twenty Eight
Download
Report
Transcript Session Twenty Eight
Chapter 9:
Domain Name Servers
Networking
CS 3470, Section 1
DNS: Domain Name System
Major goals
Map hostname to IP address
Map IP address to hostname
Also provides other services
Host aliasing – multiple names for one server
MX records (Mail eXchanger) – indicate mail
servers for a domain
Load balancing – many IP addresses
associated with a hostname
2
Distributed, Hierarchical Database
DNS is implemented as a distributed
hierarchical database
Root DNS Servers
com DNS servers
yahoo.com
amazon.com
DNS servers DNS servers
org DNS servers
pbs.org
DNS servers
edu DNS servers
uni.edu
DNS servers
fsu.edu
DNS servers
3
Distributed, Hierarchical Database
Root DNS servers know information for each
top-level domain
The Internet domain is partitioned into
multiple top-level domains
Root DNS Servers
com DNS servers
yahoo.com
amazon.com
DNS servers DNS servers
org DNS servers
pbs.org
DNS servers
edu DNS servers
uni.edu
DNS servers
fsu.edu
DNS servers
4
Distributed, Hierarchical Database
Below the top-level domain, there are more
specific domain names for different
organizations
Root DNS Servers
com DNS servers
yahoo.com
amazon.com
DNS servers DNS servers
org DNS servers
pbs.org
DNS servers
edu DNS servers
uni.edu
DNS servers
fsu.edu
DNS servers
5
DNS: Root Name Servers
Contacted by local name server that cannot
resolve name
Root name server:
Contacts authoritative name server if name
mapping not known
Gets mapping
Returns mapping to
local name server
6
TLD and Authoritative Servers
Top-level domain (TLD) servers: responsible
for com, org, net, edu, etc, and all top-level
country domains cn, ca, fr, jp, uk etc.
Ex: Network solutions maintains servers for com
TLD
Authoritative DNS servers: organization’s
DNS servers, providing authoritative
hostname to IP mappings for organization’s
servers (e.g., Web and mail).
Can be maintained by organization or service
provider
7
Local Name Server
Each ISP (residential ISP, company,
university) has one.
Also called “default name server”
When a host makes a DNS query, query is
sent to its local DNS server
Acts as a proxy, forwards query into hierarchy.
8
Iterative Queries
root DNS server
2
3
4
iterated query:
contacted server replies with
name of server to contact
“I don’t know this name, but
ask this server”
TLD DNS server
5
local DNS server
dns.poly.edu
1
8
requesting host
7
6
authoritative DNS server
dns.cs.umass.edu
cis.poly.edu
gaia.cs.umass.edu
9
Recursive Queries
root DNS server
2
3
7
recursive query:
6
TLD DNS server
puts burden of name resolution
on contacted name server
heavy load?
local DNS server
dns.poly.edu
1
5
4
8
requesting host
authoritative DNS server
dns.cs.umass.edu
cis.poly.edu
gaia.cs.umass.edu
10
Combination of Query Types
root DNS server
2
In reality, we can see a
combination of iterative and
recursive queries
3
TLD DNS Server
4
7
local DNS server
dns.poly.edu
1
6
5
8
requesting host
authoritative DNS server
dns.cs.umass.edu
cis.poly.edu
gaia.cs.umass.edu
11
DNS: Caching and Updating
Records
Once (any) name server learns mapping, it
caches mapping
cache entries timeout (disappear) after some time
TLD servers typically cached in local name
servers
Thus root name servers not often visited
12
DNS Records
We can think of dns as a distributed db storing resource records (RR)
RR format: (name, value, type, class, ttl)
• Type=A
name is hostname
value is IP address
• Type=NS
name is domain (e.g.
foo.com)
value is IP address of
authoritative name server
for this domain
• Type=CNAME
name is alias name for some
“canonical” (the real) name
www.ibm.com is really
servereast.backup2.ibm.com
value is canonical name
• Type=MX
value is name of mail server associated
with name
13
Other Information
DNS uses UDP to exchange information
Query is initiated from system calls like
gethostbyname and gethostbyaddr.
14
Host Configurations
Two options
Configure DNS manually – manually configure
the name/IP address pairs for each host (usually
done in a configuration file like “/etc/hosts”)
DHCP – Get your local name server address
from a dhcp server (along with your IP address
and other routing information)
15