application layer protocols
play

Application-Layer Protocols: The World-Wide Web (HTTP) Reliable - PowerPoint PPT Presentation

COMP 431 Application-Layer Protocols Internet Services & Protocols Outline application application transport network Example client/server systems and link their application-level protocols: physical Application-Layer Protocols:


  1. COMP 431 Application-Layer Protocols Internet Services & Protocols Outline application application transport network ◆ Example client/server systems and link their application-level protocols: physical Application-Layer Protocols: » The World-Wide Web (HTTP) » Reliable file transfer (FTP) The Web & HTTP » E-mail (SMTP & POP) regional ISP » Internet Domain Name System (DNS) Jasleen Kaur ◆ Example p2p applications systems: » BitTorrent January 28, 2020 ◆ Other protocols and systems: » Streaming media — DASH » Content delivery networks (CDNs) Institutional network 1 2

  2. Applications and Application-Layer Protocols Application-Layer Protocols Overview The Web application application transport network ◆ User agent (client) for the Web is ◆ Applications: link physical called a browser : » Communicating, distributed mobile network processes » MS Internet Explorer » Running in network hosts in “ user » Google Chrome global ISP space ” » Apple Safari » Exchange messages » Mozilla Firefox home application application network ◆ Application-layer protocols transport regional ISP » One “ piece ” of an application ◆ Server for the Web is called a network Web server : » Defines messages exchanged and link application actions taken application physical » Apache (public domain) transport » Uses services provided by lower » MS Internet Information Server (IIS) layer protocols network link physical Institutional network 3 4

  3. Application-Layer Protocols Web Terminology Web Terminology URLs (Universal Resource Locators) ◆ Web page: » Addressed by a URL Optional server port (Default = port 80) » Consists of “ objects ” www.someSchool.edu:8080/someDept/pic.gif ◆ Most Web pages consist of: » Base HTML page » Embedded objects Server domain nam e Object path name <!DOCTYPE HTML PUBLIC "-//W3C// DT D HTML 4.01 Transiti on al // E N"> <html lang="en"> <head> <meta http-equ iv =" co n te nt - ty pe " content= "t ex t /h tm l ; charset=i s o- 88 59 - 1" > <title>CN N. co m </ ti tl e > ◆ Each object on the web is addressable by a URL <meta http-equ iv =" re f re sh " content="1 8 00 ; URL =http :/ /w ww . cn n. c om /? "> <link rel="Sty le Sh ee t " href=" htt p :/ /i . cn n. ne t /c nn / vi rt ua l /2 00 1 /s ty le / ma in . cs s " type="tex t/ cs s "> » RFC 1738 & 3986 <script language =" Ja v aS cr i pt 1. 1" src=" http :/ / i. cn n .n et /c n n/ vi r tu al /2 0 00 /c o de /m ai n .j s " type="te xt /j av a sc ri p t" > </script > <script language =" Ja v aS cr i pt 1. 1" type="tex t/ j av as c ri pt "> </script> ◆ URL components <script language= "J av aS c ri pt 1 .1 " src=" htt p: // ar . at wo l a. co m/ f il e/ a ds Wr ap p er .j s "> </ sc r ip t> <style type="tex t /c ss "> < /s ty l e> » Server address <script language= "J av aS c ri pt " >d oc um e nt .a d of fs et = 0< /s c ri pt > </head> » (Optional port number) <body class="cnn M ai nB od y " bgcolor=" # FF FF F F" > » Path name <a name="top _o f_ p ag e" >< / a> … 5 6

  4. Web Terminology The Hypertext Transfer Protocol The Hypertext Transfer Protocol (HTTP) HTTP Overview ◆ HTTP uses TCP sockets ◆ HTTP is “ stateless ” » Browser initiates TCP connection to » Server maintains no ◆ Web’s application layer protocol information about past server (on port 80) browser requests ◆ HTTP messages (application-layer PC running ◆ Client/server model Explorer protocol messages) exchanged » client: between browser and Web server aside ❖ browser that requests, receives, “ displays ” Web objects ◆ HTTP/1.0: RFC 1945 Protocols that maintain “ state ” ◆ » server: Server are complex! » One request/response running ❖ Web server sends objects in interaction per connection » Past history (state) must be Apache response to requests maintained ◆ HTTP/1.1: RFC 2616 » If server or client crashes, » Persistent connections their views of “ state ” may Mac running be inconsistent and must be » Pipelined connections Navigator reconciled ◆ HTTP/2.0: RFC 7540 » Pipelined, encrypted by default 7 8

  5. The Hypertext Transfer Protocol HTTP 1.0 Example HTTP example URL www.someschool.edu/someDept/home.index ◆ User enters URL www.someSchool.edu/someDept/home.index Client Server » Referenced object contains HTML text and references 10 JPEG images 1) Browser initiates TCP connection to 0) Server process at host server at www.someSchool.edu . www.someSchool.edu waiting ◆ Browser sends an HTTP “ GET ” request to the server Port 80 is “ well known ” for server for TCP connections on port 80 www.someSchool.edu ◆ Server will retrieve and send the 3) C lient writes an HTTP GET 2) Server “ accepts ” connection HTML file request message (containing path) to TCP connection socket ◆ Browser will read the file and Web sequentially make 10 separate ... Server requests for the embedded JPEG 4) Server reads request message, forms response message containing images time requested object, writes message to Browser socket 5) Server closes TCP connection 9 10

  6. HTTP 1.0 Example The Hypertext Transfer Protocol URL www.someschool.edu/someDept/home.index HTTP message format ◆ Two types of HTTP message formats: request and response messages Client Server » ASCII (human-readable format) ◆ HTTP request message: 6) Browser reads response message containing the HTML file. Ten references to JPEG objects are found during the HTML parse » Request line method <SP> path <SP> version <CR><LF> header field name “ : ” value <CR><LF> 7) Browser initiates TCP connection to » Optional server at www.someSchool.edu … header lines header field name “ : ” value <CR><LF> <CR><LF> 8) Server “ accepts ” connection » Present only time entity body for some Steps 1-6 are repeated for each methods of the 10 JPEG objects ( e.g. , POST) 11 12

  7. HTTP Message Format The Hypertext Transfer Protocol Mozilla & MS Explorer request examples HTTP request message format GET /~jasleen HTTP/1.0 Connection: Keep-Alive method <SP> path <SP> version <CR><LF> User-Agent: Mozilla/4.74 [en] (WinNT; U) header field name “ : ” value <CR><LF> Host: dove.cs.unc.edu:80 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, … image/png, */* header field name “ : ” value <CR><LF> Accept-Encoding: gzip Accept-Language: en <CR><LF> Accept-Charset: iso-8859-1,*,utf-8 Cookie: SITESERVER=ID=8a064b7855a043146e45991174a3d970 entity body ◆ How does Mozilla process: ◆ HTTP 1.0 Method types: ◆ HTTP/1.1 adds http://dove.cs.unc.edu:80/~jasleen ?? » GET » PUT—Uploads in entity body to path ◆ List of standard header fields: specified in URL field » POST — Form input sent in entity body » DELETE — Delete file specified in https://en.wikipedia.org/wiki/List_of_HTTP_header_fields URL field » HEAD — Just headers, no object ◆ Chrome –> Inspect –> Network –> Headers 13 14

  8. HTTP Message Format HTTP Message Format Mozilla & MS Explorer request examples General response message format GET /~jasleen HTTP/1.0 ◆ Response messages Connection: Keep-Alive » ASCII (human-readable format) User-Agent: Mozilla/4.74 [en] (WinNT; U) Host: dove.cs.unc.edu:80 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, ◆ Message structure: image/png, */* Accept-Encoding: gzip » Response line Accept-Language: en version <SP> code <SP> phrase <CR><LF> Accept-Charset: iso-8859-1,*,utf-8 header field name “ : ” value <CR><LF> Cookie: SITESERVER=ID=8a064b7855a043146e45991174a3d970 » Optional … GET /~jasleen HTTP/1.1 header lines Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, header field name “ : ” value <CR><LF> application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, */* » Requested <CR><LF> Accept-Language: en-us object, error Accept-Encoding: gzip, deflate entity body message User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) message, etc. Host: dove.cs.unc.edu:80 Connection: Keep-Alive 15 16

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend