100% found this document useful (1 vote)
173 views

UNIT V Application Layer

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
100% found this document useful (1 vote)
173 views

UNIT V Application Layer

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

COMPUTER NETWORK

B.TECH CSE
3rd Year – 1st Sem

UNIT – V

Application Layer

DEPARTMENT OF CSE
VIGNAN INSTITUTE OF TECHNOLOGY & SCIENCE
DESHMUKHI
Application Layer
The Application Layer, residing at the top of the OSI model, serves as a vital interface between end-
user applications and the underlying network infrastructure. It encompasses protocols and standards
facilitating communication among applications, such as HTTP, FTP, SMTP, and DNS, ensuring
seamless data exchange. Handling data formatting and abstraction of network complexities, this
layer enables developers to focus on application functionality. It encapsulates data for transmission
and provides mechanisms for security, encryption, and authentication, ensuring secure
communication. Examples of applications operating at this layer include web browsers, email
clients, and file transfer utilities. By fostering interoperability and enabling end-to-end
communication, the Application Layer plays a crucial role in facilitating efficient network services
for users.
The Application Layer is topmost layer in the Open System Interconnection (OSI) model.
The application layer transmits the data in the form of a user-readable format. It provides many
services to the user. It transfers data to the presentation layer. Furthermore, it either provides
services to the presentation layer or takes services from the presentation layer.
 The application layer programs are based on client and servers.
The application Layer:
 determines the communication partner to whom data will be transmitted.
 specifies the availability of resources, i.e., it checks whether adequate network resources
are available or not.
 delivers protocols that are accountable for creating seamless transmission between
applications.

 serves as an interface between user applications and the network.


 delivers directory services, which means it permits access to any sort of data from a
distributed database.

 delivers several facilities to the users for multiple email forwarding and storage facilities.
 lets users log into a remote host and access any type of application.
 provides file transfer access and management.
 communicates with the operating system and guarantees that data is saved properly.
 enables users to communicate with other software applications.

Protocols of the application layer


 SMTP: SMTP is a TCP/IP protocol used to organize email.
 Data is sent from one email address to another. SMTP is accountable for the transmission of
email messages over the Internet. SMTP is a valid protocol for ensuring the delivery of email
messages and also provides security for email transmission by supporting authentication
mechanisms.

 HTTP: HTTP allows users to access Internet data.


 It is accountable for the conversation between the client and the web server. HTTP is a user
requests data, the browser transmits an HTTP request to a server hosting the data. The server
replies with an HTTP response, which holds the requested data or an error notification if the
data is not found or cannot be accessed.

 FTP: FTP is used to send files between server and client using the internet.
 ETP is a client-server model, where the client requests a file, and the server responds with the
requested file. It uses TCP to share data as TCP delivers error-free transmission of data.

 TFTP: TFTP is a User Datagram Protocol (UDP) based protocol, which means it is
unreliable and connectionless.
 It transmits all commands and data over a single UDP port. It is used when a lightweight and
fast file transfer protocol is required. It is uncomplicated to use and configure.

 DNS: DNS translates human-readable domain names into IP addresses so that web browsers
can comprehend what a user desires to access on the Internet.
 SNMP: SNMP used for managing and monitoring network devices and systems.
 Using this protocol, network administrators gather data about network performance, identify
and troubleshoot problems, and remotely configure network tools.

DNS—THE 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. 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.
Kinds of Domain

i. Generic domains: .com(commercial),

 .edu(educational), .mil(military), .org(nonprofit organization), .net(similar to


commercial) all these are generic domains.
ii. Country domain: .in (India) .us .uk
iii. iii. Inverse domain: if we want to know what is the domain name of the website.
 IP to domain name mapping.

Generic top-level domain


The principal DNS resource record types
ELECTRONIC MAIL
Electronic mail, commonly known as email, is a fundamental communication tool facilitated by
computer networks, particularly the internet. It allows users to send and receive digital messages
and files quickly and efficiently. At its core, email operates through the Simple Mail Transfer
Protocol (SMTP) for sending messages and the Post Office Protocol (POP) or Internet Message
Access Protocol (IMAP) for retrieving them. Email addresses serve as unique identifiers for both
senders and recipients, enabling the delivery of messages to specific destinations. Features such as
attachments, formatting options, and forwarding capabilities enhance the versatility of email for
various communication needs. Additionally, email clients and web-based interfaces provide user-
friendly platforms for composing, managing, and organizing emails. Despite the advent of
alternative communication methods, email remains a ubiquitous and indispensable tool for personal,
professional, and organizational correspondence.

Electronic mail is a method of transmitting and receiving messages using electronic devices. It
was conceived in the late 20th century as the digital version of mail.
 In 1970-71s, when Ray Tomlinson created a way to transmit messages between computer
systems on the ARPNET.
 Nowadays email is one of the popular way of digital communication.
Architecture and Services
It consists of two kinds of subsystems:
i. The user agents, which allow people to read and send email, and ii. the message transfer
agents, which move the messages from the source to the destination.
ii. Also refer to message transfer agents informally as mail servers.

The user agent is a program that provides a graphical interface, or sometimes a text- and command-
based interface that lets users interact with the email system. It includes a means to compose
messages and replies to messages, display incoming messages, and organize messages by filing,
searching, and discarding them. The act of sending new messages into the mail system for delivery
is called mail submission.
The User Agent
o A user agent is a program (sometimes called an email reader) that accepts a variety of
commands for composing, receiving, and replying to messages, as well as for
manipulating mailboxes.
There are many popular user agents, including Google gmail, Microsoft Outlook, Mozilla
Thunderbird, and Apple Mail.

Message Formats
In email communication, messages are typically formatted in various ways to accommodate
different content types and user preferences. The primary formats include plain text, which consists
of ASCII characters without any formatting, ensuring universal compatibility; HTML, enabling rich
text formatting with fonts, colors, and multimedia elements for visually engaging content; multipart,
facilitating the inclusion of multiple formats within a single message to cater to diverse recipient
capabilities; and attachments, allowing users to append files such as documents, images, and
multimedia for supplementary information. Each format serves specific purposes, with plain text
providing simplicity and reliability, HTML offering enhanced visual appeal, multipart ensuring
flexibility, and attachments enabling the sharing of additional resources. These formats collectively
contribute to the effectiveness and versatility of email communication across various platforms and
devices.
Messages sent by the user agent must be placed in a standard format to be handled by the
message transfer agents.
RFC 5322—The Internet Message Format
To: field gives the DNS address of the primary recipient Cc: field gives the addresses
of any secondary recipients.
Bcc: (Blind carbon copy) field is like the Cc: field,
From: and Sender:, tell who wrote and sent the message, respectively. Received: is added by each
message transfer agent along the way. Return-Path: field is added by the final message transfer
agent and was intended to tell how to get back to the sender.
Reply-To: field is sometimes used when neither the person composing the message nor the person
sending the message wants to see the reply.
Message-Id: is an automatically generated number that is used to link messages together (e.g., when
used in the In-Reply-To: field) and to prevent duplicate delivery.
MIME—The Multipurpose Internet Mail Extensions
MIME-Version: is dealing with a MIME message, and which version of MIME it uses.
Content-Description: header is an ASCII string telling what is in the message.
Content-Id: header identifies the content.
Content-Transfer-Encoding: tells how the body is wrapped for transmission through the network.

Message Transfer
The mail transfer is done with the SMTP protocol.
 The simplest way to move messages is to establish a transport connection from the source machine
to the destination machine and then just transfer the message.
 This is how SMTP originally worked.

SMTP (Simple Mail Transfer Protocol) and Extensions

SMTP (Simple Mail Transfer Protocol) is a communication protocol widely used for sending email
messages between servers over a network. It operates on the application layer of the OSI model and
follows a client-server architecture. SMTP facilitates the transfer of email messages by specifying
how they should be formatted, transferred, and delivered. The protocol typically utilizes TCP port
25 for communication. While the core SMTP protocol is relatively simple, various extensions and
enhancements have been developed to improve functionality, security, and efficiency. Some notable
SMTP extensions include SMTP Authentication (SMTP AUTH) for authenticating users before
allowing email transmission, SMTP STARTTLS for securing email communication with
encryption, and SMTPUTF8 for supporting internationalized email addresses and content in
different character sets. These extensions enhance the capabilities of SMTP and ensure reliable and
secure email delivery in modern email systems.

Within the Internet, email is delivered by having the sending computer establish a TCP
connection to port 25 of the receiving computer.
Listening to this port is a mail server that speaks SMTP (Simple Mail Transfer Protocol).
Final Delivery
IMAP—The Internet Message Access Protocol
 One of the main protocols that is used for final delivery is IMAP (Internet Message
Access Protocol).
 Version 4 of the protocol is defined in RFC 3501.
 To use IMAP, the mail server runs an IMAP server that listens to port 143. The user
agent runs an IMAP client.
POP3 - (Post Office Protocol, version 3)

POP3 (Post Office Protocol, version 3) is a protocol used for retrieving emails from a remote server
to a client device. It operates on the application layer, typically using TCP port 110. Users access
their emails through POP3 clients, which establish connections with the server, authenticate users,
and download emails to the local device. Unlike IMAP, POP3 usually removes emails from the
server after downloading them to the client.

 POP3 is a simpler protocol but supports fewer features and is less secure in typical
usage.
 Mail is usually downloaded to the user agent computer, instead of remaining on the
mail server.
 This makes life easier on the server, but harder on the user.
 It is not easy to read mail on multiple computers, plus if the user agent computer
breaks, all email may be lost permanently.
 Nonetheless, you will still find POP3 in use.

THE WORLD WIDE WEB


The World Wide Web (WWW or simply the Web) is a global system of interconnected documents
and resources accessible via the Internet. It operates on the application layer of the OSI model and
relies on protocols such as HTTP (Hypertext Transfer Protocol) for data transmission. The Web is
built upon the concept of hypertext, allowing users to navigate between different resources through
hyperlinks. It encompasses a vast array of websites, web pages, multimedia content, and web
applications hosted on servers worldwide. Tim Berners-Lee, a British computer scientist, is credited
with inventing the World Wide Web in 1989 while working at CERN. The Web has transformed
communication, information dissemination, commerce, entertainment, and numerous other aspects
of modern life, becoming an indispensable tool for billions of users globally.

The Web, as the World Wide Web is popularly known, is an architectural framework for accessing
linked content spread out over millions of machines all over the Internet.

 In 1994, CERN and M.I.T. signed an agreement setting up the W3C (World Wide Web
Consortium), an organization devoted to further developing the Web, standardizing protocols,
and encouraging interoperability between sites.

WWW was a what you see is what you get (WYSIWYG) hypertext browser/editor that ran in the
NextStep environment. The World Wide Web (WWW or simply the Web) is an information
system that enables content sharing over the
Internet . It allows documents and other web resources to be accessed over the Internet according to
specific rules of the Hypertext Transfer Protocol (HTTP).

World Wide Web, which is also known as a Web, is a collection of websites or web pages stored in
web servers and connected to local computers through the internet. These websites contain text
pages, digital images, audios, videos, etc.

History of the World Wide Web:


The World Wide Web was invented by a British scientist, Tim Berners-Lee in 1989. He was
working at CERN at that time. Originally, it was developed by him to fulfill the need of automated
information sharing between scientists across the world, so that they could easily share the data and
results of their experiments and studies with each other.
Architectural Overview

The Web consists of a vast, worldwide collection of content in the form of Web pages, often just
called pages for short. Each page may contain links to other pages anywhere in the world.
Pages are generally viewed with a program called a browser.
A piece of text, icon, image, and so on associated with another page is called a hyperlink.
The URL design is open-ended in the sense that it is straightforward to have browsers use multiple
protocols to get at different kinds of resources. In fact, URLs for various other protocols have been
defined. Slightly simplified forms of the common ones are listed.

The http protocol is the Web’s native language, the one spoken by Web servers. HTTP stands for
Hyper Text Transfer Protocol.

A plug-in is a third-party code module that is installed as an extension to the browser.


To tackle the problem of serving a single request at a time, one strategy is to make the server
multithreaded. In one design, the server consists of a front-end module that accepts all incoming
requests and k processing modules, as shown in Fig. 7-21. The k + 1 threads all belong to the same
process, so the processing modules all have access to the cache within the process’ address space.
When a request comes in, the front end accepts it and builds a short record describing it. It then
hands the record to one of the processing modules.

Cookies
Cookies are small pieces of data stored on a user's device by a web browser while browsing a
website. They serve various purposes, including remembering user preferences, enabling
personalized experiences, and tracking user behavior. Cookies contain information such as session
identifiers, user preferences, and browsing history, which are sent back to the website's server with
each subsequent request. There are different types of cookies, including session cookies, which
expire when the user closes the browser, and persistent cookies, which remain on the device for a
specified duration. While cookies enhance website functionality and user experience, they also raise
privacy concerns, as they can be used for tracking user activities across different websites. As such,
many web browsers offer options for users to manage and delete cookies, and regulations such as
the General Data Protection Regulation (GDPR) in the European Union require websites to obtain
user consent before storing cookies.

• An HTTP cookie stores information in a user's web browser. Web servers generate cookies and
send them to browsers, which then include the cookies in future HTTP requests.

• HTTP cookies (also called web cookies, Internet cookies, browser cookies, or simply cookies)
are small blocks of data created by a web server while a user is browsing a website and placed on
the user's computer or other device by the user's web browser.

• An HTTP cookie (also called web cookie, Internet cookie, browser cookie, or simply cookie) is a
small piece of data sent from a website and stored on the user's computer by the user's web browser
while the user is browsing. Cookies were designed to be a reliable mechanism for websites to
remember stateful information (such as items added in the shopping cart in an online store) or to
record the user's browsing activity (including clicking particular buttons, logging in, or recording
which pages were visited in the past).
HTML—The HyperText Markup Language
HTML (Hypertext Markup Language) is the standard markup language used to create and design
web pages. It provides a structured format for defining the content and layout of a webpage using
tags and attributes. HTML documents consist of elements, which are enclosed within opening and
closing tags, and can include text, images, links, forms, and multimedia content. HTML utilizes a
hierarchical structure, with elements nested within each other to create a meaningful document
outline. The language supports various features such as hyperlinks, lists, tables, and semantic
markup to describe the purpose and structure of content. Additionally, HTML works in conjunction
with CSS (Cascading Style Sheets) and JavaScript to enhance the presentation and interactivity of
web pages. As the backbone of the World Wide Web, HTML is essential for creating accessible,
well-structured, and visually appealing web content.

HTML (HyperText Markup Language) was introduced with the Web. It allows users to produce
Web pages that include text, graphics, video, pointers to other Web pages, and more. HTML is a
markup language, or language for describing how documents are to be formatted. The term
‘‘markup’’ comes from the old days when copyeditors actually marked up documents to tell the
printer— in those days, a human being—which fonts to use, and so on. Markup languages thus
contain explicit commands for formatting .
Hypertext Markup Language (HTML) is the standard markup language for creating web pages
and web applications. With Cascading Style Sheets (CSS) and JavaScript, it forms a triad of
cornerstone technologies for the World
W
i
d
e

W
e
b
Server-Side Dynamic Web Page Generation
The static page model we have used so far treats pages as multimedia documents that are
conveniently linked together.
It was a fitting model in the early days of the Web, as vast amounts of information were put online.
 To act as applications, Web pages can no longer be static. Dynamic content is needed.
 A static web page (sometimes called a flat page/stationary page) is a web page that is delivered to
the user exactly as stored, in contrast to dynamic web pages which are generated by a web
application.

 A server-side dynamic web page is a web page whose construction is controlled by an application
server processing server-side scripts. In server-side scripting, parameters determine how the
assembly of every new web page proceeds, including the setting up of more client-side processing.

STREAMING AUDIO AND VIDEO


Streaming is a method of viewing video or listening to audio content without actually downloading
the media files. Streaming performance can be improved, and buffering time reduced, if the owner
of the files uses a CDN.

 The term streaming refers to the continual transmission of audio and video files from a server to a
client.
In video streams, content is sent in a compressed form over the internet and is displayed by the
viewer in real time. The media is sent in a continuous stream of data and is played as it arrives.
Video streaming is a continuous transmission of video files from a server to a client. Video
streaming enables users to view videos online without having to download them. Video streams
normally begin with a prerecorded media file hosted on a remote server. Once the server receives a
client request, the data in the video file is compressed and sent to the requesting device in pieces.
Audio and video files are broken into data packets, where each packet contains a small piece of
data. An explosion of voice data carried over Internet networks that is called voice over IP or
Internet telephony.

 The variation in delay, called jitter, still matters.


 It must be masked by the player or the audio will sound unintelligible and the video will look jerky.

 The term multimedia is often used in the context of the Internet to mean video and audio.
Digital Audio
 An audio (sound) wave is a one-dimensional acoustic (pressure) wave. When an acoustic wave
enters the ear, the eardrum vibrates, causing the tiny bones of the inner ear to vibrate along with
it, sending nerve pulses to the brain.
 These pulses are perceived as sound by the listener.

o The frequency range of the human ear runs from 20 Hz to 20,000 Hz.
 Digital audio is a representation of sound recorded in, or converted into, digital form. In digital
audio, the sound wave of the audio signal is typically encoded as numerical samples in a
continuous sequence. Digital audio technologies are used in the recording, manipulation, mass-
production, and distribution of sound, including recordings of songs, instrumental pieces,
podcasts, sound effects, and other sounds.
 Digital audio is a digital representation of an audio wave that can be used to recreate it. Audio
waves can be converted to digital form by an ADC (Analogto-Digital Converter). An ADC
takes an electrical voltage as input and generates a binary number as output.

 Two key factors in the quality of digital audio are the audio sample rate and bit depth.
 The audio sample rate refers to the number of samples of audio that are taken per second and
is measured in Hertz (Hz).
 Common sample rates for digital audio include 44.1 kHz, 48 kHz, and 96 kHz.

Audio Compression
• Audio is often compressed to reduce bandwidth needs and transfer times, even though audio data
rates are much lower than video data rates. All compression systems require two algorithms: one
for compressing the data at the source, and another for decompressing it at the destination.
• These algorithms are referred to as the encoding and decoding algorithms, respectively. Probably
the most popular formats are MP3 (MPEG audio layer 3) and AAC (Advanced Audio Coding) as
carried in MP4 (MPEG-4) files.

Digital Video
Digital video is an electronic representation of moving visual images (video) in the form of
encoded digital data.
 Digital video comprises a series of digital images displayed in rapid succession, usually at 24, 30,
or 60 frames per second.
 Digital video has many advantages such as easy copying, multicasting, sharing and storage.
 Digital video was first introduced commercially in 1986 with the Sony D1 format, which recorded
an uncompressed standard-definition component video signal in digital form.
 In addition to uncompressed formats, popular compressed digital video formats today include
MPEG-2, H.264 and AV1. Modern interconnect standards used for playback of digital video
include HDMI, DisplayPort, Digital Visual Interface (DVI) and serial digital interface (SDI).
• Digital video is a type of video recording system that works by using a digital video signal rather
than an analog one. (The terms camera, video camera, and camcorder are used interchangeably in
this article.)

• Digital videos can be copied multiple times, with practically no degradation in quality, and they can
be edited using readily available hardware and software. The tape stock for digital video costs
significantly less than 35 mm film. Digital video is used not only for digital television (including
HDTV) but also for mobile phones, video conferencing systems, and the Internet distribution of
media.
• Digital video (DV) is video that is captured and stored in a digital format as ones and zeros, rather
than a series of still pictures captured in film. Digital, versus analog, signals are used. Information
is processed and stored as a sequence of digital data for easy manipulation by computers, but the
video is still presented to the viewer through a screen in analog form. Digital video is composed of
a series of orthogonal bitmap (BMP) images displayed in constant rapid succession with common
frequencies of 15, 24, 30 and 60 frames per second (FPS); the more frames the DV has, the more
movement details are captured or displayed.

Video Compression
Video compression is a process used to reduce the size of digital video files, allowing for efficient
storage and transmission. This compression technique is essential for various applications,
including video streaming, video conferencing, and digital television broadcasting.
• There are two main types of video compression: lossy and lossless.
 Lossy compression methods achieve higher compression ratios but sacrifice some
video quality, while lossless compression methods preserve video quality but typically
achieve lower compression ratios.

• Common video compression standards include MPEG (Moving Picture Experts Group),
H.264/AVC (Advanced Video Coding), and H.265/HEVC (High-Efficiency Video Coding).

The JPEG Standard


The JPEG (Joint Photographic Experts Group) standard is a widely used compression method for
digital images, developed to reduce file sizes while preserving visual quality. Employing lossy
compression, JPEG discards some image data, resulting in smaller files but potential loss of detail.
It supports grayscale and color images with various compression levels to balance size and quality.
JPEG compression is efficient for photographs and commonly used in digital cameras, online image
sharing, and various applications. However, it may lead to artifacts or degradation, prompting the
development of alternatives like JPEG 2000 and WebP to address limitations.

The JPEG (Joint Photographic Experts Group) standard for compressing continuous-tone still
pictures (e.g., photographs) was developed by photographic experts working under the joint
auspices of ITU, ISO, and IEC, another standards body. It is widely used (look for files with the
extension jpg) and often provides compression ratios of 10:1 or better for natural images.
 The JPEG input is a 640 × 480 RGB image with 24 bits/pixel,
The MPEG Standard
The MPEG (Moving Picture Experts Group) standard encompasses a suite of compression algorithms and
formats devised for digital audio and video content transmission. It comprises various standards, notably
MPEG-1, MPEG-2, MPEG-4, and MPEG-7, tailored for different applications. MPEG-1 is ideal for low-
bitrate video and audio compression, such as VCDs and digital audio encoding. MPEG-2 is versatile,
supporting broadcast television, DVDs, and digital satellite TV. MPEG-4 offers advanced compression for
high-quality multimedia, enabling applications like video conferencing and streaming media. MPEG-7
focuses on multimedia content description, enhancing search, retrieval, and management. Continuously
evolving, MPEG standards adapt to emerging technologies to ensure efficient compression, high-quality
playback, and interoperability across platforms.

The MPEG (Motion Picture Experts Group) standards. Though there are many proprietary
algorithms, these standards define the main algorithms used to compress videos. They have been
international standards since 1993. Because movies contain both images and sound, MPEG can
compress both audio and video.

 The MPEG-1 standard (which includes MP3 audio) was first published in 1993 and is still widely
used. Its goal was to produce video-recorder-quality output that was compressed 40:1 to rates of
around 1 Mbps.

Streaming Stored Media


Streaming stored media involves delivering multimedia content, like audio or video files, over a
network in a continuous stream. Unlike traditional downloading, streaming allows users to start
consuming content immediately while it's being transmitted. This is done by continuously sending
data packets from the server to the client device, where they're decoded and played back in real-
time. Streaming technology relies on protocols such as RTSP, HTTP, or HLS to facilitate delivery.
It offers benefits like instant access to content, adaptive streaming for varying network conditions,
and support for live broadcasting. Popular streaming platforms use advanced algorithms to ensure
smooth playback and minimize buffering, providing a seamless user experience.

Streaming stored video refers to the delivery of pre−recorded video content over a network
without having to download it first.
 This process allows users to begin watching the video before it has fully downloaded, as
opposed to traditional downloading methods where the user must first wait for the entire file
to download before watching it.

You might also like