0% found this document useful (0 votes)
50 views29 pages

FON Unit IV - IoT

The document discusses the application layer in the OSI model. It describes how the application layer interacts with the presentation layer below it to provide various services and protocols that allow software applications to send and receive information. Some key application layer protocols discussed include DNS, DHCP, FTP, SMTP, HTTP, and SNMP. DNS in particular is described as a directory service that maps hostnames to IP addresses, allowing users to access resources through easier to remember names.

Uploaded by

21d41a0513
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)
50 views29 pages

FON Unit IV - IoT

The document discusses the application layer in the OSI model. It describes how the application layer interacts with the presentation layer below it to provide various services and protocols that allow software applications to send and receive information. Some key application layer protocols discussed include DNS, DHCP, FTP, SMTP, HTTP, and SNMP. DNS in particular is described as a directory service that maps hostnames to IP addresses, allowing users to access resources through easier to remember names.

Uploaded by

21d41a0513
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/ 29

UNIT-IV

UNIT- IV Application Layer –Domain name system, SNMP, Electronic Mail; the
World WEB, HTTP, Content Delivery.

Application Layer:

The Application Layer is topmost layer in the Open System Interconnection


(OSI) model. This layer provides several ways for manipulating the data
(information) which actually enables any type of user to access network with
ease. This layer also makes a request to its bottom layer, which is presentation
layer for receiving various types of information from it. The Application Layer
interface directly interacts with application and provides common web
application services. This layer is basically highest level of open system, which
provides services directly for application process.
Present Layer => Application Layer
Presentation LayerSession
Layer Transport Layer
Network Layer
Data Layer Physical
Layer
Functions of Application Layer :

The Application Layer, as discussed above, being topmost layer in OSI model,
performs several kinds of functions which are requirement in any kind of
application or communication process.
Following are list of functions which are performed by Application Layer of OSI
Model –
Data from User <=> Application layer <=> Data from Presentation Layer
 Application Layer provides a facility by which users can forward several
emails and it also provides a storage facility.
 This layer allows users to access, retrieve and manage files in a remote
computer.
 It allows users to log on as a remote host.
 This layer provides access to global information about various services.
 This layer provides services which include: e-mail, transferring files,
distributing results to the user, directory services, network resources and so
on.
 It provides protocols that allow software to send and receive information
and present meaningful data to users.
 It handles issues such as network transparency, resource allocation and
so on.
 This layer serves as a window for users and application processes to
access network services.
 Application Layer is basically not a function, but it performs application
layer functions.
 The application layer is actually an abstraction layer that specifies the
shared protocols and interface methods used by hosts in a communication
network.
 Application Layer helps us to identify communication partners, and
synchronizing communication.
 This layer allows users to interact with other software applications.
 In this layer, data is in visual form, which makes users truly understand
data rather than remembering or visualize the data in the binary format (0’s
or 1’s).
 This application layer basically interacts with Operating System (OS) and
thus further preserves the data in a suitable manner.
 This layer also receives and preserves data from it’s previous layer,
which is Presentation Layer (which carries in itself the syntax and semantics
of the information transmitted).
 The protocols which are used in this application layer depend upon what
information users wish to send or receive.
 This application layer, in general, performs host initialization followed by
remote login to hosts.
Working of Application Layer in the OSI model :
In the OSI model, this application layer is narrower in scope.
The application layer in the OSI model generally acts only like the interface
which is responsible for communicating with host-based and user-facing
applications. This is in contrast with TCP/IP protocol, wherein the layers below
the application layer, which is Session Layer and Presentation layer, are
clubbed together and form a simple single layer which is responsible for
performing the functions, which includes controlling the dialogues between
computers, establishing as well as maintaining as well as ending a particular
session, providing data compression and data encryption and so on.
At first, client sends a command t server and when server receives that
command, it allocates port number to client. Thereafter, the client sends an
initiation connection request to server and when server receives request, it
gives acknowledgement (ACK) to client through client has successfully
established a connection with the server and, therefore, now client has access
to server through which it may either ask server to send any types of files or
other documents or it may upload some files or documents on server itself.
Features provided by Application Layer Protocols :
To ensure smooth communication, application layer protocols are implemented
the same on source host and destination host.
The following are some of the features which are provided by Application layer
protocols-
 The Application Layer protocol defines process for both parties which are
involved in communication.
 These protocols define the type of message being sent or received from
any side (either source host or destination host).
 These protocols also define basic syntax of the message being forwarded
or retrieved.
 These protocols define the way to send a message and the expected
response.
 These protocols also define interaction with the next level.
Application Layer Protocols:
The application layer provides several protocolswhich allow any software to
easily send and receive information and present meaningful data to its users.
The following are some of the protocols which are provided by the application
layer.
 TELNET: Telnet stands for Telecommunications Network. This protocol is
used for managing files over the Internet. It allows the Telnet clients to
access the resources of Telnet server. Telnet uses port number 23.
 DNS: DNS stands for Domain Name System. The DNS service translates
the domain name (selected by user) into the corresponding IP address. For
example- If you choose the domain name as www.abcd.com, then DNS must
translate it as 192.36.20.8 (random IP address written just for understanding
purposes). DNS protocol uses the port number 53.
 DHCP: DHCP stands for Dynamic Host Configuration Protocol. It
provides IP addresses to hosts. Whenever a host tries to register for an IP
address with the DHCP server, DHCP server provides lots of information to
the corresponding host. DHCP uses port numbers 67 and 68.
 FTP: FTP stands for File Transfer Protocol. This protocol helps to transfer
different files from one device to another. FTP promotes sharing of files via
remote computer devices with reliable, efficient data transfer. FTP uses port
number 20 for data access and port number 21 for data control.
 SMTP: SMTP stands for Simple Mail Transfer Protocol. It is used to
transfer electronic mail from one user to another user. SMTP is used by end
users to send emails with ease. SMTP uses port numbers 25 and 587.
 HTTP: HTTP stands for Hyper Text Transfer Protocol. It is the foundation
of the World Wide Web (WWW). HTTP works on the client server model.
This protocol is used for transmitting hypermedia documents like HTML. This
protocol was designed particularly for the communications between the web
browsers and web servers, but this protocol can also be used for several
other purposes. HTTP is a stateless protocol (network protocol in which a
client sends requests to server and server responses back as per the given
state), which means the server is not responsible for maintaining the
previous client’s requests. HTTP uses port number 80.
 NFS: NFS stands for Network File System. This protocol allows remote
hosts to mount files over a network and interact with those file systems as
though they are mounted locally. NFS uses the port number 2049.
 SNMP: SNMP stands for Simple Network Management Protocol. This
protocol gathers data by polling the devices from the network to the
management station at fixed or random intervals, requiring them to disclose
certain information. SNMP uses port numbers 161 (TCP) and 162 (UDP).

Domain Name System (DNS):


An application layer protocol defines how the application processes running on different
systems, pass the messages to each other.

o DNS stands for Domain Name System.


o DNS is a directory service that provides a mapping between the name of a host
on the network and its numerical address.
o DNS is required for the functioning of the internet.
o Each node in a tree has a domain name, and a full domain name is a sequence of
symbols specified by dots.
o DNS is a service that translates the domain name into IP addresses. This allows
the users of networks to utilize user-friendly names when looking for other hosts
instead of remembering the IP addresses.
o For example, suppose the FTP site at facebook.com had an IP address of
132.147.165.50, most people would reach this site by specifying ftp.facebook.com.
Therefore, the domain name is more reliable than IP address.

DNS is a TCP/IP protocol used on different platforms. The domain name space is divided
into three different sections: generic domains, country domains, and inverse domain.
Generic Domains
o It defines the registered hosts according to their generic behavior.
o Each node in a tree defines the domain name, which is an index to the DNS
database.
o It uses three-character labels, and these labels describe the organization type.

Label Description

aero Airlines and aerospace companies

biz Businesses or firms

com Commercial Organizations

coop Cooperative business Organizations

edu Educational institutions

gov Government institutions

info Information service providers

int International Organizations


mil Military groups

museum Museum & other nonprofit organizations

name Personal names

net Network Support centers

org Nonprofit Organizations

pro Professional individual Organizations


Country Domain
The format of country domain is same as a generic domain, but it uses two-character
country abbreviations (e.g., us for the United States) in place of three character
organizational abbreviations.

Inverse Domain
The inverse domain is used for mapping an address to a name. When the server has
received a request from the client, and the server contains the files of only authorized
clients. To determine whether the client is on the authorized list or not, it sends a query
to the DNS server and ask for mapping an address to the name.

Working of DNS
o DNS is a client/server network communication protocol. DNS clients send
requests to the. server while DNS servers send responses to the client.
o Client requests contain a name which is converted into an IP address known as a
forward DNS lookups while requests containing an IP address which is converted
into a name known as reverse DNS lookups.
o DNS implements a distributed database to store the name of all the hosts
available on the internet.
o If a client like a web browser sends a request containing a hostname, then a piece
of software such as DNS resolver sends a request to the DNS server to obtain
the IP address of a hostname. If DNS server does not contain the IP address
associated with a hostname, then it forwards the request to another DNS server.
If IP address has arrived at the resolver, which in turn completes the request over
the internet protocol.

SNMP
o SNMP stands for Simple Network Management Protocol.
o SNMP is a framework used for managing devices on the internet.
o It provides a set of operations for monitoring and managing the internet.

SNMP Concept
o SNMP has two components Manager and agent.
o The manager is a host that controls and monitors a set of agents such as routers.
o It is an application layer protocol in which a few manager stations can handle a set of
agents.
o The protocol designed at the application level can monitor the devices made by different
manufacturers and installed on different physical networks.
o It is used in a heterogeneous network made of different LANs and WANs connected by
routers or gateways.

Managers & Agents


o A manager is a host that runs the SNMP client program while the agent is a router that
runs the SNMP server program.
o Management of the internet is achieved through simple interaction between a manager
and agent.
o The agent is used to keep the information in a database while the manager is used to
access the values in the database. For example, a router can store the appropriate
variables such as a number of packets received and forwarded while the manager can
compare these variables to determine whether the router is congested or not.
o Agents can also contribute to the management process. A server program on the agent
checks the environment, if something goes wrong, the agent sends a warning message
to the manager.

Management with SNMP has three basic ideas:


o A manager checks the agent by requesting the information that reflects the behavior of
the agent.
o A manager also forces the agent to perform a certain function by resetting values in the
agent database.
o An agent also contributes to the management process by warning the manager
regarding an unusual condition.

Management Components
o Management is not achieved only through the SNMP protocol but also the use of other
protocols that can cooperate with the SNMP protocol. Management is achieved through
the use of the other two protocols: SMI (Structure of management information) and
MIB(management information base).
o Management is a combination of SMI, MIB, and SNMP. All these three protocols such as
abstract syntax notation 1 (ASN.1) and basic encoding rules (BER).

SMI
The SMI (Structure of management information) is a component used in network
management. Its main function is to define the type of data that can be stored in an
object and to show how to encode the data for the transmission over a network.
MIB
o The MIB (Management information base) is a second component for the network
management.
o Each agent has its own MIB, which is a collection of all the objects that the manager can
manage. MIB is categorized into eight groups: system, interface, address translation, ip,
icmp, tcp, udp, and egp. These groups are under the mib object.

SNMP
SNMP defines five types of messages: GetRequest, GetNextRequest, SetRequest,
GetResponse, and Trap.
GetRequest: The GetRequest message is sent from a manager (client) to the agent
(server) to retrieve the value of a variable.

GetNextRequest: The GetNextRequest message is sent from the manager to agent to


retrieve the value of a variable. This type of message is used to retrieve the values of the
entries in a table. If the manager does not know the indexes of the entries, then it will
not be able to retrieve the values. In such situations, GetNextRequest message is used to
define an object.

GetResponse: The GetResponse message is sent from an agent to the manager in


response to the GetRequest and GetNextRequest message. This message contains the
value of a variable requested by the manager.

SetRequest: The SetRequest message is sent from a manager to the agent to set a
value in a variable.
Trap: The Trap message is sent from an agent to the manager to report an event. For
example, if the agent is rebooted, then it informs the manager as well as sends the time
of rebooting.

Electronic Mail:

Electronic mail (e-mail) is a computer-based programme that allows


users to send and receive messages. E-mail is the electronic version of a
letter, but with time and flexibility advantages. While a letter can take
anywhere from a week to a couple of months to reach its intended
destination, an e-mail is sent virtually almost instantly.
Messages in the mail contain not just text but also photos, audio, and
video data. A person sending an e-mail is a sender, and the person
receiving it is the recipient.
Features Of E-Mail
Spontaneity: In a couple of seconds, you may send a message to
anybody on the globe.
Asynchronous: You may send the e-mail and let the recipient view it at
their leisure.
Attachments of data, pictures, or music, frequently in compressed
forms, can be delivered as an e-mail to a person anywhere in the world.
Addresses can be stored in an address book and retrieved instantly.
Through an e-mail, a user can transfer multiple copies of a message to
various individuals.

Services offered by E-mail system :


Composition - Creating messages and responses is referred to as
composition.
Transfer - Sending mail from the sender to the receiver is referred to as
a transfer.
Reporting - Mail delivery confirmation is known as reporting. It allows
users to see if
their mail has been delivered, misplaced, or rejected.
Displaying – This refers to presenting messages so that the user can
understand.
Disposition — This stage is concerned with the recipient's actions after
receiving mail, such as saving it, deleting it before reading it, or after
reading it.
Components Of E-mail System
The following are the essential components of an e-mail system:
1. User Agent (UA)
2. Message Transfer Agent (MTA)
3. Message Access Agent

User Agent (UA): The User-Agent is a simple software that sends and
receives mail. It is also known as a mail reader. It supports a wide range
of instructions for sending, receiving, and replying to messages, as well
as manipulating mailboxes.
Some of the services supplied by the User-Agent are listed below:
 Reading a Message
 Sending a reply to a Message
 Message Composition
 Forwarding a Message
 Handling the Message

Message Transfer Agent: The Message Transfer Agent manages the


actual e-mail transfer operation (MTA). Simple Mail Transfer Protocol
sends messages from one MTA to another. A system must have both a
client MTA and a system MTA to send an e-mail. If the recipients are
connected to the same computer, it sends mail to their mailboxes. If the
destination mailbox is on another computer, it sends mail to the
receiver's MTA.

Message Access Agent: Simple Mail Transfer Protocol is used for the
first and second stages of e-mail delivery.
The pull protocol is mainly required at the third stage of e-mail delivery,
and the message access agent is used at this point.
POP and IMAP4 are the two protocols used to access messages.

Architecture of E-mail

Source: Researchgate.net
First Scenario:
In the first scenario, two user agents are required. The sender and
recipient of the e-mail share the same machine directly connected to the
server.
For example, let us consider two user agents, Tom and Zen. When Tom
sends an e-mail to Zen, the user agent (UA) programme is used to
prepare the message. Following that, this e-mail gets saved in Zens
inbox.

Second Scenario:
The sender and recipient of an e-mail, in this case, are essentially users
on two different machines over the internet. User-Agents and Message
Transfer Agents(MTA) are required in this scenario.
Take, for example, two user agents (John and Micheal), as illustrated in
the diagram. When John sends an e-mail to Micheal, the user agent (UA)
and message transfer agents (MTAs) programmes prepare the e-mail for
transmission over the internet. Following that, this e-mail gets stored in
Micheal's inbox.

Third Scenario:
The sender is connected to the system by a point-to-point WAN, which
can be a dial-up modem or a cable modem in this case. On the other
hand, the receiver is directly attached to the system, as it was in the
second scenario.
The sender also needs a User agent (UA) to prepare the message in this
situation. After preparing the statement, the sender delivers it over LAN
or WAN via a pair of MTAs.

Fourth Scenario:
The recipient is linked to the mail server via WAN or LAN in this
scenario. When the message arrives, the recipient must retrieve it, which
needs additional client/server agents. This scenario requires two user
agents (UAs), two pairs of message transfer agents (MTAs), and a
couple of message access agents (MAAs).

World Wide Web:


The World Wide Web is abbreviated as WWW and is commonly known as the
web. The WWW was initiated by CERN (European library for Nuclear Research)
in 1989.
It mainly consists of a worldwide collection of electronic documents (i.e, Web Pages).
It is a project created, by Timothy Berner Lee in 1989, for researchers to work
together effectively at CERN. is an organization, named the World Wide Web
Consortium (W3C), which was developed for further development of the web.
This organization is directed by Tim Berner’s Lee, the father of the web.

 World wide web provides flexibility, portability, and user-friendly features.


 It is basically a way of exchanging information between computers on the Internet.
 The WWW is mainly the network of pages consists of images, text, and sounds on
the Internet which can be simply viewed on the browser by using the browser
software.
Components of WWW

The Components of WWW mainly falls into two categories:

1. Structural Components
2. Semantic Components

Architecture of WWW

The WWW is mainly a distributed client/server service where a client using the browser
can access the service using a server. The Service that is provided is distributed over
many different locations commonly known as sites/websites.

 Each website holds one or more documents that are generally referred to as web
pages.
 Where each web page contains a link to other pages on the same site or at other
sites.
 These pages can be retrieved and viewed by using browsers.

In the above case, the client sends some information that belongs to site A. It generally
sends a request through its browser (It is a program that is used to fetch the documents
on the web).

and also the request generally contains other information like the address of the site,
web page(URL).

The server at site A finds the document then sends it to the client. after that when the
user or say the client finds the reference to another document that includes the web
page at site B.

The reference generally contains the URL of site B. And the client is interested to take a
look at this document too. Then after the client sends the request to the new site and
then the new page is retrieved.
Now we will cover the components of WWW in detail.

1. Client/Browser

The Client/Web browser is basically a program that is used to communicate with the
webserver on the Internet.

Each browser mainly comprises of three components and these are

 Controller
 Interpreter
 Client Protocols

 The Controller mainly receives the input from the input device, after that it uses the
client programs in order to access the documents.
 After accessing the document, the controller makes use of an interpreter in order to
display the document on the screen.
 An interpreter can be Java, HTML, javascript mainly depending upon the type of the
document.
 The Client protocol can be FTP, HTTP, TELNET.

2. Server
The Computer that is mainly available for the network resources and in order to provide
services to the other computer upon request is generally known as the server.

 The Web pages are mainly stored on the server.


 Whenever the request of the client arrives then the corresponding document is sent
to the client.
 The connection between the client and the server is TCP.
 It can become more efficient through multithreading or multiprocessing. Because in
this case, the server can answer more than one request at a time.

3. URL

URL is an abbreviation of the Uniform resource locator

 It is basically a standard used for specifying any kind of information on the Internet.
 In order to access any page the client generally needs an address.
 To facilitate the access of the documents throughout the world HTTP generally
makes use of Locators.

URL mainly defines the four things:

Protocol It is a client/server program that is mainly used to retrieve the


document. A commonly used protocol is HTTP.

Host Computer It is the computer on which the information is located. It is not


mandatory because it is the name given to any computer that hosts the web
page.

Port The URL can optionally contain the port number of the server. If the port
number is included then it is generally inserted in between the host and path and
is generally separated from the host by the colon.

Path It indicates the pathn ame of the file where the information is located.

 www is addressable by uniform resource locator(URL).


 Ex: http://www.facebook.com
4. HTML

HTML is an abbreviation of Hypertext Markup Language

 It is generally used for creating web pages.


 It is mainly used to define the contents, structure, and organization of the web page.

5. XML

XML is an abbreviation of Extensible Markup Language. It mainly helps in order to


define the common syntax in the semantic web.

Features of WWW

Given below are some of the features provided by the World Wide Web:

 Provides a system for Hypertext information


 Open standards and Open source
 Distributed.
 Mainly makes the use of Web Browser in order to provide a single interface for
many services.
 Dynamic
 Interactive
 Cross-Platform

Advantages of WWW

Given below are the benefits offered by WWW:

 It mainly provides all the information for Free.


 Provides rapid Interactive way of Communication.
 It is accessible from anywhere.
 It has become the Global source of media.
 It mainly facilitates the exchange of a huge volume of data.
Disadvantages of WWW

There are some drawbacks of the WWW and these are as follows;

 It is difficult to prioritize and filter some information.


 There is no guarantee of finding what one person is looking for.
 There occurs some danger in case of overload of Information.
 There is no quality control over the available data.
 There is no regulation.

Hyper Text Transfer Protocol (HTTP):


o HTTP stands for Hyper Text Transfer Protocol.
o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.
o This protocol is known as HyperText Transfer Protocol because of its efficiency
that allows us to use in a hypertext environment where there are rapid jumps
from one document to another document.
o HTTP is similar to the FTP as it also transfers the files from one host to another
host. But, HTTP is simpler than FTP as HTTP uses only one connection, i.e., no
control connection to transfer the files.
o HTTP is used to carry the data in the form of MIME-like format.
o HTTP is similar to SMTP as the data is transferred between client and server. The
HTTP differs from the SMTP in the way the messages are sent from the client to
the server and from server to the client. SMTP messages are stored and
forwarded while HTTP messages are delivered immediately.

Features of HTTP:
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates
a request and waits for a response from the server. When the server receives the
request, the server processes the request and sends back the response to the
HTTP client after which the client disconnects the connection. The connection
between client and server exist only during the current request and response
time only.
o Media independent: HTTP protocol is a media independent as data can be sent
as long as both the client and server know how to handle the data content. It is
required for both the client and server to specify the content type in MIME-type
header.
o Stateless: HTTP is a stateless protocol as both the client and server know each
other only during the current request. Due to this nature of the protocol, both
the client and server do not retain the information between various requests of
the web pages.

HTTP Transactions

The above figure shows the HTTP transaction between client and server. The client initiates a
transaction by sending a request message to the server. The server replies to the request message
by sending a response message.
Messages
HTTP messages are of two types: request and response. Both the message types follow the same
message format.

Request Message: The request message is sent by the client that consists of a request line,
headers, and sometimes a body.

Response Message: The response message is sent by the server to the client that consists of a
status line, headers, and sometimes a body.
Uniform Resource Locator (URL)
o A client that wants to access the document in an internet needs an address and
to facilitate the access of documents, the HTTP uses the concept of Uniform
Resource Locator (URL).
o The Uniform Resource Locator (URL) is a standard way of specifying any kind of
information on the internet.
o The URL defines four parts: method, host computer, port, and path.

o Method: The method is the protocol used to retrieve the document from a server.
For example, HTTP.
o Host: The host is the computer where the information is stored, and the
computer is given an alias name. Web pages are mainly stored in the computers
and the computers are given an alias name that begins with the characters
"www". This field is not mandatory.
o Port: The URL can also contain the port number of the server, but it's an optional
field. If the port number is included, then it must come between the host and
path and it should be separated from the host by a colon.
o Path: Path is the pathname of the file where the information is stored. The path
itself contain slashes that separate the directories from the subdirectories and
files

Content delivery Network or Content Distribution Network:

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 wide demographic of users is no easy
task. One can think that a straightforward approach to this can be building a large
data center, storing all the content in the servers, and provide it to the users
worldwide. But there are issues that arise when this approach is followed-
1. Firstly if the data center is in the USA and the user is in India there will be
slower delivery of content.
2. Secondly, a single data center represents a single point of failure.
3. Thirdly, if some content is being accessed frequently from a remote area
then it is likely to follow the same links, and this, in turn, results in wastage of
bandwidth.
CDN – Content Distribution Network or Content Delivery Network is a
solution that provides faster delivery of content to the users distributed worldwide.
What is a CDN?
A CDN is essentially a group of servers that are strategically placed across the
globe with the purpose of accelerating the delivery of web content. A CDN-
1. Manages servers that are geographically distributed over different locations.
2. Stores the web content in its servers.
3. Attempts to direct each user to a server that is part of the CDN so as to
deliver content quickly.
How does CDN work?
To minimize the distance between the visitors and your website’s server, a CDN
stores a cached version of original content in multiple geographical locations
(a.k.a., points of presence/ PoPs). Each PoP contains a number of caching servers
known as edge servers that are responsible for content delivery to visitors within
its proximity. CDN caches content in many places at once, ensuring quick
delivery of content.
Let’s consider an example:
Suppose you are hosting a website, wherein your origin server(server containing
the primary source of your website’s data, where website files are hosted) is
located in Australia and a company XYZ provides you the CDN service.
When a user in India clicks on a video on your website, the request goes to the
user’s local DNS server(See DNS), which relays the request to the authoritative
DNS server of your website.
The authoritative DNS server then identifies that the user is situated far away and
therefore relays the request to its XYZ’s DNS server. Now the DNS query enters
XYZ’s network which provides the address of the edge server that is closest to
the user to the Local DNS server. The video is delivered by this edge server.
From this point onwards the local DNS server knows the address of the edge
server. So whenever users within its network send a request for content from your
website, the local DNS server shall relay the request to the edge server.
CDN thus minimizes the number of hops required to deliver the data to a user’s
browser due to the POPs that are located near the user.
Following image depicts the same:

Following Image depicts the difference between how a request is handled with
and without a CDN respectively:
WITH CDN(2 SECONDS)

WITHOUT CDN(5 SECONDS)

You might also like