0% found this document useful (0 votes)
1K views14 pages

Domain Name System (DNS) in Application Layer

Uploaded by

segunadedayo59
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)
1K views14 pages

Domain Name System (DNS) in Application Layer

Uploaded by

segunadedayo59
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/ 14

01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

Domain Name System (DNS) in Application Layer


Last Updated : 27 Sep, 2024

The Domain Name System (DNS) is like the internet’s phone book. It helps
you find websites by translating easy-to-remember names (like
www.example.com) into the numerical IP addresses (like 192.0.2.1) that
computers use to locate each other on the internet. Without DNS, you would
have to remember long strings of numbers to visit your favorite websites.

Domain Name System (DNS) is a hostname used for IP address translation


services. DNS is a distributed database implemented in a hierarchy of name
servers. It is an application layer protocol for message exchange between
clients and servers. It is required for the functioning of the Internet.

What is the Need for DNS?


Every host is identified by the IP address but remembering numbers is very
difficult for people also the IP addresses are not static therefore a mapping
is required to change the domain name to the IP address. So DNS is used to
convert the domain name of the websites to their numerical IP address.

Types of Domain
There are various kinds of domains:

Generic Domains: .com(commercial), .edu(educational), .mil(military),


.org(nonprofit organization), .net(similar to commercial) all these are
generic domains.
Country Domain: .in (India) .us .uk
Inverse Domain: if we want to know what is the domain name of the
website. IP to domain name mapping. So DNS can provide both the
mapping for example to find the IP addresses of geeksforgeeks.org then
we have to type

nslookup www.geeksforgeeks.org

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 1/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

Types of DNS

Organization of Domain
It is very difficult to find out the IP address associated with a website
because there are millions of websites and with all those websites we
should be able to generate the IP address immediately, there should not be
a lot of delays for that to happen organization of the database is very
important.

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 2/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

Root DNS Server

DNS Record: Domain name, IP address what is the validity? what is the
time to live? and all the information related to that domain name. These
records are stored in a tree-like structure.
Namespace: Set of possible names, flat or hierarchical. The naming
system maintains a collection of bindings of names to values – given a
name, a resolution mechanism returns the corresponding value.
Name Server: It is an implementation of the resolution mechanism.

DNS = Name service in Internet – A zone is an administrative unit, and


a domain is a subtree.

Name-to-Address Resolution
The host requests the DNS name server to resolve the domain name. And
the name server returns the IP address corresponding to that domain name
to the host so that the host can future connect to that IP address.

Name-to-Address Resolution

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 3/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

Hierarchy of Name Servers Root Name Servers: It is contacted by name


servers that can not resolve the name. It contacts the authoritative name
server if name mapping is not known. It then gets the mapping and
returns the IP address to the host.
Top-level Domain (TLD) Server: It is responsible for com, org, edu, etc,
and all top-level country domains like uk, fr, ca, in, etc. They have info
about authoritative domain servers and know the names and IP
addresses of each authoritative name server for the second-level
domains.
Authoritative Name Servers are the organization’s DNS servers,
providing authoritative hostnames to IP mapping for organization servers.
Aptitude Engineering Mathematics Discrete Mathematics Operating System DBMS Computer Networks
It can be maintained by an organization or service provider. In order to
reach cse.dtu.in we have to ask the root DNS server, then it will point out
to the top-level domain server and then to the authoritative domain name
server which actually contains the IP address. So the authoritative domain
server will return the associative IP address.

Domain Name Server


The client machine sends a request to the local name server, which, if the
root does not find the address in its database, sends a request to the root
name server, which in turn, will route the query to a top-level domain (TLD)
or authoritative name server. The root name server can also contain some
hostName to IP address mappings. The Top-level domain (TLD) server
always knows who the authoritative name server is. So finally the IP address
is returned to the local name server which in turn returns the IP address to
the host.

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 4/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

Domain Name Server

How Does DNS Work?


The working of DNS starts with converting a hostname into an IP Address. A
domain name serves as a distinctive identification for a website. It is used in
place of an IP address to make it simpler for consumers to visit websites.
Domain Name System works by executing the database whose work is to
store the name of hosts which are available on the Internet. The top-level
domain server stores address information for top-level domains such as
.com and .net, .org, and so on. If the Client sends the request, then the DNS
resolver sends a request to DNS Server to fetch the IP Address. In case,
when it does not contain that particular IP Address with a hostname, it
forwards the request to another DNS Server. When IP Address has arrived
at the resolver, it completes the request over Internet Protocol .

For more, you can refer to Working of DNS Server .

How Does DNS Works?

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 5/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

Authoritative DNS Server Vs Recursive DNS Resolver

Parameters Authoritative DNS Recursive DNS


Server Resolver

Holds the official DNS Resolves DNS queries


Function
records for a domain on behalf of clients

Provides answers to Actively looks up


Role
specific DNS queries information for clients

Responds with Queries other DNS


Query Handling
authoritative DNS data servers for DNS data

Doesn’t directly interact Serves end-users or


Client Interaction
with end-users client applications

Stores the DNS records Looks up data from


Data Source
for specific domains other DNS servers

Generally, doesn’t Caches DNS responses


Caching
perform caching for faster lookups

Actively performs
Does not participate in
Hierarchical Resolution recursive name
the recursive resolution
resolution

Has a fixed, known IP IP address may vary


IP Address
address depending on ISP

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 6/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

Parameters Authoritative DNS Recursive DNS


Server Resolver

Manages a specific DNS Does not manage any


Zone Authority
zone (domain) specific DNS zone

What is DNS Lookup?


DNS Lookup or DNS Resolution can be simply termed as the process that
helps in allowing devices and applications that translate readable domain
names to the corresponding IP Addresses used by the computers for
communicating over the web.

What Are The Steps in a DNS Lookup?


Often, DNS lookup information is stored temporarily either on your own
computer or within the DNS system itself. There are usually 8 steps involved
in a DNS lookup. If the information is already stored (cached), some of these
steps can be skipped, making the process faster. Here is an example of all 8
steps when nothing is cached:

1. A user types “example.com” into a web browser.


2. The request goes to a DNS resolver.
3. The resolver asks a root server where to find the top-level domain (TLD)
server for .com.
4. The root server tells the resolver to contact the .com TLD server.
5. The resolver then asks the .com TLD server for the IP address of
“example.com.”
6. The .com TLD server gives the resolver the IP address of the domain’s
nameserver.
7. The resolver then asks the domain’s nameserver for the IP address of
“example.com.”
8. The domain’s nameserver returns the IP address to the resolver.

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 7/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

Working of DNS

DNS Servers Involved in Loading a Webpage


Upon loading the webpage, several DNS Servers are responsible for
translating the domain name into the corresponding IP Address of the web
server hosting the website. Here is the list of main DNS servers involved in
loading a Webpage.

Local DNS Resolver


Root DNS Servers
Top-Level Domain (TLD) DNS Servers
Authoritative DNS Servers
Web Server

This hierarchical system of DNS servers ensures that when you type a
domain name into your web browser, it can be translated into the correct IP
address, allowing you to access the desired webpage on the internet.

For more information you can refer DNS Look-Up article.

What is DNS Resolver?


DNS Resolver is simply called a DNS Client and has the functionality for
initiating the process of DNS Lookup which is also called DNS Resolution.
By using the DNS Resolver, applications can easily access different websites
and services present on the Internet by using domain names that are very
much friendly to the user and that also resolves the problem of
remembering IP Address.

What Are The Types of DNS Queries?

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 8/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

There are basically three types of DNS Queries that occur in DNS Lookup.
These are stated below.

Recursive Query: In this query, if the resolver is unable to find the record,
in that case, DNS client wants the DNS Server will respond to the client
in any way like with the requested source record or an error message.
Iterative Query: Iterative Query is the query in which DNS Client wants
the best answer possible from the DNS Server.
Non-Recursive Query: Non-Recursive Query is the query that occurs
when a DNS Resolver queries a DNS Server for some record that has
access to it because of the record that exists in its cache.

What is DNS Caching?


DNS Caching can be simply termed as the process used by DNS Resolvers
for storing the previously resolved information of DNS that contains domain
names, and IP Addresses for some time. The main principle of DNS Caching
is to speed up the process of future DNS lookup and also help in reducing
the overall time of DNS Resolution.

Conclusion
In conclusion, the Domain Name System (DNS) is an essential part of the
application layer in networking. It acts like the internet’s directory,
translating human-friendly domain names into numerical IP addresses that
computers use to communicate. Without DNS, navigating the internet would
be much more difficult, as we’d need to remember complex IP addresses for
every website. DNS makes the internet user-friendly and efficient, allowing
us to easily access websites and online services by using simple, memorable
names.

Frequently Asked Questions on Domain Name


System(DNS) – FAQs

What do you mean by level 3 DNS Server?

Level 3 can be termed as a third-party DNS Server that is completely


free and open to the public.

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 9/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

Is Domain Name System (DNS) a protocol?

Domain Name System (DNS) is a protocol that is used to convert


easily readable names for communicating over the network, instead of
remembering IP Address.

How can you categorize a DNS as a TCP or UDP?

DNS is designed to be used in both the ways like as a TCP or as a


UDP. It converts to TCP when it is not able to communicate on UDP.

Are you a student in Computer Science or an employed professional looking


to take up the GATE 2025 Exam? Of course, you can get a good score in it
but to get the best score our GATE CS/IT 2025 - Self-Paced Course is
available on GeeksforGeeks to help you with its preparation. Get
comprehensive coverage of all topics of GATE, detailed explanations, and
practice questions for study. Study at your pace. Flexible and easy-to-
follow modules. Do well in GATE to enhance the prospects of your career.
Enroll now and let your journey to success begin!

Domain name system (DNS) in Computer Network Visit Course

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 10/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

GeeksforGeeks 176

Previous Article Next Article


Differences Between Virtual Circuits and Details on DNS
Datagram Networks

Similar Reads
Computer Network Tutorial
A computer network is a collection of computers or devices connected to share resources. Any device
which can share or receive the data is called a Node. Through which the information or data propagate is…

10 min read

Basics of Computer Network

Network Hardware and Software

Network Topology

OSI Model

Protocols

TCP/IP Model

Medium Access Control

SLIDING WINDOW PROTOCOLS

IP Addressing

Routing

Congestion Control Algorithms

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 11/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks

Network Switching

Application Layer:DNS

Domain Name System (DNS) in Application Layer


The Domain Name System (DNS) is like the internet's phone book. It helps you find websites by
translating easy-to-remember names (like www.example.com) into the numerical IP addresses (like…

9 min read

Details on DNS
DNS (Domain Name System) allows you to interact with devices on the Internet without having to
remember long strings of numbers. Each computer on the Internet has its own unique address, known a…

5 min read

Introduction to Electronic Mail


Introduction:Electronic mail, commonly known as email, is a method of exchanging messages over the
internet. Here are the basics of email:An email address: This is a unique identifier for each user, typically…

4 min read

E-Mail Format
Electronic Mail (e-mail) is one of the most widely used services of the Internet. This service allows an
Internet user to send a message in a formatted manner (mail) to other Internet users in any part of the…

3 min read

World Wide Web (WWW)


The World Wide Web (WWW), often called the Web, is a system of interconnected webpages and
information that you can access using the Internet. It was created to help people share and find…

6 min read

HTTP Full Form


HTTP stands for HyperText Transfer Protocol. It is the main way web browsers and servers communicate
to share information on the internet. Tim Berner invents it. HyperText is the type of text that is specially…

9 min read

Streaming Stored Video


Streaming of videos involve, storing of prerecorded videos on servers. Users send request to those
servers.Users may watch the video from the start till the end, and may pause it anytime, do a forward or…

5 min read

What is a Content Distribution Network and how does it work?

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 12/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks
Over the last few years, there has been a huge increase in the number of Internet users. YouTube alone
has 2 Billion users worldwide, while Netflix has over 160 million users. Streaming content to such a wid…

4 min read

CN Interview Quetions

CN MCQ

Article Tags : Computer Networks GATE CS Application Layer

Corporate & Communications Address:-


A-143, 9th Floor, Sovereign Corporate
Tower, Sector- 136, Noida, Uttar Pradesh
(201305) | Registered Address:- K 061,
Tower K, Gulshan Vivante Apartment,
Sector 137, Noida, Gautam Buddh
Nagar, Uttar Pradesh, 201305

Company Languages
About Us Python
Legal Java
In Media C++
Contact Us PHP
Advertise with us GoLang
GFG Corporate Solution SQL
Placement Training Program R Language
GeeksforGeeks Community Android Tutorial
Tutorials Archive

DSA Data Science & ML


Data Structures Data Science With Python
Algorithms Data Science For Beginner
DSA for Beginners Machine Learning
Basic DSA Problems ML Maths
DSA Roadmap Data Visualisation
Top 100 DSA Interview Problems Pandas

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 13/14
01/12/2024, 14:07 Domain Name System (DNS) in Application Layer - GeeksforGeeks
DSA Roadmap by Sandeep Jain NumPy
All Cheat Sheets NLP
Deep Learning

Web Technologies Python Tutorial


HTML Python Programming Examples
CSS Python Projects
JavaScript Python Tkinter
TypeScript Web Scraping
ReactJS OpenCV Tutorial
NextJS Python Interview Question
Bootstrap Django
Web Design

Computer Science DevOps


Operating Systems Git
Computer Network Linux
Database Management System AWS
Software Engineering Docker
Digital Logic Design Kubernetes
Engineering Maths Azure
Software Development GCP
Software Testing DevOps Roadmap

System Design Inteview Preparation


High Level Design Competitive Programming
Low Level Design Top DS or Algo for CP
UML Diagrams Company-Wise Recruitment Process
Interview Guide Company-Wise Preparation
Design Patterns Aptitude Preparation
OOAD Puzzles
System Design Bootcamp
Interview Questions

School Subjects GeeksforGeeks Videos


Mathematics DSA
Physics Python
Chemistry Java
Biology C++
Social Science Web Development
English Grammar Data Science
Commerce CS Subjects
World GK

@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/ 14/14

You might also like