Presentation is loading. Please wait.

Presentation is loading. Please wait.

Application Layer 2 Figures from Kurose and Ross

Similar presentations


Presentation on theme: "Application Layer 2 Figures from Kurose and Ross"— Presentation transcript:

1 Application Layer 2 Figures from Kurose and Ross
CS 471/571 Application Layer 2 Figures from Kurose and Ross

2 Internet Transport Layer
TCP Connection oriented Reliable data transfer UDP Connectionless Data loss possible It is possible that packets are delivered out of order

3 Internet Transport Layer
No throughput guarantees No delay guarantees No security built into TCP or UDP SSL Secure socket layer Application layer services built on top of TCP

4 Application Layer Protocols
Varies by application Types of message exchange Request Response Message Syntax Fields Message Semantics Rules about when messages should be sent

5 HyperText Transfer Protocol (http)
Overview Connections Message Format Cookies Web Caching

6 Overview Created in the early 1990s by Tim Berners-Lee
Client/Server Architecture http client/http server Request/response Web Page Web page consist of one or more objects URL: hostname/pathname cs.uwlax.edu/~gendreau/cs471 Stateless

7 Hypertext Vannevar Bush: Memex (1954) Ted Nelson (1963)
Douglas Engelbart (1962) Hypercard (MacIntosh 1987)

8 Request/Response HTTP request PC running Firefox browser HTTP response
server running Apache Web iphone running Safari browser

9 Connections TCP connections Persistent Non-Persistent

10 Example Transfer TCP three-way handshake initiate TCP connection RTT
request file time to transmit file RTT file received time time

11 Message Format Syntax Semantics Standard ASCII Text Methods GET POST
HEAD PUT DELETE

12 Example Request request line (GET, POST, HEAD commands) header lines
Carriage return line-feed character request line (GET, POST, HEAD commands) GET /index.html HTTP/1.1\r\n Host: www-net.cs.umass.edu\r\n User-Agent: Firefox/3.6.10\r\n Accept: text/html,application/xhtml+xml\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO ,utf-8;q=0.7\r\n Keep-Alive: 115\r\n Connection: keep-alive\r\n \r\n header lines carriage return, line feed at start of line indicates end of header lines

13 HTTP request message: general format
sp request line method URL sp version cr lf cr lf value header field name header lines ~ ~ cr lf value header field name cr lf ~ entity body ~ body Application Layer

14 HTTP response message status line (protocol status code status phrase)
HTTP/ OK\r\n Date: Sun, 26 Sep :09:20 GMT\r\n Server: Apache/ (CentOS)\r\n Last-Modified: Tue, 30 Oct :00:02 GMT\r\n ETag: "17dc6-a5c-bf716880"\r\n Accept-Ranges: bytes\r\n Content-Length: 2652\r\n Keep-Alive: timeout=10, max=100\r\n Connection: Keep-Alive\r\n Content-Type: text/html; charset=ISO \r\n \r\n data data data data data ... header lines data, e.g., requested HTML file Application Layer

15 HTTP response message: general format
version sp Status code sp phrase cr status line lf cr lf value header field name sp header lines ~ ~ cr lf value header field name sp cr lf ~ entity body ~ body Application Layer

16 Message Format Status codes 200 OK: 301 Moved Permanently
400 Bad Request 404 Not Found: 505 HTTP Version Not Supported:

17 telnet example Prompt> telnet cis.poly.edu 80
Trying Connected to cis.poly.edu. Escape character is '^]'. HEAD /~ross HTTP/1.1 Host: cis.poly.edu HTTP/ Moved Permanently Date: Wed, 19 Feb :48:38 GMT Server: Apache/1.2.5 Location: Content-Type: text/html Connection closed by foreign host. Prompt>

18 Cookies Client maintains cookie file
Server maintains database matching id number with information about the user Once the id is established it can be included in response messages

19 Cookies: keeping “state” (cont.)
client server ebay 8734 usual http request msg Amazon server creates ID 1678 for user create entry cookie file usual http response set-cookie: 1678 ebay 8734 amazon 1678 backend database usual http request msg cookie: 1678 cookie- specific action access usual http response msg usual http request msg cookie: 1678 cookie- specific action access one week later: ebay 8734 amazon 1678 usual http response msg Application Layer

20 Web Cache Proxy Server Conditional Get

21 Web Cache proxy server HTTP request client HTTP response origin server

22 File Transfer Protocol (ftp)
Allows a use to sign in (an anonymous account can be used) and transfer files between the client machine and server machine ftp server listens on port 21 Uses TCP Separate control and data connection Out-of-band control http uses in-band control Maintains user state

23 ftp file transfer FTP user FTP interface client server user at host
remote file system local file system

24 TCP control connection,
ftp Connections TCP control connection, server port 21 TCP data connection, server port 20 FTP client FTP server

25 ftp Commands Data transferred in plain text User username
PASS password List RETR filename (get) STOR filename (put)


Download ppt "Application Layer 2 Figures from Kurose and Ross"

Similar presentations


Ads by Google