0% found this document useful (0 votes)
5 views23 pages

application layer

Uploaded by

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

application layer

Uploaded by

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

Principles of Network Applications



The Principles of Network Applications are fundamental concepts that govern the design and
development of applications that run on a computer network. These principles encompass several
key aspects of network applications, including:
 Network Application Architectures
 Processes Communicating
 The Interface Between the Process and the Computer Network
 Transport Services Available to Applications
 Transport Services Provided by the Internet
 Application-Layer Protocols
1. Network Application Architectures refer to the overall design and structure of a network
application. It encompasses how the application is divided into different components, and how
these components interact with each other. There are several commonly used network
application architectures, including:
 Client-Server Architecture: In this architecture, one component acts as a client and makes
requests to a server component, which provides the requested services. This architecture is
commonly used in web applications, where the client is a web browser and the server is a web
server.
 Peer-to-Peer Architecture: In this architecture, every component is both a client and a
server, and each component can communicate directly with any other component. This
architecture is commonly used in file-sharing applications, where each user’s device acts as
both a client and a server.
 Three-Tier Architecture: In this architecture, the application is divided into three
components: a client component, a middleware component, and a database component. The
client component makes requests to the middleware component, which communicates with
the database component to retrieve or update data. This architecture provides a layer of
abstraction between the client and the database, which can improve performance and
scalability.
 Microservices Architecture: In this architecture, the application is divided into a collection
of small, independently deployable components, known as microservices. Each microservice
is responsible for a specific aspect of the application’s functionality, and they communicate
with one another through APIs. This architecture allows for greater flexibility and scalability
compared to other architectures.
The choice of network application architecture depends on several factors, including the
requirements of the application, the scale of the application, and the available resources.
Regardless of the architecture chosen, the design should consider factors such as scalability,
performance, security, and maintainability.
2. Processes Communicating refers to the communication between multiple processes in a
computer network. Processes can be thought of as individual programs or tasks running on a
device, and they may be located on the same device or on different devices connected to the
network.
 Communication between processes is facilitated by the use of protocols, which define the
rules and formats for exchanging data. The communication between processes can be either
synchronous or asynchronous, meaning that either both processes must be available to
communicate at the same time or the communication can occur at different times.
 In a network application, communication between processes is essential for the application to
function correctly. For example, in a client-server architecture, the client process makes
requests to the server process, and the server process returns the requested information. In a
peer-to-peer architecture, each process can communicate directly with any other process.
 It’s important to consider the communication between processes when designing a network
application. Factors such as the reliability of communication, the security of communication,
and the performance of the communication must be taken into account. The choice of
protocols used for communication will depend on the requirements of the application and the
network infrastructure.
3. The Interface between the Process and the Computer Network refers to the connection
between a process running on a device and the underlying computer network. This interface
determines how the process communicates with other processes and with the network itself.
The interface between a process and the computer network is usually provided by a network
stack, which is a collection of protocols and services that handle the communication between the
process and the network. The network stack translates the process’s requests and data into the
appropriate network protocols, and vice versa, allowing the process to communicate over the
network.

Transport Layer responsibilities



The transport Layer is the second layer in the TCP/IP model and the fourth layer in the OSI
model. It is an end-to-end layer used to deliver messages to a host. It is termed an end-to-end
layer because it provides a point-to-point connection rather than hop-to-hop, between the source
host and destination host to deliver the services reliably. The unit of data encapsulation in the
Transport Layer is a segment.
Working of Transport Layer
The transport layer takes services from the Application layer and provides services to
the Network layer.
At the sender’s side: The transport layer receives data (message) from the Application layer and
then performs Segmentation, divides the actual message into segments, adds the source and
destination’s port numbers into the header of the segment, and transfers the message to the
Network layer.
At the receiver’s side: The transport layer receives data from the Network layer, reassembles
the segmented data, reads its header, identifies the port number, and forwards the message to the
appropriate port in the Application layer.
Responsibilities of a Transport Layer
 The Process to Process Delivery
 End-to-End Connection between Hosts
 Multiplexing and Demultiplexing
 Congestion Control
 Data integrity and Error correction
 Flow control
1. The Process to Process Delivery
While Data Link Layer requires the MAC address (48 bits address contained inside the Network
Interface Card of every host machine) of source-destination hosts to correctly deliver a frame and
the Network layer requires the IP address for appropriate routing of packets, in a similar way
Transport Layer requires a Port number to correctly deliver the segments of data to the correct
process amongst the multiple processes running on a particular host. A port number is a 16-bit
address used to identify any client-server program uniquely.

Process to Process Delivery

2. End-to-end Connection between Hosts


The transport layer is also responsible for creating the end-to-end Connection between hosts for
which it mainly uses TCP and UDP. TCP is a secure, connection-orientated protocol that uses a
handshake protocol to establish a robust connection between two end hosts. TCP ensures the
reliable delivery of messages and is used in various applications. UDP, on the other hand, is a
stateless and unreliable protocol that ensures best-effort delivery. It is suitable for applications
that have little concern with flow or error control and requires sending the bulk of data like video
conferencing. It is often used in multicasting protocols.
End to End Connection.

3. Multiplexing and Demultiplexing


Multiplexing(many to one) is when data is acquired from several processes from the sender and
merged into one packet along with headers and sent as a single packet. Multiplexing allows the
simultaneous use of different processes over a network that is running on a host. The processes
are differentiated by their port numbers. Similarly, Demultiplexing(one to many is required at the
receiver side when the message is distributed into different processes. Transport receives the
segments of data from the network layer distributes and delivers it to the appropriate process
running on the receiver’s machine.

Multiplexing and Demultiplexing


4. Congestion Control
Congestion is a situation in which too many sources over a network attempt to send data and the
router buffers start overflowing due to which loss of packets occurs. As a result, the
retransmission of packets from the sources increases the congestion further. In this situation, the
Transport layer provides Congestion Control in different ways. It uses open-loop congestion
control to prevent congestion and closed-loop congestion control to remove the congestion in a
network once it occurred. TCP provides AIMD – additive increases multiplicative decrease
and leaky bucket technique for congestion control.

Leaky Bucket Congestion Control Technique

5. Data integrity and Error Correction


The transport layer checks for errors in the messages coming from the application layer by using
error detection codes, and computing checksums, it checks whether the received data is not
corrupted and uses the ACK and NACK services to inform the sender if the data has arrived or
not and checks for the integrity of data.
Error Correction using Checksum

6. Flow Control
The transport layer provides a flow control mechanism between the adjacent layers of the
TCP/IP model. TCP also prevents data loss due to a fast sender and slow receiver by imposing
some flow control techniques. It uses the method of sliding window protocol which is
accomplished by the receiver by sending a window back to the sender informing the size of data
it can receive

File Transfer Protocol (FTP) in Application Layer



Prerequisite: Protocols in the Application Layer


File Transfer Protocol(FTP) is an application layer protocol that moves files between local and
remote file systems. It runs on top of TCP, like HTTP. To transfer a file, 2 TCP connections are
used by FTP in parallel: control connection and data connection.
Why FTP?
FTP is a standard communication protocol. There are various other protocols like HTTP which
are used to transfer files between computers, but they lack clarity and focus as compared to FTP.
Moreover, the systems involved in connection are heterogeneous systems, i.e. they differ in
operating systems, directories, structures, character sets, etc the FTP shields the user from these
differences and transfers data efficiently and reliably. FTP can transfer ASCII, EBCDIC, or
image files. The ASCII is the default file share format, in this, each character is encoded by NVT
ASCII. In ASCII or EBCDIC the destination must be ready to accept files in this mode. The
image file format is the default format for transforming binary files.
Mechanism of File Transfer Protocol

Types of Connection in FTP


1. Control Connection
2. Data Connection

Types of Connection in FTP

1. Control Connection: For sending control information like user identification, password,
commands to change the remote directory, commands to retrieve and store files, etc., FTP makes
use of a control connection. The control connection is initiated on port number 21.
2. Data connection: For sending the actual file, FTP makes use of a data connection. A data
connection is initiated on port number 20.
FTP sends the control information out-of-band as it uses a separate control connection. Some
protocols send their request and response header lines and the data in the same TCP connection.
For this reason, they are said to send their control information in-band. HTTP and SMTP are
such examples.
FTP Session
When an FTP session is started between a client and a server, the client initiates a
control TCP connection with the server side. The client sends control information over this.
When the server receives this, it initiates a data connection to the client side. Only one file can be
sent over one data connection. But the control connection remains active throughout the user
session. As we know HTTP is stateless i.e. it does not have to keep track of any user state. But
FTP needs to maintain a state about its user throughout the session.
FTP Clients
FTP works on a client-server model. The FTP client is a program that runs on the user’s
computer to enable the user to talk to and get files from remote computers. It is a set of
commands that establishes the connection between two hosts, helps to transfer the files, and then
closes the connection.
Some of the commands are:
get the filename(retrieve the file from the server)
get the filename(retrieve multiple files from the server )
ls(list files available in the current directory of the server)
There are also built-in FTP programs, which makes it easier to transfer files and it does not
require remembering the commands.
FTP Data Structures
FTP allows three types of data structures :
1. File Structure: In file structure, there is no internal structure and the file is considered to be a
continuous sequence of data bytes.
2. Record Structure: In record structure, the file is made up of sequential records.
3. Page Structure: In page structure, the file is made up of independent indexed pages.
FTP Commands
Some of the FTP commands are:
 USER – This command sends the user identification to the server.
 PASS – This command sends the user password to the server.
 CWD – This command allows the user to work with a different directory or dataset for file
storage or retrieval without altering his login or accounting information.
 RMD – This command causes the directory specified in the path name to be removed as a
directory.
 MKD – This command causes the directory specified in the pathname to be created as a
directory.
 PWD – This command causes the name of the current working directory to be returned in the
reply.
 RETR – This command causes the remote host to initiate a data connection and send the
requested file over the data connection.
 STOR – This command causes the storage of a file in the current directory of the remote
host.
 LIST – Sends a request to display the list of all the files present in the directory.
 ABOR – This command tells the server to abort the previous FTP service command and any
associated transfer of data.
 QUIT – This command terminates a USER and if file transfer is not in progress, the server
closes the control connection.
FTP Replies
Some of the FTP replies are :
 200 – Command okay.
 530 – Not logged in.
 331 – User name okay, need a password.
 225 – Data connection open; no transfer in progress.
 221 – Service closing control connection.
 551 – Requested action aborted: page type unknown.
 502 – Command not implemented.
 503 – Bad sequence of commands.
 504 – Command not implemented for that parameter.
Characteristics of FTP
1. FTP uses TCP as a transport layer protocol.
2. It is good for simple file transfers, such as during boot time.
3. Errors in the transmission (lost packets, checksum errors) must be handled by the TFTP
server.
4. It uses only one connection through well-known port 69.

5. TFTP uses a simple lock-step protocol (each data packet needs to be acknowledged). Thus the
throughput is limited.
Advantages of FTP
 Speed is one of the advantages of FTP(File Transfer Protocol).
 File sharing also comes in the category of advantages of FTP in this between two machines
files can be shared on the network.
 Efficiency is more in FTP.
Disadvantages of FTP
 File size limit is the drawback of FTP only 2 GB size files can be transferred.
 Multiple receivers are not supported by the FTP.
 FTP does not encrypt the data this is one of the biggest drawbacks of FTP.
 FTP is unsecured we use login IDs and passwords making it secure but they can be attacked
by hackers.
Anonymous FTP
Anonymous FTP is enabled on some sites whose files are available for public access. A user can
access these files without having any username or password. Instead, the username is set to
anonymous, and the password is to the guest by default. Here, user access is very limited. For
example, the user can be allowed to copy the files but not to navigate through directories.

Simple Mail Transfer Protocol (SMTP)



Pre-Requisite: Application Layer


Email is emerging as one of the most valuable services on the internet today. Most internet
systems use SMTP as a method to transfer mail from one user to another. SMTP is a push
protocol and is used to send the mail whereas POP (post office protocol) or IMAP (internet
message access protocol) is used to retrieve those emails at the receiver’s side.
SMTP Fundamentals
SMTP is an application layer protocol. The client who wants to send the mail opens
a TCP connection to the SMTP server and then sends the mail across the connection. The SMTP
server is an always-on listening mode. As soon as it listens for a TCP connection from any client,
the SMTP process initiates a connection through port 25. After successfully establishing a TCP
connection the client process sends the mail instantly.
SMTP Protocol
The SMTP model is of two types:
1. End-to-end method
2. Store-and-forward method
The end-to-end model is used to communicate between different organizations whereas the store
and forward method is used within an organization. An SMTP client who wants to send the mail
will contact the destination’s host SMTP directly, in order to send the mail to the destination.
The SMTP server will keep the mail to itself until it is successfully copied to the receiver’s
SMTP.
The client SMTP is the one that initiates the session so let us call it the client-SMTP and the
server SMTP is the one that responds to the session request so let us call it receiver-SMTP. The
client-SMTP will start the session and the receiver SMTP will respond to the request.
Model of SMTP System
In the SMTP model user deals with the user agent (UA), for example, Microsoft Outlook,
Netscape, Mozilla, etc. In order to exchange the mail using TCP, MTA is used. The user sending
the mail doesn’t have to deal with MTA as it is the responsibility of the system admin to set up a
local MTA. The MTA maintains a small queue of mail so that it can schedule repeat delivery of
mail in case the receiver is not available. The MTA delivers the mail to the mailboxes and the
information can later be downloaded by the user agents.
SMTP Model

Components of SMTP
1. Mail User Agent (MUA)
2. Mail Submission Agent (MSA)
3. Mail Transfer Agent (MTA)
4. Mail Delivery Agent (MDA)
1. Mail User Agent (MUA): It is a computer application that helps you in sending and retrieving
mail. It is responsible for creating email messages for transfer to the mail transfer agent(MTA).
2. Mail Submission Agent (MSA): It is a computer program that basically receives mail from a
Mail User Agent(MUA) and interacts with the Mail Transfer Agent(MTA) for the transfer of the
mail.
3. Mail Transfer Agent(MTA): It is basically software that has the work to transfer mail from
one system to another with the help of SMTP.
4. Mail Delivery Agent(MDA): A mail Delivery agent or Local Delivery Agent is basically a
system that helps in the delivery of mail to the local system.
Working of SMTP
1. Communication between the sender and the receiver :
The sender’s user agent prepares the message and sends it to the MTA. The MTA’s
responsibility is to transfer the mail across the network to the receiver’s MTA. To send mail, a
system must have a client MTA, and to receive mail, a system must have a server MTA.
2. Sending Emails:
Mail is sent by a series of request and response messages between the client and the server. The
message which is sent across consists of a header and a body. A null line is used to terminate the
mail header and everything after the null line is considered the body of the message, which is a
sequence of ASCII characters. The message body contains the actual information read by the
receipt.
3. Receiving Emails:
The user agent on the server-side checks the mailboxes at a particular time of intervals. If any
information is received, it informs the user about the mail. When the user tries to read the mail it
displays a list of emails with a short description of each mail in the mailbox. By selecting any of
the mail users can view its contents on the terminal.

Working of SMTP

Some SMTP Commands


 HELO – Identifies the client to the server, fully qualified domain name, only sent once per
session
 MAIL – Initiate a message transfer, the fully qualified domain of the originator
 RCPT – Follows MAIL, identifies an addressee, typically the fully qualified name of the
addressee, and for multiple addressees use one RCPT for each addressee
 DATA – send data line by line
For more, you can refer to SMTP Commands.
Difference between SMTP and Extended SMTP
Extended STMP is an extended version of SMTP. Extended SMTP is a set of protocols for
sending and receiving electronic messages on the internet. First, Email is sent from sender to
sender-server through ESTMP and from sender-server to receiver-server on the internet through
ESTMP. ESMTP follows the same protocols as SMTP. It adds more functionality, security, and
authentication than SMTP.
Let’s see some basic differences between them.
SMTP Extended SMTP

Users were not verified in SMTP as


a result of massive-scale scam In Extended SMTP, authentication of the sender is done.
emails being sent.

We cannot attach a Multimedia file


in SMTP directly without the help We can directly attach Multimedia FIle in ESMTP.
of MMIE.

We cannot reduce the size of the


We can reduce the size of the email in Extended SMTP.
email in Extended SMTP.

The main identification feature for ESMTP clients is to


SMTP clients open transmission
open a transmission with the command EHLO (Extended
with the command HELO.
HELLO).

Advantages of SMTP
 If necessary, the users can have a dedicated server.
 It allows for bulk mailing.
 Low cost and wide coverage area.
 Offer choices for email tracking.
 Reliable and prompt email delivery.
Disadvantages of SMTP
 SMTP’s common port can be blocked by several firewalls.
 SMTP security is a bigger problem.
 Its simplicity restricts how useful it can be.
 Just 7-bit ASCII characters can be used.
 If a message is longer than a certain length, SMTP servers may reject the entire message.
 Delivering your message will typically involve additional back-and-forth processing between
servers, which will delay sending and raise the likelihood that it won’t be sent.

Difference Between SMTP and HTTP




Pre-requisites: SMTP, HTTP
A network protocol is an accepted set of rules that govern data communication between different
devices in the network. In this article, we will see the difference between SMTP and HTTP
protocols.
SMTP
SMTP (Simple Mail Transfer Protocol) is a protocol for managing Internet’s electronic mail. It is
an application layer protocol. It uses TCP due to its reliable data transfer service. TCP
establishes SMTP connections at port 25. SMTP uses persistent connections. The same TCP
connection can be used to send multiple emails, once the connection has been established. Only
7-bit ASCII content is to be directly sent. Other content needs to be encoded to 7-bit ASCII and
then decoded at the receiving end.

DNS uses distributed servers so that data remains distributed in places and per server load
decreases. But SMTP never uses intermediate mail servers. Mail sent by user A to B will go
directly from A’s server to B’s server, and nowhere in between.
HTTP
HTTP is a client-server protocol. It is IP based communication protocol that is used to deliver
data from server to client or vice-versa. Any type of content can be exchanged as long as the
server and client are compatible with it.
Difference between SMTP and HTTP
SMTP HTTP

SMTP is used for mail services. HTTP is mainly used for data and file transfer.

It uses port 25. It uses port 80.

It is primarily a push protocol. It is primarily a pull protocol.

It imposes a 7-bit ASCII restriction on the It does not impose a 7-bit ASCII restriction.
content to be transferred. Can transfer multimedia, hyperlinks, etc.

HTTP transfers files between the Web server


SMTP transfers emails via Mail Servers.
and the Web client.

SMTP is a persistent type of TCP connection. It can use both Persistent and Non-persistent.

Uses different methods of authentication such


Uses base64 encoding for authentication.
as basic, digest, and OAuth.
SMTP HTTP

Does not support session management or Supports session management and cookies to
cookies. maintain state.

Has a smaller message size limit compared to Has a larger message size limit compared to
HTTP. SMTP.

Does not require authentication for browsing


Requires authentication for sending emails.
web pages.

Supports both plain text and encrypted Supports both plain text and encrypted
communication (SMTPS or STARTTLS). communication (HTTPS).

Domain Name System (DNS) in Application Layer



Domain Name System (DNS) is a hostname for IP address translation service. 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 of 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 domain:
1. Generic domains: .com(commercial), .edu(educational), .mil(military), .org(nonprofit
organization), .net(similar to commercial) all these are generic domains.
2. Country domain: .in (India) .us .uk
3. 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

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.

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

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

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 Work?

Authoritative DNS Server Vs Recursive DNS Resolver


Parameters
Authoritative DNS Server Recursive DNS Resolver

Resolves DNS queries on behalf


Holds the official DNS records for
Function of clients
a domain

Provides answers to specific DNS Actively looks up information


Role
queries for clients
Parameters
Authoritative DNS Server Recursive DNS Resolver

Responds with authoritative DNS Queries other DNS servers for


Query Handling
data DNS data

Doesn’t directly interact with end- Serves end-users or client


Client Interaction
users applications

Stores the DNS records for Looks up data from other DNS
Data Source
specific domains servers

Generally, doesn’t perform Caches DNS responses for


Caching
caching faster lookups

Hierarchical Does not participate in the Actively performs recursive


Resolution recursive resolution name resolution

IP address may vary depending


IP Address Has a fixed, known IP address
on ISP

Manages a specific DNS zone Does not manage any specific


Zone Authority
(domain) 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.
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?
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.

What is a DNS record?

DNS records (aka zone files) are instructions that live in authoritative DNS servers and provide
information about a domain including what IP address is associated with that domain and how to
handle requests for that domain. These records consist of a series of text files written in what is
known as DNS syntax. DNS syntax is just a string of characters used as commands that tell the
DNS server what to do. All DNS records also have a ‘TTL’, which stands for time-to-live, and
indicates how often a DNS server will refresh that record.

You can think of a set of DNS records like a business listing on Yelp. That listing will give you a
bunch of useful information about a business such as their location, hours, services offered, etc.
All domains are required to have at least a few essential DNS records for a user to be able to
access their website using a domain name, and there are several optional records that serve
additional purposes.
What are the most common types of DNS record?

 A record - The record that holds the IP address of a domain. Learn more about the A
record.

 AAAA record - The record that contains the IPv6 address for a domain (as opposed to
A records, which list the IPv4 address). Learn more about the AAAA record.

 CNAME record - Forwards one domain or subdomain to another domain, does NOT
provide an IP address. Learn more about the CNAME record.

 MX record - Directs mail to an email server. Learn more about the MX record.

 TXT record - Lets an admin store text notes in the record. These records are often
used for email security. Learn more about the TXT record.

 NS record - Stores the name server for a DNS entry. Learn more about the NS record.

 SOA record - Stores admin information about a domain. Learn more about the SOA
record.

 SRV record - Specifies a port for specific services. Learn more about the SRV record.

 PTR record - Provides a domain name in reverse-lookups. Learn more about the PTR
record.

You might also like