The Application Layer - Home Pages of People@DU

grrrgrapeInternet and Web Development

Oct 31, 2013 (3 years and 9 months ago)

63 views

The Application Layer

Chapter 7

DNS


The Domain Name System: RFC
1034, 1035


The DNS Name Space : No rule against
registering under two top
-
level domains
but not many organizations except
multinationals do it( For Eg. Yahoo.com
and Yahoo.co.in


Resource Records: Every DNS keeps lot
of information about its domain in what
are called the resource records.


Name Servers


The DNS Name Space

A portion of the Internet domain name space.

The DNS Name Space

Note that


Yale Univ of US is directly under generic domain “edu”


Keio Univ of Japan is under “ac.jp” (ac mirrors edu in japan)


Vrije Univ of Netherland is directly under country domain “nl”.


Resource records

Five Tuple


Domain_name TTL Class Type value


TTL: How much stable/reliable is this entry, for heavily used
site this could be big and infrequently used site it could be
small.

Class: Theoretically, for Internet related information it is IN,
for other purposes other codes may be used, but in practice
other codes are rarely seen.


Resource Records

The principal DNS resource records types.

Resource Records (2)

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

Name Servers

Part of the DNS name space showing the division into zones.

Name Servers (2)

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

Caching

As resource records trace back through various name
servers, they are entered into a cache there.


This information is
not authoritative
, since the changes
made at cs.yale.edu before the use of the entry are not
reflected in the cache entry.

Hence the
TTL field
. Sites which have held their IP
addresses for long can have a large value(1 day or
86400secs) for this field and others can have smaller
value depending upon how frequently they change.

Electronic Mail


Architecture and Services


The User Agent


Message Formats


Message Transfer


Final Delivery


Electronic Mail (2)

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

Architecture and Services

Architecture: Header and Body.


Basic functions


Composition (compose)


Transfer (send/recv)


Reporting (whether successfully
delivered or not etc)


Displaying


Disposition (delete/save etc)

Advanced Features

a)
Create and maintain address book

b)
Forward etc

User Agent

a)
User Agents deals with providing an interface to the user
to perform various functions. For Eg. Outlook Express,
Yahoo mail, mail.du.ac.in, etc.

Reading E
-
mail

An example display of the contents of a mailbox.

Message Formats


RFC 822

RFC 822 header fields related to message transport.

Message Formats


RFC 822 (2)

Some fields used in the RFC 822 message header.

Problems with RFC 822

a)
Messages in languages without alphabet (e.g. Chinese
and Japanese)

b)
Messages in languages with accents (e.g. French and
German)

c)
Messages in non
-
Latin alphabets (e.g. Russian)

d)
Messages containing audio and images.


Solution:


MIME


Multipurpose Internet Mail Extensions: RFC
2045
-
2049

MIME

RFC 822 headers added by MIME.

MIME

The MIME types and subtypes defined in RFC 2045.

MIME (4)

A multipart message containing enriched and audio alternatives.

Message Transfer


SMTP (Simple Mail Transfer Protocol)


POP3(Post Office Protocol Version 3) and IMAP
(Internet Message Access Protocol)

SMTP

An SMTP client (running on the sender’s mail server) establishes
a TCP connection at port 25 with SMTP server (running on
receiver’s mail server).

SMTP server is continuously listening to port 25 as explained
earlier.

If the server is ready to accept mail from the client it informs else
try later.

Once the connection is established, client announces whom the
mail is coming from and whom is it meant for.

If such a recipient exists at the server’s side it gives a go
-
ahead.

Client sends the message and the server acknowledges. Send more
if required else connection is released.

Message Transfer


using SMTP

Transferring a message
from
elinore@abc.com

to

carolyn@xyz.com.

Problems in this approach

a)
Receiver was expected to be online all the time.

b)
Worked well when the Internet was small
(ARPANET)

c)
But not now when the IP address being a scarce
resource, is allocated dynamically.

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.

Problems with POP3

Once the receiver downloaded the message, it was erased
from the mailbox at the ISP.

The only copy was at the user’s hard disk and if it crashes
all the mails are gone.


IMAP

A comparison of POP3 and IMAP.

The World Wide Web


Architectural Overview


Static Web Documents


Dynamic Web Documents


HTTP


The HyperText Transfer Protocol


Performance Enhancements


The Wireless Web


Architectural
Overview

(a)

A Web page
(b)

The page reached by clicking on

Department of Animal Psychology
.

The URL

Three parts:


Name of the protocol (http: HyperText Transfer Protocol)


DNS name of the machine where the desired page is located
(sony.com)


The name of the file containing the page (products.html)

Architectural Overview (2)

The parts of the Web model.

Client Side

a)
The browser determines the URL (say
http://www.itu.org/home/index.html)

b)
The browser asks its DNS for the IP address of the
remote DNS www.itu.org.

c)
DNS replies with 156.106.192.32

d)
The browser makes a TCP connection to port 80 on
156.106.192.32

e)
It then sends a request asking for file /home/index.html.

f)
www.itu.org

server sends the file /home/index.html.

g)
The TCP connection is released.

h)
The browser displays the file as required (using a plug
in or an application program like Adobe Reader or
Word)

The Client Side

(a)

A browser plug
-
in.
(b)

A helper application.

The Server Side

a)
Accept a TCP connection from a client.

b)
Get the name of the requested file.

c)
Get the file (from the disk).

d)
Return the file to the client.

e)
Release the TCP connection.

The Server Side

A multithreaded Web server with a front end and processing modules.

Modern Servers do much more

a)
Resolve the name of the web page requested.

b)
Authenticate the client.

c)
Perform access control on the client.

d)
Perform access control on the Web page.

e)
Check the cache.

f)
Fetch the requested page from the disk.

g)
Determine the MIME type to include in response.

h)
Other miscellaneous.

i)
Return the reply to the client.

j)
Make an entry in the server log.

The Server Side (2)

A server farm.

The Server Side (3)

(a)

Normal request
-
reply message sequence.

(b)

Sequence when TCP handoff is used.