0% found this document useful (0 votes)
22 views17 pages

Unit 5 Application Layer in OSI Model

Uploaded by

Adnan Fuzail
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)
22 views17 pages

Unit 5 Application Layer in OSI Model

Uploaded by

Adnan Fuzail
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/ 17

Application Layer in OSI Model

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

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:
1. TELNET:
TELNET stands for Teletype Network. It is a type of protocol
that enables one computer to connect to the local computer. It
is used as a standard TCP/IP protocol for virtual terminal
service which is provided by ISO. The computer which starts
the connection is known as the local computer.
The computer which is being connected to i.e. which accepts
the connection known as the remote computer.
During telnet operation, whatever is being performed on the
remote computer will be displayed by the local computer.
Telnet operates on a client/server principle. The local computer
uses a telnet client program and the remote computers use a
telnet server program.
Logging
The logging process can be further categorized into two parts:
1. Local Login
2. Remote Login
1. Local Login: Whenever a user logs into its local system, it is
known as local login.

The Procedure of Local Login


 Keystrokes are accepted by the terminal driver when the user
types at the terminal.
 Terminal Driver passes these characters to OS.
 Now, OS validates the combination of characters and opens the
required application.
Remote Login: Remote Login is a process in which users can log in
to a remote site i.e. computer and use services that are available on
the remote computer. With the help of remote login, a user is able to
understand the result of transferring the result of processing from the
remote computer to the local computer.

The Procedure of Remote Login


 When the user types something on the local computer, the local
operating system accepts the character.
 The local computer does not interpret the characters, it will send
them to the TELNET client.
 TELNET client transforms these characters to a universal
character set called Network Virtual Terminal (NVT) characters
and it will pass them to the local TCP/IP protocol Stack.
 Commands or texts which are in the form of NVT, travel through
the Internet and it will arrive at the TCP/IP stack at the remote
computer.
 Characters are then delivered to the operating system and later
on passed to the TELNET server.
 Then TELNET server changes those characters to characters that
can be understandable by a remote computer.
 The remote operating system receives characters from a pseudo-
terminal driver, which is a piece of software that pretends that
characters are coming from a terminal.
 The operating system then passes the character to the
appropriate application program.

Network Virtual Terminal (NVT)


NVT (Network Virtual Terminal) is a virtual terminal in TELNET that
has a fundamental structure that is shared by many different types of
real terminals. NVT (Network Virtual Terminal) was created to make
communication viable between different types of terminals with
different operating systems.
Domain Name System (DNS)
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.

Types of Domain
There are various kinds of domain:
1. Generic domains: .com(commercial), .edu(educational),
.mil(military), .org(nonprofit organization), .net(similar to
commercial) all these are generic domains.
2. Country domain: .in (India) .us .uk
3. Inverse domain: if we want to know what is the domain name of
the website. Ip to domain name mapping. So DNS can provide
both the mapping for example to find the IP addresses of
geeksforgeeks.org then we have to type
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.

Domain Name Server


The client machine sends a request to the local name server, which,
if the root does not find the address in its database, sends a request
to the root name server, which in turn, will route the query to a top-
level domain (TLD) or authoritative name server. The root name
server can also contain some hostName to IP address mappings.
The Top-level domain (TLD) server always knows who the
authoritative name server is. So finally the IP address is returned to
the local name server which in turn returns the IP address to the
host.
DNS Servers Involved in Loading a Webpage
Upon loading the webpage, several DNS Servers are responsible for
translating the domain name into the corresponding IP Address of
the web server hosting the website. Here is the list of main DNS
servers involved in loading a Webpage.
 Local DNS Resolver
 Root DNS Servers
 Top-Level Domain (TLD) DNS Servers
 Authoritative DNS Servers
 Web Server

File Transfer Protocol (FTP)


File Transfer Protocol(FTP) is an application layer protocol that
moves files between local and remote file systems.
TP is a standard communication protocol. There are various other
protocols like HTTP which are used to transfer files between
computers, but they lack clarity and focus as compared to FTP
Types of FTP
There are different ways through which a server and a client do a file
transfer using FTP. Some of them are mentioned below:
 Anonymous FTP: Anonymous FTP is enabled on some sites
whose files are available for public access. A user can access
these files without having any username or password. Instead,
the username is set to anonymous, and the password is to the
guest by default. Here, user access is very limited. For example,
the user can be allowed to copy the files but not to navigate
through directories.
 Password Protected FTP: This type of FTP is similar to the
previous one, but the change in it is the use of username and
password.
 FTP Secure (FTPS): It is also called as FTP Secure Sockets
Layer (FTP SSL). It is a more secure version of FTP data
transfer. Whenever FTP connection is established, Transport
Layer Security (TLS) is enabled.
 FTP over Explicit SSL/TLS (FTPES): FTPES helps by upgrading
FTP Connection from port 21 to an encrypted connection.
 Secure FTP (SFTP): SFTP is not a FTP Protocol, but it is a
subset of Secure Shell Protocol, as it works on port 22.
Types of Connection in FTP
 Control Connection
 Data Connection
Control Connection
For sending control information like user identification, password,
commands to change the remote directory, commands to retrieve
and store files, etc., FTP makes use of a control connection. The
control connection is initiated on port number 21.
Data connection
For sending the actual file, FTP makes use of a data connection. A
data connection is initiated on port number 20.
FTP sends the control information out-of-band as it uses a separate
control connection. Some protocols send their request and response
header lines and the data in the same TCP connection. For this
reason, they are said to send their control information in-band. HTTP
and SMTP are such examples.

FTP Session
When an FTP session is started between a client and a server, the
client initiates a control TCP connection with the server side. The
client sends control information over this. When the server receives
this, it initiates a data connection to the client side. But the control
connection remains active throughout the user session. As we know
HTTP is stateless . But FTP needs to maintain a state about its user
throughout the session.
FTP Clients
FTP works on a client-server model. The FTP client is a program
that runs on the user’s computer to enable the user to talk to and get
files from remote computers. It is a set of commands that establishes
the connection between two hosts, helps to transfer the files, and
then closes the connection.
Simple Mail Transfer Protocol (SMTP)
Email is emerging as one of the most valuable services on the
internet today. Most internet systems use SMTP as a method to
transfer mail from one user to another. SMTP is a push protocol and
is used to send the mail whereas POP (post office
protocol) or IMAP (internet message access protocol) is used to
retrieve those emails at the receiver’s side
SMTP is an application layer protocol. The client who wants to send
the mail opens a TCP connection to the SMTP server and then
sends the mail across the connection. The SMTP server is an
always-on listening mode. As soon as it listens for a TCP connection
from any client, the SMTP process initiates a connection through
port 25. After successfully establishing a TCP connection the client
process sends the mail instantly.

SMTP Protocol
The SMTP model is of two types:
 End-to-End Method
 Store-and-Forward Method
The end-to-end model is used to communicate between different
organizations whereas the store and forward method is used within
an organization. An SMTP client who wants to send the mail will
contact the destination’s host SMTP directly, to send the mail to the
destination. The SMTP server will keep the mail to itself until it is
successfully copied to the receiver’s SMTP.
The client SMTP is the one that initiates the session so let us call it
the client-SMTP and the server SMTP is the one that responds to
the session request so let us call it receiver-SMTP. The client-SMTP
will start the session and the receiver SMTP will respond to the
request.

Model of SMTP System


In the SMTP model user deals with the user agent (UA), for
example, Microsoft Outlook, Netscape, Mozilla, etc. To exchange the
mail using TCP, MTA is used. The user sending the mail doesn’t
have to deal with MTA as it is the responsibility of the system admin
to set up a local MTA. The MTA maintains a small queue of mail so
that it can schedule repeat delivery of mail in case the receiver is not
available. The MTA delivers the mail to the mailboxes and the
information can later be downloaded by the user agents.

Components of SMTP
 Mail User Agent (MUA): It is a computer application that helps
you in sending and retrieving mail. It is responsible for creating
email messages for transfer to the mail transfer agent(MTA).
 Mail Submission Agent (MSA): It is a computer program that
receives mail from a Mail User Agent(MUA) and interacts with the
Mail Transfer Agent(MTA) for the transfer of the mail.
 Mail Transfer Agent (MTA): It is software that has the work to
transfer mail from one system to another with the help of SMTP.
 Mail Delivery Agent (MDA): A mail Delivery agent or Local
Delivery Agent is basically a system that helps in the delivery of
mail to the local system.
Working of SMTP
Below mentioned are the steps of the working of SMTP [Simple Mail
Transfer Protocol].
 Communication between the sender and the receiver: The
sender’s user agent prepares the message and sends it to the
MTA. The MTA’s responsibility is to transfer the mail across the
network to the receiver’s MTA. To send mail, a system must have
a client MTA, and to receive mail, a system must have a server
MTA.
 Sending Emails: Mail is sent by a series of request and
response messages between the client and the server. The
message which is sent across consists of a header and a body. A
null line is used to terminate the mail header and everything after
the null line is considered the body of the message, which is a
sequence of ASCII characters. The message body contains the
actual information read by the receipt.
 Receiving Emails: The user agent on the server-side checks the
mailboxes at a particular time of intervals. If any information is
received, it informs the user about the mail. When the user tries to
read the mail it displays a list of emails with a short description of
each mail in the mailbox. By selecting any of the mail users can
view its contents on the terminal.
Some SMTP Commands
 HELO: Identifies the client to the server, fully qualified domain
name, only sent once per session
 MAIL: Initiate a message transfer, the fully qualified domain of
the originator
 RCPT: Follows MAIL, identifies an addressee, typically the fully
qualified name of the addressee, and for multiple addressees use
one RCPT for each addressee
 DATA: Send data line by line

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.
First of all, whenever we want to open any website we 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 checks records for this URL in their
database, and 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.
HTTP request is simply termed as the information or data that is
needed by Internet browsers for loading a website. This is simply
known as HTTP Request.
There is some common information that is generally present in all
HTTP requests. These are mentioned below.
 HTTP Version
 URL
 HTTP Method
 HTTP Request Headers
 HTTP Body
HTTP Request Headers
HTTP Request Headers generally store information in the form of
key-value and must be present in each HTTP Request. The use of
this Request Header is to provide core information about the client’s
information, etc.
HTTP Request Body
HTTP Request Body simply contains the information that has to be
transferred. HTTP Request has the information or data to be sent to
these browsers.
HTTP Method
HTTP Methods are simply HTTP Verb. In spite of being present so
many HTTP Methods, the most common HTTP Methods are HTTP
GET and HTTP POST. These two are generally used in HTTP
cases. In HTTP GET, the information is received in the form of a
website.
For more, refer to the Difference Between HTTP GET and HTTP
POST.
What is HTTP Response?
HTTP Response is simply the answer to what a Server gets when
the request is raised. There are various things contained in HTTP
Response, some of them are listed below.
 HTTP Status Code
 HTTP Headers
 HTTP Body
HTTP Response Headers
HTTP Response headers are simply like an HTTP Request where it
has that work to send some important files and data to the HTTP
Response Body.
HTTP Response Body
HTTP Responses are the responses that are received successfully
upon the request. Generally, it comes under the requests generated
by the web. In most cases, the request is to transfer the HTML data
into a webpage.
HTTP Status Codes are the 3-digit codes that tell the message or
simply tell us about the HTTP Request whether it has been
completed or not. There are simply 5 types of status codes.
 Informational
 Successful
 Re-directional
 Client-Error
 Server-Error

You might also like