ImageVerifierCode 换一换
格式:PPT , 页数:78 ,大小:292KB ,
资源ID:373137      下载积分:2000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-373137.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(A Closer Look at HTTP, TCP, IP, and PPP.ppt)为本站会员(赵齐羽)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

A Closer Look at HTTP, TCP, IP, and PPP.ppt

1、A Closer Look at HTTP, TCP, IP, and PPP,Chapter 3Copyright 2001 Prentice Hall Revision 2: July 2001,2,A Closer Look at,HTTP at the Application Layer TCP (and UDP) at the Transport Layer IP at the Internet Layer PPP at the Data Link Layer,3,HTTP: A Closer Look,World Wide Web Standards HTML (HyperText

2、 Markup Language) governs the structure of the HTML webpage HTTP (HyperText Transfer Protocol) governs the format and timing of requests and responses between the browser and the webserver application program,Browser,Webserver Program,HTML,HTTP,4,HTTP: A Closer Look,Sample HTTP Request Line All text

3、, often only a single line Keywordabsolute pathHTTP/ version Keyword (Method) is GET for Retrievals GET must be capitalized Absolute path is URL without http:/hostname,GET /report1/home.htm HTTP/1.1,Absolute Path,5,HTTP: A Closer Look,Sample HTTP Request Header Although the book only discusses the r

4、equest-line, if only the absolute path is give, the request line is supposed to be followed by a header line naming the host. So if the host is puka.hawaii.edu, the request-line and header would be (where CRLF is carriage return followed by line feed):,GET /report1/home.htm HTTP/1.1CRLF Host:puka.ha

5、waii.edu,New,6,HTTP: A Closer Look,Sample HTTP Response Message Header is multiple lines of text Each ends with CRLF,HTTP/1.1 200 OKCRLF Date: Tuesday, 20-JAN-1999 18:32:15 GMTCRLF Server: name of server softwareCRLF MIME-version: 1.0CRLF Content-type: text/plainCRLF CRLF File to be downloaded.,7,HT

6、TP: A Closer Look,Sample HTTP Response Message 200 is a code for a successful retrieval, followed by the humanly readable code, OK Other codes indicate errors, such as 404,HTTP/1.1 200 OKCRLF Date: Tuesday, 20-JAN-1999 18:32:15 GMTCRLF Server: name of server softwareCRLF MIME-version: 1.0CRLF Conten

7、t-type: text/plainCRLF CRLF File to be downloaded.,8,HTTP: A Closer Look,Sample HTTP Response Message MIME-version and Content-type tell the type of file being retrieved For HTML document, text/plain,HTTP/1.1 200 OKCRLF Date: Tuesday, 20-JAN-1999 18:32:15 GMTCRLF Server: name of server softwareCRLF

8、MIME-version: 1.0CRLF Content-type: text/plainCRLF CRLF File to be downloaded.,9,HTTP: A Closer Look,HTML Pages Contain Text To be displayed HTML Pages Contain Tags Some tags say “place a graphic here”, “place a JAVA applet in a box here”, etc. For instance, the tag says “Get file big.jpg and place

9、it here in the HTML document” Graphics, Java programs, etc. are separate files,10,HTTP: A Closer Look,Downloading a “page” may require several downloads One for the HTML document One each for the other files it calls for Each needs a separate request/response cycle,HTML,Big. jpg,App. java,Webserver,

10、User PC,File Downloads,2,3,1,11,HTTP: A Closer Look,How Many HTTP request-response cycles will be needed to download the three files? 3 HTTP request-response cycles,HTML,Big. jpg,App. java,Webserver,User PC,HTTP Request-Response Cycle 1,2,3,12,HTTP: A Closer Look,HTTP is Unreliable No error detectio

11、n and correction for errors As we will see later, TCP at the transport layer is reliable, offering error detection and correction TCP gives HTTP clean data, so there is no need for HTTP to do error checking,13,HTTP: A Closer Look,HTTP is Connectionless HTTP is connectionless. Just send requests, get

12、 responses. No connection between messages Like sending a letter, fax, or e-mail,Browser,Webserver Application,HTTP Request,14,TCP: A Closer Look,Browser does not send HTTP Requests directly to the webserver application The application layer programs are not physically connected Browser sends HTTP R

13、equest to the user PCs transport layer process for delivery,Browser,Transport Process,HTTP Request,15,TCP: A Closer Look,Transport layer process stores the HTTP Request Temporarily Does NOT merely add a TCP header and then pass the TCP segment down to the Internet layer process as noted in Chapter 2

14、,Browser,Transport Process,Transport Process,Request,16,TCP: A Closer Look,User PC transport process opens a connection to the webserver transport layer process This connection can be used to send several TCP segments to handle a several HTTP request-response cycles,Browser,Transport Process,Transpo

15、rt Process,17,TCP: A Closer Look,TCP has a Flags Field Six one-bit flags,Source Port # (16),Destination Port # (16),Sequence Number (32 bits),Acknowledgement Number (32 bits),Hdr Len (4),Flags (6),Window Size (16),Options (if any),PAD,Bit 0,Bit 31,Reserved (6),TCP Checksum (16),Urgent Pointer (16),T

16、CP Segment,Data Field,18,TCP/IP: A Closer Look,Three Flags are Widely Used SYN bit set to 1 in a TCP segment to request a connection ACK bit set to 1 in a segment to acknowledge a received TCP segment FIN bit set to 1 in a segment to inform of a connection closure,Hdr Len (4),Flags (6),Window Size (

17、16),Reserved (6),19,TCP: A Closer Look,Opening a connection takes 3 Segments First TCP segment has SYN flag set. Requests connection to webserver transport process (connection-oriented service) Like a telephone call,User PC Transport Process,Webserver Transport Process,SYN,20,TCP: A Closer Look,Open

18、ing a connection takes 3 Segments Second TCP segment asks to open a connection and also acknowledges the first SYN message (ACK flag set too),User PC Transport Process,Webserver Transport Process,SYN,SYN, ACK,21,TCP: A Closer Look,Opening a connection takes 3 Segments Third TCP segment acknowledges

19、the second All segments are acknowledged except for pure ACKs like the third segment,User PC Transport Process,Webserver Transport Process,SYN,SYN, ACK,ACK,22,TCP: A Closer Look,Next, user PC sends the HTTP Request Sends HTTP Request in data field of a TCP segment Will receive an ACK TCP segment to

20、acknowledge receipt,User PC Transport Process,Webserver Transport Process,TCP segment containing HTTP Request,ACK,23,Delivering the HTTP Response,Transport layer process on the webserver receives the TCP segment delivering the HTTP Request The transport process on the webserver passes the HTTP Reque

21、st in the TCP segment data field to the webserver application program,Webserver Application,Transport Process,HTTP Request,24,Delivering the HTTP Response,Webserver application creates the HTTP Response message Webserver application passes the HTTP Response message to the webserver transport layer p

22、rocess for delivery to the user PC transport layer process,Webserver Application,Transport Process,HTTP Response,25,Delivering the HTTP Response,Webserver Transport Process Delivers the Response User PC transport process sends an acknowledgement,User PC Transport Process,Webserver Transport Process,

23、TCP segment containing HTTP Response,ACK,26,TCP: A Closer Look,Multiple HTTP Request-Response Cycles can be Handled with a Single TCP Connection in HTTP/1.1 and later versions Request message must have following line: Connection: Keep-Alive,New,27,TCP: A Closer Look,Closing the Connection takes 4 TC

24、P Segments You dont simply hang up in a phone call! Initiated by the browser when it downloads the last file,User PC Transport Process,Webserver Transport Process,FIN,FIN,ACK,ACK,28,TCP: A Closer Look,Refinement If your respond quickly to a letter, often include acknowledgement of letter your receiv

25、ed in your response letter TCP segments too can both send new information and acknowledge a segment received. Example: SYN, ACK at start of connection If response will take time, however, send a pure ACK message,29,TCP Connections: Recap,For Page Downloads 3 TCP segments to open the connection 4 TCP

26、 segments per file downloaded More if file downloaded is long, because may take multiple segments to download 4 TCP segments to close the connection A very chatty protocol,30,TCP: Error Handling,TCP is reliable-it does error correction ACKs acknowledge each correctly-received TCP segment If a TCP se

27、gment is not acknowledged, the other side retransmits it after awhile TCP is reliable-it Places TCP Segments in Order IP does not guarantee that packets will arrive in order TCP can place TCP segments in order based on their sequence numbers,31,TCP: Error Handling,TCP Reliability in Perspective Prov

28、ides clean application data to application program If data link layer frame or IP packet is lost at lower layers, receiving transport process will not acknowledge a segment The sending transport process will resend automatically So TCP protects against errors at lower layers as well as transport lay

29、er errors,32,User Datagram Protocol (UDP),UDP User Datagram Protocol Alternative to TCP at the transport layer Lightweight No connections (connectionless) No error correction (unreliable) Reduces work source and destination host must do,33,User Datagram Protocol (UDP),UDP Good for voice, for which t

30、he delay of error correction would be unacceptable Good for applications for which the cost of an occasional message is small compared to the cost of connection-oriented service,34,IP: Connectionless Service,The Internet Protocol (IP) Internet layer protocol Governs transmission between router and h

31、ost Governs transmission between pairs of routers Gives end-to-end route across many routers,User PC,Webserver,Router,Router,35,IP: Connectionless Service,The Internet Protocol (IP) IP messages are called IP packets IP is unreliable and connectionless Low overhead Let TCP correct any errors!,Interne

32、t Process,Internet Process,IP Packet,36,TCP/IP Partnership,TCP checks for errors only once, at the destination host By not checking for errors at each router along the route, IP greatly reduces overall processing work Reduces router costs,Transport,Transport,Internet,Internet,Internet,Check Only Onc

33、e,Host,Router,Host,37,Connectionless IP,IP is unreliable (does not catch errors) But this is not bad First, errors are corrected-at the next-higher layer (transport) if TCP is used Second, avoiding error correction at each hop between routers lowers router costs Far less expensive to correct errors

34、on one destination host than on many routers along the way,38,IP Addresses and Router Forwarding,Routers use the destination IP address of an incoming packet in the router forwarding decision, that is, to decide what output port to use to send the packet back out to the destination host or to anothe

35、r router (B, C or D?),B?,D?,C?,Router A,B,C,D,Packet,39,Router Delivery,If Destination Host is On the Source Hosts Subnet, Source Host Delivers the Packet Directly No router is involved Called local delivery to destination host,Subnet,Subnet,Source Host,Destination Host,Local Delivery,40,Router Deli

36、very,If Destination Host is NOT On the Source Hosts Subnet, Source Host Sends the Packet to a Router for Delivery Delivery to next-hop router,Subnet,Subnet,Delivery to Next-Hop Router,41,Router Delivery,If Destination Host is On One of the Routers Subnets, the Router Sends the Packet to the Destinat

37、ion Host for Delivery Local delivery to destination host,Subnet,Subnet,Local Delivery,42,Router Delivery,If Destination Host is NOT On One of the Routers Subnets, the Router Sends the Packet to a Next-Hop Router for Delivery May have to choose among several possible next-hop routers for delivery,Sub

38、net,Subnet,Delivery to Next-Hop Router,43,Router Delivery,Border Routers Connect Networks, Not Subnets Select between next-hop router on own network or on another network,Own Network,Other Network,44,IP Addresses and Router Forwarding,Routers look at destination IP address of packet to make decision

39、s What do I do with this packet, based upon its IP destination address,B?,D?,C?,Router A,B,C,D,Packet,45,IP Addresses,Many Addressing Systems Use Hierarchical Addressing Postal delivery: city, street address Post office looks at city first If not P.O.s city, put in bag for other city If in P.O.s cit

40、y, put in bag for sorting by street address Hierarchical addressing greatly speeds sorting at each post office Imagine if we needed a sorting bin for each address in the country!,City 1,City 2,City 3,Letter,46,IP Hierarchical Addressing,IP Address has Three Parts Network part Identifies hosts networ

41、k on the Internet Subnet part Most networks consist of smaller subnets Identifies hosts subnet on that network Host part Identifies a particular host Total equals 32 bits (the whole IP address),47,IP Hierarchical Addressing,Using Address Parts Router has one forwarding rule for all packets to a part

42、icular network or to a particular subnets Does not need a forwarding rule for each host Many fewer rules to look through when making router forwarding decisions Vastly reduces the work that routers have to do Internet core routers still have 100,000 to 200,000 rules,New,48,IP Addresses,Network Part

43、Numbers For the University of Hawaii, this is 128.171 All IP Addresses in that organizations network begin with that Network Part Network parts can be 8 to 24 bits long,Network Part,IP Address,128.171,49,Assigning Network Parts,Organization applies to an Internet IP address registrar Registrar gives

44、 organization a network part Organization assigns the remaining bits to its hosts internally Only large organizations and ISPs get network parts,Registrar,Firm,128.171,128.171.17.13,128.171.123.130,50,IP Addresses,Network Part is Followed by a Subnet Part Identifies the subnet within the network Rem

45、aining bits are the Host Part, designating a particular host on that subnet,Network Part,Subnet Part,IP Address (32 bits total),Host Part,51,Assigning Subnet Parts,Organization Assigns Subnet Parts Assigns subnet parts to suborganizations Suborganization assigns host bits to hosts,Registrar,Firm,128

46、.171,128.171.17.13,128.171.17.13,Suborganization,Host,52,Assigning Parts,Example University of Hawaii has network part 128.171 UH gave the College of Business Administration the subnet part 17 College of Business Administration gave the host part 13 to a computer it later gave the host name voyager.

47、cba.hawaii.edu So the computers IP address became 128.171.17.13.,53,Importance of Part Sizes,Determine Number of Possible Networks, Subnets, or Hosts If There are N Bits in the Part, there can be 2N possible Networks, Subnets, or Hosts Actually, 2N-2 All zeros cannot be used for a part All ones cann

48、ot be used for a part Example: if part has 8 bits, 28-2 possibilities (254),54,Masks,Problem: Just looking at an IP address does not tell you what bits belong to each part Solution: Create a second 32-bit number, a mask, to tell the size of The network part for border router decisions The network pl

49、us subnet parts for internal router decisions,55,Masks,Two Types: Network Masks and Subnet Masks Network Mask Tells the Length of the Network Part. To get packet closer to network. Subnet Mask Tells the length of the Network Plus Subnet Parts (not just subnet part). To get packet closer to subnet in own network IP Address will be paired with one or the other, but not both simultaneously The correct pairing happens automatically,56,Masks,

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1