0% found this document useful (0 votes)
26 views79 pages

CN UNIT V ApplicationLayer - Part1

The document discusses the Application Layer of network architecture, highlighting its role in providing user-facing services while relying on lower layers for reliable transport. Key protocols such as DNS, electronic mail, the World Wide Web, and multimedia applications are explored, with a focus on their functionality and structure. The document also details the DNS system, its hierarchical naming scheme, resource records, and the architecture of electronic mail systems.

Uploaded by

Shivani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views79 pages

CN UNIT V ApplicationLayer - Part1

The document discusses the Application Layer of network architecture, highlighting its role in providing user-facing services while relying on lower layers for reliable transport. Key protocols such as DNS, electronic mail, the World Wide Web, and multimedia applications are explored, with a focus on their functionality and structure. The document also details the DNS system, its hierarchical naming scheme, resource records, and the architecture of electronic mail systems.

Uploaded by

Shivani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 79

UNIT V

The Application Layer

1
PREVIOUS LAYERS
 THE PURPOSE OF THE PHYSICAL
LAYER IS TO TRANSPORT A RAW
BIT STREAM FROM ONE MACHINE
TO ANOTHER.
 THE MAIN TASK OF THE DATA LINK
LAYER IS TO TRANSFORM A RAW
TRANSMISSION FACILITY INTO A
LINE THAT APPEARS FREE OF
UNDETECTED TRANSMISSION
ERRORS TO THE NETWORK LAYER.
2
 THE NETWORK LAYER IS
CONCERNED WITH GETTING
PACKETS FROM THE SOURCE ALL
THE WAY TO THE DESTINATION.
 THE TRANSPORT LAYER’S TASK IS
TO PROVIDE RELIABLE, COST-
EFFECTIVE DATA TRANSPORT
FROM SOURCE MACHINE TO
DESTINATION MACHINE,
INDEPENDENTLY OF THE PHYSICAL
Layer
The Application Layer
 Layers below the application
layer are there to provide
reliable transport, but they do
not do real work for users.

 In this chapter we will study


some real network applications.
4
The Application Layer
 In the application layer there is also need
for support protocols, to allow the
applications to function.
 One of them is DNS which handles
naming within the Internet.
 Three real applications:
1. Electronic Mail
2. The World Wide Web
3. Multimedia
5
The Application Layer’s topics

7.1. DNS – The Domain Name System


7.2. Electronic Mail

7.3. The World Wide Web


7.4. Multimedia
7.5. Summary

6
7.1. DNS – The Domain Name System

• 7.1.1. The DNS Name Space


• 7.1.2. Resource Records
• 7.1.3. Name Servers

7
7.1. DNS – The Domain Name System

• Network addresses (e.g., IP) are hard


for people to remember.
• Also, sending e-mail to
[email protected] means that if
Tana’s ISP moves the mail server to a
different machine with different IP
address, her e-mail address has to
change. 8
7.1. DNS – The Domain Name System
• Consequently, ASCII names were
introduced to decouple machine names
from machine addresses.
• In this way, Tana’s address might be
something like [email protected].
• Nevertheless, network itself understand
only numerical addresses, so some
mechanism is required to convert the
ASCII srtings to network addresses.
9
7.1. DNS – The Domain Name System
 DNS (Domain Name System) solves this
problem.
 The essence of DNS is the invention of a
hierarchical, domain-based naming scheme
and a distributed database system for
implementing this naming scheme.
 DNS is primarily used for mapping host names
and e-mail destinations to IP addresses but can
also be used for other purposes.
10
7.1. DNS – The Domain Name System
 DNS is used as follows.
 To map a name onto an IP address, an
application program calls a library
procedure called the resolver, passing it
the name as a parameter.

11
7.1. DNS – The Domain Name System
 Resolver sends a UDP packet to a local
DNS server, which then looks up the
name and returns the IP address to the
resolver, which then returns it to the
caller.
 Armed with the IP address, the program
can then establish a TCP connection with
the destination or send it UDP packets.
12
7.1.1. The DNS Name Space
 Internet is divided into over 200 top-
level domains, where each domain
covers many hosts.
 Each domain is partitioned into
subdomains, and these are further
partitioned, and so on.
 All these domains can be represented
by a tree.
13
7.1.1. The DNS Name Space

A portion of the Internet domain name space.


14
7.1.1. The DNS Name Space
 The leaves of the tree represent
domains that have no subdomains (but
do contain machines, of course).
 A leaf domain may contain a single
host, or it may represent a company
and contain thousands of hosts.
 The top-level domains come in two
flavors: generic and countries.
15
7.1.1. The DNS Name Space
 Top-level general-purpose domains:
 Commercial (com)
 Educational institutions (edu)
 Governments (gov)
 Certain international organizations (int)
 Armed forces (mil)
 Network providers (net)
 Nonprofit organizations (org) 16
7.1.1. The DNS Name Space
 Business (biz) – 2000, ICANN
 Information (inf) – 2000, ICANN
 Peaple’s names (name) – 2000, ICANN
 Professions (pro) – 2000, ICANN
 Aerospace industry (aero) - by request
 Co-operatives (coop) - by request
 Museums (museum) - by request, etc
17
7.1.1. The DNS Name Space
 In general, getting a second-level domain,
such as name-of-company.com, is easy.
 It requires going to a registrar for the
corresponding top-level domain (com in
this case) to check if the desired name is
available and not somebody’s trademark.
 If there are no problems, the register pays
a small annual fee and gets the name.
18
7.1.1. The DNS Name Space
 Each domain is named by the path upward
from it to the root.
 The components are separated by periods
(pronounced “dot”).
 eng.sun.com is the engineering
department at Sun Microsystems.
 eng/sun/com is UNIX-style
19
7.1.1. The DNS Name Space
 Domain names are case insensitive, so
edu, Edu, and EDU mean the same thing.
 Component names can be up to 63
characters long, and full path names must
not exceed 255 characters.

20
7.1.1. The DNS Name Space
 Domains can be inserted into the tree in
two different ways.
 cs.yale.edu
 cs.yale.ct.us
 Most organization in the United States are
under a generic domain, and most outside
the United States are under the domain of
their country.
21
7.1.1. The DNS Name Space
 Each domain controls how it allocates the
domains under it.
 For example, Japon has domains ac.jp and
co.jp that mirror edu and com
 The Netherlands does not make this
distinction and puts all organization
directly under nl
22
7.1.1. The DNS Name Space
 Thus, all three of the following are
university computer science departments:
 cs.yale.edu (Yale University, in the US)
 cs.vu.nl (Vrije Universiteit, in the Netherl)
 cs.keio.ac.jp (Keio University, in Japan)
 Naming follows organizational
boundaries, not physical networks.
23
7.1.2. Resource Records
 Every domain, whether it is a single host
or a top-level domain, can have a set of
resource records associated with it.
 For a single host, the most common
resource record is just its IP address, but
many other kinds of resource records also
exist.

24
7.1.2. Resource Records
 When a resolver gives a domain name to
DNS, what it gets back are the resource
records associated with that name.
 Thus, the primary function of DNS is to
map domain names onto resource
records.

25
7.1.2. Resource Records
 A resource record is a five-tuple.
 Resource records are presented as ASCII
text, one line per resource record.
 The format we will use is as follows:
 Domain_name Time_to_live Class
Type Value

26
7.1.2. Resource Records
 Domain_name
 It tells the domain to which this record
applies.
 Normally, many records exist for each
domain and each copy of the database
holds information about multiple
domains.
 This field is thus the primary search key
used to satisfy queries. 27
7.1.2. Resource Records
 Time_to_live
 It gives an indication of how stable the
record is.
 Information that is highly stable is
assigned a large value, such as 86400
(the number of seconds in 1 day).
 Information that is highly volatile is
assigned a small value, such as 60 (1
minute). 28
7.1.2. Resource Records
 Class
 For Internet information, it is always IN.
 Type
 It tells what kind of record this is
 The most important types are listed in
following figure.

29
7.1.2. Resource Records

The principal DNS resource records types.


30
7.1.2. Resource Records
 Value
 This field can be a number, a domain
name, or an ASCII string.
 The semantics depend on the record type.
 Following figure depicts part of a
database for the cs.vu.nl domain shown
on slide number 12.
31
7.1.2. Resource Records

A portion of a possible DNS database for cs.vu.nl.


32
7.1.3. Name Servers
 In theoty at least, a single name server
could contain the entire DNS database
and respond to all queries about it.
 In practice, this server would be so
overloaded as to be useless.
 Futhermore, if it ever went down, the
entire Internet would be crippled.
33
7.1.3. Name Servers
 To avoid the problems associated
with having only a single source of
information, the DNS name space is
divided into nonoverlapping zones.
 One possible way to divide the name
space on slide 12 is shown in
following figure.

34
7.1.3. Name Servers

Part of the DNS name space showing the division into zones.
35
7.1.3. Name Servers

How a resolver looks up a remote name in eight steps.

36
7.2. Electronic Mail
• Electronic mail, or e-mail, like other forms
of communication, has its own
conventions and style.
• e-mail is very informal and has a low
threshold of use.
• e-mail is full of jargon
• Many people also use litle ASCII symbols
called smileys or emoticons in their e-
mail… 37
7.2. Electronic Mail

Some smileys. They will not be on the final exam :-).


38
7.2. Electronic Mail
• The first e-mail systems simply consisted
of file transfer protocols, with the
convention that the first line of each
message (i.e., file) contained the
recipient’s address.

39
7.2. Electronic Mail
• Some of the complaints were as follows:
a) Sending a message to a group of people
was inconvenient.
b) Messages had no internal structure,
making computer processing difficult.
c) The sender never knew if a message
arrived or not.
d) It was not possible to create and send
messages containing a mixture of text,
drawings, facsimile, and voice, etc.
40
7.2. Electronic Mail
• 1982 – RFC 821 (transmission protocol)
and RFC 822 (message format)
• 1984 – X.400
• After two decades of competition, e-mail
systems based on RFC 822 are widely
used.

41
7.2. Electronic Mail

• Architecture and Services


• The User Agent
• Message Formats
• Message Transfer
• Final Delivery

42
7.2.1. Architecture and Services
• What e-mail systems can do and how they
are organized?
• There are two subsystems in e-mail
systems
a) User agents allow people to read and send
e-mail.
b) Message transfer agents move messages
from the source to the destination.
43
7.2.1. Architecture and Services
e-mail systems support five basic
functions
• Composition
• Transfer
• Reporting
• Displaying
• Disposition

44
7.2.1. Architecture and Services
A few of advanced features:
• Mailboxes
• Mailing list
• Carbon copies
• Blind carbon copies
• Etc.

45
7.2.1. Architecture and Services
• A key idea in e-mail systems is the
distinction between the envelope and its
contents.
• The envelope encapsulates the message
• It contains all the information needed
for transporting the message, such as the
destination address, priority, and
security level, all of which are distinct
from the message itself. 46
7.2.1. Architecture and Services
• Message inside the envelope consists of
two parts:
• The header and the body
• The header contains control information
for the user agents.
• The body is entirely for the human
recipient.

47
7.2.1. Architecture and Services

Envelopes and messages. (a) Paper mail. (b) Electronic mail.


48
7.2.2. The User Agent
• A user agent is normally a program
(sometimes called a mail reader) that
accepts a variety of commands for
composing, receiving, and replying to
message, as well as for manipulating
mailboxes.

49
7.2.2. The User Agent
• SENDING E-MAIL
• To send an e-mail message, a user must
provide the message, the destination address,
and possiply some other parameters,
• The message can be produced with a free-
standing text editor, a word processing
program, etc
• Most e-mail systems support mailing lists, so
that a user can send same message to a list of
people with a single command.
50
7.2.2. The User Agent
• READING E-MAIL
• Typically, when a user agent is started up, it
looks at the user’s mailbox for incoming e-
mail before displaying anything on the
screen.
• Then it may announce the number of
messages in the mailbox or display a one-
line summary of each one and wait for a
command.
51
7.2.2. Reading E-mail

An example display of the contents of a mailbox.


52
7.2.3 Message Formats – RFC 822

• Messages consist of :
• a primitive envelope,
• some number of header fields,
• a blank line,
• and then message body

53
7.2.3 Message Formats – RFC 822

• Each header field consists of a single line of


ASCII text containing the field name, a
colon, and, for most fields, a value.

• In normal usage, the user agent builds a


message and passes it to the message transfer
agent, which then uses some of the header
fields to construct the actual envelope. 54
7.2.3 Message Formats – RFC 822

RFC 822 header fields related to message transport.


55
Message Formats – RFC 822 (2)

Some fields used in the RFC 822 message header.


56
MIME – Multipurpose Internet Mail
Extensions
 In the early days of the ARPANET,
e- mail consisted exclusivly of text
messages written in English and
expressed in ASCII.
 For this environment, RFC 822 did
the job completely: it specified the
headers but left the content entirely up
to the users.
57
MIME – Multipurpose Internet Mail
Extensions
Problems with international languages:
 Languages with accents
(French, German).
 Languages in non-Latin alphabets
(Hebrew, Russian).
 Languages without alphabets
(Chinese, Japanese).
 Messages not containing text at all
(audio or images).
58
MIME – Multipurpose Internet Mail
Extensions
 A solution was proposed in RFC 1341
and updated in RFCs 2045-2049.
 This solution, called MIME
(Multipurpose Internet Mail Extensions) is
now widely used.
 The basic idea of MIME is to continue
to use the RFC 822 format, but to add
srtucture to the message body and define
encoding rules for non-ASCII messages. 59
MIME ( ) 60

RFC 822 headers added by MIME. 60


MIME ( ) 61

The MIME types and subtypes defined in RFC 2045.


MIME (4)

62
7.2.4. Message Transfer
 The message transfer system is
concerned with relaying messages from
the originator to the recipient.

 The simplest way to do this is to


establish a transport connection from the
source machine to the destination machine
and then just transfer the message.
63
7.2.4. Message Transfer
 SMTP – The Simple Mail
Transfer Protocol
 Within the Internet, e-mail is delivered
by having the source machine establish a
TCP connection to port 25 of the
destination machine.
 Listening to this port is an e-mail
daemon that speaks SMTP.
64
7.2.4. Message Transfer
 This daemon accepts incoming
connections and copies messages from
them into the appropriate mailboxes.

 If a message cannot be delivered, an


error report containing the first part of the
undeliverable message is returned to the
sender.
65
7.2.4. Message Transfer
 SMTP is a simple ASCII protocol.
 After establishing the TCP connection
to port 25, the sending machine, operating
as the client, waits for the receiving
machine, operating as the server, to talk
first.

66
7.2.4. Message Transfer
 The server starts by sending a line of
text giving its identity and telling whether
it is prepared to receive mail.

 If it is not, the client releases


the connection and tries again
later.
67
7.2.4. Message Transfer
 If the server is willing to accept e-
mail, the client announces whom the e-
mail is coming from and whom it is
going to.

 If such a recipient exists at the


destination, the server gives the client the
go-ahead to send the message.
7.2.4. Message Transfer
7.2.4. Message Transfer
 Then the client sends the message and
the server acknowledges it.
 No checksums are needed because
TCP provides a reliable byte stream.
 If there is more e-mail, that is now sent.
 When all the e-mail has been
exchanged in both directions, the
connection is
7.2.4. Message Transfer
released.
Message Transfer

Transferring a message
from
[email protected] to
[email protected].

BLM431 Computer Networks 70


Dr.Refik Samet
7.2.5. Final Delivery
 What happens when Elinor wants to
send Carolyn e-mail and Carolyn is not
currently on-line?
 Elinor cannot establish a TCP
connection to Carolyn and thus cannot
run the SMTP protocol.

71
7.2.5. Final Delivery
 One solution is to have a message
transfer agent on an ISP machine accept e-
mail for its customers and store it in their
mailboxes on an ISP machine.
 Since this agent can be on-line all
the time, e-mail can be sent to it 24
hours a day.
7.2.5. Final Delivery - POP3
 How does the user get the e-mail from
the ISP’s message transfer agent?
 The solution to this problem is to create
another protocol that allows user transfer
agents (on client PCs) to contact the
message transfer agent (on ISP’s machine)
and allow e-mail to be copied from the ISP
to the user.
7.2.5. Final Delivery

(a) Sending and reading mail when the receiver has a permanent
Internet connection and the user agent runs on the same machine as
the message transfer agent. (b) Reading e-mail when the receiver has
a dial-up connection to an ISP.
74
7.2.5. Final Delivery - POP3
7.2.5. Final Delivery - IMAP
 IMAP – Internet Message Access Protocol
 IMAP assumes that all the e-mail will
remain on the server indefinitely in multiple
mailboxes.
 But POP3 basically assumes that the user
will clear out the mailbox on every contact
and work off-line after that.
 IMAP – provides extensive mechanisms
for reading message or even parts of
7.2.5. Final Delivery - IMAP
messages

You might also like