1、ANDREW S. TANENBAUM-COMPUTER NETWORKS FOURTH EDITION PROBLEM SOLUTIONSCollected and Modified By YanZhenXing, Mail To: Classify: EEasy, MMiddle, HHard,DDeleteGreen: Important Red: Master Blue: VI Others:Know Grey: UnnecessaryChapter 1 IntroductionProblems2. An alternative to a LAN is simply a big tim
2、esharing system with terminals forall users. Give two advantages of a client-server system using a LAN.(M)使用局域网模型可以容易地增加节点。如果局域网只是一条长的电缆,且不会因个别的失效而崩溃( 例如采用镜像服务器)的情况下,使用局域网模型会更便宜。使用局域网可提供更多的计算能力和更好交互式接口。3. The performance of a client-server system is influenced by two network factors:the bandwidth of
3、 the network (how many bits/sec it can transport) and the latency(how many seconds it takes for the first bit to get from the client to the server). Givean example of a network that exhibits high bandwidth and high latency. Then givean example of one with low bandwidth and low latency.(E)横贯大陆的光纤连接可以
4、有很多千兆位/秒带宽, 但是由于光速度传送要越过数千公里,时延将也高。相反,使用 56 kbps 调制解调器呼叫在同一大楼内的计算机则有低带宽和较低的时延。4. Besides bandwidth and latency, what other parameter is needed to give a goodcharacterization of the quality of service offered by a network used for digitizedvoice traffic?(M)声音的传输需要相应的固定时间,因此网络时隙数量是很重要的。传输时间可以用标准偏差方式表示
5、。实际上,短延迟但是大变化性比更长的延迟和低变化性更糟。6. A client-server system uses a satellite network, with the satellite at a height of40,000 km. What is the best-case delay in response to a request?(E)由于请求和应答都必须通过卫星,因此传输总路径长度为 160,000 千米。在空气和真空中的光速为 300,000 公里/秒, 因此最佳的传播延迟为 160,000/300,000秒,约 533 msec。8. A collection of
6、 five routers is to be connected in a point-to-point subnet.Between each pair of routers, the designers may put a high-speed line, amedium-speed line, a low-speed line, or no line. If it takes 100 ms of computer timeto generate and inspect each topology, how long will it take to inspect all ofthem?(
7、E)将路由器称为 A,B,C,D 和 E.则有 10 条可能的线路;AB, AC, AD, AE, BC, BD, BE, CD, CE,和 DE每条线路有 4 种可能性(3 速度或者不是线路),拓扑的总数为 410 = 1,048,576。检查每个拓扑需要 100 ms,全部检查总共需要 104,857. 6 秒,或者稍微超过 29个小时。9. A group of 2n - 1 routers are interconnected in a centralized binary tree, with arouter at each tree node. Router i communica
8、tes with router j by sending a messageto the root of the tree. The root then sends the message back down to j. Derive anapproximate expression for the mean number of hops per message for large n,assuming that all router pairs are equally likely.(H)这意味着,从路由器到路由器的路径长度相当于路由器到根的两倍。 若在树中,根深度为 1,深度为 n,从根到
9、第 n 层需要 n-1 跳,在该层的路由器为 0.50。从根到 n-1 层的路径有 router 的 0.25 和 n -2 跳步。 因此,路径长度 l 为:l = 0.5*(n-1)+0.25*(n-2)+0.125*(n-3)结果化简为 ln2,平均路由路径为 2n-4。10. A disadvantage of a broadcast subnet is the capacity wasted when multiplehosts attempt to access the channel at the same time. As a simplistic example,suppose
10、 that time is divided into discrete slots, with each of the n hosts attempting touse the channel with probability p during each slot. What fraction of the slots arewasted due to collisions?(H)区分 n-2 事件。 事件 1 到 n 由主机成功地、没有冲突地使用这条信道的事件组成。 这些可能性的事件的概率为 p(1p) n-1。事件 n+1 是一个空闲的信道,其概率为(1- p) n。事件 n+2 是一个冲
11、突。由于事件 n+2 互斥,它们可能发生的事件必须统一合计。 冲突的可能性等于那些小部分的槽的浪费,只是1 np(1p) n-1 (1p) n11. What are two reasons for using layered protocols?(M)通过协议分层可以把设计问题划分成较小的易于处理的片段分层意味着某一层的协议的改变不会影响高层或低层的协议13. What is the principal difference between connectionless communication andconnection-oriented communication?(E)主要的区别有两
12、条。其一:面向连接通信分为三个阶段,第一是建立连接,在此阶段,发出一个建立连接的请求。第二阶段,只有在连接成功建立之后,保持连接状态,才能开始数据传输。第三阶段,当数据传输完毕,必须释放连接。而无连接通信没有这么多阶段,它直接进行数据传输。其二:面向连接的通信具有数据的保序性, 而无连接的通信不能保证接收数据的顺序与发送数据的顺序一致。14. Two networks each provide reliable connection-oriented service. One of themoffers a reliable byte stream and the other offers a
13、 reliable message stream. Arethese identical? If so, why is the distinction made? If not, give an example of howthey differ.(E)不相同。在报文流中,网络保持对报文边界的跟踪;而在字节流中,网络不做这样的跟踪。例如,一个进程向一条连接写了 1024 字节,稍后又写了另外 1024 字节。那么接收方共读了 2048 字节。对于报文流,接受方将得到两个报文。每个报文 1024字节。 而对于字节流,报文边界不被识别。接收方把全部的 2048 个字节当作一个整体,在此已经体现不出
14、原先有两个报文的事实。15. What does negotiation mean when discussing network protocols? Give anexample.(E)协商就是要让双方就在通信期间将使用的某些参数或数值达成一致。最大分组长度就是一个例子。16. In Fig. 1-19, a service is shown. Are any other services implicit in this figure?If so, where? If not, why not?(E)服务是由 k 层向 k1 层提供的。服务必须由下层 k 提供,即,对层 k 的服务是由
15、k- 1 层提供的。17. In some networks, the data link layer handles transmission errors byrequesting damaged frames to be retransmitted. If the probability of a frames beingdamaged is p, what is the mean number of transmissions required to send a frame?Assume that acknowledgements are never lost.(M)假设某帧传到第
16、k 次才传输成功,起初 k-1 次传输皆尝试失败,概率为 pk-1 ,第 k次传输成功,概率为(1- p) ,则发送一帧成功的平均传输次数为:1. Which of the OSI layers handles each of the following:a. (a) Dividing the transmitted bit stream into frames.b. (b) Determining which route through the subnet to use.(E)把传输的比特流划分为帧数据链路层决定使用哪条路径通过子网网络层.19. If the unit exchanged
17、 at the data link level is called a frame and the unitexchanged at the network level is called a packet, do frames encapsulate packets ordo packets encapsulate frames? Explain your answer.(E )帧封装包。 当一个包到达数据链路层时,整个数据包,包括包头、数据及全部内容,都用作帧的数据区。或者说,将整个包放进一个信封(帧)里面,( 如果能装入的话)。21. List two ways in which the
18、 OSI reference model and the TCP/IP referencemodel are the same. Now list two ways in which they differ.(M )相似点:都是独立的协议栈的概念;层的功能也大体相似。不同点:OSI 更好的区分了服务、接口和协议的概念,因此比 TCP/IP 具有更好的隐藏性,能够比较容易的进行替换;OSI 是先有的模型的概念,然后再进行协议的实现,而 TCP/IP 是先有协议,然后建立描述该协议的模型;层次数量有差别;TCP/IP没有会话层和表示层,OSI 不支持网络互连。OSI 在网络层支持无连接和面向连接的
19、通信,而在传输层仅有面向连接的通信,而 TCP/IP 在网络层仅有一种通信模式(无连接),但在传输层支持两种模式。22. What is the main difference between TCP and UDP?(E)TCP 是面向连接的,而 UDP 是一种数据报服务。25. When a file is transferred between two computers, two acknowledgementstrategies are possible. In the first one, the file is chopped up into packets, which are
20、individually acknowledged by the receiver, but the file transfer as a whole is notacknowledged. In the second one, the packets are not acknowledged individually,but the entire file is acknowledged when it arrives. Discuss these two approaches.(E)- 2 - 如果网络容易丢失分组,那么对每一个分组逐一进行确认较好,此时仅重传丢失的分组。如果网络高度可靠,
21、那么在不发差错的情况下,仅在整个文件传送的结尾发送一次确认,从而减少了确认的次数,节省了带宽;不过,即使有单个分组丢失,也需要重传整个文件。26. Why does ATM use small, fixed-length cells?(E)因为这样可以迅速地经由交换机转发,并且这是在硬件上完成的。这样的设计使得制造可以同时并行处理多个 CELLS 的硬件设备更加容易。另外,它们不会阻碍传输线路很久,更加容易保证提供出高质量的服务。28. An image is 1024 x 768 pixels with 3 bytes/pixel. Assume the image isuncompress
22、ed. How long does it take to transmit it over a 56-kbps modem channel?Over a 1-Mbps cable modem? Over a 10-Mbps Ethernet? Over 100-MbpsEthernet?(E)该图像大小为 1024 * 768 * 3 * 8 = 18,874,368 bits. 传输速率为 56Kbits/sec,需要 18,874,368 / 56,000 = 337.042 sec. 传输速率为 1Mbits/sec, 需要 18,874,368 / 10 6 = 18.874 sec.
23、 传输速率为 10Mbits/sec,需要 18,874,368 / 10 7 = 1.887 sec. 传输速率为 100Mbits/sec,需要 18,874,368 / 10 8 = 0.189 sec.29. Ethernet and wireless networks have some similarities and some differences.One property of Ethernet is that only one frame at a time can be transmitted on anEthernet. Does 802.11 share this p
24、roperty with Ethernet? Discuss your answer.(E)想象一下隐藏终端的问题。假设一个无线网络里有五台终端,从 A 至 E,使它们每一台都只可以联系到与其相邻的两个邻居之一,那么 A 在与 B 通讯的同时 D 可以与 E 进行通讯。因此无线网络有潜在的并行性,这与以太网上不同的。30. Wireless networks are easy to install, which makes them inexpensive sinceinstallation costs usually far overshadow equipment costs. Never
25、theless, they alsohave some disadvantages. Name two of them.(E)无线网络的缺点:一是安全性,偶然出现在无线网络内的人都能监听到网络上传递的消息;再有就是可靠性,无线网络在传输过程中会出现很多错误;另外,因为许多无线设备需要移动,电池使用寿命不长也是其缺点之一。Chapter 2 The Physical Problems2. A noiseless 4-kHz channel is sampled every 1 msec. What is the maximum datarate?(E)由尼奎斯特定理,无噪声信道最大数据传输率=2
26、Hlog 2V b/s。依题有带宽 H =4kHz,因此最大数据传输率决定于每次采样所产生的比特数(log 2V)。如果每次采样产生 16bits,那么数据传输率可达 128kbps;如果每次采样产生 1024bits,那么可达 8.2Mbps。3. Television channels are 6 MHz wide. How many bits/sec can be sent iffour-level digital signals are used? Assume a noiseless channel.(E )依题有带宽 H = 6MHz ,每次采样 log 2V = 2bit由尼奎斯
27、特定理,可发送的最大数据传输率为 2Hlog 2V = 24Mbps。4. If a binary signal is sent over a 3-kHz channel whose signal-to-noise ratio is 20dB, what is the maximum achievable data rate?(M)由香农定理信道比为 S/N 的有噪声信道的最大数据传输率 = Hlog2(1+S/N)。依题知带宽 H = 3kHz,信噪比为 10lgS/N = 20 dB,知 S/N =100由于 log 21016.658,该信道的信道容量为 3log 2(1+100)=19
28、.98kbps再根据尼奎斯特定理,发送二进制信号的 3kHz 信道的最大数据传输速率为2Hlog2V = 2*3 log22 = 6kbps 综上,可以取得的最大数据传输速率为 6kbps。5. What signal-to-noise ratio is needed to put a T1 carrier on a 50-kHz line?(M)T1 信号的带宽 = 1.544 * 106Hz,为发送 T1 信号,由香农定理,最大数据传输率= Hlog2(1+S/N) = 1.544 * 106Hz ,依题知带宽 H = 50 kHz,解得 S/N = 2311 再由尼奎斯特定理 2Hlog
29、 2V = 2Hlog2S/N = 93 dB所以,在 50kHz 线路上使用 T1 载波需要 93dB 的信噪比。7. How much bandwidth is there in 0.1 micron of spectrum at a wavelength of 1micron?(M)依题知频段为 0.1 ,波长为 1因此,在 0.1 的频段中可以有 30THz。- 3 - 8. It is desired to send a sequence of computer screen images over an optical fiber.The screen is 480 x 640 p
30、ixels, each pixel being 24 bits. There are 60 screen imagesper second. How much bandwidth is needed, and how many microns of wavelengthare needed for this band at 1.30 microns?(M )12. Multipath fading is maximized when the two beams arrive 180 degrees out ofphase. How much of a path difference is re
31、quired to maximize the fading for a50-km-long 1-GHz microwave link?(E)传输数据的速率为 480u61472X64024u61472X60bps,即 442Mbps。 由公式 ,这里光速 c =300000km/s,依题 f=1GHz,所以微波的波长是 30cm。需要 442Mbps 的带宽,对应的波长范围是 。如果一个波比另一个波多行进 15cm,那么它们到达时将 180 异相。显然,答案与链路长度是 50km 的事实无关。18. A simple telephone system consists of two end o
32、ffices and a single toll office towhich each end office is connected by a 1-MHz full-duplex trunk. The averagetelephone is used to make four calls per 8-hour workday. The mean call duration is6 min. Ten percent of the calls are long-distance (i.e., pass through the toll office).9. Is the Nyquist the
33、orem true for optical fiber or only for copper wire?(D)尼奎斯特定理是一个数学性质,不涉及技术处理。该定理说,如果你有一个函数,它的傅立叶频谱不包含高于 f 的正弦和余弦,那么以 2 f的频率采样该函数,那么你就可以获取该函数所包含的全部信息。因此尼奎斯特定理适用于所有介质。10. In Fig. 2-6 the lefthand band is narrower than the others. Why?(E )What is the maximum number of telephones an end office can suppo
34、rt? (Assume 4kHz per circuit.)(E)每部电话每小时做 0.5 次通话,每次通话 6 分钟。因此一部电话每小时占用一条电路 3 分钟,60/3=20 ,即 20部电话可共享一条线路。由于只有 10%的呼叫是长途,所以 200 部电话占用一条完全时间的长途线路。局间干线复用了 1000000/4000=250条线路,每条线路支持 200 部电话,因此,一个端局可以支持的电话部数为200*250=50000。.21. The cost of a fast microprocessor has dropped to the point where it is nowpos
35、sible to put one in each modem. How does that affect the handling of telephoneline errors?(E )通常在物理层对于在线路上发送的比特不采取任何差错纠正措施。在每个调制解调器中都包括一个 CPU 使得有可能在第一层中包含错误纠正码,从而大大减少第二层所看到的错误率。由调制解调器做的错误处理可以对第二层完全透明。现在许多调制解调器都有内建的错误处理功能。由于这 3 个波段的频率范围大体上相等,根据公式得小,才能保持f 大约相等。, 小的波段 也 22. A modem constellation diagra
36、m similar to Fig. 2-25 has data points at thefollowing coordinates: (1, 1), (1, -1), (-1, 1), and (-1, -1). How many bps can a modemwith these parameters achieve at 1200 baud?(E)顺便指出,3 个带宽大致相同的事实是所使用的硅的种类的一个碰巧的特性反映。11. Radio antennas often work best when the diameter of the antenna is equal tothe wa
37、velength of the radio wave. Reasonable antennas range from 1 cm to 5 metersin diameter. What frequency range does this cover?(E)- 4 - 每个波特有 4 个合法值,因此比特率是波特率的两倍。对应于 1200 波特,数据速率是 2400bps 。23. A modem constellation diagram similar to Fig. 2-25 has data points at (0, 1)and (0, 2). Does the modem use ph
38、ase modulation or amplitude modulation?(E )相位总是 0,但使用两个振幅,因此这是直接的幅度调制。24. In a constellation diagram, all the points lie on a circle centered on the origin.What kind of modulation is being used?(E)如果所有的点都在同一圆周上,那么它们有着同样的幅度,所以没有使用幅度调制。在星座图中从来就不使用频率调制,所以,这里所采用的编码是纯相位调制。25. How many frequencies does a
39、full-duplex QAM-64 modem use?(E)全双工的 QAM-64 使用了两个频率。一个给上行流,一个给下行流。调制机制本身只使用了相位和幅度调制,这里对频率不做调制。26. An ADSL system using DMT allocates 3/4 of the available data channels to thedownstream link. It uses QAM-64 modulation on each channel. What is the capacityof the downstream link?(M)DMT 指离散的多信道调制。这里总共有
40、256 条信道,减去 6 条给 POTS 以及再减少 2 条用于控制,余下的 248 条留给数据。依题其中的 3/4 即 186 条信道给下行流。ADSL 是以 4000 baud/s 进行调置。所以对 QAM-64(6 bits/baud)可得每条信道的带宽为 24,000 bps所以下行流总的带宽为 24,000 bps*186=4.464 Mbps27. In the four-sector LMDS example of Fig. 2-30, each sector has its own36-Mbps channel. According to queueing theory, if
41、 the channel is 50% loaded, thequeueing time will be equal to the download time. Under these conditions, how longdoes it take to download a 5-KB Web page? How long does it take to download thepage over a 1-Mbps ADSL line? Over a 56-kbps modem?(E)LMDS 指本地多点分发服务。一个 5-KB 的网页数据量为 40,000 bits,对于 36 Mbps的
42、信道而言下载时间是 1.1msec,依题平均排队延迟时间也是 1.1msec ,则总下载时间是 2.2msec,对 ADSL 而言并没有排队延迟时间,所以 1 Mbps 的下载时间是 40msec,在 56 kbps 的条件下下载时间是 714 msec.28. Ten signals, each requiring 4000 Hz, are multiplexed on to a single channelusing FDM. How much minimum bandwidth is required for the multiplexedchannel? Assume that the
43、 guard bands are 400 Hz wide.(E)对于 10 个 4000 Hz 的信号,我们需要使用 9 个防护频段来避免可能的干扰。所需要的最小带宽为 4000 * 10 + 400 * 9 = 43,600 Hz29. Why has the PCM sampling time been set at 125 sec?(E )125 的采样时间对应于每秒 8000 次采样。一个典型的电话通道为 4kHz。根据尼奎斯特定理,为获取一个 4kHz 的通道中的全部信息需要每秒 8000 次的采样频率。30. What is the percent overhead on a T1
44、 carrier; that is, what percent of the1.544 Mbps are not delivered to the end user?(M)T1 线路的每一帧中,端点用户使用 193 位中的 168(7*24)位,开销占 25(=193-168)位,因此开销比例等于 25/193=13%。31. Compare the maximum data rate of a noiseless 4-kHz channel usinga. (a) Analog encoding (e.g., QPSK) with 2 bits per sample.b. (b) The T
45、1 PCM system.(E)两种情况下均为 8000 次采样/秒。使用 2 进制编码,则对 a 每次采样中发送 2 位数据,对 T1 线路,每次采样发送 7 位数据。所以相对的最大数据传输率为:(a) 每次采样 2 比特的模拟编码 2Hlog 2V = 16 kbps(b) T1 PCM 系统 2Hlog 2V = 56 kbps32. If a T1 carrier system slips and loses track of where it is, it tries toresynchronize using the 1st bit in each frame. How many
46、frames will have to beinspected on average to resynchronize with a probability of 0.001 of being wrong?(M)10 个帧。 在数字通道上某些随机比特是 0101010101 模式的概率是 1/1024。察看 10 个帧,若每一帧中的第一位形成比特串 0101010101,则判断同步成功,而误判的概率为 1/1024,小于 0.001。33. What is the difference, if any, between the demodulator part of a modem andthe coder part of a codec? (After all, both convert analog signals to digital ones.) (M)有区别。编码器接受任意的模拟信号,并从它产生数字信号。而解调器仅仅接受调制了的正弦(或余弦)波,产生数字信号。- 5 -