0% found this document useful (0 votes)
59 views29 pages

ITEC310 Computer Networks II: Objectives

The document discusses the Domain Name System (DNS) which maps human-friendly domain names to IP addresses. DNS uses a hierarchical naming system to organize domain names with multiple levels, such as "www.example.com". This hierarchical structure allows decentralized control and management of domain name spaces. DNS acts as a client-server application that supports other applications by translating domain names to IP addresses behind the scenes.

Uploaded by

yawahab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views29 pages

ITEC310 Computer Networks II: Objectives

The document discusses the Domain Name System (DNS) which maps human-friendly domain names to IP addresses. DNS uses a hierarchical naming system to organize domain names with multiple levels, such as "www.example.com". This hierarchical structure allows decentralized control and management of domain name spaces. DNS acts as a client-server application that supports other applications by translating domain names to IP addresses behind the scenes.

Uploaded by

yawahab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

ITEC310

Computer Networks II

Chapter 25
Domain Name System

Department of Information Technology


Eastern Mediterranean University

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 2/57

Objectives
• After completing this chapter you should be able to
do the following:
– Discuss the Domain Name System (DNS) which is a
client/server application that provides name services
for other applications.
– Discuss how DNS enables the use of application
layer addresses, such as an e-mail address, instead
of network layer logical addresses.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

1
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 3/57

Introduction
• There are several applications in the application layer of
the Internet model that follow the client/server model.
• The client/server programs can be divided into two
categories:
– Those that can be directly used by the user, such as e-mail.
– Those that support other application programs.
• The Domain Name System (DNS) is a supporting
program that is used by other programs such as e-mail.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 4/57

Introduction
• Figure shows an example of how a DNS client/server program can
support an e-mail program to find the IP address of an e-mail recipient.
– A user of an e-mail program may know the e-mail address of the recipient;
however, the IP protocol needs the IP address.
– The DNS client program sends a request to a DNS server to map the e-mail
address to the corresponding IP address.

Figure 25.1 Example of using the DNS service


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

2
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution Flat Name Space
DNS Messages Hierarchical Name Space
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 5/57

Name Space
• The names assigned to machines must be unique because
the addresses are unique.
• A name space that maps each address to a unique name
can be organized in two ways:
– Flat
– Hierarchical

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution Flat Name Space
DNS Messages Hierarchical Name Space
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 6/57

Name Space
• In a flat name space, a name is assigned to an address.
• A name in this space is a sequence of characters without
structure.
• The main disadvantage of a flat name space is that it
cannot be used in a large system such as the Internet
because it must be centrally controlled to avoid ambiguity
and duplication.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

3
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution Flat Name Space
DNS Messages Hierarchical Name Space
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 7/57

Name Space
• In a hierarchical name space, each name is made of
several parts.
– The first part can define the nature of the organization, the
second part can define the name of an organization, the third
part can define departments in the organization, and so on.
• In this case, the authority to assign and control the name
spaces can be decentralized.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Label
Resolution
DNS Messages Domain Name
Types of Records Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 8/57

Domain Name Space


• To have a hierarchical name space, a domain name space
was designed.
– The names are defined in an inverted-tree structure with the
root at the top.
– The tree can have only 128 levels: level 0 (root) to level 127.

Figure 25.2 Domain name space


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

4
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Label
Resolution
DNS Messages Domain Name
Types of Records Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 9/57

Domain Name Space


• Each node in the tree has a label, which is a string with a
maximum of 63 characters.
– The root label is a null string (empty string).
• DNS requires that children of a node (nodes that branch from
the same node) have different labels, which guarantees the
uniqueness of the domain names.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Label
Resolution
DNS Messages Domain Name
Types of Records Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 10/57

Domain Name Space


• Each node in the tree has a domain name.
• A full domain name is a sequence of labels separated by
dots (.).
• The domain names are always read from the node up to the
root.
• A full domain name always ends in a null label, which means
the last character is a dot.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

10

5
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Label
Resolution
DNS Messages Domain Name
Types of Records Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 11/57

Domain Name Space


• Figure shows some
domain names.

Figure 25.3 Domain names and labels


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

11

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Label
Resolution
DNS Messages Domain Name
Types of Records Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 12/57

Domain Name Space


• If a label is terminated by a null string, it is called a fully qualified
domain name (FQDN).
– For example, the domain name
challenger.atc.fhda.edu.
• If a label is not terminated by a null string, it is called a partially
qualified domain name (PQDN).
– A PQDN starts from a node, but it does not reach the root.
– It is used when the name to be resolved belongs to the same site as
the client.
• For example, if a user at the fhda.edu. site wants to get the IP address of
the challenger computer, he or she can define the partial name
challenger.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

12

6
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Label
Resolution
DNS Messages Domain Name
Types of Records Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 13/57

Domain Name Space


• Figure shows some fully qualified domain names (FQDNs)
and partially qualified domain names (PQDNs).

Figure 25.4 FQDN and PQDN


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

13

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Label
Resolution
DNS Messages Domain Name
Types of Records Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 14/57

Domain Name Space


• A domain is a subtree of the domain name space.
– The name of the domain is the domain name of the node at the top of
the subtree.
• Figure shows some domains.
– A domain may itself be divided into domains (or subdomains).

Figure 25.5 Domains


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

14

7
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Hierarchy of Name Servers
Resolution Zone
DNS Messages Root Server
Types of Records
Registrars Primary and Secondary Servers
Dynamic Domain Name System (DDNS)
Encapsulation 15/57

Distribution of Name Space


• The information contained in the domain name space must
be stored.
• It is very inefficient and also unreliable to have just one
computer store such a huge amount of information.
– It is inefficient because responding to requests from all over
the world places a heavy load on the system.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

15

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Hierarchy of Name Servers
Resolution Zone
DNS Messages Root Server
Types of Records
Registrars Primary and Secondary Servers
Dynamic Domain Name System (DDNS)
Encapsulation 16/57

Distribution of Name Space


• The solution to these problems is to distribute the information among
many computers called DNS servers.
• Each server can be responsible for either a large or a small domain.
• We have a hierarchy of servers in the same way that we have a
hierarchy of names.

Figure 25.6 Hierarchy of name servers


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

16

8
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Hierarchy of Name Servers
Resolution Zone
DNS Messages Root Server
Types of Records
Registrars Primary and Secondary Servers
Dynamic Domain Name System (DDNS)
Encapsulation 17/57

Distribution of Name Space


• We can define a zone as a contiguous part of the entire tree.
• If a server accepts responsibility for a domain and does not
divide the domain into smaller domains, the domain and the zone
refer to the same thing.
– The server makes a database called a zone file and keeps all the
information for every node under that domain.
• If a server divides its domain into subdomains and gives part of
its authority to other servers, domain and zone refer to different
things.
– The information about the nodes in the subdomains is stored in the
servers at the lower levels, with the original server keeping some
sort of reference to these lower-level servers.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

17

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Hierarchy of Name Servers
Resolution Zone
DNS Messages Root Server
Types of Records
Registrars Primary and Secondary Servers
Dynamic Domain Name System (DDNS)
Encapsulation 18/57

Distribution of Name Space

Figure 25.7 Zones and domains


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

18

9
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Hierarchy of Name Servers
Resolution Zone
DNS Messages Root Server
Types of Records
Registrars Primary and Secondary Servers
Dynamic Domain Name System (DDNS)
Encapsulation 19/57

Distribution of Name Space


• A root server is a server whose zone consists of the whole
tree.
• A root server usually does not store any information about
domains but gives its authority to other servers, keeping
references to those servers.
• There are several root servers, each covering the whole
domain name space.
• The servers are distributed all around the world.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

19

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Hierarchy of Name Servers
Resolution Zone
DNS Messages Root Server
Types of Records
Registrars Primary and Secondary Servers
Dynamic Domain Name System (DDNS)
Encapsulation 20/57

Distribution of Name Space

c. Cogent, Herndon, VA (5 other sites)


d. U Maryland College Park, MD k. RIPE London (17 other sites)
h. ARL Aberdeen, MD
j. Verisign, Dulles VA (69 other sites ) i. Netnod, Stockholm (37 other sites)

e. NASA Mt View, CA m. WIDE Tokyo


f. Internet Software C. (5 other sites)
Palo Alto, CA (and 48 other sites)

a. Verisign, Los Angeles CA 13 root name


(5 other sites)
b. USC-ISI Marina del Rey, CA
“servers” worldwide
l. ICANN Los Angeles, CA
(41 other sites)
g. US DoD Columbus,
OH (5 other sites)

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

20

10
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Hierarchy of Name Servers
Resolution Zone
DNS Messages Root Server
Types of Records
Registrars Primary and Secondary Servers
Dynamic Domain Name System (DDNS)
Encapsulation 21/57

Distribution of Name Space


• DNS defines two types of servers: primary and secondary.
• A primary server is a server that stores a file about the zone for
which it is an authority.
– It is responsible for creating, maintaining, and updating the zone file.
• It stores the zone file on a local disk.
• A secondary server is a server that transfers the complete
information about a zone from another server (primary or
secondary) and stores the file on its local disk.
– The secondary server neither creates nor updates the zone files.
• If updating is required, it must be done by the primary server, which
sends the updated version to the secondary.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

21

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Hierarchy of Name Servers
Resolution Zone
DNS Messages Root Server
Types of Records
Registrars Primary and Secondary Servers
Dynamic Domain Name System (DDNS)
Encapsulation 22/57

Distribution of Name Space


• A primary server loads all information from the disk file; the
secondary server loads all information from the primary
server.
• When the secondary downloads information from the
primary, it is called zone transfer.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

22

11
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Generic Domains
Resolution
DNS Messages Country Domains
Types of Records Inverse Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 23/57

DNS in the Internet


• In the Internet, the domain name space (tree) is divided into
three different sections: generic domains, country domains,
and the inverse domain.

Figure 25.8 DNS used in the Internet


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

23

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Generic Domains
Resolution
DNS Messages Country Domains
Types of Records Inverse Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 24/57

DNS in the Internet


• The generic domains define registered hosts according to their generic
behavior.
– Each node in the tree defines a domain, which is an index to the domain
name space database.

Figure 25.9 Generic domains


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

24

12
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Generic Domains
Resolution
DNS Messages Country Domains
Types of Records Inverse Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 25/57

DNS in the Internet


• The first level in the
generic domains
section allows 14
possible labels.
• These labels
describe the
organization types
as listed in table.

Table 25.1
Generic domain labels
ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

25

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Generic Domains
Resolution
DNS Messages Country Domains
Types of Records Inverse Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 26/57

DNS in the Internet


• The country domains section uses two-character country
abbreviations (e.g., us for United States).
• Second labels can be organizational, or they can be more
specific, national designations.
– The United States, for example, uses state abbreviations as a
subdivision of us (e.g., ca.us.).

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

26

13
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Generic Domains
Resolution
DNS Messages Country Domains
Types of Records Inverse Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 27/57

DNS in the Internet


• Figure shows the
country domains
section.
– The address
anza.cup.ca.us
can be
translated to De
Anza College in
Cupertino,
California, in the
United States.

Figure 25.10 Country domains


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

27

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Generic Domains
Resolution
DNS Messages Country Domains
Types of Records Inverse Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 28/57

DNS in the Internet


• The inverse domain is used to map an address to a name.
• This may happen, for example, when a server has received
a request from a client to do a task.
• Although the server has a file that contains a list of
authorized clients, only the IP address of the client
(extracted from the received IP packet) is listed.
• The server asks its resolver to send a query to the DNS
server to map an address to a name to determine if the
client is on the authorized list.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

28

14
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Generic Domains
Resolution
DNS Messages Country Domains
Types of Records Inverse Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 29/57

DNS in the Internet


• This type of query is called an inverse or pointer (PTR)
query.
• To handle a pointer query, the inverse domain is added to
the domain name space with the first-level node called arpa
(for historical reasons).
• The second level is also one single node named in-addr
(for inverse address).
• The rest of the domain defines IP addresses.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

29

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet Generic Domains
Resolution
DNS Messages Country Domains
Types of Records Inverse Domain
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 30/57

DNS in the Internet


• To follow the convention of
reading the domain labels
from the bottom to the top,
an IP address such as
132.34.45.121 (a class B
address with netid 132.34)
is read as 121.45.34.132.in-
addr.arpa.
• See figure for an illustration
of the inverse domain
configuration.

Figure 25.11 Inverse domain


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

30

15
Name Space
Domain Name Space Resolver
Distribution of Name Space
DNS in the Internet
Mapping Names to Addresses
Resolution Mapping Address to Names
DNS Messages Recursive Resolution
Types of Records
Registrars Iterative Resolution
Dynamic Domain Name System (DDNS) Caching
Encapsulation 31/57

Resolution
• Mapping a name to an address or an address to a name is
called name-address resolution.
• A host that needs to map an address to a name or a name
to an address calls a DNS client called a resolver.
• The resolver accesses the closest DNS server with a
mapping request.
– If the server has the information, it satisfies the resolver;
otherwise, it either refers the resolver to other servers or asks
other servers to provide the information.
• After the resolver receives the mapping, delivers the result
to the process that requested it.
ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

31

Name Space
Domain Name Space Resolver
Distribution of Name Space
DNS in the Internet
Mapping Names to Addresses
Resolution Mapping Address to Names
DNS Messages Recursive Resolution
Types of Records
Registrars Iterative Resolution
Dynamic Domain Name System (DDNS) Caching
Encapsulation 32/57

Resolution
• Most of the time, the resolver gives a domain name to the server
and asks for the corresponding address.
• The server checks the generic domains or the country domains
to find the mapping.
– If the domain name is from the generic domains section, the
resolver receives a domain name such as "chal.atc.fhda.edu.".
• The query is sent by the resolver to the local DNS server for resolution.
• If the local server cannot resolve the query, it either refers the resolver
to other servers or asks other servers directly.
– If the domain name is from the country domains section, the
resolver receives a domain name such as "ch.fhda.cu.ca.us.".
• The procedure is the same.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

32

16
Name Space
Domain Name Space Resolver
Distribution of Name Space
DNS in the Internet
Mapping Names to Addresses
Resolution Mapping Address to Names
DNS Messages Recursive Resolution
Types of Records
Registrars Iterative Resolution
Dynamic Domain Name System (DDNS) Caching
Encapsulation 33/57

Resolution
• A client can send an IP address to a server to be mapped to a
domain name.
– This is called a PTR query.
• To answer queries of this kind, DNS uses the inverse domain.
• In the request, the IP address is reversed and the two labels in-
addr and arpa are appended to create a domain acceptable by
the inverse domain section.
– For example, if the resolver receives the IP address
132.34.45.121, the resolver first inverts the address and then adds
the two labels before sending.
• The domain name sent is "121.45.34.132.in-addr.arpa." which
is received by the local DNS and resolved.
ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

33

Name Space
Domain Name Space Resolver
Distribution of Name Space
DNS in the Internet
Mapping Names to Addresses
Resolution Mapping Address to Names
DNS Messages Recursive Resolution
Types of Records
Registrars Iterative Resolution
Dynamic Domain Name System (DDNS) Caching
Encapsulation 34/57

Resolution
• The client (resolver) can ask for a recursive answer from a name
server.
– This means that the resolver expects the server to supply the final
answer.
• If the server is the authority for the domain name, it checks its
database and responds.
• If the server is not the authority, it sends the request to another
server (the parent usually) and waits for the response.
– If the parent is the authority, it responds; otherwise, it sends the
query to yet another server.
• When the query is finally resolved, the response travels back
until it finally reaches the requesting client.
• This is called recursive resolution.
ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

34

17
Name Space
Domain Name Space Resolver
Distribution of Name Space
DNS in the Internet
Mapping Names to Addresses
Resolution Mapping Address to Names
DNS Messages Recursive Resolution
Types of Records
Registrars Iterative Resolution
Dynamic Domain Name System (DDNS) Caching
Encapsulation 35/57

Resolution
• The recursive resolution is
shown in figure.

Figure 25.12 Recursive resolution


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

35

Name Space
Domain Name Space Resolver
Distribution of Name Space
DNS in the Internet
Mapping Names to Addresses
Resolution Mapping Address to Names
DNS Messages Recursive Resolution
Types of Records
Registrars Iterative Resolution
Dynamic Domain Name System (DDNS) Caching
Encapsulation 36/57

Resolution
• If the client does not ask for a recursive answer, the mapping
can be done iteratively.
– If the server is an authority for the name, it sends the answer.
– If it is not, it returns (to the client) the IP address of the server that
it thinks can resolve the query.
– The client is responsible for repeating the query to this second
server.
– If the newly addressed server can resolve the problem, it answers
the query with the IP address; otherwise, it returns the IP address
of a new server to the client.
– Now the client must repeat the query to the third server.
• This process is called iterative resolution because the client
repeats the same query to multiple servers.
ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

36

18
Name Space
Domain Name Space Resolver
Distribution of Name Space
DNS in the Internet
Mapping Names to Addresses
Resolution Mapping Address to Names
DNS Messages Recursive Resolution
Types of Records
Registrars Iterative Resolution
Dynamic Domain Name System (DDNS) Caching
Encapsulation 37/57

Resolution
• In figure the client queries four servers before it gets an answer
from the mcgraw.com server.

Figure 25.13 Iterative resolution


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

37

Name Space
Domain Name Space Resolver
Distribution of Name Space
DNS in the Internet
Mapping Names to Addresses
Resolution Mapping Address to Names
DNS Messages Recursive Resolution
Types of Records
Registrars Iterative Resolution
Dynamic Domain Name System (DDNS) Caching
Encapsulation 38/57

Resolution
• Each time a server receives a query for a name that is not
in its domain, it needs to search its database for a server IP
address.
• Reduction of this search time would increase efficiency.
• DNS handles this with a mechanism called caching.
• When a server asks for a mapping from another server and
receives the response, it stores this information in its cache
memory before sending it to the client.
• If the same or another client asks for the same mapping, it
can check its cache memory and solve the problem.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

38

19
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages Header
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 39/57

DNS Messages
• DNS has two types of messages: query and response.
– Both types have the same format.
• The query message consists of a header and question
records.
• The response message consists of a header, question
records, answer records, authoritative records, and
additional records.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

39

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages Header
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 40/57

DNS Messages

Figure 25.14 Query and response messages


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

40

20
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages Header
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 41/57

DNS Messages
• Both query and response messages have the same header
format with some fields set to zero for the query messages.
• The header is 12 bytes.

Figure 25.15 Header format


ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

41

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages Header
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 42/57

DNS Messages

• The identification subfield is used by the client to match the response


with the query.
– The client uses a different identification number each time it sends a query.
– The server duplicates this number in the corresponding response.
• The flags subfield is a collection of subfields that define the type of the
message, the type of answer requested, the type of desired resolution
(recursive or iterative), and so on.
• The number of question records subfield contains the number of
queries in the question section of the message.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

42

21
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages Header
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 43/57

DNS Messages

• The number of answer records subfield contains the number of


answer records in the answer section of the response message.
– Its value is zero in the query message.
• The number of authoritative records subfield contains the number of
authoritative records in the authoritative section of a response message.
– Its value is zero in the query message.
• The number of additional records subfield contains the number
additional records in the additional section of a response message.
– Its value is zero in the query message.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

43

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages Header
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 44/57

DNS Messages

• Question section consists of one or more question records.


– It is present on both query and response messages.
• Answer section consists of one or more resource records.
– It is present only on response messages.
– This section includes the answer from the server to the client
(resolver).
• Authoritative section consists of one or more resource records.
– It is present only on response messages.
– This section gives information (domain name) about one or more
authoritative servers for the query.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

44

22
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages Header
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 45/57

DNS Messages

• Additional information section consists of one or more resource


records.
– It is present only on response messages.
– This section provides additional information that may help the
resolver.
• For example, a server may give the domain name of an authoritative
server to the resolver in the authoritative section, and include the IP
address of the same authoritative server in the additional information
section.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

45

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution Question Record
DNS Messages Resource Record
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 46/57

Types of Records
• Two types of records are used in DNS.
– The question records are used in the question section of
the query and response messages.
– The resource records are used in the answer, authoritative,
and additional information sections of the response message.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

46

23
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution Question Record
DNS Messages Resource Record
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 47/57

Types of Records
• A question record is used by the client to get information
from a server.
• This contains the domain name.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

47

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution Question Record
DNS Messages Resource Record
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 48/57

Types of Records
• Each domain name (each node on the tree) is associated
with a record called the resource record.
• The server database consists of resource records.
• Resource records are also what is returned by the server to
the client.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

48

24
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 49/57

Registrars
• How are new domains added to DNS?
• This is done through a registrar, a commercial entity.
• A registrar first verifies that the requested domain name is
unique and then enters it into the DNS database.
• A fee is charged.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

49

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 50/57

Registrars
• To register, the organization needs to give the name of its
server and the IP address of the server.
– For example, a new commercial organization named
wonderful with a server named ws and IP address
200.200.200.5 needs to give the following information to one
of the registrars:
• Domain name: ws.wonderful.com
• IP address: 200.200.200.5

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

50

25
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 51/57

Dynamic Domain Name System (DDNS)


• In DNS, when there is a change, such as adding a new
host, removing a host, or changing an IP address, the
change must be made to the DNS master file.
• These types of changes involve a lot of manual updating.
• The DNS master file must be updated dynamically.
• The Dynamic Domain Name System (DDNS) therefore
was devised to respond to this need.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

51

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 52/57

Encapsulation
• DNS can use either UDP or TCP.
• In both cases the well-known port used by the server is port
53.
• UDP is used when the size of the response message is
less than 512 bytes because most UDP packages have a
512-byte packet size limit.
• If the size of the response message is more than 512 bytes,
a TCP connection is used.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

52

26
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 53/57

Summary
• The Domain Name System (DNS) is a client/server
application that identifies each host on the Internet with a
unique user-friendly name.
• DNS organizes the name space in a hierarchical structure
to decentralize the responsibilities involved in naming.
• DNS can be pictured as an inverted hierarchical tree
structure with one root node at the top and a maximum of
128 levels.
• Each node in the tree has a domain name.
• A domain is defined as any subtree of the domain name
space.
ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

53

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 54/57

Summary
• The name space information is distributed among DNS
servers. Each server has jurisdiction over its zone.
• A root server’s zone is the entire DNS tree.
• A primary server creates, maintains, and updates
information about its zone.
• A secondary server gets its information from a primary
server.
• The domain name space is divided into three sections:
generic domains, country domains, and inverse domain.
• There are 14 generic domains, each specifying an
organization type.
ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

54

27
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 55/57

Summary
• Each country domain specifies a country.
• The inverse domain finds a domain name for a given IP
address. This is called address-to-name resolution.
• Name servers, computers that run the DNS server program,
are organized in a hierarchy.
• The DNS client, called a resolver, maps a name to an
address or an address to a name.
• In recursive resolution, the client sends its request to a
server that eventually returns a response.
• In iterative resolution, the client may send its request to
multiple servers before getting an answer.
ITEC310 Computer Networks II
Eastern Mediterranean University, Department of Information Technology

55

Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 56/57

Summary
• Caching is a method whereby an answer to a query is
stored in memory (for a limited time) for easy access to
future requests.
• A fully qualified domain name (FQDN) is a domain name
consisting of labels beginning with the host and going back
through each level to the root node.
• A partially qualified domain name (PQDN) is a domain
name that does not include all the levels between the host
and the root node.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

56

28
Name Space
Domain Name Space
Distribution of Name Space
DNS in the Internet
Resolution
DNS Messages
Types of Records
Registrars
Dynamic Domain Name System (DDNS)
Encapsulation 57/57

Summary
• There are two types of DNS messages: queries and
responses.
• There are two types of DNS records: question records and
resource records.
• Dynamic DNS (DDNS) automatically updates the DNS
master file.
• DNS uses the services of UDP for messages of less than
512 bytes; otherwise, TCP is used.

ITEC310 Computer Networks II


Eastern Mediterranean University, Department of Information Technology

57

29

You might also like