CN Unit 5
CN Unit 5
Introduction:
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. This layer is basically highest level of
open system, which provides services directly for application process.
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.
Application Layer Protocols: The application layer provides several protocols which
allow any software to easily send and receive information and present meaningful
data to its users.
The following are some of the protocols which are provided by the application layer.
TELNET: Telnet stands for Telecommunications Network. This protocol is used for
managing files over the Internet. It allows the Telnet clients to access the resources
of Telnet server. Telnet uses port number 23.
DNS: DNS stands for Domain Name System. The DNS service translates the domain
name (selected by user) into the corresponding IP address. For example- If you
choose the domain name as [Link], then DNS must translate it as
[Link] (random IP address written just for understanding purposes). DNS
protocol uses the port number 53.
DHCP: DHCP stands for Dynamic Host Configuration Protocol. It provides IP
addresses to hosts. Whenever a host tries to register for an IP address with the
DHCP server, DHCP server provides lots of information to the corresponding host.
DHCP uses port numbers 67 and 68.
FTP: FTP stands for File Transfer Protocol. This protocol helps to transfer different
files from one device to another. FTP promotes sharing of files via remote
computer devices with reliable, efficient data transfer. FTP uses port number 20 for
data access and port number 21 for data control.
SMTP: SMTP stands for Simple Mail Transfer Protocol. It is used to transfer
electronic mail from one user to another user. SMTP is used by end users to send
emails with ease. SMTP uses port numbers 25 and 587.
HTTP: HTTP stands for Hyper Text Transfer Protocol. It is the foundation of the
World Wide Web (WWW). HTTP works on the client server model. This protocol is
used for transmitting hypermedia documents like HTML. This protocol was
designed particularly for the communications between the web browsers and web
servers, but this protocol can also be used for several other purposes. HTTP is a
stateless protocol (network protocol in which a client sends requests to server and
server responses back as per the given state), which means the server is not
responsible for maintaining the previous client’s requests. HTTP uses port number
80.
NFS: NFS stands for Network File System. This protocol allows remote hosts to
mount files over a network and interact with those file systems as though they are
mounted locally. NFS uses the port number 2049.
SNMP: SNMP stands for Simple Network Management Protocol. This protocol
gathers data by polling the devices from the network to the management station at
fixed or random intervals, requiring them to disclose certain information. SNMP
uses port numbers 161 (TCP) and 162 (UDP).
Edu Education
au Australia
in India
cl Chile
fr France
us United States
za South Africa
uk United Kingdom
jp Japan
Domain Name Space
The domain name space refers a hierarchy in the internet naming structure. This
hierarchy has multiple levels (from 0 to 127), with a root at the top. The following
diagram shows the domain name space hierarchy:
In the above diagram each subtree represents a domain. Each domain can be
partitioned into sub domains and these can be further partitioned and so on.
Name Server
Name server contains the DNS database. This database comprises of various names and
their corresponding IP addresses. Since it is not possible for a single server to maintain
entire DNS database, therefore, the information is distributed among many DNS servers.
Hierarchy of server is same as hierarchy of names.
The entire name space is divided into the zones
Zones
Zone is collection of nodes (sub domains) under the main domain. The server maintains
a database called zone file for every zone.
If the domain is not further divided into sub domains then domain and zone refers to
the same thing.
To complete a DNS resolution, different types of servers are used. The order in which a
query passes through the four name servers is listed below. They can either supply the
requested domain name or refer you to alternative name servers.
DNS Resolver
An application, such as a web browser, sends DNS queries to the recursive server. It's
the user's first resource, and it either provides the response to the query if it has it
cached, or it goes to the next-level server if it doesn't. Before answering the client, this
server may undergo multiple iterations of querying.
If the recursive server does not have the answer cached, it first sends a query to this
server. The root name server is a directory of all the servers that will hold the requested
information. The Internet Corporation for Assigned Names and Numbers (ICANN),
specifically the Internet Assigned Numbers Authority, is in charge of these servers.
A TLD nameserver keeps track of all domain names with the same domain extension,
such as .com, .net, or whatever comes after the last dot in a URL. For example, a '.com'
TLD nameserver includes information for every website that ends in '.com'. If a user
searched for [Link], the DNS resolver would submit a query to a .com TLD
nameserver, which would answer by referring to the authoritative nameserver for that
domain.
1. If you type [Link] into a web browser, the query is transmitted over the
Internet and received by a DNS resolver.
2. The DNS resolver then queries a DNS root nameserver.
3. After then, the root server responds to the DNS resolver with the address of
a TLD DNS server (such as .com or .net), which keeps the information for the
resolver's domains. Our request for [Link] is directed to the .com top-
level domain (TLD).
4. The DNS resolver then requests the .com TLD after receiving the address of the
TLD by the root server.
5. The IP address of the domain nameserver, [Link], is then returned by the
TLD server.
6. Finally, the DNS resolver sends a query to the domain's nameserver.
7. The nameserver returns the IP address, for [Link], to the resolver.
8. The DNS resolver then returns the IP address of the domain that was requested
originally to the web browser.
9. An HTTP request is sent to the IP address by the browser.
10. The server returns the webpage to be rendered in the browser at that IP.
11. Finally, after all the processes mentioned above, the user can now view the web
page on their machine.
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
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, address
translation, ip, icmp, tcp, udp, and egp. These groups are under the mib object.
SNMP
GetResponse: The GetResponse message is sent from an agent to the manager in response
to the GetRequest and GetNextRequest message. This message contains the value of a
variable requested by the manager.
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.
Email architecture:
Email architecture consists of three components:
Architecture of WWW
The WWW is mainly a distributed client/server service where a client using the browser can
access the service using a server. The Service that is provided is distributed over many different
locations commonly known as sites/websites.
Each website holds one or more documents that are generally referred to as web pages.
Where each web page contains a link to other pages on the same site or at other sites.
These pages can be retrieved and viewed by using browsers.
In the above case, the client sends some information that belongs to site A. It generally sends a
request through its browser (It is a program that is used to fetch the documents on the web).
and also the request generally contains other information like the address of the site, web
page(URL).
The server at site A finds the document then sends it to the client. after that when the user or
say the client finds the reference to another document that includes the web page at site B.
The reference generally contains the URL of site B. And the client is interested to take a look at
this document too. Then after the client sends the request to the new site and then the new
page is retrieved.
Components of WWW
1. Client/Browser
The Client/Web browser is basically a program that is used to communicate with the webserver
on the Internet.
The Computer that is mainly available for the network resources and in order to provide
services to the other computer upon request is generally known as the server.
[Link]
It is basically a standard used for specifying any kind of information on the Internet.
In order to access any page the client generally needs an address.
To facilitate the access of the documents throughout the world HTTP generally makes
use of Locators.
WWW Operation
WWW works on client- server approach. Following steps explains how the web works:
1. User enters the URL (say, [Link] of the web page in the address
bar of web browser.
2. Then browser requests the Domain Name Server for the IP address corresponding to
[Link].
3. After receiving IP address, browser sends the request for web page to the web server
using HTTP protocol which specifies the way the browser and web server
communicates.
4. Then web server receives request using HTTP protocol and checks its search for the
requested web page. If found it returns it back to the web browser and close the HTTP
connection.
5. Now the web browser receives the web page, It interprets it and display the contents of
web page in web browser’s window.
HTTP Protocol
when we enter a URL (Uniform Resource Locator) in the browser to visit a website,The
browser fetches the IP address corresponding to the entered URL using DNS (Domain
Name System). Once the browser gets the IP address corresponding to the entered URL,
the browser sends a request to the server at the backend (along with the IP address of
the website) to fetch the webpage of the website. In return, the browser receives a
response from the server and this response contains the HTML (Hypertext Markup
Language) information of the webpage. These requests and responses that are sent
follow a protocol which is called HTTP (Hypertext Transfer Protocol) .
Hence, HTTP is a protocol which is used to transfer hypertext data (example HTML data),
plain text data, audio data, video data etc. over the internet.
HTTP relies on the TCP (Transmission Control Protocol) and it works on the PORT
number 80. Hence, a connection is first established (TCP connection) and then the data
is transferred over this connection.
An HTTP-based system consists of 3 parts i.e. a client, a server and numerous proxies
lying in between the client and the server.
1. Client A client is the one that sends the HTTP request so as to fetch information
from the server at the backend. For example: The web browser you are using to
surf the internet is the client which is actually requesting the webpages from the
web server.
2. Server A server is present at the backend which receives requests from the client.
It sends an HTTP response back to the client along with the data which is
requested by the client.
3. Proxy In order to make the process of the request and response faster, we use
proxy servers. Proxy servers are generally smaller servers which contain some of
the information that is present in the main server.
Below is the step by steps discussion of how the Hypertext transfer protocol works.
In our browser, we enter the URL address of the website we want to visit. Once we
enter the URL address of the website, the browser with the help of the DNS extracts
the IP address corresponding to the URL address that is entered.
The DNS contains the mapping of the URLs along with their corresponding IP addresses.
Once we get the IP address of the website, the browser sends an HTTP request to the
server to extract the HTML webpage corresponding to the IP address. This request is
sent over PORT 80 using TCP. Once the server receives this HTTP request, it responds
back with an HTTP response. This HTTP response consists of the information related to
the HTML page corresponding to the IP address of the website.
The browser receives the HTML information for the website along with the response
and hence, it processes and displays the HTML page on the browser. Finally, the users
can see a HTML page for the URL that they entered.
What is in an HTTP Request?
In order to fetch the webpage corresponding to a given IP address, the browser sends a
request (called as HTTP request) to the web server. An HTTP request consists of 3 parts
i.e. a request line, request headers, and request body. Given below is the structure of
an HTTP request.
Request Line
Request Headers
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
After the client/browser sends an HTTP request to the web server, the server responds
back to the browser with an HTTP response. This response consists of all the data that is
requested by the client in the HTTP request.
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.