Application Layer
Application Layer
The application layer is the topmost layer of the OSI model and the TCP/IP model. In TCP/IP
model, the application layer is formed by combining the top three layers, i.e., the application
layer, the presentation layer, and the session layer. An application layer is an abstraction layer
that specifies the shared communications protocols and interface methods used by hosts in a
communications network. It is the layer closest to the end-user, implying that the application
layer and the end-user can interact directly with the software application.
It does not provide service to other layers because it is the topmost layer. The
Application layer uses Transport and any levels below it to communicate with or transfer data
to a remote host.
Consumers frequently require protocols from the Application Layer. One of the most often
used application protocols is HTTP (Hypertext Transfer Protocol), the foundation for the World
Wide Web. Domain Name System (DNS), Simple Mail Transfer Protocol (SMTP), File
Transfer Protocol (FTP), Trivial File Transfer Protocol (TFTP), and TELNET are some of the
protocols used in the application layer.
Functions of the Application Layer
The application layer provides the following functions.
1. The Application Layer provides protocols that allow the software to communicate and
receive data and finally present it to users in a meaningful way.
2. This layer allows users to log on as a remote host.
3. The Application Layer provides various facilities for users to forward multiple emails
and a storage facility.
4. This layer acts as a window via which users and application processes can access
network resources.
5. This layer provides services such as email, file transfer, results distribution, directory
services, network resources, etc.
6. The application layer communicates with the operating system and guarantees that data
is properly saved.
7. This layer allows users to interact with other software applications.
8. This application layer generally performs host initialization followed by remote login
to hosts.
9. This layer visualizes data, allowing individuals to grasp it rather than memorize it or
see it in binary format (1s or 0s).
DNS in Networking-
Need-
The need for Domain Name Service arises due to the following reasons-
Point-01:
IP Addresses are not static and may change dynamically.
So, a mapping is required which maps the domain names to the IP Addresses of their web
servers.
Point-02:
IP Addresses are a complex series of numbers.
So, it is difficult to remember IP Addresses directly while it is easy to remember names.
DNS Resolution-
DNS contains various servers that coverts the alphabetic domains to its numeric IP. The
resolution process of the DNS can either be iterative or recursive.
1. Recursive DNS Service
In this type, if the DNS resolver only communicates to the root servers and the remaining
servers were communicated recursively by the root server. The root server sends the output
(IP in this case) to the DNS resolver.
2. Iterative DNS Service
In this type, the DNS resolver can directly communicate and receive input from the
servers at different levels.
Request Line
An HTTP request-line consists of 3 parts which are discussed below.
1. Request Method A request method defines what type of request is needed to send to
the web server. For example if we want to fetch something from the web server, we
use a GET request method. If we want to send something from the client to the web
server, we use POST request method.
2. Request URI It it the the URI of the website / destination we want to reach.
3. HTTP Version It states the version of the HTTP we are using. For example HTTP
1.0, HTTP 1.1.
Request Headers
Request headers contain additional information about the resource/data that is to be fetched
from the web server.
For example, if we want the data in the plaintext format, we can specify that information in
the HTTP headers.
We can also specify the information related to the client using headers like the browser it is
using etc.
We can send more than one HTTP headers along with an HTTP request to specify the
additional information which is to be sent along with an HTTP request.
Request Body
It is an optional part of an HTTP request. If there is a requirement of sending some data along
with an HTTP request, we send that data along with the HTTP Body. For example: If we
want to send the details of a user which is taken through a form at the client side to the web
server, we can send this data in the HTTP body.
An HTTP response consists of 3 parts:
1. Response Status Line
2. Response Headers
3. Response Body
Response Status Line
An HTTP request-line consists of 3 parts which are discussed below.
1. HTTP Version It states the version of the HTTP we are using. For example HTTP
1.0, HTTP 1.1.
2. Status Code It is a three-digit code that tells the status of the HTTP response. For
example code 200 stands for a successful HTTP response.
3. Status Phrase It is a short description of the status code.
Response Headers
The response headers are used to specify the additional information related to the response
data and the server.
Response Body
It is an optional part of the HTTP response. The data which is requested by the client using
the HTTP request is sent from server to client by keeping it inside the response body.
What is an HTTP Status Code?
An HTTP status code is a three-digit code that specifies the status of the HTTP response.
Some of the commonly seen HTTP status codes along with their description are given below.
500 Internal server error An error such as a server crash has occurred.
Characteristics of SMTP-
Purpose-
Working-
Characteristics of IMAP-
FTP, a networking protocol that connects client and server, allows users to download
web pages, data, and programs from other services. FTP is used when a user wants to
download information to their own computer.
The end user's machine is commonly referred to as the local host in an FTP transaction.
The second computer involved in FTP is a remote host, which is usually a server.
Individuals and businesses can share electronic files with others via the file transfer
protocol without needing to be in the same space. This can be accomplished via an FTP
client or the cloud.
FTP clients come with most online browsers, allowing users to transfer files from their
computer to a server and vice versa. Some users may prefer to utilize a third-party FTP
client because many of them often come with additional features. Some FTP clients that
are available for free to download are FileZilla Client, FTP Voyager, WinSCP,
CoffeeCup Free FTP, and Core FTP.
Many people have utilized FTP without even knowing it. You've used FTP if you've
ever downloaded a file from a website. The starting step is to log in, which can be done
automatically or by manually entering a username and password. FTP requires a
specific port number to access an FTP server. You can transfer files using your FTP
client after connecting to the FTP server. Some public FTP servers do not require you
to sign in because you can access them anonymously.
A typical FTP transfer works like this:
Firstly, a user must log in to the FTP server. There are some servers that make some or all
of their content available without requiring a login; they are referred to as anonymous
FTP.When a user raises a request to download a file, the client starts a discussion with the
server. A client can use FTP to download, move, delete, upload, rename, and copy files on
a server.
Objectives of FTP
To encourage file sharing (computer programs and/or data).
To encourage the indirect or implicit use of remote computers (via programs).
To protect a user from variations in file storage systems between hosts.
To reliably and efficiently transfer data (designed mainly for use by programs).