0% found this document useful (0 votes)
61 views

Unit 7 Note Application Layer

The application layer allows interaction between end users and software applications. It identifies communication partners, determines resource availability, and synchronizes communication between applications. Common application layer protocols include network virtual terminals, file transfer and management, email, directory services, and authentication. Application architecture can be client-server, where clients request services from servers, or peer-to-peer, where nodes directly communicate as both clients and servers. File transfer and access management (FTAM) provides file transfer and access across diverse systems similarly to FTP and NFS.

Uploaded by

Khemal Desai
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)
61 views

Unit 7 Note Application Layer

The application layer allows interaction between end users and software applications. It identifies communication partners, determines resource availability, and synchronizes communication between applications. Common application layer protocols include network virtual terminals, file transfer and management, email, directory services, and authentication. Application architecture can be client-server, where clients request services from servers, or peer-to-peer, where nodes directly communicate as both clients and servers. File transfer and access management (FTAM) provides file transfer and access across diverse systems similarly to FTP and NFS.

Uploaded by

Khemal Desai
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/ 16

APPLICATION LAYER

The application layer in the OSI model is the closest layer to the end user which means that the
application layer and end user can interact directly with the softwareapplication. The application
layer programs are based on client and servers.

The Application layer includes the following functions:

 Identifying communication partners: The application layer identifies the availability of


communication partners for an application with data to transmit.
 Determining resource availability: The application layer determines whether sufficient
network resources are available for the requested communication.
 Synchronizing communication: All the communications occur between theapplications
requires cooperation which is managed by an application layer.

Services of Application Layers

o Network Virtual terminal: An application layer allows a user to log on to aremote host.
To do so, the application creates a software emulation of a terminal at the remote host.
The user's computer talks to the softwareterminal, which in turn, talks to the host. The
remote host thinks that it is communicating with one of its own terminals, so it allows the
user to log on.
o File Transfer, Access, and Management (FTAM): An application allows a user to
access files in a remote computer, to retrieve files from a computerand to manage files in
a remote computer. FTAM defines a hierarchical virtual file in terms of file structure, file
attributes and the kind of operationsperformed on the files and their attributes.
o Addressing: To obtain communication between client and server, there is a need for
addressing. When a client made a request to the server, the request contains the server
address and its own address. The server response to the client request, the request contains
the destination address, i.e., client address. To achieve this kind of addressing, DNS is used.
o Mail Services: An application layer provides Email forwarding and storage.
o Directory Services: An application contains a distributed database thatprovides access
for global information about various objects and services.
o Authentication: It authenticates the sender or receiver's message or both.

Network Application Architecture

Application architecture is different from the network architecture. The network architecture is
fixed and provides a set of services to applications. The application
architecture, on the other hand, is designed by the application developer and defineshow the
application should be structured over the various end systems.

Application architecture is of two types:

o Client-server architecture: An application program running on the local machine sends


a request to another application program is known as a client,and a program that serves a
request is known as a server. For example, whena web server receives a request from the
client host, it responds to the requestto the client host.

Characteristics of Client-server architecture:

o In Client-server architecture, clients do not directly communicate with each other. For
example, in a web application, two browsers do not directly communicate with each other.
o A server is fixed, well-known address known as IP address because the serveris always on
while the client can always contact the server by sending a packet to the sender's IP
address.

Disadvantage Of Client-server architecture:

It is a single-server based architecture which is incapable of holding all the requests from
the clients. For example, a social networking site can becomeoverwhelmed when there is
only one server exists.

o P2P (peer-to-peer) architecture: It has no dedicated server in a data center.The peers are
the computers which are not owned by the service provider. Most of the peers reside in
the homes, offices, schools, and universities. The peers communicate with each other
without passing the information througha dedicated server, this architecture is known as
peer-to-peer architecture. The applications based on P2P architecture includes file sharing
and internettelephony.

Features of P2P architecture

o Self scalability: In a file sharing system, although each peer generates a workload by
requesting the files, each peer also adds a service capacity by distributing the files to the
peer.
o Cost-effective: It is cost-effective as it does not require significant server infrastructure
and server bandwidth.

Client and Server processes

o A network application consists of a pair of processes that send the messagesto each other
over a network.
o In P2P file-sharing system, a file is transferred from a process in one peer toa process in
another peer. We label one of the two processes as the client andanother process as the
server.
o With P2P file sharing, the peer which is downloading the file is known as a client, and the
peer which is uploading the file is known as a server. However, we have observed in some
applications such as P2P file sharing; a process can be both as a client and server.
Therefore, we can say that a process can both download and upload the files.

File Transfer, Access and Management

FTAM is an OSI standard that provides file transfer services between client(initiator) and server
(responder) systems in an open environment. It also providesaccess to files and management of
files on diverse systems. In these respects, it strives to be a universal file system. FTAM has
worked well as a way to bring mainframe information systems into distributed environments, but
FTAM has not caught on otherwise.

FTAM is designed to help users access files on diverse systems that use compatible FTAM
implementations. It is similar to FTP (File Transfer Protocol) and NFS (Network File System),
both of which operate in the TCP/IP environment. Users can manipulate files down to the record
level, which is how FTAM stores files. In this respect, FTAM has some relational database
features. For example, users can lock files or lock individual records.

FTAM is a system in which connection-oriented information about the user and thesession is
maintained by a server until the session is taken down. In a stateless system, such as NFS, requests
are made independently of one another in a connectionless manner. There are advantages to
stateless operation. If the server crashes, the request simply goes away and the client makes
another request. This simplifies recovery after the crash. In a stateful system, both systems must be
awarethat one or the other has crashed so they can restore the states and prevent data corruption.

Files are transferred between systems by first establishing a connection-oriented session. The
FTAM client contacts the FTAM server and requests a session. Once the session is established,
file transfer can take place. FTAM uses the concept of a virtual filestore, which provides a
common view of files. The FTAM file system hides the differences between different vendor
systems. FTAM specifies documenttypes as files with straight binary information or text files in
which each line is terminated with a carriage return. Data is interpreted as records and FTAM
providesthe virtual filestore capabilities that store record-oriented structured files.

So far, FTAM, like other OSI protocols, has not caught on as a useful system for transferring files
between different vendor systems in the LAN environment. Manyof the implementations so far
have failed to interoperate with one another. FTAM has worked well as a way to bring mainframe
information systems into distributedenvironments.
FTP
o FTP stands for File transfer protocol.
o FTP is a standard internet protocol provided by TCP/IP used for transmittingthe files
from one host to another.
o It is mainly used for transferring the web page files from their creator to thecomputer
that acts as a server for other computers on the internet.
o It is also used for downloading the files to computer from other servers.

Objectives of FTP

o It provides the sharing of files.


o It is used to encourage the use of remote computers.
o It transfers the data more reliably and efficiently.Why

FTP?

Although transferring files from one system to another is very simple and straightforward, but
sometimes it can cause problems. For example, two systems may have different file conventions.
Two systems may have different ways to represent text and data. Two systems may have different
directory structures. FTP protocol overcomes these problems by establishing two connections
between hosts.One connection is used for data transfer, and another connection is used for the
control connection.

Mechanism of FTP
The above figure shows the basic model of the FTP. The FTP client has three components: the
user interface, control process, and data transfer process. The server has two components: the
server control process and the server data transfer process.

There are two types of connections in FTP:

o Control Connection: The control connection uses very simple rules for communication.
Through control connection, we can transfer a line of command or line of response at a
time. The control connection is made between the control processes. The control
connection remains connected during the entire interactive FTP session.
o Data Connection: The Data Connection uses very complex rules as data types may vary.
The data connection is made between data transfer processes. The data connection opens
when a command comes for transferring the filesand closes when the file is transferred.

FTP Clients

o FTP client is a program that implements a file transfer protocol which allowsyou to transfer
files between two hosts on the internet.
o It allows a user to connect to a remote host and upload or download the files.
o It has a set of commands that we can use to connect to a host, transfer the files between
you and your host and close the connection.
o The FTP program is also available as a built-in component in a Web browser.This GUI
based FTP client makes the file transfer very easy and also does not require to remember
the FTP commands.

Advantages of FTP:

o Speed: One of the biggest advantages of FTP is speed. The FTP is one of thefastest way
to transfer the files from one computer to another computer.
o Efficient: It is more efficient as we do not need to complete all the operationsto get the
entire file.
o Security: To access the FTP server, we need to login with the username andpassword.
Therefore, we can say that FTP is more secure.
o Back & forth movement: FTP allows us to transfer the files back and forth.Suppose you
are a manager of the company, you send some information to all the employees, and they
all send information back on the same server.

Disadvantages of FTP:

o The standard requirement of the industry is that all the FTP transmissions should be
encrypted. However, not all the FTP providers are equal and not all the providers offer
encryption. So, we will have to look out for the FTP providers that provides encryption.
o FTP serves two operations, i.e., to send and receive large files on a network.However, the
size limit of the file is 2GB that can be sent. It also doesn't allow you to run simultaneous
transfers to multiple receivers.
o Passwords and file contents are sent in clear text that allows unwanted eavesdropping. So,
it is quite possible that attackers can carry out the brute force attack by trying to guess the
FTP password.
o It is not compatible with every system.

HTTP
o HTTP stands for HyperText 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 oneconnection, 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 repliesto the request message
by sending a response message.

Message

HTTP messages are of two types: request and response. Both the message typesfollow the same
message format.

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

Response Message: The response message is sent by the server to the client thatconsists 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 thehost 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 subdirectoriesand files.

E-mail Protocols are set of rules that help the client to properly transmit the
information to or from the mail server. Here in this tutorial, we will discuss variousprotocols such
as SMTP, POP, and IMAP.

SMTP
SMTP stands for Simple Mail Transfer Protocol. It was first proposed in 1982. It is a standard
protocol used for sending e-mail efficiently and reliably over the internet.
Key Points:
 SMTP is application level protocol.
 SMTP is connection oriented protocol.
 SMTP is text based protocol.
 It handles exchange of messages between e-mail servers over TCP/IPnetwork.
 Apart from transferring e-mail, SMPT also provides notification regardingincoming
mail.
 When you send e-mail, your e-mail client sends it to your e-mail serverwhich
further contacts the recipient mail server using SMTP client.
 These SMTP commands specify the sender’s and receiver’s e-mail address,along with
the message to be send.
 The exchange of commands between servers is carried out withoutintervention of
any user.

In case, message cannot be delivered, an error report is sent to the senderwhich makes SMTP a
reliable protocol.

SMTP Commands

The following table describes some of the SMTP commands:


S.N. Command Description
1 HELLO This command initiates the SMTP conversation.

2 EHELLO This is an alternative command to initiate the conversation. ESMTPindicates that the
sender server wants to use extended SMTP protocol.
3 MAIL FROM This indicates the sender’s address.

4 RCPT TO It identifies the recipient of the mail. In order to deliver similar messageto multiple users this
command can be repeated multiple times.
5 SIZE This command let the server know the size of attached message in bytes.

6 DATA The DATA command signifies that a stream of data will follow. Herestream of data refers to
the body of the message.
7 QUIT This commands is used to terminate the SMTP connection.

8 VERFY This command is used by the receiving server in order to verify whetherthe given username is
valid or not.
9 EXPN It is same as VRFY, except it will list all the users name when it usedwith a distribution list.
E-mail System

E-mail system comprises of the following three components:


 Mailer
 Mail Server
 Ma

ilbox

Mailer

It is also called mail program, mail application or mail client. It allows us to manage,
read and compose e-mail.

Mail Server

The function of mail server is to receive, store and deliver the email. It is must formail
servers to be Running all the time because if it crashes or is down, email canbe lost.

Mailboxes

Mailbox is generally a folder that contains emails and information about them.Working of E-

mail

Email working follows the client server approach. In this client is the mailer i.e.the
mail application or mail program and server is a device that manages emails.
Following example will take you through the basic steps involved in sending and receiving
emails and will give you a better understanding of working of email system:
 Suppose person A wants to send an email message to person B.
 Person A composes the messages using a mailer program i.e. mail client andthen
select Send option.
 The message is routed to Simple Mail Transfer Protocol to person B’s mailserver.
 The mail server stores the email message on disk in an area designated for person
B.
The disk space area on mail server is called mail
spool.

 Now, suppose person B is running a POP client and knows how to communicate
with B’s mail server.
 It will periodically poll the POP server to check if any new email has arrivedfor B.As
in this case, person B has sent an email for person B, so email is forwarded over
the network to B’s PC. This is message is now stored on person B’s PC.
The following diagram gives pictorial representation of the steps discussed above:
SNMP - Simple Network Management Protocol
• SNMP is a framework that provides facilities for managing and monitoring
network resources on the Internet.
• Components of SNMP:
– SNMP agents
– SNMP managers
– Management Information Bases (MIBs)
– SNMP protocol itself

• SNMP agent is software that runs on a piece of network equipment (host, router,
printer, or others) and that maintains information about its configuration and
current state in a database
• Information in the database is described by Management Information Bases
(MIBs)
• An SNMP manager is an application program that contacts an SNMP agent to
query or modify the database at the agent.
• SNMP protocol is the application layer protocol used by SNMP agents and
managers to send and receive data.
• Interactions in SNMP
. root

iso(1)

org (3)

dod (6)

internet (1)

directory (1) mgmt (2) experimental (3) private (4)

mib-2 (1)

system (1) at (3) icmp (5) udp (7) snmp (11)

interface (2) ip (4) tcp (6) egp (8) transmission (10)

ipForwDatagrams (6)

MIBS
• A MIB specifies the managed objects
• MIB is a text file that describes managed objects using the syntax of ASN.1
(Abstract Syntax Notation 1)
• ASN.1 is a formal language for describing data and its properties
• In Linux, MIB files are in the directory /usr/share/snmp/mibs

Managed Objects
• Each managed object is assigned an object identifier (OID)
• The OID is specified in a MIB file.
• An OID can be represented as a sequence of integers separated by decimal points or
by a text string:
Example:
– 1.3.6.1.2.1.4.6.
– iso.org.dod.internet.mgmt.mib-2.ip.ipForwDatagrams
– When an SNMP manager requests an object, it sends the OID to the SNMP
agent.
Organization of managed objects
• Managed objects are organized in a tree-like hierarchy and the OIDs reflect the
structure of the hierarchy.
• Each OID represents a node in the tree.
• The OID 1.3.6.1.2.1 (iso.org.dod.internet.mgmt.mib-2) is at the top of the hierarchy
for all managed objects of the MIB-II.
• Manufacturers of networking equipment can add product specific objects to the
hierarchy.
. root

iso(1)

org (3)

dod (6)

internet (1)

directory (1) mgmt (2) experimental (3) private (4)

mib-2 (1)

system (1) at (3) icmp (5) udp (7) snmp (11)

interface (2) ip (4) tcp (6) egp (8) transmission (10)

ipForwDatagrams (6)

• SNMP manager and an SNMP agent communicate using the SNMP protocol
– Generally: Manager sends queries and agent responds
– Exception: Traps are initiated by agent.

• Get-request. Requests the values of one or more objects


• Get-next-request. Requests the value of the next object, according to a
lexicographical ordering of OIDs.
• Set-request. A request to modify the value of one or more objects
• Get-response. Sent by SNMP agent in response to a get-request, get-next-request,
or set-request message.
• Trap. An SNMP trap is a notification sent by an SNMP agent to an SNMP
manager, which is triggered by certain events at the agent.
DOMAIN NAME SYSTEM (DNS)
The host that needs mapping can contact the closest computer holding the needed
information. This method is used by the Domain Name System (DNS).

A user wants to use a file transfer client to access the corresponding file transfer server running
on a remote host.
The user knows only the file transfer server name, such as afilesource.com.

Name Space

A name space that maps each address to a unique name can be organized in twoways:
flat or hierarchical.
In a flat name space, a name is assigned to an address. A name in this space is asequence of
characters without structure.
In a hierarchical name space, each name is made of several parts.

Domain Name Space

Domain Name Space


To have a hierarchical name space, a domain name space was designed. In thisdesign
the names are defined in an inverted-tree structure with the root at the top.
Label

Each node in the tree has a label, which is a string with a maximum of 63characters. The
root label is a null string (empty string).

Domain Name

If a label is terminated by a null string, it is called a fully qualified domain name(FQDN).


If a label is not terminated by a null string, it is called a partially qualified domainname
PQDN).

Domain

A domain is a sub tree of the domain name space. The name of the domain isthe
name of the node at the top of the sub tree.
Distribution of Name Space

The information contained in the domain name space must be stored. However, it is very
inefficient and also not reliable to have just one computerstore such a huge amount of
information. It is inefficient because responding torequests from all over the world places
a heavy load on the system it is notreliable because any failure makes the data
inaccessible.

Zone

Since the complete domain name hierarchy cannot be stored on a single server,it is divided
among many servers. What a server is responsible for or has authority over is called a zone.
The server makes a database called a zone file and keeps all the information forevery node
under that domain.

You might also like