2.-第二章课后习题及答案.docx

上传人:晚风 文档编号:3155303 上传时间:2020-07-10 格式:DOCX 页数:6 大小:33.28KB
返回 下载 相关 举报
2.-第二章课后习题及答案.docx_第1页
第1页 / 共6页
2.-第二章课后习题及答案.docx_第2页
第2页 / 共6页
点击查看更多>>
资源描述

《2.-第二章课后习题及答案.docx》由会员分享,可在线阅读,更多相关《2.-第二章课后习题及答案.docx(6页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、第二章1. (Q2) For a communication session between a pair of processes, which process is the client and which is the server?Answer: The process which initiates the communication is the client; the process that waits to be contacted is the server. 2. (Q3) What is the difference between network architectu

2、re and application architecture?Answer: Network architecture refers to the organization of the communication process into layers (e.g., the five-layer Internet architecture). Application architecture, on the other hand, is designed by an application developer and dictates the broad structure of the

3、application (e.g., client-server or P2P)3. (Q4) What information is used by a process running on one host to identify a process running on another host?Answer: The IP address of the destination host and the port number of the destination socket.4. (Q6) Referring to Figure 2.4, we see that none of th

4、e application listed in Figure 2.4 requires both no data loss and timing. Can you conceive of an application that requires no data loss and that is also highly time-sensitive?Answer: There are no good example of an application that requires no data loss and timing. If you know of one, send an e-mail

5、 to the authors5. (Q9) Why do HTTP, FTP, SMTP, and POP3 run on top of TCP rather than on UDP?Answer: The applications associated with those protocols require that all application data be received in the correct order and without gaps. TCP provides this service whereas UDP does not.6. (Q11) What is m

6、eant by a handshaking protocol?Answer: A protocol uses handshaking if the two communicating entities first exchange control packets before sending data to each other. SMTP uses handshaking at the application layer whereas HTTP does not.7. (Q13) Telnet into a Web server and send a multiline request m

7、essage. Include in the request message the If-modified-since: header line to force a response message with the 304 Not Modified status code.Answer: Issued the following command (in Windows command prompt) followed by the HTTP GET message to the “utopia.poly.edu” web server: telnet utopia.poly.edu 80

8、Since the index.html page in this web server was not modified since Fri, 18 May 2007 09:23:34 GMT, the following output was displayed when the above commands were issued on Sat, 19 May 2007. Note that the first 4 lines are the GET message and header lines input by the user and the next 4 lines (star

9、ting from HTTP/1.1 304 Not Modified) is the response from the web server.8. (Q14) Consider an e-commerce site that wants to keep a purchase record for each of its customers. Describe how this can be done with cookies.Answer: When the user first visits the site, the site returns a cookie number. This

10、 cookie number is stored on the users host and is managed by the browser. During each subsequent visit (and purchase), the browser sends the cookie number back to the site. Thus the site knows when this user (more precisely, this browser) is visiting the site.9. (Q15) Suppose Alice, with a Web-based

11、 e-mail account (such as Hotmail or gmail), sends a message to Bob, who accesses his mail from his mail server using POP3. Discuss how the message gets from Alices host to Bobs host. Be sure to list the series of application-layer protocols that are used to move the message between the two hosts.Ans

12、wer: Message is sent from Alices host to her mail server over HTTP. Alices mail server then sends the message to Bobs mail server over SMTP. Bob then transfers the message from his mail server to his host over POP3.10. (Q10) Recall that TCP can be enhanced with SSL to provide process-to-process secu

13、rity services, including encryption. Does SSL operate at the transport layer or the application layer? If the application developer wants TCP to be enhanced with SSL, what does the developer have to do?Answer: SSL operates at the application layer. The SSL socket takes unencrypted data from the appl

14、ication layer, encrypts it and then passes it to the TCP socket. If the application developer wants TCP to be enhanced with SSL, she has to include the SSL code in the application.11. (Q16) Print out the header of an e-mail message you have recently received. How many Received: header lines are ther

15、e? Analyze each of the header lines in the message.Answer: from 65.54.246.203 (EHLO bay0-omc3-)Received: (65.54.246.203) by with SMTP; Sat, 19 May 2007 16:53:51 -0700from (65.55.135.106) by bay0-omc3-Received: with Microsoft SMTPSVC(6.0.3790.2668); Sat, 19 May 2007 16:52:42 -0700Received: from mai

16、l pickup service by with Microsoft SMTPSVC; Sat,19 May 2007 16:52:41 -0700Message-ID: Received: from 65.55.135.123 by with HTTP; Sat, 19 May 2007 23:52:36 GMTFrom: prithula dhungel To: Bcc:Subject: Test mailDate: Sat, 19 May 2007 23:52:36 +0000Mime-Version:1.0Content-Type: Text/html; format=flowed

17、Return-Path: Figure: A sample mail message headerReceived: This header field indicates the sequence in which the SMTP servers send and receive the mail message including the respective timestamps.In this example there are 4 “Received:” header lines. This means the mail message passed through 5 diffe

18、rent SMTP servers before being delivered to the receivers mail box. The last (forth) “Received:” header indicates the mail message flow from the SMTP server of the sender to the second SMTP server in the chain of servers. The senders SMTP server is at address 65.55.135.123 and the second SMTP server

19、 in the chain is . The third “Received:” header indicates the mail message flow from the second SMTP server in the chain to the third server, and so on.Finally, the first “Received:” header indicates the flow of the mail message from the forth SMTP server to the last SMTP server (i.e. the receivers

20、mail server) in the chain.Message-id: The message has been given this number BAY130-F26D9E35BF59E0D18A819AFB9310phx.gbl(by bay0-omc3-. Message-id is a unique string assigned by the mail system when the message is first created.From: This indicates the email address of the sender of the mail. In the

21、givenexample, the sender is To: This field indicates the email address of the receiver of the mail. In the example, the receiver is Subject: This gives the subject of the mail (if any specified by the sender). In the example, the subject specified by the sender is “Test mail”Date: The date and time

22、when the mail was sent by the sender. In the example, the sender sent the mail on 19th May 2007, at time 23:52:36 GMT.Mime-version: MIME version used for the mail. In the example, it is 1.0. Content-type: The type of content in the body of the mail message. In the example, it is “text/html”.Return-P

23、ath: This specifies the email address to which the mail will be sent if thereceiver of this mail wants to reply to the sender. This is also used by the sendersmail server for bouncing back undeliverable mail messages of mailer-daemonerror messages. In the example, the return path is“”.12. (Q18) Is i

24、t possible for an organizations Web server and mail server to have exactly the same alias for a hostname (for example, )? What would be the type for the RR that contains the hostname of the mail server?Answer: Yes an organizations mail server and Web server can have the same alias for a host name. T

25、he MX record is used to map the mail servers host name to its IP address.13. (Q19) Why is it said that FTP sends control information “out-of-band”?Answer: FTP uses two parallel TCP connections, one connection for sending control information (such as a request to transfer a file) and another connecti

26、on for actually transferring the file. Because the control information is not sent over the same connection that the file is sent over, FTP sends control information out of band.14. (P6) Consider an HTTP client that wants to retrieve a Web document at a given URL. The IP address of the HTTP server i

27、s initially unknown. What transport and application-layer protocols besides HTTP are needed in this scenario?Answer: Application layer protocols: DNS and HTTPTransport layer protocols: UDP for DNS; TCP for HTTP15. (P9) Consider Figure2.12, for which there is an institutional network connected to the

28、 Internet. Suppose that the average object size is 900,000 bits and that the average request rate from the institutions browsers to the origin servers is 10 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 HTT

29、P request until it receives the response is two seconds on average (see Section 2.2.5). Model the total average response times 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-

30、), 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 hit rate is 0.6. Find the total response time.Answer:a.

31、 The time to transmit an object of size L over a link or rate R is L/R. The average time is the average size of the object divided by R:= (900,000 bits)/(1,500,000 bits/sec) = 0.6 secThe traffic intensity on the link is (1.5 requests/sec)(0.6 sec/request) = 0.9. Thus, the average access delay is (0.

32、6 sec)/(1 - 0.9) = 6 seconds. The total average response time is therefore 6 sec + 2 sec = 8 sec.b. The traffic intensity on the access link is reduced by 40% since the 40% of the requests are satisfied within the institutional network. Thus the average access delay is (0.6 sec)/1 (0.6)(0.9) = 1.2 s

33、econds. The response time is approximately zero if the request is satisfied by the cache (which happens with probability 0.4); the average response time is 1.2 sec + 2 sec = 3.2 sec for cache misses (which happens 60% of the time). So the average response time is (0.4)(0 sec) + (0.6)(3.2 sec) = 1.92

34、 seconds. Thus the average response time is reduced from 8 sec to 1.92 sec.16. (P12) What is the difference between MAIL FROM: in SMTP and From: in the mail message itself?Answer: The MAIL FROM: in SMTP is a message from the SMTP client that identifies the sender of the mail message to the SMTP serv

35、er. The From: on the mail message itself is NOT an SMTP message, but rather is just a line in the body of the mail message.17. (P16) Consider distributing a file of F = 5 Gbits to N peers. The server has an upload rate of us = 20 Mbps, and each peer has a download rate of di =1 Mbps and an upload ra

36、te of u. For N = 10, 100, and 1,000 and u = 100 Kbps, 250 Kbps, and 500 Kbps, prepare a chart giving the minimum distribution time for each of the combinations of N and u for both client-server distribution and P2P distribution.Answer: For calculating the minimum distribution time for client-server

37、distribution, we use the following formula:Dcs = max NF/us, F/dminSimilarly, for calculating the minimum distribution time for P2P distribution, we use the following formula:DP2P= maxF/us, F/dmin, NF/( us +i=1nui )Where, F = 5 Gbits = 5 * 1024 Mbitsus = 20 Mbpsdmin = di = 1 MbpsClient Server:N10 1001000200 Kbps 10240 51200 512000u 600 Kbps 10240 51200 5120001Mbps 1024051200 512000Peer to Peer:N101001000200 Kbps 10240 25904.3 47559.33U600 Kbps 10240 13029.6 16899.641 Mbps 10240 1024010240

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 应用文书 > 工作报告

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁