20-1 Last time □ NAT □ Application layer ♦ Intro ♦ Web / HTTP.

Slides:



Advertisements
Similar presentations
HTTP Cookies. CPSC Application Layer 2 User-server state: cookies Many major Web sites use cookies Four components: 1) cookie header line of HTTP.
Advertisements

EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
HyperText Transfer Protocol (HTTP)
Application Layer-11 CSE401N: Computer Networks Lecture-4 Application Layer Overview HTTP.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 2: Application Layer
EEC-484/584 Computer Networks Discussion Session for HTTP and DNS Wenbing Zhao
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
1 Creating a network app Write programs that m run on different end systems and m communicate over a network. m e.g., Web: Web server software communicates.
Application Layer Overview and Web/HTTP
9/16/2003-9/18/2003 The Application Layer and Java Programming September 16-18, 2003.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Week 11: Application Layer1 Week 11: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
Web, HTTP and Web Caching
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
1 K. Salah Module 2.1: Application Layer Application-level protocols provide high-level services –Web and HTTP –DNS –Electronic mail –Remote login –FTP.
Chapter 2 Application Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 4.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Network access and physical media Internet structure and ISPs Delay & loss.
2: Application Layer World Wide Web (WWW). Introduction 1-2 Internet protocol stack (recap) r application: supporting network applications m FTP,
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
Trying out HTTP (client side) for yourself
FTP (File Transfer Protocol) & Telnet
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Mail (smtp), VoIP (sip, rtp)
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Application Layer 2 Figures from Kurose and Ross
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
2: Application Layer1 Internet apps: their protocols and transport protocols Application remote terminal access Web file transfer streaming multimedia.
Week 11: Application Layer1 Web and HTTP First some jargon r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,…
CS 372 – introduction to computer networks* Wednesday June 30
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Introduction 1 Lecture 6 Application Layer (HTTP) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
2: Application Layer1 Web and HTTP First some jargon Web page consists of base HTML-file which includes several referenced objects Object can be HTML file,
2: Application Layer1 Chapter 2 Application Layer Part 2: Web & HTTP These slides derived from Computer Networking: A Top Down Approach, 6 th edition.
1 HTTP EECS 325/425, Fall 2005 September Chapter 2: Application layer r 2.1 Principles of network applications m app architectures m app requirements.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
Application Layer 2-1 Chapter 2 Application Layer 2.2 Web and HTTP.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
2: Application Layer 1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April.
Dr. Philip Cannata 1 The Web and HTTP. Dr. Philip Cannata 2 Application Layer 2-2 Chapter 2 Application Layer Computer Networking: A Top Down Approach.
Application Layer 2-1 Lecture 4: Web and HTTP. Web and HTTP First, a review… web page consists of objects object can be HTML file, JPEG image, Java applet,
2: Application Layer 1 Application layer  Principles of network applications  Web and HTTP  FTP, TFTP  TELNET  Electronic Mail  SMTP, POP3, IMAP.
Important r There will be NO CLASS on Friday 1/30/2015! r Please mark you calendars 1.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
Advance Computer Networks Lecture#05 Instructor: Engr. Muhammad Mateen Yaqoob.
1 Chapter 2: Application Layer Part A Introduction r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Lecture 5 Internet Core: Protocol layers. Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP 
2: Application Layer 1 Chapter 2 Application Layer These ppt slides are originally from the Kurose and Ross’s book. But some slides are deleted and added.
Block 5: An application layer protocol: HTTP
HTTP request message: general format
Internet transport protocols services
لایه ی کاربرد مظفر بگ محمدی 2: Application Layer.
Chapter 2 Application Layer
Presentation transcript:

20-1 Last time □ NAT □ Application layer ♦ Intro ♦ Web / HTTP

20-2 This time □ Finish HTTP □ FTP

20-3 HTTP Modeling □ Assume Web page consists of: ♦ 1 base HTML page (of size O bits) ♦ M images (each of size O bits) □ Non-persistent HTTP: ♦ M+1 TCP connections in series ♦ Response time = (M+1)O/R + (M+1)2RTT + sum of idle times □ Persistent HTTP: ♦ 2 RTT to request and receive base HTML file ♦ 1 RTT to request and receive M images ♦ Response time = (M+1)O/R + 3RTT + sum of idle times □ Non-persistent HTTP with X parallel connections ♦ Suppose M/X integer. ♦ 1 TCP connection for base file ♦ M/X sets of parallel connections for images. ♦ Response time = (M+1)O/R + (M/X + 1)2RTT + sum of idle times See the applet on UW-ACE!

20-4 HTTP Response time (in seconds) RTT = 100 msec, O = 5 Kbytes, M=10 and X=5 For low bandwidth, connection & response time dominated by transmission time. Persistent connections only give minor improvement over parallel connections.

20-5 HTTP Response time (in seconds) RTT =1 sec, O = 5 Kbytes, M=10 and X=5 For larger RTT, response time dominated by TCP establishment & slow start delays. Persistent connections now give important improvement: particularly in high delay  bandwidth networks.

20-6 HTTP request message □ Two types of HTTP messages: request, response □ HTTP request message: ♦ ASCII (human-readable format) GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr (extra carriage return, line feed) request line (GET, POST, HEAD commands) header lines Carriage return, line feed indicates end of message

20-7 HTTP request message: general format

20-8 Uploading form input POST method: □ Web page often includes form input □ Input is uploaded to server in entity body URL method: □ Uses GET method □ Input is uploaded in URL field of request line:

20-9 Method types HTTP/1.0 □ GET □ POST □ HEAD ♦ asks server to leave requested object out of response HTTP/1.1 □ GET, POST, HEAD □ PUT ♦ uploads file in entity body to path specified in URL field □ DELETE ♦ deletes file specified in the URL field

20-10 HTTP response message HTTP/ OK Connection: close Date: Thu, 06 Aug :00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data... status line (protocol status code status phrase) header lines data, e.g., requested HTML file

20-11 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:

20-12 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 cis.poly.edu. Anything typed in sent to port 80 at cis.poly.edu telnet cis.poly.edu Type in a GET HTTP request: GET /~ross/ HTTP/1.1 Host: cis.poly.edu 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!

20-13 User-server state: cookies Many major Web sites use cookies Four components: 1) cookie header line of HTTP response message 2) cookie header line in HTTP request message 3) cookie file kept on user’s host, managed by user’s browser 4) back-end database at Web site Example: ♦ Susan access Internet always from same PC ♦ She visits a specific e- commerce site for first time ♦ When initial HTTP requests arrives at site, site creates a unique ID and creates an entry in backend database for ID

20-14 Cookies: keeping “state” (cont.) client server usual http request msg usual http response + Set-cookie: 1678 usual http request msg Cookie: 1678 usual http response msg usual http request msg Cookie: 1678 usual http response msg cookie- specific action cookie- spectific action server creates ID 1678 for user entry in backend database access Cookie file amazon: 1678 ebay: 8734 Cookie file ebay: 8734 Cookie file amazon: 1678 ebay: 8734 one week later:

20-15 Cookies (continued) What cookies can bring: □ authorization □ shopping carts □ recommendations □ user session state (Web e- mail) Cookies and privacy: □ cookies permit sites to learn a lot about you □ you may supply name and to sites aside How to keep “state”: □ Protocol endpoints: maintain state at sender/receiver over multiple transactions □ cookies: http messages carry state

20-16 Web caches (proxy server) □ user sets browser: Web accesses via cache □ browser sends all HTTP requests to cache ♦ object in cache: cache returns object ♦ else cache requests object from origin server, then returns object to client Goal: satisfy client request without involving origin server client Proxy server client HTTP request HTTP response HTTP request HTTP response origin server origin server

20-17 More about Web caching □ Cache acts as both client and server □ Typically cache is installed by ISP (university, company, residential ISP) Why Web caching? □ Reduce response time for client request. □ Reduce traffic on an institution’s access link. □ Internet dense with caches: enables “poor” content providers to effectively deliver content (but so does P2P file sharing)

20-18 Caching example Assumptions □ average object size = 100,000 bits □ avg. request rate from institution’s browsers to origin servers = 15/sec □ delay from institutional router to any origin server and back to router = 2 sec Consequences □ utilization on LAN = 15% □ utilization on access link = 100% □ total delay = Internet delay + access delay + LAN delay = 2 sec + minutes + milliseconds origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link institutional cache

20-19 Caching example (cont) Possible solution □ increase bandwidth of access link to, say, 10 Mbps Consequences □ utilization on LAN = 15% □ utilization on access link = 15% □ Total delay = Internet delay + access delay + LAN delay = 2 sec + msecs + msecs □ often a costly upgrade origin servers public Internet institutional network 10 Mbps LAN 10 Mbps access link institutional cache

20-20 Caching example (cont) Install cache □ suppose hit rate is.4 Consequence □ 40% requests will be satisfied almost immediately □ 60% requests satisfied by origin server □ utilization of access link reduced to 60%, resulting in negligible delays (say 10 msec) □ total avg delay = Internet delay + access delay + LAN delay =.6*(2.01) secs +.4*milliseconds < 1.4 secs origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link institutional cache

20-21 Conditional GET □ Goal: don’t send object if cache has up-to-date cached version □ cache: specify date of cached copy in HTTP request If-modified-since: □ server: response contains no object if cached copy is up-to- date: HTTP/ Not Modified cache server HTTP request msg If-modified-since: HTTP response HTTP/ Not Modified object not modified HTTP request msg If-modified-since: HTTP response HTTP/ OK object modified

20-22 Chapter 2: Application layer □ 2.1 Principles of network applications □ 2.2 Web and HTTP □ 2.3 FTP □ 2.4 Electronic Mail ♦ SMTP, POP3, IMAP □ 2.5 DNS □ 2.6 P2P file sharing □ 2.7 Socket programming with TCP □ 2.8 Socket programming with UDP □ 2.9 Building a Web server

20-23 FTP: the file transfer protocol □ transfer file to/from remote host □ client/server model ♦ client: side that initiates transfer (either to/from remote) ♦ server: remote host □ ftp: RFC 959 □ ftp server: port 21 file transfer FTP server FTP user interface FTP client local file system remote file system user at host

20-24 FTP: separate control, data connections □ FTP client contacts FTP server at port 21, specifying TCP as transport protocol □ Client obtains authorization over control connection □ Client browses remote directory by sending commands over control connection. □ When server receives file transfer command, server opens 2 nd TCP connection (for file) to client □ After transferring one file, server closes data connection. FTP client FTP server TCP control connection port 21 TCP data connection port 20 □ Server opens another TCP data connection to transfer another file. □ Control connection: “out of band” □ FTP server maintains “state”: current directory, earlier authentication

20-25 FTP commands, responses Sample commands: □ sent as ASCII text over control channel □ USER username □ PASS password □ LIST return list of file in current directory □ RETR filename retrieves (gets) file □ STOR filename stores (puts) file onto remote host Sample return codes □ status code and phrase (as in HTTP) □ 331 Username OK, password required □ 125 data connection already open; transfer starting □ 425 Can’t open data connection □ 452 Error writing file

20-26 Recap □ Finish HTTP □ FTP

20-27 Next time □ SMTP ( ) □ DNS □ P2P