DNS/DNSSEC Workshop
DNS/DNSSEC Workshop
DNS/DNSSEC Workshop
DNS Refresher
This document is a result of work by the Network Startup Resource Center (NSRC at http://www.nsrc.org). This document may be freely
copied, modified, and otherwise re-used on the condition that any re-use acknowledge the NSRC as the original source.
Overview
What is DNS ?
System to convert names to IP addresses:
nsrc.org. => 128.223.157.19
www.afrinic.net. => 2001:42d0::200:80:1
What is DNS ?
Other information can be found in DNS:
where to send mail for a domain
who is responsible for this system
geographical information
etc
A DNS query
Resolver configuration
So how does your computer know which server to
ask to get answers to DNS queries ?
On UNIX, look in /etc/resolv.conf
dig output
Some interesting fields:
flags section: qr aa ra rd
status
answer section
authority section
TTL (numbers in the left column)
query time
server
Record types
Basic record types:
A, AAAA:
NS:
MX:
CNAME:
(alias)
PTR:
Caching vs Authoritative
In the dig output, and in subsequent outputs,
we noticed a decrease in query time if we
repeated the query
Answers are being cached by the querying
nameserver, to speed up requests and save
network resources
The TTL value controls the time an answer
can be cached
DNS servers can be put in two categories:
caching and authoritative
Caching vs Authoritative:
authoritative
Authoritative servers typically only answer
queries for data over which they have
authority
i.e. data for which they have an external copy,
from disk (file or database)
Caching vs Authoritative:
caching
Caching nameservers act as query
forwarders on behalf of clients, and cache
answers for later.
Can be the same software (often is), but
mixing functionality (recursive/caching and
authoritative) is discouraged (security risks +
confusing)
The TTL of the answer is used to determine
how long it may be cached without requerying.
TTL values
TTL values decrement and expire
Try repeatedly asking for the A record for
www.yahoo.com:
# dig www.yahoo.com
SOA
Let's query the SOA for a domain:
# dig SOA <domain>
...
;; AUTHORITY SECTION:
<domain>. 860 IN SOA ns.<domain>. root.<domain>.
200702270
; serial
28800
; refresh
14400
; retry
3600000
; expire
86400
; neg ttl
...
SOA
The two fields highlighted are:
ns.<domain>
the SOA (Start Of Authority), which the
administrator sets to the name of the source
server for the domain data (this is not always the
case)
root.<domain>
the RP (Responsible Person), which is the email
address (with the first @ replaced by a '.') to
contact in case of technical problems.
SOA
The other fields are:
serial: the serial number of the zone: this is used
for replication between two nameservers
refresh: how often a replica server should check
the master to see if there is new data
retry: how often to retry if the master server fails
to answer after refresh.
expire: when the master server has failed to
answer for too long, stop answering clients about
this data.
Delegation
We mentioned that one of the advantages of
DNS was that of distribution through shared
administration. This is called delegation.
We delegate when there is an administrative
boundary and we want to turn over control of
a subdomain to:
a department of a larger organization
an organization in a country
an entity representing a country's domain
Delegation
Conclusion
DNS is a vast subject
It takes a lot of practice to pinpoint problems
accurately the first time caching and
recursion are especially confusing
Remember that there are several servers for
the same data, and you don't always talk to
the same one
Practice, practice, practice!
Don't be afraid to ask questions...
Questions?