Application Layer - Computer Networks - Lecture Slides, Slides of Computer Science

These are the Lecture Slides of Computer Networks which includes Specific Protocols, Socket Programming, Network Application Protocols, Service Models, Client Server Paradigm, Distributed Processes, Interprocess Communication etc. Key important points are: Application Layer, Specific Protocols, Socket Programming, Network Application Protocols, Service Models, Client Server Paradigm, Distributed Processes, Interprocess Communication

Typology: Slides

2012/2013

Uploaded on 03/22/2013

dhirendra
dhirendra šŸ‡®šŸ‡³

4.3

(78)

268 documents

1 / 40

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
2: Application Layer 1
Chapter 2: Application Layer
Chapter goals:
conceptual +
implementation aspects
of network application
protocols
client server
paradigm
service models
learn about protocols by
examining popular
application-level
protocols
More chapter goals
specific protocols:
http
ftp
smtp
pop
dns
programming network
applications
socket programming
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Partial preview of the text

Download Application Layer - Computer Networks - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

2: Application Layer 1

Chapter 2: Application Layer

Chapter goals:

 conceptual + implementation aspects of network application protocols  client server paradigm  service models

 learn about protocols by examining popular application-level protocols

More chapter goals

 specific protocols:

 http  ftp  smtp  pop  dns

 programming network

applications

 socket programming

2: Application Layer 2

Applications and application-layer protocols

Application: communicating, distributed processes  running in network hosts in ā€œuser spaceā€  exchange messages to implement app  e.g., email, file transfer, the Web Application-layer protocols  one ā€œpieceā€ of an app  define messages exchanged by apps and actions taken  user services provided by lower layer protocols

application transport network data link physical

application transport network data link physical

application transport network data link physical

2: Application Layer 4

Client-server paradigm

Typical network app has two

pieces: client and server

application transport network data link physical

application transport network data link physical

Client:  initiates contact with server (ā€œspeaks firstā€)  typically requests service from server,  for Web, client is implemented in browser; for e-mail, in mail reader Server:  provides requested service to client  e.g., Web server sends requested Web page, mail server delivers e-mail

request

reply

2: Application Layer 5

Application-layer protocols (cont).

API: application

programming interface

 defines interface

between application

and transport layer

 socket: Internet API

 two processes communicate by sending data into socket, reading data out of socket

Q: how does a process

ā€œidentifyā€ the other

process with which it

wants to communicate?

 IP address of host running other process  ā€œport numberā€ - allows receiving host to determine to which local process the message should be delivered

… lots more on this later.

2: Application Layer 7

Transport service requirements of common apps

Application

file transfer e-mail Web documents real-time audio/video

stored audio/video interactive games financial apps

Data loss

no loss no loss loss-tolerant loss-tolerant

loss-tolerant loss-tolerant no loss

Bandwidth

elastic elastic elastic audio: 5Kb-1Mb video:10Kb-5Mb 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

2: Application Layer 8

Services provided by Internet

transport protocols

TCP service:

 connection-oriented: setup

required between client, server

 reliable transport between

sending and receiving process

 flow control: sender won’t

overwhelm receiver

 congestion control: throttle

sender when network overloaded

 does not provide: timing,

minimum bandwidth guarantees

UDP service:

 connection-less: unreliable

data transfer between sending and receiving process

 does not provide:

connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee

Q: why bother? Why is there a UDP?

2: Application Layer 10

The Web: some jargon

 Web page:

 consists of ā€œobjectsā€  addressed by a URL

 Most Web pages

consist of:

 base HTML page, and  several referenced objects.

 URL has two

components: host name

and path name:

 User agent for Web is

called a browser:

 MS Internet Explorer  Netscape Communicator

 Server for Web is

called Web server:

 Apache (public domain)  MS Internet Information Server

www.someSchool.edu/someDept/pic.gif

2: Application Layer 11

The Web: the http protocol

http: hypertext transfer

protocol

 Web’s application layer protocol

 client/server model

 client: browser that

requests, receives, ā€œdisplaysā€ Web objects

 server: Web server

sends objects in response to requests

 http1.0: RFC 1945

 http1.1: RFC 2068

PC running Explorer

Server running NCSA Web server

Mac running Navigator

2: Application Layer 13

http example

Suppose user enters URL

www.someSchool.edu/someDepartment/home.index

1a. http client initiates TCP connection to http server (process) at www.someSchool.edu. Port 80 is default for http server.

  1. http client sends http request message (containing URL) into TCP connection socket

1b. http server at host www.someSchool.edu waiting for TCP connection at port 80. ā€œacceptsā€ connection, notifying client

  1. http server receives request message, forms response message containing requested object (someDepartment/home.index), sends message into socket

time

(contains text, references to 10 jpeg images)

2: Application Layer 14

http example (cont.)

  1. http client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects

  2. Steps 1-5 repeated for each of 10 jpeg objects 4. http server closes TCP connection.

time

2: Application Layer 16

http message format: request

 two types of http messages: request, response

 http request message:

 ASCII (human-readable format)

GET /somedir/page.html HTTP/1. User-agent: Mozilla/4. Accept: text/html, image/gif,image/jpeg Accept-language:fr

(extra carriage return, line feed)

request line (GET, POST, HEAD commands)

header lines

Carriage return, line feed indicates end of message

2: Application Layer 17

http request message: general format

2: Application Layer 19

http response status codes

200 OK

 request succeeded, requested object later in this message

301 Moved Permanently

 requested object moved, new location specified later in this message (Location:)

400 Bad Request

 request message not understood by server

404 Not Found

 requested document not found on this server

505 HTTP Version Not Supported

In first line in server->client response message.

A few sample codes:

2: Application Layer 20

Trying out http (client side) for yourself

1. Telnet to your favorite Web server:

Opens TCP connection to port 80 (default http server port) at www.eurecom.fr. Anything typed in sent to port 80 at www.eurecom.fr

telnet www.eurecom.fr 80

2. Type in a GET http request:

GET /~ross/index.html HTTP/1.0 By typing this in (hit carriage return twice), you send this minimal (but complete) GET request to http server

3. Look at response message sent by http server!