fall 2005 by: h. veisi computer networks course olum-fonoon babol chapter 7 the application layer

15
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Upload: lydia-kennedy

Post on 11-Jan-2016

219 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Fall 2005By: H. Veisi

Computer networks course

Olum-fonoon Babol

Chapter 7

The Application Layer

Page 2: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 2

Overview

Processes running in different hosts communicate with an application-layer protocol

Popular application-level protocols: DNS HTTP FTP SMTP / POP3 / IMAP

Programming network applications socket API

Page 3: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 3

DNS (1)

Programs could refer to hosts, mailboxes and other resources by their network IP. These Numbers are difficult to remember by people? Also, if moving the servers to different machine? Use names instead of IP numbers.

Ex. ce.sharif.edu, [email protected] Need a mechanism to convert names to IP Number

Use a file: hosts.txt As the number of PCs increase?

Size increase, Conflict of host names

Need a central manager: DNS: Domain Name System

Page 4: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 4

DNS (2)

DNS Name Space For managing large and changing set of names, need a

postal like management, Ex. No. 4, Azadi St., Tehran, Iran

Hierarchical addressing

Top-level domain: 200 top-level domains

Page 5: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 5

no server has all name-to-IP address mappings

local name servers: each ISP, company has

local (default) name server

host DNS query first goes to local name server

authoritative name server: for a host: stores that

host’s IP address, name can perform

name/address translation for that host’s name

Why not centralize DNS? single point of failure traffic volume distant centralized database maintenance

DNS (3)

Page 6: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 6

Example:

host surf.eurecom.fr wants IP address of gaia.cs.umass.edu

1. contacts its local DNS server, dns.eurecom.fr

2. dns.eurecom.fr contacts root name server, if necessary

3. root name server contacts authoritative name server, dns.umass.edu, if necessary

requesting hostsurf.eurecom.fr

gaia.cs.umass.edu

root name server

authoritative name serverdns.umass.edu

local name serverdns.eurecom.fr

1

23

4

5

6

DNS (4)

Page 7: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 7

DNS (5)

Once (any) name server learns mapping, it caches mapping cache entries timeout (disappear) after some

time DNS Records

format: (name, TTL, value, type)

Records types:

Page 8: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 8

Three major components: user agents mail servers simple mail transfer

protocol: SMTP

User Agent Sometimes is called:

“mail reader” composing, editing,

reading mail messages e.g., Eudora, Outlook,

elm, Netscape Messenger outgoing, incoming

messages stored on server

user mailbox

outgoing message queue

mailserver

useragent

useragent

useragent

mailserver

useragent

useragent

mailserver

useragent

SMTP

SMTP

SMTP

E-Mail (1)

Page 9: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 9

Mail Servers mailbox contains incoming

messages for user message queue of

outgoing (to be sent) mail messages

SMTP protocol between mail servers to send email messages

“client”: sending mail server (sending agent)

“server”: receiving mail server (receiving agent)

mailserver

useragent

useragent

useragent

mailserver

useragent

useragent

mailserver

useragent

SMTP

SMTP

SMTP

E-Mail (2)

Page 10: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 10

Message Format: SMTP: protocol for

exchanging email msgs RFC 822: standard for text

message format: header lines, e.g.,

To: From: Subject: different from SMTP

commands! body

the “message”, ASCII characters only

header

body

blankline

E-Mail (3)

Page 11: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 11

E-Mail (4)

MIME: Multipurpose Internet Mail Extension For multimedia mail extension

Text example subtypes:

plain, html

Image example subtypes:

jpeg, gif

Audio example subtypes:

basic (8-bit mu-law encoded), 32kadpcm (32 kbps coding)

Video example subtypes:

mpeg, quicktime

Application other data that must be

processed by reader before “viewable”

example subtypes: msword, octet-stream

Page 12: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 12

SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server

POP: Post Office Protocol [RFC 1939] authorization (agent <-->server) and download

IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server

HTTP: Hotmail , Yahoo! Mail, etc.

useragent

sender’s mail server

useragent

SMTP SMTP accessprotocol

receiver’s mail server

E-Mail (5)

Page 13: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 13

E-Mail (6)

POP3 Previous example uses

“download and delete” mode.

“Download” brings the mail into client computer.

“Delete” removes the mail from the mail server. Mr.X cannot re-read e-mail if he changes client computer.

“Download-and-keep”: leaves the message on the mail server.

POP3 is stateless across sessions.

IMAP Keep all messages in

one place: the server Allows user to

organize messages in folders

IMAP keeps user state across sessions:

names of folders and mappings between message IDs and folder name

Page 14: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 14

transfer file to/from remote host client/server model

client: side that initiates transfer (either to/from remote)

server: remote host ftp: RFC 959 ftp server: port 21

file transfer FTPserver

FTPuser

interface

FTPclient

local filesystem

remote filesystem

user at host

FTP: File Transfer Protocol

Page 15: Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer

Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 15

WWW: World Wide Web

In 1989, CERN: European Center of Nebular Research, By Berners-Lee.

Accessing linked documents, support Text, Image, Audio, Video, …

People think that this is “Internet” ! Hypertext Browsers:

Mosaic, Netscape, IE, …

Use HTML (Hyper-Text Markup Language) as a common language of web.