3. 25
25-
-1 NAME SPACE
1 NAME SPACE
T
T b
b bi
bi th
th i d
i d t
t hi
hi
To
To be
be unambiguous,
unambiguous, the
the names
names assigned
assigned to
to machines
machines
must
must be
be carefully
carefully selected
selected from
from a
a name
name space
space with
with
l t
l t t l
t l th
th bi di
bi di b t
b t th
th
complete
complete control
control over
over the
the binding
binding between
between the
the names
names
and
and IP
IP addresses
addresses.
.
Flat Name Space
Topics discussed in this section:
Topics discussed in this section:
Hierarchical Name Space
25.3
4. 25
25-
-2
2 DOMAIN NAME SPACE
DOMAIN NAME SPACE
T
T h
h hi hi l
hi hi l d i
d i
To
To have
have a
a hierarchical
hierarchical name
name space,
space, a
a domain
domain name
name
space
space was
was designed
designed.
. In
In this
this design
design the
the names
names are
are
d fi d
d fi d i
i i d
i d i h
i h h
h
defined
defined in
in an
an inverted
inverted-
-tree
tree structure
structure with
with the
the root
root at
at
the
the top
top.
. The
The tree
tree can
can have
have only
only 128
128 levels
levels:
: level
level 0
0
( )
( ) l l
l l 127
127
(root)
(root) to
to level
level 127
127.
.
Label
Topics discussed in this section:
Topics discussed in this section:
be
Domain Name
Domain
25.4
9. 25
25-
-3
3 DISTRIBUTION OF NAME SPACE
DISTRIBUTION OF NAME SPACE
The
The information
information contained
contained in
in the
the domain
domain name
name space
space
The
The information
information contained
contained in
in the
the domain
domain name
name space
space
must
must be
be stored
stored.
. However,
However, it
it is
is very
very inefficient
inefficient and
and also
also
unreliable
unreliable to
to have
have just
just one
one computer
computer store
store such
such a
a huge
huge
unreliable
unreliable to
to have
have just
just one
one computer
computer store
store such
such a
a huge
huge
amount
amount of
of information
information.
. In
In this
this section,
section, we
we discuss
discuss the
the
distribution
distribution of
of the
the domain
domain name
name space
space
distribution
distribution of
of the
the domain
domain name
name space
space.
.
Hierarchy of Name Servers
Topics discussed in this section:
Topics discussed in this section:
Zone
Root Server
Primary and Secondary Servers
25.9
Primary and Secondary Servers
12. Note
A primary server loads all information
from the disk file; the secondary server
loads all information from
the primary server.
When the secondary downloads
i f ti f th i it i ll d
information from the primary, it is called
zone transfer.
25.12
13. 25
25-
-4
4 DNS IN THE INTERNET
DNS IN THE INTERNET
DNS
DNS is
is a
a protocol
protocol that
that can
can be
be used
used in
in different
different
DNS
DNS is
is a
a protocol
protocol that
that can
can be
be used
used in
in different
different
platforms
platforms.
. In
In the
the Internet,
Internet, the
the domain
domain name
name space
space
(tree)
(tree) is
is divided
divided into
into three
three different
different sections
sections:
: generic
generic
(tree)
(tree) is
is divided
divided into
into three
three different
different sections
sections:
: generic
generic
domains,
domains, country
country domains,
domains, and
and the
the inverse
inverse domain
domain.
.
Generic Domains
Topics discussed in this section:
Topics discussed in this section:
Country Domains
Inverse Domain
25.13
19. 25
25-
-5
5 RESOLUTION
RESOLUTION
Mapping
Mapping a
a name
name to
to an
an address
address or
or an
an address
address to
to a
a
name
name is
is called
called name
name-
-address
address resolution
resolution.
.
Topics discussed in this section
Topics discussed in this section
Resolver
Mapping Names to Addresses
Topics discussed in this section:
Topics discussed in this section:
Mapping Names to Addresses
Mapping Addresses to Names
Recursive Resolution
Caching
25.19
22. 25
25-
-6
6 DNS MESSAGES
DNS MESSAGES
DNS
DNS has
has two
two types
types of
of messages
messages:
: query
query and
and response
response
DNS
DNS has
has two
two types
types of
of messages
messages:
: query
query and
and response
response.
.
Both
Both types
types have
have the
the same
same format
format.
. The
The query
query message
message
consists
consists of
of a
a header
header and
and question
question records
records;
; the
the
consists
consists of
of a
a header
header and
and question
question records
records;
; the
the
response
response message
message consists
consists of
of a
a header,
header, question
question
records
records answer
answer records
records authoritative
authoritative records
records and
and
records,
records, answer
answer records,
records, authoritative
authoritative records,
records, and
and
additional
additional records
records.
.
Header
Topics discussed in this section:
Topics discussed in this section:
25.22
25. 25
25-
-7
7 TYPES OF RECORDS
TYPES OF RECORDS
A
A i
i S ti
S ti 25
25 6
6 t
t t
t f
f d
d
As
As we
we saw
saw in
in Section
Section 25
25.
.6
6,
, two
two types
types of
of records
records are
are
used
used in
in DNS
DNS.
. The
The question
question records
records are
are used
used in
in the
the
ti
ti ti
ti f
f th
th d
d
question
question section
section of
of the
the query
query and
and response
response messages
messages.
.
The
The resource
resource records
records are
are used
used in
in the
the answer,
answer,
th it ti
th it ti d
d dditi l
dditi l i f ti
i f ti ti
ti f
f
authoritative,
authoritative, and
and additional
additional information
information sections
sections of
of
the
the response
response message
message.
.
Q ti R d
Topics discussed in this section:
Topics discussed in this section:
Question Record
Resource Record
25.25
26. 25
25-
-8
8 REGISTRARS
REGISTRARS
How
How are
are new
new domains
domains added
added to
to DNS?
DNS? This
This is
is done
done
How
How are
are new
new domains
domains added
added to
to DNS?
DNS? This
This is
is done
done
through
through a
a registrar,
registrar, a
a commercial
commercial entity
entity accredited
accredited by
by
ICANN
ICANN A
A registrar
registrar first
first verifies
verifies that
that the
the requested
requested
ICANN
ICANN.
. A
A registrar
registrar first
first verifies
verifies that
that the
the requested
requested
domain
domain name
name is
is unique
unique and
and then
then enters
enters it
it into
into the
the
DNS
DNS database
database A
A fee
fee is
is charged
charged
DNS
DNS database
database.
. A
A fee
fee is
is charged
charged.
.
25.26
27. 25
25-
-9
9 DYNAMIC DOMAIN NAME
DYNAMIC DOMAIN NAME
SYSTEM (DDNS)
SYSTEM (DDNS)
The
The DNS
DNS master
master file
file must
must be
be updated
updated dynamically
dynamically.
.
The
The Dynamic
Dynamic Domain
Domain Name
Name System
System (DDNS)
(DDNS)
therefore
therefore was
was devised
devised to
to respond
respond to
to this
this need
need.
. In
In
DDNS,
DDNS, when
when a
a binding
binding between
between a
a name
name and
and an
an
address
address is
is determined,
determined, the
the information
information is
is sent,
sent, usually
usually
by
by DHCP
DHCP to
to a
a primary
primary DNS
DNS server
server.
. The
The primary
primary server
server
updates
updates the
the zone
zone.
. The
The secondary
secondary servers
servers are
are notified
notified
either
either actively
actively or
or passively
passively.
.
25.27
28. 25
25-
-10
10 ENCAPSULATION
ENCAPSULATION
DNS
DNS can
can use
use either
either UDP
UDP or
or TCP
TCP In
In both
both cases
cases the
the
DNS
DNS can
can use
use either
either UDP
UDP or
or TCP
TCP.
. In
In both
both cases
cases the
the
well
well-
-known
known port
port used
used by
by the
the server
server is
is port
port 53
53.
. UDP
UDP is
is
used
used when
when the
the size
size of
of the
the response
response message
message is
is less
less than
than
used
used when
when the
the size
size of
of the
the response
response message
message is
is less
less than
than
512
512 bytes
bytes because
because most
most UDP
UDP packages
packages have
have a
a 512
512-
-byte
byte
packet
packet size
size limit
limit If
If the
the size
size of
of the
the response
response message
message is
is
packet
packet size
size limit
limit.
. If
If the
the size
size of
of the
the response
response message
message is
is
more
more than
than 512
512 bytes,
bytes, a
a TCP
TCP connection
connection is
is used
used.
.
25.28
29. Note
DNS can use the services of UDP or TCP
i th ll k t 53
using the well-known port 53.
25.29