0% found this document useful (0 votes)
107 views

Protocols-Domain Name System (DNS)

The document discusses the Domain Name System (DNS) which maps hostnames to IP addresses. DNS uses a hierarchical domain name space organized in a tree structure with labels separated by dots in domain names. DNS servers are distributed worldwide and arranged hierarchically to store information from the domain name space. Primary DNS servers store authoritative zone files while secondary servers copy zone files from primary servers for redundancy.

Uploaded by

Ali Abd
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views

Protocols-Domain Name System (DNS)

The document discusses the Domain Name System (DNS) which maps hostnames to IP addresses. DNS uses a hierarchical domain name space organized in a tree structure with labels separated by dots in domain names. DNS servers are distributed worldwide and arranged hierarchically to store information from the domain name space. Primary DNS servers store authoritative zone files while secondary servers copy zone files from primary servers for redundancy.

Uploaded by

Ali Abd
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Protocols – 4th Year

Computer Eng. Dept.

Lecture No. 6a
Application layer protocols
Domain Name System (DNS)
DNS is a client/server application program used to help
other application programs.
DNS is used to map a host name (Internet domain name) in
the application layer to an IP address in the network layer.
TCP/IP protocols use the IP address, which uniquely
identifies the connection of a host to the Internet.
However, people prefer to use names instead of numeric
addresses.
Therefore, we need a system that can map a name to an
address or an address to a name. 
2
For example, if someone types example.com into a web
browser, a server will map that name to the corresponding IP
address, something similar in structure to 121.12.12.121.

3
When the Internet was small, mapping was done using a
host file. The host file had only two columns:
name and address.
Every host could store the host file on its disk and update it
periodically from a master host file.
The host file would be too large to store in every host. In
addition, it would be impossible to update all the host files
every time there is a change.
The solution, the one used today, is to divide this huge
amount of information into smaller parts and store each
part on a different computer.
In this method, the host that needs mapping can contact the
closest computer holding the needed information.
This method is used by the Domain Name System (DNS).
4
Figure below shows how TCP/IP uses a DNS client and a
DNS server to map a name of the file transfer server to an
IP address in order to connect with the file transfer client;
the reverse mapping is similar.

5
Name Space (application layer)
The names assigned to machines (selected from a name
space ) must be unique because the IP addresses are unique.
A name space that maps each IP address to a unique name
can be organized in two ways: flat or hierarchical.

 Flat Name Space


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.
6
 Hierarchical 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.

For example, assume two colleges and a company call one


of their computers challenger.
The first college is given a name such as fhda.edu,
the second college is given the name berkeley.edu, and
the company is given the name smart.com. 7
When each of these organizations adds the name challenger
to the name they have already been given, the end result is
three distinguishable names:
challenger.fhda.edu,
challenger.berkeley.edu, and
challenger.smart.com.
Domain Name Space
To have a hierarchical name space, a domain name space
was designed.
In this design 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 (see Figure below).

10
Label:
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.
Domain Name:
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.
The last label is the label of the root (null).
Figure below shows some domain names.
11
12
 Fully Qualified Domain Name (FQDN)
If a label is terminated by a null string, it is called a fully
qualified domain name (FQDN).
An FQDN is a domain name that contains the full name of
a host.
It contains all labels, from the most specific to the most
general, that uniquely define the name of the host.
For example, the domain name is the FQDN of a computer
named challenger installed at the Advanced Technology
Center(ATC) at FootHill De Anza College.
Note that the name must end with a null label, but because
null means nothing, the label ends with a dot (.)
challenger.atc.fhda.edu.
13
 Partially Qualified Domain Name (PQDN)
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.
Here the resolver can supply the missing part, called the
suffix, to create an FQDN. (A DNS client is called a resolver)

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
The DNS client adds the suffix atc.fhda.edu. before
passing the address to the DNS server. 14
Domain
A domain is a subtree of the domain name space.
The name of the domain is the name of the node at the top
of the subtree.
Figure below shows some domains. Note that a domain may
itself be divided into domains (or subdomains as they are
sometimes called).

15
Distribution of Name Space:
The information contained in the domain name space must be
stored. However, it is very inefficient and also not reliable to
have just one computer store such a huge amount of infor-
mation.
It is inefficient because responding to requests from all over the
world places a heavy load on the system.
It is not reliable because any failure makes the data inaccessible.
Hierarchy of Name Servers
The solution to these problems is to distribute the
information among many computers called DNS servers.
One way to do this is to divide the whole space into many
domains based on the first level.
In other words, we let the root stand alone and create as
many domains (subtrees) as there are first-level nodes.
16
Because a domain created this way could be very large,
DNS allows domains to be divided further into smaller
domains (subdomains).
Each server can be responsible (authoritative) for either a
large or small domain.
In other words, we have a hierarchy of servers in the same
way that we have a hierarchy of names (see Figure below).

Root DNS Servers

com DNS servers org DNS servers edu DNS servers

pbs.org poly.edu umass.edu


yahoo.com amazon.com
DNS servers DNS serversDNS servers
DNS servers DNS servers

17
 client queries a root server to find com DNS server
 client queries com DNS server to get amazon.com DNS
server
 client queries amazon.com DNS server to get IP address
for www.amazon.com

There are 3 DNS components:


Name Space: Specifications for a structured name
space and data associated with the names
Resolvers: Client programs that extract information
from Name Servers. A Resolver maps a name to an
address and vice versa.
Name Servers: Server programs which hold
information about the structure and the names. 18
Zone
Since the complete domain name hierarchy cannot be stored
on a single server, it is divided among many servers.
What a server is responsible for or has authority over is
called a zone.
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.
However, if a server divides its domain into subdomains and
gives part of its authority to other servers, “domain” and
“zone” refer to different things. 19
Root Server
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 delegates‫ فـيـــوض‬its authority to other servers,
keeping references to those servers.
There are several root servers, each covering the whole
domain name space.
The root servers are distributed all around the world.
Primary and Secondary Servers
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. 20
 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.
 The primary and secondary servers are both authoritative
for the zones they serve.
 The idea is not to put the secondary server at a lower
level of authority but to create redundancy for the data
so that if one server fails, the other can continue serving
clients.
 Note also that a server can be a primary server for a
specific zone and a secondary server for another zone. 21
 Therefore, when we refer to a server as a primary or
secondary server, we should be careful about which zone
we refer to.

 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.

22

You might also like