Docsity

Computer Networks chapter2, Slides of Computer Networks

Partial preview of the text

Download Computer Networks chapter2 and more Slides Computer Networks in PDF only on Docsity!

Chapter 2

Application

Layer

Computer

Networking: A

Top Down

Approach

6 th^ edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Some network apps

  • (^) e-mail
  • (^) web
  • (^) text messaging
  • (^) remote login
  • (^) P2P file sharing
  • (^) multi-user network games
  • (^) streaming stored video (YouTube, Hulu, Netflix) - (^) voice over IP (e.g., Skype) - (^) real-time video conferencing - (^) social networking - (^) search - (^) … - (^) …

Client-server architecture

server:

  • (^) always-on host
  • (^) permanent IP address
  • (^) data centers for scaling clients:
  • (^) communicate with server
  • (^) may be intermittently connected
  • (^) may have dynamic IP addresses
  • (^) do not communicate directly with each other client/server

P2P architecture

  • (^) no always-on server
  • (^) arbitrary end systems directly communicate
  • (^) peers request service from other peers, provide service in return to other peers - (^) self scalability – new

peers bring new service

capacity, as well as new

service demands

  • (^) peers are intermittently connected and change IP addresses - (^) complex management peer-peer

Sockets

  • (^) process sends/receives messages to/from its socket
  • (^) socket analogous to door
    • (^) sending process shoves message out door
    • (^) sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process Internet controlled by OS controlled by app developer transport application physical link network process transport application physical link network process socket

Addressing processes

  • (^) to receive messages, process must have identifier
  • (^) host device has unique 32- bit IP address
  • (^) Q: does IP address of host on which process runs suffice for identifying the process? - (^) identifier includes both IP address and port numbers associated with process on host. - (^) example port numbers: - (^) HTTP server: 80 - (^) mail server: 25 - (^) to send HTTP message to gaia.cs.umass.edu web server: - (^) IP address: 128.119.245. - (^) port number: 80 - (^) more shortly…  (^) A: no, many processes can be running on same host

What transport service does an app need? data integrity

  • some apps (e.g., file transfer, web transactions) require 100% reliable data transfer
  • (^) other apps (e.g., audio) can tolerate some loss timing
  • (^) some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” throughput  (^) some apps (e.g., multimedia) require minimum amount of throughput to be “effective”  (^) other apps (“elastic apps”) make use of whatever throughput they get security  (^) encryption, data integrity, …

Transport service requirements: common apps application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games text messaging data loss no loss no loss no loss loss-tolerant loss-tolerant loss-tolerant no loss throughput elastic elastic elastic audio: 5kbps-1Mbps video:10kbps-5Mbps same as above few kbps up elastic time sensitive no no no yes, 100’s msec yes, few secs yes, 100’s msec yes and no

Internet apps: application, transport protocols application e-mail remote terminal access Web file transfer streaming multimedia Internet telephony application layer protocol SMTP [RFC 2821] Telnet [RFC 854] HTTP [RFC 2616] FTP [RFC 959] HTTP (e.g., YouTube), RTP [RFC 1889] SIP, RTP, proprietary (e.g., Skype) underlying transport protocol TCP TCP TCP TCP TCP or UDP TCP or UDP

Securing TCP TCP & UDP

  • (^) no encryption
  • (^) cleartext passwds sent into socket traverse Internet in cleartext SSL
  • (^) provides encrypted TCP connection
  • (^) data integrity
  • (^) end-point authentication

SSL is at app layer

  • (^) Apps use SSL libraries,

which “talk” to TCP

SSL socket API

cleartext passwds sent

into socket traverse

Internet encrypted

See Chapter 7

Web and HTTP

First, a review…

• web page consists of objects

• object can be HTML file, JPEG image, Java

applet, audio file,…

• web page consists of base HTML-file which

includes several referenced objects

• each object is addressable by a URL, e.g.,

www.someschool.edu/someDept/pic.gif host name path name

Application Layer 2- 17 HTTP overview HTTP: hypertext transfer protocol

  • (^) Web’s application layer protocol
  • (^) client/server model
    • (^) client: browser that

requests, receives,

(using HTTP

protocol) and

“displays” Web

objects

  • (^) server: Web server

sends (using HTTP

protocol) objects in

response to

requests

PC running Firefox browser server running Apache Web server iphone running Safari browser HTTP request HTTP response HTTP request HTTP response

HTTP connections

non-persistent HTTP

• at most one object sent over TCP connection

  • (^) connection then closed

• downloading multiple objects required

multiple connections

persistent HTTP

• multiple objects

can be sent over

single TCP

connection

between client,

server

Non-persistent HTTP suppose user enters URL: 1a. HTTP client initiates TCP connection to HTTP server (process) at www.someSchool.edu on port 80

  1. HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object someDepartment/home.ind ex 1b. HTTP server at host www.someSchool.edu waiting for TCP connection at port 80. “accepts” connection, notifying client
  2. HTTP server receives request message, forms response message containing requested object, and sends message into its socket time (contains text, references to 10 jpeg images) www.someSchool.edu/someDepartment/home.index