当前位置:文档之家› 北交 计网 自顶向下 第二章作业答案

北交 计网 自顶向下 第二章作业答案

Chapter 2注:括弧之中红色标注为与课本习题对应的编号2.1,2.2节后作业:1.(R2)For a communication session between a pair of processes, which process is the clientand which is the server?建立连接的是客户等待的是服务器。

2.(R3)What is the difference between network architecture and application architecture?网络架构为标准的五层或七层,应用架构由程序员自行设计3.(R4)What information is used by a process running on one host to identify a processrunning on another host?端口号和IP地址4.(R7)Suppose you wanted to do a transaction from a remote client to a server as fast aspossible. Would you use UDP or TCP? Why?UDP,因为不需要建立连接,速度更快。

5.(R8)List the four broad classes of services that a transport protocol can provide. For each ofthe service classes, indicate if either UDP or TCP (or both) provides such a service.可靠数据传输,安全,吞吐量,定时6.(R9)Why do HTTP, FTP, SMTP, and POP3 run on top of TCP rather than on UDP?因为与这些协议相联系的应用都要求应用数据能够被无差错的有序的接收,而TCP提供可靠的数据传输7.(R11)What is meant by a handshaking protocol?握手协议,通过三次握手建立连接,保证可靠传输2.3,2.4节后作业8.(R15)Suppose Alice, with a Web-based e-mail account (such as Hotmail or gmail), sends amessage to Bob, who accesses his mail from his mail server using POP3. Discuss how the message gets from Alice's host to Bob's host. Be sure to list the series of application-layer protocols that are used to move the message between the two hosts.信息从Alice的主机发送到她的邮件服务器,使用HTTP 协议。

然后邮件从Alice的邮件服务器发送到Bob 的邮件服务器,使用SMTP协议。

最后Bob将邮件从他的邮件服务器接收到他的主机,使用POP3协议。

9.(R17)From a user's perspective, what is the difference between the download-and-deletemode and the download-and-keep mode in POP3?在下载并删除方式下,在用户从POP服务器取回他的邮件后,信息就被删除。

在下载并保留方式下,在用户取回邮件后,邮件不会被删除。

10.(R18)Is it possible for an organization's Web server and mail server to have exactly the samealias for a hostname (for example,foo. com)? What would be the type for the RR thatcontains the hostname of the mail server?可以使用同样名称,使用MX11. (R19)Why is it said that FTP sends control information "out-of-band"?FTP 使用两个并行的TCP 连接,一个用于发送控制信息,另一个用于实际传输文件的连接。

因为控制信息不是通过文件发送的同一个连接发送的,所以FTP 将控制信息发送到带外。

2.5,2.6节后作业12. (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, /research.Html and /students. html) can be sent over the same persistent 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.FTFF13. (P7)Suppose within your Web browser you click on a link to obtain a Web page. The IPaddress 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 n RTT RTT ,...,1. Further suppose that the Web page associated with the link contains exactly one object, consisting of a small amount of HTML text. Let 0RTT 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?2Rtt0+ Rtt1+ Rtt2 + A + Rttn.14. (P8)Referring to Problem P7, suppose the HTML file references three very small objects onthe same server. Neglecting transmission times, how much time elapses witha. Non-persistent HTTP with no parallel TCP connections?b. Non-persistent HTTP with parallel connections?c. Persistent HTTP (with pipelining)?a. 8Rtt0+Rt1 +A+ Rtnb. 4Rtt0+ Rtt1 +A+ Rtnc. 3RTtt0+Rtt1 +A+ Rttn2.7,2.8节后作业15.(P9)Consider Figure2.12, for which there is an institutional network connected to theInternet. Suppose that the average object size is 900,000 bits and that the average request rate from the institution’s browsers to the origin servers is 10 requests per second. Also suppose that the amount of time it takes from when the routers on the Internet side of the access link forwards an HTTP request until it receives the response is two 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 institution LAN. Suppose the hit rate is 0.6. Findthe total response time.16.(P20)In our coverage of an overlay network using query flooding in Section 2.6, we describein some detail how a new peer joins the overlay network. In this problem we want to explore what happens when a peer leaves the overlay network. Suppose every participating peer maintains TCP connections to at least four distinct peers at all times. Suppose Peer X, which has five TCP connections to other peers, wants to leave.a.First consider the case of a graceful departure, that is, Peer X explicitly close itsapplication, thereby graceful closing its five TCP connections. What actions would each of the five formerly connected peers take?b.Now suppose that Peer X abruptly disconnects from the Internet without notifying itsfive neighbors that is closing the TCP connections. What would happen?17.(P21)Consider query flooding, as discussed in Section 2.6. Suppose that each peer isconnected to at most N neighbors in the overlay network. Also suppose that the node-count field is initially set to K. Suppose Alice make s a query. Find an upper bound on the number of query messages that are sent into the overlay network.附加选做题18.在TCP协议中,为了使通信不致发生混乱,引入了所谓套接字的概念,这里,套接字由( A )和IP地址两部分组成。

相关主题