Course: Computer and
Communication Networks
Topic: Domain Name System
(DNS )
Presentation by
Ajay Kakkar
Assistant Professor
Department of Electronics and
Communication Engineering,
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.
Label
Domain Name
Domain
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication. 3. https://ieeexplore.ieee.org
NAME SPACE
The names assigned to machines must be carefully selected from a name space with
complete control over the binding between the names and IP
• DNS database: each node and leaf in the name space tree structure names a set of information (e.g.,
IP address, type of resource) that is contained in a resource record (RR).The collection of all RRs is
organized into a distributed database.
Variable-depth hierarchy for names: DNS allows essentially unlimited levels and uses the period (.) as
the level delimiter in printed names, as described earlier.
• Distributed database: The database resides in DNS servers scattered throughout the Internet and
private intranets.
• Distribution controlled by the database: The DNS database is divided into thousands of separately
managed zones, which are managed by separate administrators. The database software controls
distribution and update of records.
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication. 3. https://ieeexplore.ieee.org
Distribution: Domain name space
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication. 3. https://ieeexplore.ieee.org
Domain names and labels
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication. 3. https://ieeexplore.ieee.org
Domains
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication. 3. https://ieeexplore.ieee.org
DNS IN THE INTERNET
DNS is a protocol that can be used in different platforms. In the Internet, the domain name
space (tree) is divided into three different sections: generic domains, country domains, and the
inverse domain.
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication. 3. https://ieeexplore.ieee.org
Generic domains
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication. 3. https://ieeexplore.ieee.org
Generic domain labels
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication. 3. https://ieeexplore.ieee.org
Country domains
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication. 3. https://ieeexplore.ieee.org
Inverse domain
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication. 3. https://ieeexplore.ieee.org
Domain Name System
• Domain Name Server (DNS) is a standard protocol that helps
Internet users discover websites using human readable addresses.
Like a phonebook which lets you look up the name of a person and
discover their number, DNS lets you type the address of a website
and automatically discover the Internet Protocol (IP) address for
that website.
• The Domain Name System (or DNS) converts human readable
domain names (like: www.google.com) into Internet Protocol (IP)
addresses (like: 173.194.39.78).
• Host names are divided into several pieces called domains.
Domains are designed in a hierarchical structure.
• The top-level domains refer to the type of organization to which
the network belongs, and subdomains further identify the specific
network on which the host is situated.
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. sourcedaddy.com
Resolution
• Mapping a name to an address or an address to a name is called
name-address resolution.
• Resolver: The resolver receives a hostname - for example,
www.example.com - and is responsible for tracking down the IP
address for that hostname. It is also called a recursive resolver.
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. sourcedaddy.com 3. https://techhub.hpe.com
• Mapping Names to Addresses: referred to as mapping, is the process of finding the IP
address of a computer in a database by using its host name as an index. Name-to-address
mapping occurs when a program running on your local machine needs to contact a remote
computer.
• The resolver gives a domain name to the server and asks for the corresponding address. In this
case, the server checks the generic domains or the country domains to find the mapping.
• Mapping Addresses to Names: A client can send an IP address to a server to be mapped to a
domain name.
• 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.
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication
Types of Resolution
• Recursive Resolution : It is just a name for the resolution process use by a
name server when it receives recursive queries.
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication 3.
https://www.geeksforgeeks.org
• Iterative resolution: It refers to the resolution process used by a name server
when it receives iterative queries.
• Each server that does not know the mapping sends the IP Address of the next
server to the one requested it. Here, client allows the server to return the best
answer it can give as a match or as a referral.
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication 3.
https://www.geeksforgeeks.org
• Caching:
• 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.
• 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.
• Reduction of this search time would increase efficiency.
• DNS handles this with a mechanism called caching.
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication 3.
https://www.geeksforgeeks.org
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.
Reference: 1. Ferouzan, Behrouz A., Data Communications and Networking, 2. Stallings William, Data and Computer Communication 3.
https://www.geeksforgeeks.org
Dynamic domain name system
(DDNS)
• It provides a database containing relations between domain and numeric
addresses, but this database may be updated on request by the domain owner.
• The server is available in the domain address regardless its actual IP number.
• The DNS master file must be updated dynamically. The Dynamic Domain Name
System (DDNS) therefore was devised to respond to this need.
• The primary server updates the zone. The secondary servers are notified either
actively or passively.
Encapsulation
• DNS can use the services of UDP or TCP using the well-known port 53.
UDP is used when the size of the response message is less than 512
and for more than 512 bytes, a TCP connection is used.
• Two scenarios
If the resolver has prior knowledge that the size of the response
message is more than 512 bytes, it uses the TCP connection.
If the resolver does not know the size of the response message, it can
use the UDP port.