1 an overview of applications xin liu ecs 152a ref: slides by j. kurose and k. ross

23
1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

Post on 22-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

1

An Overview of Applications

Xin Liu

ECS 152A

Ref: slides by J. Kurose and K. Ross

Page 2: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

2

Application architecture

Client-server architecture Servers always on With fixed address Server farm

P2P architecture Scalability Difficult to manage

Hybrid Napster Instant messaging

• Register to central server• Chatting in a p2p fashion

Page 3: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

3

Network applications: some reviewProcess: program running

within a host. within same host, two

processes communicate using interprocess communication (defined by OS).

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

user agent: interfaces with user “above” and network “below”.

implements user interface & application-level protocol Web: browser E-mail: mail reader streaming

audio/video: media playerQ: software needed for network core?

Page 4: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

4

Applications and application-layer protocols

Application: communicating, distributed processes e.g., e-mail, Web, P2P file

sharing, instant messaging running in end systems

(hosts) exchange messages to

implement application

Application-layer protocols one “piece” of an app define messages exchanged

by apps and actions taken use communication services

provided by lower layer protocols (TCP, UDP)

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Page 5: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

5

App-layer protocol defines

Types of messages exchanged, eg, request & response messages

Syntax of message types: what fields in messages & how fields are delineated

Semantics of the fields, ie, meaning of information in fields

Rules for when and how processes send & respond to messages

Public-domain protocols:

defined in RFCs allows for

interoperability eg, HTTP, SMTPProprietary protocols: eg, KaZaA

Page 6: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

6

Components of Network App.

Application-layer protocol is one piece Web is an application

HTTP protocol HTML standard for document formats Web browsers (Navigator, firefox, IE) Web servers (e.g., Apache, microsoft

servers) E-mail

SMTP protocol Mail servers, mail readers

Page 7: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

7

Client-server paradigmTypical network app has two

pieces: client and serverapplicatio

ntransportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Client: initiates contact with server

(“speaks first”) typically requests service

from server, Web: client implemented in

browser; e-mail: in mail reader

request

reply

Server: provides requested service to client e.g., Web server sends requested Web

page, mail server delivers e-mail

Page 8: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

8

Processes communicating across network

process sends/receives messages to/from its socket

socket analogous to door sending process shoves

message out door sending process assumes

transport infrastructure on other side of door which brings message to socket at receiving process

Can choose the transport layer protocol

process

TCP withbuffers,variables

socket

host orserver

process

TCP withbuffers,variables

socket

host orserver

Internet

controlledby OS

controlled byapp developer

Page 9: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

9

Addressing processes:

For a process to receive messages, it must have an identifier

Every host has a unique 32-bit IP address

Example port numbers: HTTP server: 80 Mail server: 25

Page 10: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

10

What transport service does an app need?Data loss some apps (e.g., audio)

can tolerate some loss other apps (e.g., file

transfer, telnet) require 100% reliable data transfer

Timing some apps (e.g.,

Internet telephony, interactive games) require low delay to be “effective”

Bandwidth some apps (e.g.,

multimedia) require minimum amount of bandwidth to be “effective”

other apps (“elastic apps”) make use of whatever bandwidth they get

Page 11: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

11

Transport service requirements of common apps

Application

file transfere-mail

Web documentsreal-time audio/video

stored audio/videointeractive gamesinstant messaging

Data loss

no lossno lossno lossloss-tolerant

loss-tolerantloss-tolerantno loss

Bandwidth

elasticelasticelasticaudio: 5kbps-1Mbpsvideo:10kbps-5Mbpssame as above few kbps upelastic

Time Sensitive

nononoyes, 100’s msec

yes, few secsyes, 100’s msecyes and no

Page 12: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

12

Internet transport protocols services

TCP service: connection-oriented: setup

required between client and server processes

reliable transport between sending and receiving process

flow control: sender won’t overwhelm receiver

congestion control: throttle sender when network overloaded

does not providing: timing, minimum bandwidth guarantees

UDP service: unreliable data

transfer between sending and receiving process

does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee

Page 13: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

13

Internet apps: application, transport protocols

Application

e-mailremote terminal access

Web file transfer

streaming multimedia

Internet telephony

Applicationlayer protocol

SMTP [RFC 2821]Telnet [RFC 854]HTTP [RFC 2616]FTP [RFC 959]proprietary(e.g. RealNetworks)proprietary(e.g., Dialpad)

Underlyingtransport protocol

TCPTCPTCPTCPTCP or UDP

typically UDP

Page 14: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

14

An Example: Domain Name SystemInternet hosts, routers:

IP address “name”, e.g.,

bread.cs.ucdavis.edu Map between IP

addresses and name Host aliasing:

relay1.west.abc.com is abc.com, www.abc.com

Canonical hostname Mail-server aliasing: Load balancing Different from app., e.g.,

web, email. used by other

applications

Domain Name System: distributed database

implemented in hierarchy of many name servers

application-layer protocol host, routers, name servers to communicate to resolve names (address/name translation) note: core Internet

function, implemented as application-layer protocol

complexity at network’s “edge”

Page 15: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

15

DNS name servers

no server has all name-to-IP address mappings

Distributed, hierarchicallocal 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

doesn’t scale!

Use UDP, port 53

Page 16: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

16

DNS: Root name servers contacted by local name server that can not resolve name root name server:

contacts authoritative name server if name mapping not known

gets mapping returns mapping to local name server

b USC-ISI Marina del Rey, CAl ICANN Marina del Rey, CA

e NASA Mt View, CAf Internet Software C. Palo Alto, CA

i NORDUnet Stockholm

k RIPE London

m WIDE Tokyo

a NSI Herndon, VAc PSInet Herndon, VAd U Maryland College Park, MDg DISA Vienna, VAh ARL Aberdeen, MDj NSI (TBD) Herndon, VA

13 root name servers worldwide

Page 17: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

17

Simple DNS example

host surf.eurecom.fr wants IP address of hi.cs.ucdavis.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.ucdavis.edu, if necessary

requesting hostsurf.eurecom.fr

hi.cs.ucdavis.edu

root name server

authorititive name serverdns.ucdavis.edu

local name serverdns.eurecom.fr

1

23

4

5

6

Page 18: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

18

DNS example

Root name server: may not know

authoritative name server

may know intermediate name server: who to contact to find authoritative name server

requesting hostsurf.eurecom.fr

hi.cs.ucdavis.edu

root name server

local name serverdns.eurecom.fr

1

23

4 5

6

authoritative name serverdns.cs.ucdavis.edu

intermediate name serverdns.ucdavis.edu

7

8

Page 19: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

19

DNS: iterated queries

recursive query: puts burden of

name resolution on contacted name server

heavy load?

iterated query: contacted server

replies with name of server to contact

“I don’t know this name, but ask this server”

requesting hostsurf.eurecom.fr

hi.cs.ucdavis.edu

root name server

local name serverdns.eurecom.fr

1

23

4

5 6

authoritative name serverdns.cs.ucdavis.edu

intermediate name serverdns.ucdavis.edu

7

8

iterated query

Page 20: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

20

DNS: caching and updating records once (any) name server learns mapping, it

caches mapping cache entries timeout (disappear) after

some time update/notify mechanisms under design by

IETF RFC 2136 http://www.ietf.org/html.charters/dnsind-charter.html

Page 21: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

21

DNS records

DNS: distributed db storing resource records (RR)

Type=NS name is domain (e.g.

foo.com) value is IP address of

authoritative name server for this domain

RR format: (name, value, type,ttl)

Type=A name is hostname value is IP address

Type=CNAME name is alias name for some

“cannonical” (the real) name

www.ibm.com is really servereast.backup2.ibm.com value is cannonical name

Type=MX value is name of mailserver

associated with name

Page 22: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

22

DNS protocol, messagesDNS protocol : query and reply messages, both with same message format

msg header identification: 16 bit #

for query, reply to query uses same #

flags: query or reply recursion desired recursion available reply is authoritative

Page 23: 1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross

23

DNS protocol, messages

Name, type fields for a query

RRs in reponseto query

records forauthoritative servers

additional “helpful”info that may be used