Application Layer
Application Layer
Application Layer
Computer Networks
20-11-2024 1
Dr. Divya Lohani
Topics
• Domain Name System (DNS)
• E-mail – SMTP, IMAP, POP3
• World Wide Web – WWW, HTTP
Computer Networks
20-11-2024 2
Dr. Divya Lohani
Example information flow supporting virtual communication in layer 5.
Computer Networks
20-11-2024 3
Dr. Divya Lohani
Application Layer
• At the very top of the Reference Model stack of layers, we have application
layer.
• Application layer is the one that is used by network applications.
• As the “top of the stack” layer, the application layer is the only one that
does not provide any services to the layer above it in the stack—there isn't
one.
• There are dozens of different application layer protocols that enable various
functions at this layer. Some of the most popular ones include HTTP, FTP,
SMTP, DNS, NFS, Telnet, SNMP, POP3, IMAP etc.
Computer Networks
20-11-2024 4
Dr. Divya Lohani
Domain Name System
(DNS)
Computer Networks
20-11-2024 5
Dr. Divya Lohani
Domain Name System (DNS)
• Although programs theoretically could refer to hosts, mailboxes, and other
resources by their network (e.g., IP) addresses, these addresses are hard for
people to remember.
• Sending e-mail to a@128.111.24.41 means that if A's ISP or organization
moves the mail server to a different machine with a different IP address, its
e-mail address has to change.
• The network itself understands only numerical addresses, so some
mechanism is required to convert the ASCII strings to network addresses.
• The essence of DNS is the invention of a hierarchical, domain-based
naming scheme and a distributed database system for implementing
this naming scheme.
• Used for mapping host names and e-mail destinations to IP addresses.
Computer Networks
20-11-2024 6
Dr. Divya Lohani
• Working Principle:
• To map a name onto an IP address, an application program calls a
library procedure called the resolver, passing it the name as a
parameter.
• The resolver sends a query containing the name to a local DNS
server, which looks up the name and returns a response containing
the IP address to the resolver, which then returns it to the caller.
• The query and response messages are sent as UDP packets.
• Armed with the IP address, the program can then establish a TCP
connection with the host or send it UDP packets.
Computer Networks
20-11-2024 7
Dr. Divya Lohani
DNS Name Space
• For the Internet, the top of the naming hierarchy is managed by an organization called ICANN (Internet Corporation for
Assigned Names and Numbers). ICANN was created for this purpose in 1998, as part of the maturing of the Internet to a
worldwide, economic concern. Naming follows organizational boundaries and not physical networks.
Computer Networks
20-11-2024 8
Dr. Divya Lohani
Computer Networks
20-11-2024 9
Dr. Divya Lohani
Computer Networks
20-11-2024 10
Dr. Divya Lohani
Resource Records
• Every domain, whether it is a single host or a top-level domain, can have a set of resource records associated
with it.
• When a resolver gives a domain name to DNS, what it gets back are the resource records associated with that
name.
• Thus, the primary function of DNS is to map domain names onto resource records.
• A resource record is a five-tuple: Domain_name Time_to_live Class Type Value
Computer Networks
20-11-2024 11
Dr. Divya Lohani
Computer Networks
20-11-2024 12
Dr. Divya Lohani
Electronic Mail (Email)
Computer Networks
20-11-2024 13
Dr. Divya Lohani
Email
• Electronic mail, or more commonly email, has been around for almost
over six decades.
• During the 1990s, it became known to the public at large and grew
exponentially, to the point where the number of emails sent per day
now is vastly more than the number of paper letters.
• Other forms of network communication, such as instant messaging and
voice-over-IP calls have expanded greatly in use over the past decade,
but email remains the workhorse of Internet communication.
Computer Networks
20-11-2024 14
Dr. Divya Lohani
Email Architecture
• It consists of two kinds of subsystems: the user agents, which allow people to read and
send email, and the message transfer agents (mail servers), which move the messages
from the source to the destination.
Computer Networks
20-11-2024 15
Dr. Divya Lohani
Typical Elements of the User Agent Interface
Computer Networks
20-11-2024 16
Dr. Divya Lohani
RFC 5322 (Internet Message Format) – originally RFC 822
header fields related to message transport
Header Meaning
To: Email address(es) of primary recipient(s)
Cc: Email address(es) of secondary recipient(s)
Bcc: Email address(es) for blind carbon copies
From: Person or people who created the message
Sender: Email address of the actual sender
Received: Line added by each transfer agent along the route
Return-Path: Can be used to identify a path back to the sender
Computer Networks
20-11-2024 17
Dr. Divya Lohani
MIME (Multipurpose Internet Mail Extensions)
• In the early days of the ARPANET, e-mail consisted exclusively of text messages written in English and
expressed in ASCII.
• Nowadays, on the worldwide Internet, this approach is no longer adequate. The problems include sending and
receiving:
• Messages in languages with accents (e.g., French and German).
• Messages in non-Latin alphabets (e.g., Hebrew and Russian).
• Messages in languages without alphabets (e.g., Chinese and Japanese).
• Messages not containing text at all (e.g., audio or images).
• The solution was the development of MIME (Multipurpose Internet Mail Extensions).
• The basic idea of MIME is to continue to use the RFC 822 (Standard for ARPA Internet Text Messages)
(now RFC 5322) format, but to add structure to the message body and define encoding rules for non-ASCII
messages.
Computer Networks
20-11-2024 18
Dr. Divya Lohani
World Wide Web (WWW)
Computer Networks
20-11-2024 19
Dr. Divya Lohani
Introduction
• 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.
• The Web began in 1989 at CERN, the European Center for Nuclear Research. The initial
idea was to help large teams, often with members in half a dozen or more countries and
time zones, collaborate using a constantly changing collection of reports, blueprints,
drawings, photos, and other documents produced by experiments in particle physics. The
proposal for a web of linked documents came from Tim Berners-Lee.
• 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. Berners Lee became the director.
• The consortium’s home page is at www.w3.org.
• Distributed System.
Computer Networks
20-11-2024 20
Dr. Divya Lohani
Architectural Overview
The browser is displaying a Web page on the client machine. Each page is fetched by sending a
request to one or more servers, which respond with the contents of the page. The request-
response protocol for fetching pages is a simple text-based protocol that runs over TCP, called
HTTP (HyperText Transfer Protocol).
HTTP is an application layer protocol designed to transfer information between networked
devices and runs on top of other layers of the network protocol stack.
Computer Networks
20-11-2024 21
Dr. Divya Lohani
• HTTP versions
• HTTP/1.0, the initial version (1996) - communication between clients (like web browsers) and
servers follows a straightforward request-response model.
• HTTP/1.1. (1997) - introduction of persistent connections, allowing multiple requests and responses
to be sent over the same TCP connection. This reduced the overhead of establishing new
connections for each request, resulting in faster data transfer and improved performance.
• HTTP/2 (2015) - enhance the performance and efficiency of data transfer on the web. One of the
key features of HTTP/2 is multiplexing, which allows multiple requests and responses to be sent
over a single TCP connection concurrently. also supported by major web servers over Transport
Layer Security (TLS).
• HTTP/3 (2022) - the latest evolution in web communication. Building on the foundation of QUIC
(Quick UDP Internet Connections) and utilizing the User Datagram Protocol (UDP), HTTP/3 offers
a fresh approach to data transfer that promises enhanced performance and security.
Computer Networks
20-11-2024 22
Dr. Divya Lohani
• A typical flow over HTTP involves a client machine making a request to a server,
which then sends a response message.
• The request and response model plays a vital role in almost every client server
network architecture.
• defines a communication pattern where a client sends a request to a server, and the server
responds with a corresponding response.
• enables seamless exchange of data or information between client and servers.
• HTTP is a stateless protocol.
• server doesn’t keep any information about the client after it sends its response, and therefore it
can’t recognize that multiple requests from the same client may be related.
Computer Networks
20-11-2024 23
Dr. Divya Lohani
References
• Andrew S. Tanenbaum, Nick Feamster, and David J. Wetherall;
Computer Networks; Pearson Education; 6th Edition, 2021.
Computer Networks
20-11-2024 24
Dr. Divya Lohani