版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Chapter 2 Review questionsR1.The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; e-mail: SMTP.R2. 发起通信的进程是客户端,等待接触联系的是服务器端。R3. 网络体系结构(network architecture)是指以分层组织的方式描述通信过程的组织体系,比如说本书介绍的自顶向下的五层结构。而应用体系结构(application architecture)是由应用程序的设计者设计并规定的。从应用研发的角度来看,网络体系结构是固定的,而应用体系结构是
2、灵活多变的,前者为后者提供的特定的服务集合。R4. 答:目的主机的IP地址和目的套接字的端口号。R5.不同意. 每个通信会话都有一个客户端和服务器端. 在一个P2P进程中, 接收文件的一方是客户端, 发送文件的一方是服务器端.R6. 答:目前为止还没有这样的应用程序。R7.使用UDP, 因为在使用UDP的情况下, 事务能在一个RTT时间内完成, 而TCP则需要2个RTT, 因为有3次握手.R8.详细内容在课本P.1141. Reliable data transferTCP provides a reliable byte-stream between client and server bu
3、t UDP does not.2. A guarantee that a certain value for throughput will be maintainedNeither3. A guarantee that data will be delivered within a specified amount of timeNeither4. SecurityNeither为什么说TCP也不提供安全呢, 因为TCP的SSL是在应用层的, 不是用在传输层的.R9.因为这些协议要保证数据在传输过程中不丢失,需要可靠的数据传输,TCP协议是可靠的,当有包丢失时会重新传送,所以要选择TCP协议
4、,而UDP不满足,所以不能选择UDP协议。R10. 答:SSL运转在应用层中,SSL套接字从应用层获取未加密的数据,将这些数据加密,然后传送给TCP的套接字。如果想要通过SSL加强TCP,需要将SSL的代码添加到应用程序中。R11.握手(handshaking)是一个建立连接的过程,握手协议的作用是使收发双方交换一些信息,做好传输信息的准备。R12.Web caching can bring the desired content “closer” to the user, perhaps to the same LAN to which the users host is connected
5、. Web caching can reduce the delay for all objects, even objects that are not cached, since caching reduces the traffic on links.R14. 当游客第一次登录网站时,网站会返回给游客一个cookie码,这个cookie码被保存在用户主机上并且受浏览器的管理。在接下来的子访问(包括题目所说的购买动作)中,浏览器发送cookie码给商务网站,于是当用户(确切的说是这个浏览器)浏览这个网站的时候, 网站知道了这个用户之前提交的购买请求。R15.Alice的邮件客户端HTTPA
6、lice的邮件服务器 SMTPBob的邮件服务器 POP3Bob的邮件客户端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.R16. Received:展示了SMTP服务器在哪些地址序列里接收和发送的邮件(即邮件通过了那些SMT
7、P服务器),包含当时的时间戳。Message-ID:是一个邮件系统安排的独立无二的序列,在邮件创建的时候被生成。From:邮件的发送者To:邮件的接收者Date:邮件发送的时间Content-type: 邮件主题内容的类型(html之类的)。Return-Path:指定一个邮箱地址,如果接收方想要回复,就会回复到这个邮箱。它也用于无法发送的邮件的回弹。R17.With download and delete, after a user retrieves its messages from a POP server, the messages are deleted. This poses a
8、 problem for the nomadic user, who may want to access the messages from many different machines (office PC, home PC, etc.). In the download and keep configuration, messages are not deleted after the user retrieves the messages. This can also be inconvenient, as each time the user retrieves the store
9、d messages from a new machine, all of non-deleted messages will be transferred to the new machine (including very old messages).R18. Web服务器与邮件服务器有相同的别名是可以的,通过添加RR中MX类记录来实现,例如(, )。R19. FTP客户机和服务器之间会建立两个并行的TCP连接,一个控制连接一个数据连接。因为控制连接与数据连接相分离,所以控制信息称为“带外信令”。R20.Alice will get her f
10、irst chunk as a result of she being selected by one of her neighbors as a result of an “optimistic unchoke,” for sending out chunks to her.R21.It is not necessary that Bob will also provide chunks to Alice. Alice has to be in the top 4 neighbors of Bob for Bob to send out chunks to her; this might n
11、ot occur even if Alice is provides chunks to Bob throughout a 30-second interval.R22.The overlay network in a P2P file sharing system consists of the nodes participating in the file sharing system and the logical links between the nodes. There is a logical link (an “edge” in graph theory terms) from
12、 node A to node B if there is a semi-permanent TCP connection between A and B. An overlay network does not include routers. With Gnutella, when a node wants to join the Gnutella network, it first discovers (“out of band”) the IP address of one or more nodes already in the network. It then sends join
13、 messages to these nodes. When the node receives confirmations, it becomes a member of the of Gnutella network. Nodes maintain their logical links with periodic refresh messages.R23.It is a hybrid of client server and P2P architectures:a) There is a centralized component (the index) like in the case
14、 of a client server system.b) Other functions (except the indexing) do not use any kind of central server. This is similar to what exists in a P2P system.R24.Whenever a user, say Alice wants to locate another user in the instant messaging system, say Bob, her node would send out a query message aski
15、ng for the (unique) username (Bob) into the overlay network, which would be flooded into the network in the same manner a query requesting the location of a resource (eg: a file in Gnutella network) is flooded. If the user with the username (Bob) is online, as the query reaches the node where the us
16、er is online from, the node sends back the query response to the original query source (Alice). In this way, Alice locates the IP address of the node Bob is currently at in the instant messaging system. The advantage of such a design is that there is no centralized component in the system and hence
17、no single point of failure. The disadvantage however, is that the flooding of each such request into the overlay network results in huge traffic in the network. One option is to have limited scope query as in Gnutella. However, with this approach, the user might not be located even if she is online.
18、R25.a) User locationb) NAT traversalR26.a) File Distributionb) Instant Messagingc) Video Streamingd) Distributed ComputingR27.For the TCP application, as soon as the client is executed, it attempts to initiate a TCP connection with the server. If the TCP server is not running, then the client will f
19、ail to make a connection. For the UDP application, the client does not initiate connections (or attempt to communicate with the UDP server) immediately upon executionR28.With the UDP server, there is no welcoming socket, and all data from different clients enters the server through this one socket.
20、With the TCP server, there is a welcoming socket, and each time a client initiates a connection to the server, a new socket is created. Thus, to support n simultaneous connections, the server would need n+1 sockets.Problems:P2.a) The document request was /cs453/index.html. The
21、 Host : field indicates the servers name and /cs453/index.html indicates the file name.b) The browser is running HTTP version 1.1,as indicated just before hte first pair.c) The browser is requesting a persistent connection, as indicated by the Connection: keep-alive.d) This is a trick question. This
22、 information is not contained in an HTTP message anywhere. So there is no way to tell this from looking at the exchange of HTTP messages alone. One would need information from the IP datagrams (that carried the TCP segment that carried the HTTP GET request) to answer this question.P3.a) The status c
23、ode of 200 and the phrase OK indicate that the server was able to locate the document successfully. The reply was provided on Tuesday, 07 Mar 2006 12:39:45 Greenwich Mean Time.b) The document index.html was last modified on Saturday 10 Dec 2005 18:27:46 GMT.c) There are 3874 bytes in the document be
24、ing returned.d) The first five bytes of the returned document are : !doc. The server agreed to a persistent connection, as indicated by the Connection: Keep-Alive fieldP4.a) Persistent connections are discussed in section 8 of RFC 2616 (the real goal of this question was to get you to retrieve and r
25、ead an RFC). Sections 8.1.2 and of the RFC indicate that either the client or the server can indicate to the other that it is going to close the persistent connection. It does so by including the including the connection-token close in the Connection-header field of the http request/reply.b)
26、 HTTP does not provide any encryption services.P5.Access control commands:USER, PASS, ACT, CWD, CDUP, SMNT, REIN, QUIT.Transfer parameter commands:PORT, PASV, TYPE STRU, MODE.Service commands:RETR, STOR, STOU, APPE, ALLO, REST, RNFR, RNTO, ABOR, DELE,RMD, MRD, PWD, LIST, NLST, SITE, SYST, STAT, HELP
27、, NOOP.P6. 应用层协议:DNS和HTTP协议传输层协议:UDP为DNS服务,TCP为HTTP服务。P7.首先DNS迭代查询到IP地址, 花费时间是 i=1nRTTi.然后花费一个 RTT0 用于TCP建链(2次握手) , 然后再花费一个 RTT0 用于第三次握手(请求)和数据的传输.所以一共消耗时间为i=1nRTTi + 2RTT0P8.三者用于迭代寻找IP的时间是一样的, 为 i=1nRTTia) 由于是非持久非并行连接, 所以每得到一个object都需要(建链+传输), 2个RTT0. 现在一共有1个HTML, 3个对象, 所以一共4个, 花费8个RTT0. 所以总花费时间为:i
28、=1nRTTi + 8RTT0.b) 现在是并行连接, 首先花费 2RTT0 得到HTML, 然后再次建链, 花费RTT0 , 接下来由于是并行, 所以一次传输三个对象, 花费RTT0.所以总花费为:i=1nRTTi + 4RTT0.c) 首先花费 2RTT0 得到HTML, 由于持久连接, 所以不用再次建链, 而且是流水线, 所以一个 RTT0 就能得到全部对象(如果不是流水线就是3个RTT0). 总花费为:i=1nRTTi + 3RTT0P9. a) =900,000bits / 15Mbps = 0.06sec = 10requests/sectraffic intensity = *
29、= 0.6average access delay = 0.06/(1-0.6)=0.15secaverage response time = 0.15 + 2 = 2.15secb) 由于web缓存的命中率为60%,流量强度下降了60%所以average access delay = 0.06/(1 - 60% * 0.6) = 0.09sec在这60%里, 请求时延几乎为0, 时延全部在未命中缓存时的外请求,所以Total response time = 0.6*0 + 0.4*(2.09) = 0.836secP11.Parallel download would only share
30、the 100K bandwidth among the 10 connections (each getting just 10K bits/sec) thus, there is no significant advantage here. With persistent HTTP we avoid the SYN and SYNACK exchange but that only requires 2 seconds (1 second to send the 100 bit SYN message over the 100 bps link, and 1 second to recei
31、ve the ACK). Given that each object takes 101 seconds to send and receive the ACK, the use of pipelining gives only a 2 percent gain.P12. MAIL FROM: in SMTP:是来自于SMTP客户端的一条信息,它确认发送这条消息的发送者的身份,并通知到服务器端。From: in the mail message itself:它并不是SMTP消息,它只是邮件信息中的一行信息而已。P14.UIDL abbreviates “unique-ID listing”
32、. When a POP3 client issues the UIDL command, the server responds with the unique message ID for all of the messages present in the users mailbox. This command is useful for “download and keep”. By keeping a file that lists the messages retrieved in earlier sessions, the client can use the UIDL comm
33、and to determine which messages on the server have already been seen.P16. minimum distribution time for client-server distribution:DCS=maxNFus,Fdminminimum distribution time for P2P distribution:DP2P=maxFus,Fdmin,NFus+i=1Nui其中:F = 5Gbits = 5120Mbitsus = 20Mbpsdmin = di = 1MbpsC-S: Nu101001000100Kbps
34、512025600250Kbps512025600500Kbps512025600P2P: Nu101001000100Kbps512017201.0498743516.60027250Kbps512011527.8803919383.61432500Kbps51207438.8195210073.16323P17.a) Define u = u1 + u2 + . + uN. By assumptionus = (us + u)/N Equation 1Divide the file into N parts, with the ith part having size (ui/u)F. T
35、he server transmits the ith part to peer i at rate ri = (ui/u)us. Note that r1 + r2 + . + rN = us, so that the aggregate server rate does not exceed the link rate of the server. Also have each peer i forward the bits it receives to each of the N-1 peers at rate ri. The aggregate forwarding rate by p
36、eer i is (N-1)ri. We have(N-1)ri = (N-1)(usui)/u = (us + u)/N Equation 2Let ri = ui/(N-1) and rN+1 = (us u/(N-1)/NIn this distribution scheme, the file is broken into N+1 parts. The server sends bits from the ith part to the ith peer (i = 1, ., N) at rate ri. Each peer i forwards the bits arriving a
37、t rate ri to each of the other N-1 peers. Additionally, the server sends bits from the (N+1) st part at rate rN+1 to each of the N peers. The peers do not forward the bits from the (N+1)st part.The aggregate send rate of the server isr1+ . + rN + N rN+1 = u/(N-1) + us u/(N-1) = usThus, the servers s
38、end rate does not exceed its link rate. The aggregate send rate of peer i is (N-1)ri = uiThus, each peers send rate does not exceed its link rate.In this distribution scheme, peer i receives bits at an aggregate rate ofThus each peer receives the file in NF/(us+u).(For simplicity, we neglected to sp
39、ecify the size of the file part for i = 1, ., N+1. We now provide that here. Let = (us+u)/N be the distribution time. For i = 1, , N, the ith file part is Fi = ri bits. The (N+1)st file part is FN+1 = rN+1 bits. It is straightforward to show that F1+ . + FN+1 = F.)c) We know from section 2.6 that Co
40、mbining this with (a) and (b) gives the desired result.P18.a) Consider a distribution scheme in which the server sends the file to each client, in parallel, at a rate of a rate of us/N. Note that this rate is less than each of the clients download rate, since by assumption us/N dmin. Thus each clien
41、t can also receive at rate us/N. Since each client receives at rate us/N, the time for each client to receive the entire file is F/( us/N) = NF/ us. Since all the clients receive the file in NF/ us, the overall distribution time is also NF/ us.b) Consider a distribution scheme in which the server se
42、nds the file to each client, in parallel, at a rate of dmin. Note that the aggregate rate, N dmin, is less than the servers link rate us, since by assumption us/N dmin. Since each client receives at rate dmin, the time for each client to receive the entire file is F/ dmin. Since all the clients rece
43、ive the file in this time, the overall distribution time is also F/ dmin.c) From Section 2.6 we know thatDCS max NF/us, F/dmin (Equation 1)Suppose that us/N dmin. Then from Equation 1 we have DCS NF/us . But from (a) we have DCS NF/us . Combining these two gives:DCS = NF/us when us/N dmin. (Equation
44、 2)We can similarly show that:DCS =F/dmin when us/N dmin (Equation 3).Combining Equation 2 and Equation 3 gives the desired result.P19.There are N nodes in the overlay network. There are N(N-1)/2 edges.P20.a) In this case, each of the five Gnutella clients immediately learns that it has one less nei
45、ghbor. Consider one of these five clients, called, Bob. Suppose Bob has only three neighbors after X drops out. Then Bob needs to establish a TCP connection with another peer. Bob should have a fresh list of active peers; he sequentially contacts peers on this list until one accepts his TCP connecti
46、on attempt.b) In this case, Bob does not immediately know that X has departed. Bob will only learn about Xs departure when it attempts to send a message (query or ping) to X. When Bob attempts to send a message, Bobs TCP will make several unsuccessful attempts to send the message to B. Bobs TCP will
47、 then inform the Gnutella client that X is down. Bob will then try to establish a TCP connection with a new peer (see part (a) to rebuild a fifth connection.P21.Alice sends her query to at most N neighbors. Each of these neighbors forwards the query to at most M = N-1 neighbors. Each of those neighb
48、ors forwards the query to at most M neighbors. Thus the maximum number of query messages isN + NM + NM2 + + NM(K-1)= N(1 + M + M2 + + M(K-1) )= N(1-MK)/(1-M)= N(N-1)K- 1/(N-2)P22.a) The advantage of sending the QueryHit message directly over a TCP connection from Bob to Alice is that the QueryHit me
49、ssage is routed by the underlying Internet without passing through intermediate peers; thus, the delay in sending the message from Bob to Alice should be substantially less. The disadvantage is that each peer that has a match would ask Alice to open a TCP connection; Alice may therefore have to open
50、s tens or hundreds of TCP connections for a given query. Furthermore, there will be additional complications if Alice is behind a NAT (see Chapter 4).b) When a QueryHit message enters a peer, the peer records in a table the MessageID along with an identifier of the TCP socket from which the message arrived. When the same peer r
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 福州职业技术学院《企业资源计划原理与实践》2025-2026学年期末试卷
- 福建江夏学院《国际信贷》2025-2026学年期末试卷
- 闽南师范大学《监察法》2025-2026学年期末试卷
- 长春早期教育职业学院《国际结算》2025-2026学年期末试卷
- 福州科技职业技术学院《交通运输经济法规》2025-2026学年期末试卷
- 消防安全检查部门职责
- 临床临床左侧卵巢子宫内膜样腺癌的影像表现
- 工厂生产安全制度
- 数控制齿工岗后能力考核试卷含答案
- 纺粘熔喷热轧非织造布制作工道德水平考核试卷含答案
- 彩钢厂安全生产管理制度
- 《汽车测试技术》课件(共八章)
- 电气柜挂锁管理办法
- 学校章程修订会议记录范文
- 环境人类学实践-洞察及研究
- 变压器套管培训课件
- 四川评职称培训课件
- 孕期过敏课件
- 2025年PCB的DFM评审报告表格
- 肿瘤防治课件下载
- 交友平台会员管理办法
评论
0/150
提交评论