





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






3/31/2004ECS152B Demet Aksoy
ECS152B Demet Aksoy
ECS152B Demet Aksoy
3
4, 2002.^ by Jim Kurose and Keith Ross, Addison-Wesley ISBN: 0-201-97699-
ECS152B Demet Aksoy
I. Introduction • Computer Networks Overview
ECS152B Demet Aksoy
Road Map
IV. Network Layer • Overview of Network Layer
ECS152B Demet Aksoy
Computer Networks
Interconnected collection of autonomous computers attached to a host system:
Host A
Network Adapter
ComputerNetwork
Host B
Network Adapter
ECS152B Demet Aksoy
7 Protocols
host
Network Adapter
host
Network Adapter
Computer Network
ECS152B Demet Aksoy
8 Protocols
ECS152B Demet Aksoy
The Internet Protocol Stack
source destination original message
Transport Network Link
Application
ECS152B Demet Aksoy
The Internet Protocol Stack
source original message
Transport Network Link
Application
Protocol Data Units (PDU) message
frame
segment datagram
software
network interface card
software mixed
Implementation
ECS152B Demet Aksoy
15 Protocol Layers Summary
Network Link
Transport Network Link
Application Transport Network Link
Application
HostA router HostB
Network Link router
ECS152B Demet Aksoy
16 Client-Server Model
client server
client = host that initiates the session (e.g., asks for a Web page; browser) server = host that gives the requested service same host can be both a client and a server for one application (e-mail)
A typical network has two components: client and server
ECS152B Demet Aksoy
Application Layer
Application-layer protocols:
applicationtransport data linknetwork physical
applicationtransport networkdata link physical
applicationtransport data linknetwork physical
ECS152B Demet Aksoy
Application Layer Protocols
ECS152B Demet Aksoy
19 World Wide Web: the HTTP protocol
(browser)^ client
serverWeb
(browser)client
http request
http request
http response
http response
Uses TCP, reliable transport layer protocol: handshaking etc., on port 80 ECS152B Demet Aksoy
20 HTTP example Suppose user enters URL www.cs.ucdavis.edu/instruction/default.html 1a. http client initiates TCP connection to http server (process) at www.cs.ucdavis.edu. Port 80 is default for http server.
1b. http server at host www.cs.ucdavis.edu waiting for TCP connection at port 80. “accepts” connection, notifies client
time
http client receives response message containing html file, displays html.
http server closes TCP connection.
host name path name
ECS152B Demet Aksoy
HTTP response message: general format version status code phrase
ECS152B Demet Aksoy
try it out! http (client side)
Open TCP connection to port 80(default http server port) at www.cs.ucdavis Anything typed in sent to port 80 at www.cs.ucdavis
telnet www.cs.ucdavis.edu 80
GET /index.html HTTP/1.0Host: www.cs.ucdavis.edu hit carriage return twice
ECS152B Demet Aksoy
27 HTTP
two versions:
ECS152B Demet Aksoy
28 Authentication and Cookies
“ authorization: typically name and password “
HTTP is stateless; ask for the same object twice, server sends it twice!
server
client (^) 401 Authorization Req WWW-Authenticate:
( send withAuthorization: each message )
ECS152B Demet Aksoy
Authentication, Cookies
server
client Set-cookie: # Cookie: #
Saves to a file (e.g., .netscape/cookies) ( send with each message )
ECS152B Demet Aksoy
Conditional GET
client server
If-modified-since:^ http request msg
object not modified
If-modified-since:^ http request msg
object modified
ECS152B Demet Aksoy
31 Conditional Get
HTTP/1.1 200 OKDate: Thu, 6 April 2000 12:00:15 GMT Server: Apache/1.3.0Last-Modified: Sat, 1 (Unix) Apr 2000 06:23:19 GMT Content-Length:Content-Type: text/html 6821 GET /instruction/default.html HTTP/1.1data^ data^ data^ data data ... User-agent:Accept: text/html, image/gif Mozilla/4. If-modified-since: Sat, 1 April 2000 06:23:19HTTP/1.1 304 Not Modified Date:Server: Apache/1.3.0 Thu, 8 Apr (^2000) (Unix)12:00:15 GMT (empty entity body)
GET... /instruction/default.html HTTP/1.
ECS152B Demet Aksoy
32 Web Caches (Proxy Server)
client
Proxy server
client
http request http response http request http response
originserver