Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Computer Networks

Unit-V APPLICATION LAYER

Domain Name System


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.

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

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

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.

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 1


Computer Networks

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
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.
If an organization has 1000 devices then to check all devices, one by one every day,
are working properly or not is a hectic task. To ease these up, a Simple Network
Management Protocol (SNMP) is used.

C.Dinesh Asst.Prof./CSE(AIML),
/CSE(AIML), MRCE Page 2
Computer Networks

Simple Network Management Protocol (SNMP)


SNMP is an application layer protocol that uses UDP port number 161/162. SNMP
is used to monitor the network, detect network faults and sometimes even to configure
remote devices.

Components of SNMP
There are mainly three components of SNMP:
1. SNMP Manager
It is a centralized system used to monitor the network. It is also known as a Network
Management Station (NMS). A router that runs the SNMP server program is called an
agent, while a host that runs the SNMP client program is called a manager.
2. SNMP agent
It is a software management software module installed on a managed device. The
manager accesses the values stored in the database, whereas the agent maintains the
information in the database. To ascertain if the router is congested or not, for instance,
a manager can examine the relevant variables that a router stores, such as the quantity
of packets received and transmitted.
3. Management Information Base
MIB consists of information on resources that are to be managed. This information
is organized hierarchically. It consists of objects instances which are essentially
variables. A MIB, or collection of all the objects under management by the manager,
is unique to each agent. System, interface, address translation, IP, udp, and egp , icmp,
tcp are the eight categories that make up MIB. The mib object is home to these
groups.

SNMP messages
 GetRequest
It is simply used to retrieve data from SNMP agents. In response to this, the
SNMP agent responds with the requested value through a response message.

 GetNextRequest
To get the value of a variable, the manager sends the agent the
GetNextRequest message. The values of the entries in a table are retrieved using this
kind of communication. The manager won’t be able to access the values if it doesn’t
know the entries’ indices. The GetNextRequest message is used to define an object
in certain circumstances.

 SetRequest
It is used by the SNMP manager to set the value of an object instance on the
SNMP agent.

 Response
When sent in response to the Set message, it will contain the newly set value
as confirmation that the value has been set.

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 3


Computer Networks

 Trap
These are the message sent by the agent without being requested by the
manager. It is sent when a fault has occurred.

 InformRequest
It was added to SNMPv2c and is used to determine if the manager has
received the trap message or not. It is the same as a trap but adds an
acknowledgement that the trap doesn’t provide.

Advantages of SNMP
 It is simple to implement.
 Agents are widely implemented.
 Agent level overhead is minimal.
 It is robust and extensible.
 Polling approach is good for LAN based managed object.
 It offers the best direct manager agent interface.
 SNMP meet a critical need.

Limitation of SNMP
 It is too simple and does not scale well.
 There is no object oriented data view.
 It has no standard control definition.
 It has many implementation specific (private MIB) extensions.
 It has high communication overhead due to polling

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 4


Computer Networks

Electronic Mail
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 in the format of
name@domain.com.
 An email client
This is a software program used to send, receive and manage emails, such as
Gmail, Outlook, or Apple Mail.
 An email server
This is a computer system responsible for storing and forwarding emails to
their intended recipients.

To send an email
1. Compose a new message in your email client.
2. Enter the recipient’s email address in the “To” field.
3. Add a subject line to summarize the content of the message.
4. Write the body of the message.
5. Attach any relevant files if needed.
6. Click “Send” to deliver the message to the recipient’s email server.
7. Emails can also include features such as cc (carbon copy) and bcc (blind carbon
copy) to send copies of the message to multiple recipients, and reply, reply all, and
forward options to manage the conversation.

Electronic Mail (e-mail) is one of most widely used services of Internet. This service
allows an Internet user to send a message in formatted manner (mail) to the other Internet
user in any part of world. Message in mail not only contain text, but it also contains images,
audio and videos data. The person who is sending mail is called sender and person who
receives mail is called recipient. It is just like postal mail service.

Components of E-Mail System


 User Agent (UA)
The UA is normally a program which is used to send and receive mail.
Sometimes, it is called as mail reader. It accepts variety of commands for composing,
receiving and replying to messages as well as for manipulation of the mailboxes.
 Message Transfer Agent (MTA)
MTA is actually responsible for transfer of mail from one system to another.
To send a mail, a system must have client MTA and system MTA. It transfer mail to
mailboxes of recipients if they are connected in the same machine. It delivers mail to
peer MTA if destination mailbox is in another machine. The delivery from one MTA
to another MTA is done by Simple Mail Transfer Protocol.

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 5


Computer Networks

 Mailbox
It is a file on local hard drive to collect mails. Delivered mails are present in
this file. The user can read it delete it according to his/her requirement. To use e-mail
e
system each user must have a mailbox . Access to mailbox is only to owner of
mailbox.
 Spool file
This file contains mails that are to be sent. User
User agent appends outgoing mails
in this file using SMTP. MTA extracts pending mail from spool file for their delivery.
E-mail
mail allows one name, an alias, to represent several different e-mail
mail addresses. It is
known as mailing list,, Whenever user have to sent sent a message, system checks
recipient’s name against alias database. If mailing list is present for defined alias,
separate messages, one for each entry in the list, must be prepared and handed to
MTA. If for defined alias, there is no such mailing list is present, name itself becomes
naming address and a single message is delivered to mail transfer entity.

Services provided by E-mail system


 Composition – The composition refer to process that creates messages and answers.
For composition any kind of text edi
editor can be used.
 Transfer – Transfer means sending procedure of mail i.e. from the sender to recipient.
 Reporting – Reporting refers to confirmation for delivery of mail. It help user to
check whether their mail is delivered, lost or rejected.
 Displaying – It refers to present mail in form that is understand by the user.
 Disposition – This step concern with recipient that what will recipient do after
receiving mail i.e save mail, delete before reading or delete after reading.

Advantages of email
 Convenient and fast communication with individuals or groups globally.
 Easy to store and search for past messages.
 Ability to send and receive attachments such as documents, images, and videos.
 Cost-effective
effective compared to traditional mail and fax.
 Available 24/7.

C.Dinesh Asst.Prof./CSE(AIML),
/CSE(AIML), MRCE Page 6
Computer Networks

Disadvantages
 Risk of spam and phishing attacks.
 Overwhelming amount of emails can lead to information overload.
 Can lead to decreased face-to-face communication and loss of personal touch.
 Potential for miscommunication due to lack of tone and body language in written
messages.
 Technical issues, such as server outages, can disrupt email service.
 It is important to use email responsibly and effectively, for example, by keeping the
subject line clear and concise, using proper etiquette, and protecting against security
threats.

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 world. Message in the mail not only contain text, but it also
contains images, audio and videos data. The person who is sending mail is called sender and
person who receives mail is called the recipient. It is just like postal mail service.

Format of E-mail
An e-mail consists of three parts that are as follows
Envelope
Header
Body
Envelope
The envelope part encapsulates the message. It contains all information that is
required for sending any e-mail such as destination address, priority and security level. The
envelope is used by MTAs for routing message.

Header
The header consists of a series of lines. Each header field consists of a single line of
ASCII text specifying field name, colon and value. The main header fields related to message
transport are
To:
It specifies the DNS address of the primary recipient(s).
Cc :
It refers to carbon copy. It specifies address of secondary recipient(s).
BCC:
It refers to blind carbon copy. It is very similar to Cc. The only difference
between Cc and Bcc is that it allow user to send copy to the third party without
primary and secondary recipient knowing about this.
From :
It specifies name of person who wrote message.
Sender :
It specifies e-mail address of person who has sent message.

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 7


Computer Networks

Received :
It refers to identity of sender’s, data and also time message was received. It
also contains the information which is used to find bugs in routing system.
Return-Path:
It is added by the message transfer agent. ThThis
is part is used to specify how to
get back to the sender.

Body
The body of a message contains text that is the actual content/message that needs to
be sent, such as “Employees who are eligible for the new health care program should contact
their supervisors by next Friday if they want to switch.” The message body also may include
signatures or automatically generated text that is inserted by the sender’s email system.
The above-discussed
discussed field is represented in tabular form as follows.
follows

C.Dinesh Asst.Prof./CSE(AIML),
/CSE(AIML), MRCE Page 8
Computer Networks

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.
WWW can be defined as the collection of different websites around the world,
containing different information shared via local servers(or computers).
History
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.

System Architecture
From the user’s point of view, the web consists of a vast, worldwide connection of
documents or web pages. Each page may contain links to other pages anywhere in the
world. The pages can be retrieved and viewed by using browsers of which internet explorer,
Netscape Navigator, Google Chrome, etc are the popular ones. The browser fetches the
page requested interprets the text and formatting commands on it, and displays the page,
properly formatted, on the screen.
The basic model of how the web works are shown in the figure below. Here the
browser is displaying a web page on the client machine. When the user clicks on a line of
text that is linked to a page on the abd.com server, the browser follows the hyperlink by
sending a message to the abd.com server asking it for the page.

Here the browser displays a web page on the client machine when the user clicks on
a line of text that is linked to a page on abd.com, the browser follows the hyperlink by
sending a message to the abd.com server asking for the page.
Working of WWW
The World Wide Web is based on several different technologies:
Web browsers,
Hypertext Markup Language (HTML) and
Hypertext Transfer Protocol (HTTP).

A Web browser is used to access web pages. Web browsers can be defined as
programs which display text, data, pictures, animation and video on the Internet.

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 9


Computer Networks

Hyperlinked resources on the World Wide Web can be accessed using software
interfaces provided by Web browsers. Initially, Web browsers were used only for surfing
the Web but now they have become more universal. Web browsers can be used for several
tasks including conducting searches, mailing, transferring files, and much more. Some of
the commonly used browsers are Internet Explorer, Opera Mini, and Google Chrome.
Features of WWW
 HyperText Information System
 Cross-Platform
 Distributed
 Open Standards and Open Source
 Uses Web Browsers to provide a single interface for many services
 Dynamic, Interactive and Evolving.
 “Web 2.0”

Components of the Web


 Uniform Resource Locator (URL)
URL serves as a system for resources on the web.
 HyperText Transfer Protocol (HTTP)
It specifies communication of browser and server.
 Hyper Text Markup Language (HTML)
It defines the structure, organization and content of a webpage.

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 10


Computer Networks

HTTP
HTTP stands for HyperText Transfer Protocol. Tim Berner invents it. HyperText is
the type of text that is specially coded with the help of some standard coding language
called HyperText Markup Language (HTML). HTTP/2 is the new version of
HTTP. HTTP/3 is the latest version of HTTP, which is published in 2022.
The protocol used to transfer hypertext between two computers is known as
HyperText Transfer Protocol.
HTTP provides a standard between a web browser and a web server to establish
communication. It is a set of rules for transferring data from one computer to another. Data
such as text, images, and other multimedia files are shared on the World Wide Web.
Whenever a web user opens their web browser, the user indirectly uses HTTP. It is an
application protocol that is used for distributed, collaborative, hypermedia information
systems.

Working of HTTP

First of all, whenever we want to open any website then first open a web browser
after that we will type the URL of that website (e.g., www.facebook.com ). This URL is
now sent to the Domain Name Server (DNS). Then DNS first check records for this URL in
their database, then DNS will return the IP address to the web browser corresponding to
this URL. Now the browser is able to send requests to the actual server.
After the server sends data to the client, the connection will be closed. If we want
something else from the server we should have to re-establish the connection between the
client and the server.

The Basic Characteristics


 It is the protocol that allows web servers and browsers to exchange data over the web.
 It is a request response protocol.
 It uses the reliable TCP connections by default on TCP port 80.
 It is stateless means each request is considered as the new request. In other words,
server doesn't recognize the user by default.

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 11


Computer Networks

Streaming of videos
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 reverse skip, or stop the video whenever they want to do so.
There are 3 video streaming categories:
1. UDP Streaming
2. HTTP Streaming
3. Adaptive HTTP Streaming

Usually, today’s system employs HTTP and Adaptive HTTP Streaming. Common
characteristic of these three streaming technique is that the extensive use of Client-Side
Buffering.

Advantages of Client Buffering


 Client side buffer absorbs variations in server-client delay. Until the delayed packet
is received by the client, the received-but not yet-played video will be played.
 Even if bandwidth drops, user can view the video until the buffer is completely
drained.

1. UDP STREAMING
UDP servers send video chunks (Chunk: unit of information that contains either
control information or user data) to clients, based on client’s consumption rate. It transmits
chunks at a rate, that matches client’s video consumption rate by clocking out video chunks
over UDP over steady state.
For example,
Video consumption rate = 2Mbps
Capacity of one UDP packet = 8000 bits
Therefore, Transmission rate = 8000 bits/2 Mbps = 4000 msec

Properties
 UDP does not use congestion-control mechanism. Video chunks are encapsulated
before transmission using RTT (Real-Time Transport) Protocol.
 Additional client-server path is maintained to inform the client state to server like
pause, resume, skip and so on.
Drawbacks
 Bandwidth is unpredictable and varying between client and server.
 UDP streaming requires a separate media control server like RTSP server(Real-Time
Streaming Protocol) to track client state(pause, resume etc).
 Devices are configured with firewalls to block UDP traffic which prevents the
reception of UDP packets to clients.

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 12


Computer Networks

2. HTTP STREAMING
Video is stored in an HTTP server as a simple ordinary file with a unique URL. Client
establishes TCP connection with server and issues a HTTP GET request for that URL.
Server sends the video file along with an HTTP RESPONSE. Now the client buffer grabs
the video and then displayed on user screen.

Advantages
 Use of HTTP over TCP allows the video to traverse firewalls and NATs easily.
 Does not need any media control servers like RTSP servers causing reduction in cost
of large-scale deployment over internet.

Disadvantages
 Latency or lag between a video is recorded and played. This can make the viewers
more annoyed and irritated. Only a few milliseconds delay is acceptable.
 Early pre-fetching of video, but, what if, the user stops playing the video at a early
stage? Wastage of data is not appreciated.
 All clients receive the same encoding of the video, despite the large variations in
bandwidth amount available to different clients and also for same client over time.

3. ADAPTIVE HTTP STREAMING:


The major drawbacks of HTTP streaming, lead to development of new type of HTTP
based streaming referred to as DASH (Dynamic Adaptive Streaming over HTTP). Videos
are encoded into different bit rate versions, having different quality. The host makes a
dynamic video request of few seconds in length from different bit versions. When
bandwidth is high, high bit rate chunks are received hence high quality similarly, low
quality video during low bandwidth.

Advantages
 DASH uses the user to switch over different qualities of video on screen.
 Client can use HTTP byte-range request to precisely control the amount of pre-
fetched video that is locally buffered.
 DASH also stores the audio in different versions with different quality and different
bit-rate with unique URL. So the client dynamically selects the video and audio
chunks and synchronizes it locally in the play-out.

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 13


Computer Networks

Advantages of Streaming Stored Video


 Convenience
Streaming stored video allows users to access content at any time, without
the need for a physical media or download.
 Increased Accessibility
Streaming stored video makes it easier for users to access content, as it
eliminates the need for physical storage and retrieval of media.
 On-demand Content
Streaming stored video allows users to choose what they want to watch, and
when they want to watch it, rather than having to conform to a schedule.
 Increased User Experience
Streaming stored video provides a better viewing experience compared to
traditional broadcast, as it allows for higher quality video and improved
interactivity.
 Scalability
Streaming stored video can be scaled to meet the demands of large numbers
of users, making it a reliable solution for large-scale video distribution.

Applications of Streaming Stored Video


 Online Entertainment
Streaming stored video is commonly used for online entertainment, allowing
users to access movies, TV shows, and other content from the internet.
 Video Conferencing
Streaming stored video is used for video conferencing, allowing for real-time
communication between participants.
 Education
Streaming stored video is used in education to facilitate online classes and
lectures.
 Corporate Communications
Streaming stored video is used in corporate communications to share
important information with employees and stakeholders.
 Advertising
Streaming stored video is used for advertising, allowing businesses to reach
target audiences with video content.

C.Dinesh Asst.Prof./CSE(AIML), MRCE Page 14

You might also like