Professional Documents
Culture Documents
ALTTC/ DX Faculty 1
ALTTC/ DX Faculty 1
ALTTC/ DX Faculty 1
Introduction
The Domain Name System, Or DNS , is a distributed
database that is used by TCP/IP applications to map
between the host- names and IP addresses
Provides electronic mail routing information.
We use the term distributed because no single site on the
Internet knows all the information.
Each site (University department, Campus, Company ,
or department within a company, for example ) \
maintains its own database of information and runs
a server program that other systems across the
Internet (clients) can query.
The DNS Provides the protocol that allows client and
servers to communicate with each other.
ALTTC/ DX Faculty
Introduction
Initially Host name to address mappings were
maintained by the Network Information Centre(NIC) in
a single file (HOST.TXT) which was FTPed by all
hosts(RFC-952,953)
The total network bandwidth consumed in
distributing a new version by this scheme is
proportional to the square of the number of hosts in
the network.
When multiple levels of FTP are used, the outgoing
FTP load on the NIC host is considerable.
Explosive growth in the number of hosts didnt bode
well for the future.
ALTTC/ DX Faculty
Introduction
The Network population was also Changing in
Characte
The timeshared hosts that made up the
original ARPANET were being replaced with
local networks of workstations.
Local organizations were administering their
own names and addresses, but had to wait
for the NIC to change HOSTS>TXT to make
changes visible to the Internet at large.
Organizations also wanted some local
structure on the name space.
ALTTC/ DX Faculty
Introduction
The result was several ideas about name
spaces and their management
The proposal varied, but a common
thread was the idea of a Hierarchical
name space
With the hierarchy roughly corresponding
to the organizational structure and
names using . as the character to mark
the boundary between hierarchy level
ALTTC/ DX Faculty
DNS Components
DNS does much more than the name -toaddress resolution. It basically comprises of
the following components :
Domain Name Space and Resource Records
Name Servers
Resolvers
ALTTC/ DX Faculty
ALTTC/ DX Faculty
ALTTC/ DX Faculty
in
Perdue .edu node
org
edu
com
perdue
Perdue.edu Domain
10
edu
org
in
Ca.in node
ca
hs
com
In domain
Ca .in domain
11
In Zone
us
in
ab
on
qb
In domain
12
in
bc
qb
ab
sk
on
In zone
13
Name servers
The programs that keep information about the domain
name space are called name servers.
These are workstations that contain a database of
information about hosts in zones.
This information can be about well-known services ,
mail exchanger, or host information.
Name servers know the parts of the domain tree for for
which they have complete information
A name server is said to be an authority for these
parts of name space.
An authoritative Name Server has complete
information about the part of the domain name space it
is responsible for.
ALTTC/ DX Faculty
14
ALTTC/ DX Faculty
15
ALTTC/ DX Faculty
16
Resolvers
These are programs that send request
over the network to servers on behalf of
the users (I.e they are the programs that
extract information from name servers in
response to client requests).
Resolvers must be able to access at
least one name server and use that
name servers information to answer a
query directly, or pursue the query using
referrals to other name servers.
ALTTC/ DX Faculty
17
Resolvers (contd)
A resolver will typically be a system routine
that is directly accessible to user programs
Hence no protocol is necessary between the
resolver and the user program.
When a DNS server responds to a resolver,
the requester attempts a connection to host
using IP address not the name.
The resolver is the client portion of the DNS.
The resolver is the library of routines called by
applications when they want to translate
(resolve) a DNS name.
ALTTC/ DX Faculty
18
Resolvers (contd)
Resolver handles :
Querying a Name server
Interpreting responses (which may
be RRs or error)
Returning information to the
program that requested it
ALTTC/ DX Faculty
19
Resolvers (contd)
User Machine
Application
program
Name server
Domain Name
server
R
e
s
o
l
v
e
r
Resolver
Functioning of Resolver
ALTTC/ DX Faculty
20
DNS Structure
Root
First level
domains com
Second level
domains
edu
gov
noao
tuc
int
mil
net
org
au
in
us
nic
alttc
sun
21
ALTTC/ DX Faculty
22
ALTTC/ DX Faculty
23
ALTTC/ DX Faculty
24
Delegation
An organization administering a domain can
divide it into subdomains.
Each of those subdomains
can
be
delegated to other organizations.
And the organizations delegated to become
responsible for all the data, and can even
subdivide
their subdomains into more
subdomains and delegate those.
The parent
domain contains only pointers
to sources of the subdomains data so that
it can refer queries there.
ALTTC/ DX Faculty
25
Delegation (contd)
If a subdomain of the domain is not
delegated away, the zone contains the
domain names and data in the
subdomain.
So bc.in and sk.in subdomains may exist
but not delegated.
Here the zone in contains bc.in snd sk.in
but not the other in domains, i.e. the
subdomains on.in &qb.in will have their
own name servers.
ALTTC/ DX Faculty
26
ALTTC/ DX Faculty
27
28
29
30
Query functions
There are two types of queries issued :
1. Recursive
2. Iterative
ALTTC/ DX Faculty
31
ALTTC/ DX Faculty
32
Query Types
Query host.jj.com
Response Cant find it
Iterative Query
Query host.jj.com
jj.com
Res. Ip Address
Recursive query
ALTTC/ DX Faculty
Host.jj.com
33
Root server
Query labhost.bnr.ca.us
Query labhost.bnr.ca.us
.us server
Ip address of labhost.bnr.ca.us
Query labhost.bnr.ca.us
Recursive Query
Iterative query
.ca.us server
Query labhost.bnr.ca.us
Ip address of labhost.bnr.ca.us Bnr.ca.us server
ALTTC/ DX Faculty
34
Caching
The cost for lookup for non-local names can
be extremely high if resolvers send each
query to the root server.
Even if queries go directly to the server that
has authority for the name, name look up can
present heavy load on the Internet.
Internet domain name servers use name
caching to optimize search costs.
Severs report cached information to clients ,
but mark it as non authoritative binding.
The local server also sends the IP address of
authoritative server for that name.
ALTTC/ DX Faculty
35
Caching (contd)
If efficiency is important the client will
choose to accept the non authoritative
answer and proceed.
If accuracy is important, the client will
choose to contact the authority and verify
that binding between name and address
is still valid.
ALTTC/ DX Faculty
36
Caching (contd)
The TTL is the amount of time that any name
server is allowed to cache the data. After the
expiry of TTL the name server must discard
the cached data and get new data from the
authoritative name server.
Value of TTL is a Trade off between
consistency and performance.
Small TTL means more consistent data but
lengthening of resolution time.
Large TTL will shorten the resolution time but
data may be inconsistent.
ALTTC/ DX Faculty
37
31
15 16
Identification
Flags
Number of Questions
Variable Length
Questions
Answers
(Variable number of resource records)
Authority
(Variable number of resource records)
Additional Information
(Variable number of resource records)
General Format of DNS Queries and Responses
ALTTC/ DX Faculty
38
ALTTC/ DX Faculty
AA
TC
RD
RA
(zero)
3
rcode
4
39
40
41
ALTTC/ DX Faculty
42
i 3
Query Class
t u c 4 n o a o 3 e d
u u0
ALTTC/ DX Faculty
43
A
NS
CNAME
PTR
MX
AFXR
Numeric
1
2
5
12
15
255
Description
IP Address
Name Server
Canonical Name
Pointer Record
Mail Exchange Record
Request for Zone Transfer
Query Class
For IP Networks it is always 1
ALTTC/ DX Faculty
44
Domain Name
Type
Class
Time to Live
ALTTC/ DX Faculty
45
ALTTC/ DX Faculty
46