Protocols-Domain Name System (DNS)
Protocols-Domain Name System (DNS)
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.
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)
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).
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
22