计算机网络课后习题指导 陕西师范大学 P34.Skype offers a service that allows you to make a phone call from a PC to an ordinary phone.This ro心e感oa迪a恤o电alepone ne might be done 答:电路交换电话网路和互联网两个网络在“网关"处连接在一起。当一个“Skyp"用户(连接 到互联网的)打一个电话给普通用户时,通过电路交换网络,在电话用户和网关之间建立了 电路。由多个分组构成的“Skype"的语音通过互联网发送到网关。在网关那里,语音信号被 重整处理,然后发送到电话交换网络。另一方面,语音信号通过电路交换网络发送到网关, 网关对语音信号进行分组化处理,再发送给“Skyp”用户
计算机网络课后习题指导 陕西师范大学 18 P34. Skype offers a service that allows you to make a phone call from a PC to an ordinary phone. This means that the voice call must pass through both the Internet and through a telephone network. Discuss how this might be done. 答:电路交换电话网路和互联网两个网络在“网关”处连接在一起。当一个“Skype”用户(连接 到互联网的)打一个电话给普通用户时,通过电路交换网络,在电话用户和网关之间建立了 电路。由多个分组构成的“Skype”的语音通过互联网发送到网关。在网关那里,语音信号被 重整处理,然后发送到电话交换网络。另一方面,语音信号通过电路交换网络发送到网关, 网关对语音信号进行分组化处理,再发送给“Skype”用户
计算机网络课后习翘指导 陕西师范大学 Chapter 2 Application Layer P1 True or false? a.A use requestsa Web page that consists of some text and three images For this page,the lie will send one request message and receive four response messages. b.Two distinct Web pages (for example.www.mitedu/research.html and wwmitedu/students html)can be sent over the same per-sistent connection. e.With nonpersistent connections between browser and origin server,it is possible for a single TCP arry two distinct HTTP request messages d.The Date e:header in the HTTP response message indicates when the object in the response was last modified e.HTTP response messages never have an empty message body. 答:a下,文本和三张图片各需要一个请求和响应报文,所以一共有四个请求报文和四个响 应报文: b.T,由题意,这两个web页面主机名相同均为: ww.mit.cdu,只是路径名不同 c.F, 方面 不同的HTTP请求报文经过封装后形成的TCP报文段不同 所以 个TCP报 文段不可能携带不同的HTTP请求报文:另一方面是非持久连接,有可能在一个请求南应报 文回合结束就断开了连接,所以不正确。 d.F,上次修改时间在HTTP首部字段,即:“Last-Modified”,而非在数据字段。 e.F,响应报文可能实体为空,比如“404 Not Found”,表示请求的对象在服务器上没有找到。 P2.Read RFC959 for FTP.List all of the client commands that are supported by the RFC 答:访问控制命令(Access control commands):USER,PASS,ACT,CWD,CDUP,SMNT,REN QUIT: 传输参数命令(Transfer para ands):Port PASy TYPE STRU MODE FTP服务命令(S ce commands) RETR, TOR,STOU,APPE,ALLO.REST,RNFR.RNTO ABOR,DELE,RMD,MRD,PWD,LIST,NLST,SITE,SYST,STAT,HELP,NOOP P3.Consider an HTTP client that wants to retrieve a Web document at a given URL.The IP address of the HTTP server is.What transport and application-layer besides HTTP 应用层协议:HTTP和DNS,运输层协议:TCP用于封装HTTP,UDP用于封装DNS P4.Consider the following string of ASCll characters that were captured by Wireshark when the browser sent an HTTP GET message (ie..this is the actual content of an HTTP GET message).The charactersare carriage ine-feed characters (that is,the italized chara h text belo repre ents thesineiage-re cha racter tha was tained at th point in the HTTP header).Answer the following questions,indicating where in the HTTP GET message below you find the answer GET /cs453/index.html HTTP/1.1<cr></Host gaia cs.umass eduscr>sUser-Agent Mozilla/5.0(Windows:U:Windows NT 5.1:en-US:rv:1.7.2)Gecko/20040804 Netscape/7.2(ax) g
计算机网络课后习题指导 陕西师范大学 19 Chapter 2 Application Layer P1. True or false? a. A user requests a Web page that consists of some text and three images. For this page, the client will send one request message and receive four response messages. b. Two distinct Web pages (for example, www.mit.edu/research.html and www.mit.edu/students.html) can be sent over the same per- sistent connection. c. With nonpersistent connections between browser and origin server, it is possible for a single TCP segment to carry two distinct HTTP request messages. d. The Date: header in the HTTP response message indicates when the object in the response was last modified. e. HTTP response messages never have an empty message body. 答:a. F,文本和三张图片各需要一个请求和响应报文,所以一共有四个请求报文和四个响 应报文; b. T,由题意,这两个 web 页面主机名相同均为:www.mit.edu,只是路径名不同。 c. F,一方面,不同的 HTTP 请求报文经过封装后形成的 TCP 报文段不同,所以一个 TCP 报 文段不可能携带不同的 HTTP 请求报文;另一方面是非持久连接,有可能在一个请求响应报 文回合结束就断开了连接,所以不正确。 d. F,上次修改时间在 HTTP 首部字段,即:“Last-Modified”,而非在数据字段。 e. F,响应报文可能实体为空,比如“404 Not Found”,表示请求的对象在服务器上没有找到。 P2. Read RFC 959 for FTP. List all of the client commands that are supported by the RFC. 答:访问控制命令(Access control commands):USER, PASS, ACT, CWD, CDUP, SMNT, REIN, QUIT; 传输参数命令(Transfer parameter commands):PORT, PASV, TYPE STRU, MODE; FTP 服务命令(Service commands):RETR, STOR, STOU, APPE, ALLO, REST, RNFR, RNTO, ABOR, DELE, RMD, MRD, PWD, LIST, NLST, SITE, SYST, STAT, HELP, NOOP。 P3. Consider an HTTP client that wants to retrieve a Web document at a given URL. The IP address of the HTTP server is initially unknown. What transport and application-layer protocols besides HTTP are needed in this scenario? 答:应用层协议:HTTP 和 DNS,运输层协议:TCP 用于封装 HTTP,UDP 用于封装 DNS。 P4. Consider the following string of ASCII characters that were captured by Wireshark when the browser sent an HTTP GET message (i.e., this is the actual content of an HTTP GET message). The characters <cr><lf> are carriage return and line-feed characters (that is, the italized character string <cr> in the text below represents the single carriage-return character that was con- tained at that point in the HTTP header). Answer the following questions, indicating where in the HTTP GET message below you find the answer. GET /cs453/index.html HTTP/1.1<cr><lf>Host: gaia.cs.umass.edu<cr><lf>User-Agent: Mozilla/5.0 (Windows;U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
计算机网络课后习题指导 陕西师范大学 <crAccept:ext/xml,application/xml,application/xhitml+xml,text/html:q-0.9.text/plain; AcceptEncoding zip.deflate<cAccept-Charset: 1S0-8859-1,uf8,q=0.7, q=0.7<cr><l>Keep-Alive:300<cr></f>Connection:keep-alive<cr><if><cr><lf> a.What is the URL of the document requested by the browser? b.What version of HTTP is the browser running? c.Does the bro quest a d.What is the IP address of the host on which the browser is running? e.What type of browser initiates this message?Why is the browser type needed in an HTTP request message? 答:a.请求的URL是:htp./gaia.cs.umass.edu/cs453/index html,其中gaia.cs umass.edu是主 机名,cs453/index.html是主机上的路径名. b.HTTP/1.1. c.由字段“Connection:keep-alive"可以得出是持久连接。 d在HTTP首部没有P信息, e.Mo2la5.0.浏览器类型信息是必须的,因为对于服务器而言,它要将同一对象的不同版本 发送给不回类型的浏览器」 P5.The text below shows the reply sent from the server in response to the HTTP GET message in the question above.Answer the following questions,indicat-ing where in the message below you find the answer. HTTP/1.1200 OK<cr>ate:Tue.07 Mar2008 12:39:45GMT<cr>Server.Apache/2.0.52 (Fedora) <er><If>Last-Modified: Sat,10 Dec2005 18:27:46 GMT<er><If>ETag "526c3-f22-a88a4c80"<cr><>Accept-Ranges:bytes<cr><IfContent-Length:3874<cr>< Keep-Alive:timeout=max=100<crConnection:Keep-AlivescrContent-Tvpe:text/html: charset=ISO-8859-1<er><<doctype html public "//w3c//dtd html 4.0 transiti nal//en'><lf><html><If> head<meta http-equiv="Content-Type"content="text/html;charset=iso-8859-1" <meta name="GENERATOR"content="Mozilla/4.79 [en](Windows NT 5.0;U)Netseape]" stitle>CMPSCL453/591/ NTU-ST550A Spring 2005 ho es/title>sIf>s/head sf> <much more do ument text following here (not shown) a Was the server able to successfully find the document or not?What time was the document reply provided? b.When was the document last modified? c.How many bytesare there inthe documen d.What are the first5 bytes of the document being retumed?Did the server agree to a persistent connection? 答:a.由HTTP1.1200OK“状态码200可以看出,服务器成功找到文档:回应文档时间为: Tue,07Mar200812:39.45GMT
计算机网络课后习题指导 陕西师范大学 20 <cr><lf>Accept:ext/xml, application/xml, application/xhtml+xml, text/html; q=0.9, text/plain; q=0.8, image/png, */*; q=0.5<cr><lf>Accept-Language: enus, en; q=0.5 <cr><lf>AcceptEncoding: zip,deflate<cr><lf>Accept-Charset: ISO-8859-1, utf-8; q=0.7, *; q=0.7<cr><lf>Keep-Alive: 300<cr><lf>Connection:keep-alive<cr><lf><cr><lf> a. What is the URL of the document requested by the browser? b. What version of HTTP is the browser running? c. Does the browser request a non-persistent or a persistent connection? d. What is the IP address of the host on which the browser is running? e. What type of browser initiates this message? Why is the browser type needed in an HTTP request message? 答:a. 请求的 URL 是:http://gaia.cs.umass.edu/cs453/index.html,其中 gaia.cs.umass.edu 是主 机名,/cs453/index.html 是主机上的路径名。 b. HTTP/1.1。 c. 由字段“Connection:keep-alive”可以得出是持久连接。 d. 在 HTTP 首部没有 IP 信息。 e. Mozilla/5.0。浏览器类型信息是必须的,因为对于服务器而言,它要将同一对象的不同版本 发送给不同类型的浏览器。 P5. The text below shows the reply sent from the server in response to the HTTP GET message in the question above. Answer the following questions, indicat- ing where in the message below you find the answer. HTTP/1.1 200 OK<cr><lf>Date: Tue, 07 Mar 2008 12:39:45GMT<cr><lf>Server: Apache/2.0.52 (Fedora) <cr><lf>Last-Modified: Sat, 10 Dec2005 18:27:46 GMT<cr><lf>ETag: “526c3-f22-a88a4c80”<cr><lf>Accept- Ranges: bytes<cr><lf>Content-Length: 3874<cr><lf> Keep-Alive: timeout=max=100<cr><lf>Connection: Keep-Alive<cr><lf>Content-Type: text/html; charset= ISO-8859-1<cr><lf><cr><lf><!doctype html public “- //w3c//dtd html 4.0 transitional//en”><lf><html><lf> <head><lf> <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1”><lf> <meta name=”GENERATOR” content=”Mozilla/4.79 [en] (Windows NT 5.0; U) Netscape]”><lf> <title>CMPSCI 453 / 591 / NTU-ST550A Spring 2005 homepage</title><lf></head><lf> <much more document text following here (not shown)> a. Was the server able to successfully find the document or not? What time was the document reply provided? b. When was the document last modified? c. How many bytes are there in the document being returned? d. What are the first 5 bytes of the document being returned? Did the server agree to a persistent connection? 答:a. 由“HTTP/1.1 200 OK”状态码 200 可以看出,服务器成功找到文档;回应文档时间为: “Tue, 07 Mar 2008 12:39:45GMT
计算机网络课后习翘指导 陕西师范大学 b.由Last-Modified::Sat,10Dec200518:27:46GMT得到上次修改时间为:Sat,10Dec2005 182746CT c.由Content Length:3874得知,文档大小为3874 bytes d <Cr>I<CrP"两个回车换行符是标志 之后是文档内容,前五个字节是:<doc。 e.由Connection:Keep-Alive”可知,是持久连接。 P6.Obtain the HTTP/1.1 specification (RFC2616).Answer the following questions: aExplain the mechanism used for signaling between the server to indicate that conection is bing Can bot sial the connection' b.What encryption services are provided by HTTP? c.Can a client open three or more simultaneous connections with a given server? connection has b Ist that one side starts the other side is transmitting data via this connection?Explain 答:a.在RFC2616第8部分讨论的是持久连接(这个问题的真正目的是要求你去获取并且阅 读RFC),RFC的8.12和8.12.1章节指出无论是客户机还是服务器都可以关闭持久连接。通 过在在请求报文或者响应报文中,Connection字段的值为:Close米关闭连接。 b.HTTP没有提供任何加密服务. 不可以, ,最多两条.(From RFC2616)"Clients that use persistent should imit th number of simultaneous connections that they maintain to a given server.A single-user client SHOULD NOT maintain more than 2 connections with any server or proxv.' d.在一端发送消息,而另一端却正在关闭连接这是有可能。(From RFC2616)“Aclient might have started to send a new request at the same time that the server has decided to close the"idle connection. from the client's point of view,arequest is in progress P7.Suppose within your Web browser you click on a link to obtain a Web page.The IP address for the associated URL is not cached in your local host,so a DNS lookup is necessary to obtain the IP address.Suppose that n DNSer e visited hefore host receives the IPaddress from DNS the successive visits incur an RTT of RTTI...RTTn.Further suppose that the Web page associated with the link contains exactly one object,consisting of a small amount of HTML text. Let RTTO denote the RTT between the local host and the server containing the object.Assuming zero transmission time of the obiect.how much time elapses from when the client clicks on the link until the clientreceives the object 答:获得网页P地址所花费的时间为 m+mi+m+m-夏m 一旦已知P地址,一个RTT。表示建立TCP连接时间,另一个RTT,表示发送请求报文和响应 报文的时间,综上总时间为 2RTTo+RTT
计算机网络课后习题指导 陕西师范大学 21 b. 由“Last-Modified: Sat, 10 Dec2005 18:27:46 GMT”得到上次修改时间为:Sat, 10 Dec2005 18:27:46 GMT。 c. 由“Content-Length: 3874”得知,文档大小为 3874bytes。 d. “<cr><lf><cr><lf>”两个回车换行符是标志,之后是文档内容,前五个字节是:<!doc 。 e. 由“Connection: Keep-Alive”可知,是持久连接。 P6. Obtain the HTTP/1.1 specification (RFC 2616). Answer the following questions: a. Explain the mechanism used for signaling between the client and server to indicate that a persistent connection is being closed. Can the client, the server, or both signal the close of a connection? b. What encryption services are provided by HTTP? c. Can a client open three or more simultaneous connections with a given server? d. Either a server or a client may close a transport connection between them if either one detects the connection has been idle for some time. Is it possible that one side starts closing a connection while the other side is transmitting data via this connection? Explain. 答:a. 在 RFC 2616 第 8 部分讨论的是持久连接(这个问题的真正目的是要求你去获取并且阅 读 RFC),RFC 的 8.1.2 和 8.1.2.1 章节指出无论是客户机还是服务器都可以关闭持久连接。通 过在在请求报文或者响应报文中,Connection 字段的值为:Close 来关闭连接。 b. HTTP 没有提供任何加密服务。 c. 不可以,最多两条。(From RFC 2616) “Clients that use persistent connections should limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy.” d. 在一端发送消息,而另一端却正在关闭连接这是有可能。(From RFC 2616) “A client might have started to send a new request at the same time that the server has decided to close the "idle" connection. From the server's point of view, the connection is being closed while it was idle, but from the client's point of view, a request is in progress.” P7. Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the associated URL is not cached in your local host, so a DNS lookup is necessary to obtain the IP address. Suppose that n DNS servers are visited before your host receives the IP address from DNS; the successive visits incur an RTT of RTT1, . . . , RTTn. Further suppose that the Web page associated with the link contains exactly one object, consisting of a small amount of HTML text. Let RTT0 denote the RTT between the local host and the server containing the object. Assuming zero transmission time of the object, how much time elapses from when the client clicks on the link until the client receives the object? 答:获得网页 IP 地址所花费的时间为: + + + ⋯ + = RTT 一旦已知 IP 地址,一个表示建立 TCP 连接时间,另一个表示发送请求报文和响应 报文的时间,综上总时间为: 2 + RTT
计算机网络课后习题指导 陕西师范大学 server,how much time elapses with a Non-persistent HTTP with no parallel TCP connections b.Non-persistent HTTP with the browser configured for 5 parallel connections? c Persistent HTTP? 答:获得网站P并且进入主界面所需时间为: RTT:+ +RTT +2RTT a没有并行TCP连接的非持久HTTP,在TCP连接建立以后,每一个对象都要建立TCP连 接并进行传输,一共需要建立8次连接,所需要的时间为: RTT1+…+RTTm+2RTT。+8×2RTTa=RTT1+…+RTTn+18RTTo b.由5条并行TCP连接的非持久HTP,并行的意思即同时可以建立5条连接,所以只需要 建立两次连接,第一次5条,第二次3条,所需时间为: RTT+. +RTTn+2RT+2×2RTT=RT+ 6RTT ©.有流水线的持久TT,在服务器和客户机建立连接以后,可以在此连接中请求并且接收所 有8个对象,无需建立新的连接,所需时间为: RTT,+·+RTT+2RTT。+RTT。=RTT,+,+RTTn+3RTT P9.Consider Figure 2.12.for which there isan institutional network to the Interet.Suppos that the average object size is 850,000 bits and that the average request rate from the institution' browsers to the origin servers is 16 requests per second.Also suppose that the amount of time it takes from when the router on the Intemet side of the access link forwards an HTTP request until it receives the response is three seconds on average (see Section 22 5).Model the total average delay (that is,the delay from nteet institution router)and the average Intemet delay.For the average access delay,use(1-AB) where A is the average time required to send an object over the access link and B is the arrival rate of obiects to the access link. a Find the total average response time b.Now is installed in the institutional LAN.Suppose the miss rate is.Find the 答:a跨越访问链路发送一个对象,即通过因特网访问一个对象所需要的时间为: 4=850000bts_850000btes 15Mbps=15×109n9*0.0567s 链路的流量强度即对象对该访问链路的平均到达率为: B=(16request/sec)x(0.0567sec/request)0. 平均访问时延为 1-2g-905605-0356 访问一个对象总的平均响应时间为: 3+0.567=3567 b."miss rate为04,即命中率为06,意思是请求的对象有60%由机构网络满足,40%由因特 网满足,流量强度减少60%,则平均访问时延为:
计算机网络课后习题指导 陕西师范大学 22 P8. Referring to Problem P7, suppose the HTML file references eight very small objects on the same server. Neglecting transmission times, how much time elapses with a. Non-persistent HTTP with no parallel TCP connections? b. Non-persistent HTTP with the browser configured for 5 parallel connections? c. Persistent HTTP? 答:获得网站 IP 并且进入主界面所需时间为: RTT + ⋯ + + 2 . a. 没有并行 TCP 连接的非持久 HTTP,在 TCP 连接建立以后,每一个对象都要建立 TCP 连 接并进行传输,一共需要建立 8 次连接,所需要的时间为: + ⋯ + + 2 + 8 × 2 = + ⋯ + + 18 b. 由 5 条并行 TCP 连接的非持久 HTTP,并行的意思即同时可以建立 5 条连接,所以只需要 建立两次连接,第一次 5 条,第二次 3 条,所需时间为: RTT + ⋯ + + 2 + 2 × 2 = + ⋯ + + 6 c. 有流水线的持久 RTT,在服务器和客户机建立连接以后,可以在此连接中请求并且接收所 有 8 个对象,无需建立新的连接,所需时间为: RTT + ⋯ + + 2 + = + ⋯ + + 3 P9. Consider Figure 2.12, for which there is an institutional network connected to the Internet. Suppose that the average object size is 850,000 bits and that the average request rate from the institution’s browsers to the origin servers is 16 requests per second. Also suppose that the amount of time it takes from when the router on the Internet side of the access link forwards an HTTP request until it receives the response is three seconds on average (see Section 2.2.5). Model the total average response time as the sum of the average access delay (that is, the delay from Internet router to institution router) and the average Internet delay. For the average access delay, use ∆/(1 −∆β), where ∆ is the average time required to send an object over the access link and β is the arrival rate of objects to the access link. a. Find the total average response time. b. Now suppose a cache is installed in the institutional LAN. Suppose the miss rate is 0.4. Find the total response time. 答:a. 跨越访问链路发送一个对象,即通过因特网访问一个对象所需要的时间为: ∆= 850000 15 = 850000 15 × 10 ≈ 0.0567 链路的流量强度即对象对该访问链路的平均到达率为: β = (16request/sec) × (0.0567/) ≈ 0.9 平均访问时延为: ∆ 1− ∆ = 0.0567 1 −0.9 = 0.567 访问一个对象总的平均响应时间为: 3+ 0.567 = 3.567s b. “miss rate”为 0.4,即命中率为 0.6,意思是请求的对象有60%由机构网络满足,40%由因特 网满足,流量强度减少60%,则平均访问时延为: