You are on page 1of 19

Unit 7 Application Layer

Overview

When DNS was not into existence, one had to download a Host file containing host names and
their corresponding IP address. But with increase in number of hosts of internet, the size of host
file also increased. This resulted in increased traffic on downloading this file. To solve this
problem the DNS system was introduced.

Domain Name System helps to resolve the host name to an address. It uses a hierarchical
naming scheme and distributed database of IP addresses and associated names

IP Address

IP address is a unique logical address assigned to a machine over the network. An IP address
exhibits the following properties:

 IP address is the unique address assigned to each host present on Internet.


 IP address is 32 bits (4 bytes) long.
 IP address consists of two components: network component and host component.
 Each of the 4 bytes is represented by a number from 0 to 255, separated with dots. For
example 137.170.4.124
IP address is 32-bit number while on the other hand domain names are easy to remember names.
For example, when we enter an email address we always enter a symbolic string such as
webmaster@tutorialspoint.com.

Uniform Resource Locator (URL)

Uniform Resource Locator (URL) refers to a web address which uniquely identifies a
document over the internet.

This document can be a web page, image, audio, video or anything else present on the web.

For example, www.tutorialspoint.com/internet_technology/index.html is an URL to the


index.html which is stored on tutorials point web server under internet_technology directory.
URL Types

There are two forms of URL as listed below:

 Absolute URL
 Relative URL
Absolute URL

Absolute URL is a complete address of a resource on the web. This completed address comprises
of protocol used, server name, path name and file name.

For example http:// www.tutorialspoint.com / internet_technology /index.htm. where:

 http is the protocol.


 tutorialspoint.com is the server name.
 index.htm is the file name.

The protocol part tells the web browser how to handle the file. Similarly we have some other
protocols also that can be used to create URL are:

 FTP
 https
 Gopher
 mailto
 news
Relative URL

Relative URL is a partial address of a webpage. Unlike absolute URL, the protocol and server
part are omitted from relative URL.

Relative URLs are used for internal links i.e. to create links to file that are part of same website
as the WebPages on which you are placing the link.

For example, to link an image on


tutorialspoint.com/internet_technology/internet_referemce_models, we can use the relative URL
which can take the form like /internet_technologies/internet-osi_model.jpg.

Difference between Absolute and Relative URL


Absolute URL Relative URL

Used to link web pages on different Used to link web pages within the same website.
websites

Difficult to manage. Easy to Manage

Changes when the server name or directory Remains same even of we change the server name or
name changes directory name.

Take time to access Comparatively faster to access.

Domain Name System Architecture

The Domain name system comprises of Domain Names, Domain Name Space, Name
Server that have been described below:

Domain Names

Domain Name is a symbolic string associated with an IP address. There are several domain
names available; some of them are generic such as com, edu, gov, net etc, while some country
level domain names such as au, in, za, us etc.

The following table shows the Generic Top-Level Domain names:

Domain Name Meaning

Com Commercial business

Edu Education

Gov U.S. government agency

Int International entity


Mil U.S. military

Net Networking organization

Org Non profit organization

The following table shows the Country top-level domain names:

Domain Name Meaning

au Australia

in India

cl Chile

fr France

us United States

za South Africa

uk United Kingdom

jp Japan

es Spain

de Germany

ca Canada

ee Estonia

hk Hong Kong

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

The information about the nodes in the sub domain is stored in the servers at the lower levels
however; the original server keeps reference to these lower levels of servers.

Types of Name Servers

Following are the three categories of Name Servers that manages the entire Domain Name
System:

 Root Server
 Primary Server
 Secondary Server
Root Server

Root Server is the top level server which consists of the entire DNS tree. It does not contain the
information about domains but delegates the authority to the other server

Primary Servers

Primary Server stores a file about its zone. It has authority to create, maintain, and update the
zone file.
Secondary Server

Secondary Server transfers complete information about a zone from another server which may be
primary or secondary server. The secondary server does not have authority to create or update a
zone file.

DNS Working

DNS translates the domain name into IP address automatically. Following steps will take you
through the steps included in domain resolution process:

 When we type www.tutorialspoint.com into the browser, it asks the local DNS Server for
its IP address.
Here the local DNS is at ISP end.

 When the local DNS does not find the IP address of requested domain name, it forwards
the request to the root DNS server and again enquires about IP address of it.
 The root DNS server replies with delegation that I do not know the IP address of
www.tutorialspoint.com but know the IP address of DNS Server.
 The local DNS server then asks the com DNS Server the same question.
 The com DNS Server replies the same that it does not know the IP address of
www.tutorialspont.com but knows the address of tutorialspoint.com.
 Then the local DNS asks the tutorialspoint.com DNS server the same question.
 Then tutorialspoint.com DNS server replies with IP address of www.tutorialspoint.com.
 Now, the local DNS sends the IP address of www.tutorialspoint.com to the computer that
sends the request.
Electronic Mail
mail
Email is a service which allows us to send the message in electronic mode over the
internet. It offers an efficient, inexpensive and real time mean of distributing information
among people.
E-Mail Address
Each user of email is assigned a unique name for his email account. This name is known as
E-mail address. Different users can send and receive messages according to the e-mail
address.
E-mail is generally of the form username@domainname. For example,
webmaster@tutorialspoint.com is an e-mail address where webmaster is username and
tutorialspoint.com is domain name.
 The username and the domain name are separated by @ (at) symbol.
 E-mail addresses are not case sensitive.
 Spaces are not allowed in e-mail address.
E-mail Message Components
E-mail message comprises of different components: E-mail Header, Greeting, Text, and
Signature. These components are described in the following diagram:

E-mail Header
The first five lines of an E-mail message is called E-mail header. The header part
comprises of following fields:
 From
 Date
 To
 Subject
 CC
 BCC
From
The From field indicates the sender’s address i.e. who sent the e-mail.
Date
The Date field indicates the date when the e-mail was sent.
To
The To field indicates the recipient’s address i.e. to whom the e-mail is sent.
Subject
The Subject field indicates the purpose of e-mail. It should be precise and to the point.
CC
CC stands for Carbon copy. It includes those recipient addresses whom we want to keep
informed but not exactly the intended recipient.
BCC
BCC stands for Black Carbon Copy. It is used when we do not want one or more of the
recipients to know that someone else was copied on the message.
Greeting
Greeting is the opening of the actual message. Eg. Hi Sir or Hi Guys etc.
Text
It represents the actual content of the message.
Signature
This is the final part of an e-mail message. It includes Name of Sender, Address, and
Contact Number.
Advantages
E-mail has prooved to be powerful and reliable medium of commmunication. Here are the
benefits of E-mail:
 Reliable
 Convenience
 Speed
 Inexpensive
 Printable
 Global
 Generality
Reliable
Many of the mail systems notify the sender if e-mail message was undeliverable.
Convenience
There is no requirement of stationary and stamps. One does not have to go to post office.
But all these things are not required for sending or receiving an mail.
Speed
E-mail is very fast. However, the speed also depends upon the underlying network.
Inexpensive
The cost of sending e-mail is very low.
Printable
It is easy to obtain a hardcopy of an e-mail. Also an electronic copy of an e-mail can also
be saved for records.
Global
E-mail can be sent and received by a person sitting across the globe.
Generality
It is also possible to send graphics, programs and sounds with an e-mail.
Disadvantages
Apart from several benefits of E-mail, there also exists some disadvantages as discussed
below:
 Forgery
 Overload
 Misdirection
 Junk
 No response
Forgery
E-mail doesn’t prevent from forgery, that is, someone impersonating the sender, since
sender is usually not authenticated in any way.
Overload
Convenience of E-mail may result in a flood of mail.
Misdirection
It is possible that you may send e-mail to an unintended recipient.
Junk
Junk emails are undesirable and inappropriate emails. Junk emails are sometimes referred
to as spam.
No Response
It may be frustrating when the recipient does not read the e-mail and respond on a regular
basis.
E-mail Protocols

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 various protocols such
as SMTP, POP, and IMAP.
SMPTP
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/IP network.
 Apart from transferring e-mail, SMPT also provides notification regarding incoming
mail.
 When you send e-mail, your e-mail client sends it to your e-mail server which 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 without intervention of any
user.
 In case, message cannot be delivered, an error report is sent to the sender which makes
SMTP a reliable protocol.
MAP
IMAP stands for Internet Message Access Protocol. It was first proposed in 1986. There
exist five versions of IMAP as follows:
1. Original IMAP
2. IMAP2
3. IMAP3
4. IMAP2bis
5. IMAP4
Key Points:
 IMAP allows the client program to manipulate the e-mail message on the server without
downloading them on the local computer.
 The e-mail is hold and maintained by the remote server.
 It enables us to take any action such as downloading, delete the mail without reading the
mail.It enables us to create, manipulate and delete remote message folders called mail
boxes.
 IMAP enables the users to search the e-mails.
 It allows concurrent access to multiple mailboxes on multiple mail servers.
POP
POP stands for Post Office Protocol. It is generally used to support a single client. There
are several versions of POP but the POP 3 is the current standard.
Key Points
 POP is an application layer internet standard protocol.
 Since POP supports offline access to the messages, thus requires less internet usage time.
 POP does not allow search facility.
 In order to access the messaged, it is necessary to download them.
 It allows only one mailbox to be created on server.
 It is not suitable for accessing non mail data.
 POP commands are generally abbreviated into codes of three or four letters. Eg. STAT.

Comparison between POP and IMAP


S.N POP IMAP
.

1 Generally used to support single client. Designed to handle multiple clients.

2 Messages are accessed offline. Messages are accessed online although it


also supports offline mode.

3 POP does not allow search facility. It offers ability to search emails.

4 All the messages have to be downloaded. It allows selective transfer of messages to


the client.

5 Only one mailbox can be created on the server. Multiple mailboxes can be created on the
server.

6 Not suitable for accessing non-mail data. Suitable for accessing non-mail data i.e.
attachment.

7 POP commands are generally abbreviated into IMAP commands are not abbreviated, they
codes of three or four letters. Eg. STAT. are full. Eg. STATUS.

8 It requires minimum use of server resources. Clients are totally dependent on server.

9 Mails once downloaded cannot be accessed Allows mails to be accessed from multiple
from some other location. locations.

10 The e-mails are not downloaded automatically. Users can view the headings and sender of
e-mails and then decide to download.

10 POP requires less internet usage time. IMAP requires more internet usage time.

The World Wide Web

WWW stands for World Wide Web. A technical definition of the World Wide Web is : all the
resources and users on the Internet that are using the Hypertext Transfer Protocol (HTTP).
A broader definition comes from the organization that Web inventor Tim Berners-Lee helped
found, the World Wide Web Consortium (W3C).
The World Wide Web is the universe of network-accessible information, an embodiment of
human knowledge.
In simple terms, The World Wide Web is a way of exchanging information between computers
on the Internet, tying them together into a vast collection of interactive multimedia resources.
Internet and Web is not the same thing: Web uses internet to pass over the information.

Evolution
World Wide Web was created by Timothy Berners Lee in 1989 at CERN in Geneva. World
Wide Web came into existence as a proposal by him, to allow researchers to work together
effectively and efficiently at CERN. Eventually it became World Wide Web.
The following diagram briefly defines evolution of World Wide Web:
WWW Architecture
WWW architecture is divided into several layers as shown in the following diagram:
Identifiers and Character Set
Uniform Resource Identifier (URI) is used to uniquely identify resources on the web
and UNICODE makes it possible to built web pages that can be read and write in human
languages.
Syntax
XML (Extensible Markup Language) helps to define common syntax in semantic web.
Data Interchange
Resource Description Framework (RDF) framework helps in defining core representation of
data for web. RDF represents data about resource in graph form.
Taxonomies
RDF Schema (RDFS) allows more standardized description of taxonomies and
other ontological constructs.
Ontologies
Web Ontology Language (OWL) offers more constructs over RDFS. It comes in following
three versions:
 OWL Lite for taxonomies and simple constraints.
 OWL DL for full description logic support.
 OWL for more syntactic freedom of RDF
Rules
RIF and SWRL offers rules beyond the constructs that are available
from RDFs and OWL. Simple Protocol and RDF Query Language (SPARQL) is SQL like
language used for querying RDF data and OWL Ontologies.
Proof
All semantic and rules that are executed at layers below Proof and their result will be used to
prove deductions.
Cryptography
Cryptography means such as digital signature for verification of the origin of sources is used.
User Interface and Applications
On the top of layer User interface and Applications layer is built for user interaction.
WWW Operation
WWW works on client- server approach. Following steps explains how the web works:
1. User enters the URL (say, http://www.tutorialspoint.com) 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
www.tutorialspoint.com.
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.

Future
There had been a rapid development in field of web. It has its impact in almost every area such
as education, research, technology, commerce, marketing etc. So the future of web is almost
unpredictable.
Apart from huge development in field of WWW, there are also some technical issues that W3
consortium has to cope up with.

User Interface
Work on higher quality presentation of 3-D information is under deveopment. The W3
Consortium is also looking forward to enhance the web to full fill requirements of global
communities which would include all regional languages and writing systems.

Technology
Work on privacy and security is under way. This would include hiding information, accounting,
access control, integrity and risk management.

Architecture
There has been huge growth in field of web which may lead to overload the internet and degrade
its performance. Hence more better protocol are required to be developed.

HTTP

HTTP stands for HyperText Transfer Protocol.


It is a protocol used to access the data on the World Wide Web (www).

The HTTP protocol can be used to transfer the data in the form of plain text, hypertext, audio,
video, and so on.

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.

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.

HTTP is used to carry the data in the form of MIME-like format.

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

o 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 replies to the
request message by sending a response message.

You might also like