15-441 Computer Networking
15-441 Computer Networking
15-441 Computer Networking
Lecture 13 – DNS
Outline
• DNS Design
• DNS Today
• Doesn’t scale!
Identification Flags
12 bytes No. of Questions No. of Answer RRs
RRs in response
to query Answers (variable number of resource records)
Records for
authoritative Authority (variable number of resource records)
servers
• Identification
• Used to match up request/response
• Flags
• 1-bit to mark query or response
• 1-bit to mark authoritative or not
• 1-bit to request recursive resolution
• 1-bit to indicate support for recursive resolution
FOR IN class:
• Type=A • Type=CNAME
• name is hostname • name is an alias name for some
• value is IP address “canonical” (the real) name
• Type=NS • value is canonical name
• name is domain (e.g. foo.com) • Type=MX
• value is name of authoritative name • value is hostname of mailserver
server for this domain associated with name
• Responsible for
“root” zone
• Approx. 13 root
name servers
worldwide
• Currently {a-
m}.root-servers.net
• Local name servers
contact root
servers when they
cannot resolve a
name
• Configured with
well-known root
servers
Lecture 13: 02-22-2005 15
Servers/Resolvers
ns1.cmu.edu
Local DNS server
Client
DNS server
ns1.cs.cmu.edu
DNS
server
ns1.cmu.edu
Local DNS server
Client
DNS server
ns1.cs.cmu.edu
DNS
server
cmu.edu
Local DNS server
Client
DNS server
cs.cmu.edu
DNS
server
unnamed root
• Task
• Given IP address, find its name
arpa edu
• Method
• Maintain separate hierarchy based
in-addr
on IP names
cmu
• Write 128.2.194.242 as
242.194.128.2.in-addr.arpa
• Why is the address reversed?
128 cs
• Managing
2
• Authority manages IP addresses
cmcl assigned to it
194
• E.g., CMU manages name space
128.2.in-addr.arpa
kittyhawk
242
128.2.194.242
Lecture 13: 02-22-2005 24
.arpa Name Server Hierarchy
chia.arin.net
128 (dill, henna, indigo, epazote, figwort, ginseng)
cucumber.srv.cs.cmu.edu,
2 t-ns1.net.cmu.edu
t-ns2.net.cmu.edu
mango.srv.cs.cmu.edu
194
(peach, banana, blueberry)
• DNS Design
• DNS Today
• Dig Program
• Allows querying of DNS system
• Use flags to find name server (NS)
• Disable recursion so that operates one step at a time
;; AUTHORITY SECTION:
edu. 172800 IN NS L3.NSTLD.COM.
edu. 172800 IN NS D3.NSTLD.COM.
edu. 172800 IN NS A3.NSTLD.COM.
edu. 172800 IN NS E3.NSTLD.COM.
edu. 172800 IN NS C3.NSTLD.COM.
edu. 172800 IN NS F3.NSTLD.COM.
edu. 172800 IN NS G3.NSTLD.COM.
edu. 172800 IN NS B3.NSTLD.COM.
edu. 172800 IN NS M3.NSTLD.COM.
;; AUTHORITY SECTION:
cmu.edu. 172800 IN NS CUCUMBER.SRV.cs.cmu.edu.
cmu.edu. 172800 IN NS T-NS1.NET.cmu.edu.
cmu.edu. 172800 IN NS T-NS2.NET.cmu.edu.
;; AUTHORITY SECTION:
cs.cmu.edu. 86400 IN NS MANGO.SRV.cs.cmu.edu.
cs.cmu.edu. 86400 IN NS PEACH.SRV.cs.cmu.edu.
cs.cmu.edu. 86400 IN NS BANANA.SRV.cs.cmu.edu.
cs.cmu.edu. 86400 IN NS BLUEBERRY.SRV.cs.cmu.edu.
;; AUTHORITY SECTION:
cs.cmu.edu. 300 IN SOA QUASAR.FAC.cs.cmu.edu.