UNIT - V - Application Layer
UNIT - V - 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
software application. The application layer programs are based on client and
servers.
Client
A client is a program that runs on the local machine requesting service from the
server. A client program is a finite program means that the service started by the
user and terminates when the service is completed.
Server
A server is a program that runs on the remote machine providing services to the
clients. When the client requests for a service, then the server opens the door for
the incoming requests, but it never initiates the service.
A server program is an infinite program means that when it starts, it runs infinitely
unless the problem arises. The server waits for the incoming requests from the
clients. When the request arrives at the server, then it responds to the request.
DNS
An application layer protocol defines how the application processes running on
different systems, pass the messages to each other.
DNS is a TCP/IP protocol used on different platforms. The domain name space is
divided into three different sections: generic domains, country domains, and inverse
domain.
Generic Domains
o It defines the registered hosts according to their generic behavior.
o Each node in a tree defines the domain name, which is an index to the DNS
database.
o It uses three-character labels, and these labels describe the organization type.
Label Description
Inverse Domain
The inverse domain is used for mapping an address to a name. When the server has
received a request from the client, and the server contains the files of only
authorized clients. To determine whether the client is on the authorized list or not,
it sends a query to the DNS server and ask for mapping an address to the name.
Working of DNS
FTP
o FTP stands for File transfer protocol.
o FTP is a standard internet protocol provided by TCP/IP used for transmitting
the files from one host to another.
o It is mainly used for transferring the web page files from their creator to the
computer 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?
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.
FTP Clients
o FTP client is a program that implements a file transfer protocol which allows
you 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:
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.
Telnet
o The main task of the internet is to provide services to users. For example,
users want to run different application programs at the remote site and
transfers a result to the local site. This requires a client-server program such
as FTP, SMTP. But this would not allow us to create a specific program for
each demand.
Remote login
SMTP
o SMTP stands for Simple Mail Transfer Protocol.
o SMTP is a set of communication guidelines that allow software to transmit an
electronic mail over the internet is called Simple Mail Transfer Protocol.
o It is a program used for sending messages to other computer users based on
e-mail addresses.
o It provides a mail exchange between users on the same or different
computers, and it also supports:
o It can send a single message to one or more recipients.
o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
o The main purpose of SMTP is used to set up communication rules between
servers. The servers have a way of identifying themselves and announcing
what kind of communication they are trying to perform. They also have a way
of handling the errors such as incorrect email address. For example, if the
Components of SMTP
o First, we will break the SMTP client and SMTP server into two components
such as user agent (UA) and mail transfer agent (MTA). The user agent (UA)
prepares the message, creates the envelope and then puts the message in
the envelope. The mail transfer agent (MTA) transfers this mail across the
internet.
o The relaying system without TCP/IP protocol can also be used to send the
emails to users, and this is achieved by the use of the mail gateway. The mail
gateway is a relay MTA that can be used to receive an email.
SNMP
o SNMP stands for Simple Network Management Protocol.
o SNMP is a framework used for managing devices on the internet.
o It provides a set of operations for monitoring and managing the internet.
SNMP Concept
Management Components
o Management is not achieved only through the SNMP protocol but also the
use of other protocols that can cooperate with the SNMP protocol.
Management is achieved through the use of the other two protocols: SMI
(Structure of management information) and MIB(management information
base).
o Management is a combination of SMI, MIB, and SNMP. All these three
protocols such as abstract syntax notation 1 (ASN.1) and basic encoding rules
(BER).
SMI
The SMI (Structure of management information) is a component used in network
management. Its main function is to define the type of data that can be stored in
an object and to show how to encode the data for the transmission over a network.
MIB
o The MIB (Management information base) is a second component for the
network management.
o Each agent has its own MIB, which is a collection of all the objects that the
manager can manage. MIB is categorized into eight groups: system, interface,
SNMP
SNMP defines five types of messages: GetRequest, GetNextRequest, SetRequest,
GetResponse, and Trap.
SetRequest: The SetRequest message is sent from a manager to the agent to set a
value in a variable.
Trap: The Trap message is sent from an agent to the manager to report an event.
For example, if the agent is rebooted, then it informs the manager as well as sends
the time of rebooting.
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 one
connection, i.e., no control connection to transfer the files.
o HTTP is used to carry the data in the form of MIME-like format.
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
Messages
HTTP messages are of two types: request and response. Both the message types
follow the same message format.
Request Message: The request message is sent by the client that consists of a
request line, headers, and sometimes a body.
Network Administrator controls access to the data and software on the network. A
network administrator assigns the user ID and password to the authorized person.
o Privacy: Privacy means both the sender and the receiver expects
confidentiality. The transmitted message should be sent only to the intended
receiver while the message should be opaque for other users. Only the
sender and receiver should be able to understand the transmitted message
as eavesdroppers can intercept the message. Therefore, there is a
requirement to encrypt the message so that the message cannot be
intercepted. This aspect of confidentiality is commonly used to achieve secure
communication.
o Message Integrity: Data integrity means that the data must arrive at the
receiver exactly as it was sent. There must be no changes in the data content
during transmission, either maliciously or accident, in a transit. As there are
more and more monetary exchanges over the internet, data integrity is more
crucial. The data integrity must be preserved for secure communication.
o End-point authentication: Authentication means that the receiver is sure of
the sender?s identity, i.e., no imposter has sent the message.
o Non-Repudiation: Non-Repudiation means that the receiver must be able to
prove that the received message has come from a specific sender. The sender
must not deny sending a message that he or she send. The burden of proving
the identity comes on the receiver. For example, if a customer sends a
request to transfer the money from one account to another account, then the
bank must have a proof that the customer has requested for the transaction.