首页 计算机网络第四版课后习题答案(中文版)

计算机网络第四版课后习题答案(中文版)

举报
开通vip

计算机网络第四版课后习题答案(中文版)第 1 章 概述 1-3    The performance of a client-server system is influenced by two network factors: the bandwidth of 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)...

计算机网络第四版课后习题答案(中文版)
第 1 章 概述 1-3    The performance of a client-server system is influenced by two network factors: the bandwidth of 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). Give an example of a network that exhibits high bandwidth and high latency. Then give an example of one with low bandwidth and low latency. 客户-服务器系统的性能会受到两个网络因素的影响:网络的带宽(每秒可以传输多少位数据)和延迟(将第一个数据位从客户端传送到服务器端需要多少秒时间)。请给出一个网络的例子,它具有高带宽和高延迟。然后再给出另一个网络的例子,它具有低带宽和低延迟。 答:横贯大陆的光纤连接可以有很多千兆位/秒带宽, 但是由于光速度传送要越过数千公里,时延将也高。相反,使用56 kbps调制解调器呼叫在同一大楼内的计算机则有低带宽和较低的时延。 1-4    Besides bandwidth and latency, what other parameter is needed to give a good characterization of the quality of service offered by a network used for digitized voice traffic? 除了带宽和延迟以外,针对数字化的语音流量,想要让网络提供很好的服务质量,还需要哪个参数? 声音的传输需要相应的固定时间,因此网络时隙数量是很重要的。传输时间可以用标准偏差方式表示。 实际上,短延迟但是大变化性比更长的延迟和低变化性更糟。 1-6    A client-server system uses a satellite network, with the satellite at a height of 40,000 km. What is the best-case delay in response to a request? 一个客户-服务器系统使用了卫星网络,卫星的高度为40000km。在对一个请求进行响应的时候,最佳情形下的延迟是什么? 答:由于请求和应答都必须通过卫星,因此传输总路径长度为160,000千米。在空气和真空中的光速为300,000 公里/秒, 因此最佳的传播延迟为160,000/300,000秒,约533 msec。 1-9    A group of 2n - 1 routers are interconnected in a centralized binary tree, with a router at each tree node. Router i communicates with router j by sending a message to the root of the tree. The root then sends the message back down to j. Derive an approximate expression for the mean number of hops per message for large n, assuming that all router pairs are equally likely. 在一个集中式的二叉树上,有2n-1个路由器相互连接起来;每个树节点上都有一个路由器。路由器i为了与路由器j进行通信,它要给树的根发送一条信息。然后树根将消息送下来给j。假设所有的路由器都是等概率出现的,请推导出当n很大时每条消息的平均跳数的一个近似表达式。 答:这意味着,从路由器到路由器的路径长度相当于路由器到根的两倍。 若在树中,根深度为1,深度为n,从根到第n层需要n-1跳,在该层的路由器为0.50(50%)。 从根到n-1 层的路径的路由器为0.25(25%)和n --2跳步。 因此,路径长度l为: 或 表达式归约为 l=n-2,平均的路由器到路由器路径为2n-4。 1-11    What are two reasons for using layered protocols? 请说出使用分层协议的两个理由? 答:通过协议分层可以把设计问题划分成较小的易于处理的片段。分层意味着某一层协议的改变不会影响高层或低层的协议。 1-13    What is the principal difference between connectionless communication and connection-oriented communication? 在无连接通信和面向连接的通信二者之间,最主要的区别是什么? 答:主要的区别有两条。 其一:面向连接通信分为三个阶段,第一是建立连接,在此阶段,发出一个建立连接的请求。只有在连接成功建立之后,才能开始数据传输,这是第二阶段。接着,当数据传输完毕,必须释放连接。而无连接通信没有这么多阶段,它直接进行数据传输。 其二:面向连接的通信具有数据的保序性, 而无连接的通信不能保证接收数据的顺序与发送数据的顺序一致。 1-14    Two networks each provide reliable connection-oriented service. One of them offers a reliable byte stream and the other offers a reliable message stream. Are these identical? If so, why is the distinction made? If not, give an example of how they differ. 两个网络都可以提供可靠的面向连接的服务。其中一个提供可靠的字节流,另一个提供可靠的报文流。这二者是否相同?如果你认为相同的话,为什么要有这样的区别?如果不相同,请给出一个例子说明它们如何不同。 答:不相同。在报文流中,网络保持对报文边界的跟踪;而在字节流中,网络不做这样的跟踪。例如,一个进程向一条连接写了1024 字节,稍后又写了另外1024 字节。那么接收方共读了2048 字节。对于报文流,接受方将得到两个报文。每个报文1024 字节。 而对于字节流,报文边界不被识别。接收方把全部的2048 个字节当作一个整体,在此已经体现不出原先有两个报文的事实。 1-17    In some networks, the data link layer handles transmission errors by requesting damaged frames to be retransmitted. If the probability of a frame's being damaged is p, what is the mean number of transmissions required to send a frame? Assume that acknowledgements are never lost. 在有些网络中,数据链路层处理传输错误的做法是,请求重传被损坏的帧。如果一帧被损坏的概率为p,那么发送一帧所需要的平均传输次数是多少?假设确认帧永远不会丢失。 帧请求正好是k次的概率Pk,就是起初的k-1次尝试都失败的概率。 pk-1 , 乘以第k次传输成功的概率。平均传输次数就是 1-22    What is the main difference between TCP and UDP? TCP和UDP之间最主要的区别是什么? TCP 是面向连接的,而UDP 是一种数据报服务。 1-25    When a file is transferred between two computers, two acknowledgement strategies are possible. In the first one, the file is chopped up into packets, which are individually acknowledged by the receiver, but the file transfer as a whole is not acknowledged. In the second one, the packets are not acknowledged individually, but the entire file is acknowledged when it arrives. Discuss these two approaches. 当一个文件在两台计算机之间传输的时候,可能会有两种不同的确认策略。在第一种策略中,该文件被分解成许多个分组,接收方会独立地确认每一个分组,但是文件传输过程作为整体并没有被确认。在第二种策略中,这些分组并没有被单独地确认,但是当整个文件到达的时候,它会被确认。请讨论这两种 方案 气瓶 现场处置方案 .pdf气瓶 现场处置方案 .doc见习基地管理方案.doc关于群访事件的化解方案建筑工地扬尘治理专项方案下载 。 如果网络容易丢失分组,那么对每一个分组逐一进行确认较好,此时仅重传丢失的分组。而在另一方面,如果网络高度可靠,那么在不发差错的情况下,仅在整个文件传送的结尾发送一次确认,从而减少了确认的次数,节省了带宽;不过,即使有单个分组丢失,也需要重传整个文件。 1-27    How long was a bit on the original 802.3 standard in meters? Use a transmission speed of 10 Mbps and assume the propagation speed in coax is 2/3 the speed of light in vacuum. 在原始的802.3标准中,一位是多长(按米来计算)?请使用10Mbps的传输速率,并且假设同轴电缆的传播速度是真空中光速的2/3. 波在同轴电缆中的速度是大约200,000 km/sec, 即200 m/μsec. 在10 Mbps, 传输一位需要 0.1μsec。 因此, 这个位在时间上持续0.1μsec, 在此期间传播20 meters。因此,这里的一位是20米。 1-28    An image is 1024 x 768 pixels with 3 bytes/pixel. Assume the image is uncompressed. 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-Mbps Ethernet? 一幅图像的分辨率为1024×768像素,每个像素用3字节来标识。假设该图像没有被压缩。请问,通过56kbps的调制解调器信道来传输这幅图像需要多长时间?通过1Mbps的电缆调制解调器(cable modem)呢?通过10Mbps的因特网呢?通过100Mbps的因特网呢? 图像是1024×768× 3 bytes或2,359,296 bytes. 就是18,874,368 bits. 在56,000 bits/sec速度下, 传输需要大约337.042 sec. 在1,000,000 bits/sec,需要大约18.874 sec. 在10,000,000 bits/sec, 需要大约1.887 sec. 在100,000,000 bits/sec, 需要大约0.189 sec. 1-30    Wireless networks are easy to install, which makes them inexpensive since installation costs usually far overshadow equipment costs. Nevertheless, they also have some disadvantages. Name two of them. 无线网络很容易安装,这使得它们并不非常昂贵。因为安装费用通常会占去整个设备费用的很大比例。然而,它们也有一些缺点。请说出两个缺点。 一个缺点是安全性。每个碰巧在此房屋内的随机发送者都能在网络上监听。另一个缺点是可靠性。无线网络造成大量错误。第三个潜在的问题是电池寿命,因为多数无线设备倾向于可移动性。 1-31    List two advantages and two disadvantages of having international standards for network protocols. 请列举出网络协议国际标准化的两个优点和缺点。 优点1:如果每个人都使用标准,那么每个人都可以与其他任何人交流;优点2:广泛使用标准将导致规模经济,比如生产大规模集成电路芯片。缺点1:为了取得标准化所需要的政治妥协经常会导致差的标准;缺点2:一旦标准被广泛采用了,要对它再做改变就会非常困难,即使发现了新的更好的技术或方法,也难以替换。 第 2 章 物理层 2-2    A noiseless 4-kHz channel is sampled every 1 msec. What is the maximum data rate? 一条无噪声4kHz信道按照每1ms一次进行采样,请问最大数据传输率是多少? 答:无噪声信道最大数据传输率公式:最大数据传输率=2Hlog2V b/s。因此最大数据传输率决定于每次采样所产生的比特数,如果每次采样产生16bits,那么数据传输率可达128kbps;如果每次采样产生1024bits,那么可达8.2Mbps。注意这是对无噪声信道而言的,实际信道总是有噪声的,其最大数据传输率由香农定律给出。 2-3    Television channels are 6 MHz wide. How many bits/sec can be sent if four-level digital signals are used? Assume a noiseless channel. 电视频道的带宽是6MHz。如果使用4级数字信号,则每秒钟可以发送多少位?假设电视频道为无噪声信道。 答:采样频率12MHz,每次采样2bit,总的数据率为24Mbps。 2-4    If a binary signal is sent over a 3-kHz channel whose signal-to-noise ratio is 20 dB, what is the maximum achievable data rate? 如果在一条3kHz信道上发送一个二进制信号,该信道的信噪比为20dB,则最大可达到的数据传输率为多少? 答:信噪比为20 dB 即 S/N = 100.由于 log2101≈6.658,由香农定理,该信道的信道容量为3log2(1 +100) =19.98kbps。 又根据乃奎斯特定理,发送二进制信号的3kHz 信道的最大数据传输速率为 2*3 log22=6 kbps。 所以可以取得的最大数据传输速率为6kbps。 2-5    What signal-to-noise ratio is needed to put a T1 carrier on a 50-kHz line? 在50kHz的线路上使用T1线路需要多大的信噪比? 答:为发送T1 信号,我们需要 所以,在50kHz 线路上使用T1 载波需要93dB 的信噪比。 2-7    How much bandwidth is there in 0.1 micron of spectrum at a wavelength of 1 micron? 在1μm波长上,在0.1μm的频段中有多少带宽? 答: 因此,在0.1 的频段中可以有30THz。 2-8    It is desired to send a sequence of computer screen images over an optical fiber. The screen is 480 x 640 pixels, each pixel being 24 bits. There are 60 screen images per second. How much bandwidth is needed, and how many microns of wavelength are needed for this band at 1.30 microns? 现需要在一条光纤发送一系列计算机屏幕图像,屏幕的分辨率为480×640像素,每个像素为24位。每秒钟有60幅屏幕图像。请问,需要多少带宽?在1.30μm波长上,这段带宽需要多少μm的波长? 答:数据速率为480× 640×24× 60bps,即442Mbps。 需要442Mbps 的带宽,对应的波长范围是 。 2-18    A simple telephone system consists of two end offices and a single toll office to which each end office is connected by a 1-MHz full-duplex trunk. The average telephone is used to make four calls per 8-hour workday. The mean call duration is 6 min. Ten percent of the calls are long-distance (i.e., pass through the toll office). What is the maximum number of telephones an end office can support? (Assume 4 kHz per circuit.) 一个简单的电话系统包括两个端局和一个长途局,每个端局通过一条1MHz全双工干线连接到长途局。在每8小时的工作日中,平均每部电话有4次呼叫,每次呼叫平均6分钟,10%的呼叫是长途(即通过长途局)。请问一个端局能够支持最多多少部电话?(假设每条线路为4kHz) 答:每部电话每小时做0.5 次通话,每次通话6 分钟。因此一部电话每小时占用一条电路3 分钟,60/3=20,即20 部电话可共享一条线路。由于只有10%的呼叫是长途,所以200 部电话占用一条完全时间的长途线路。局间干线复用了1000000/4000=250 条线路,每条线路支持200 部电话,因此,一个端局可以支持的电话部数为200*250=50000。 2-22    A modem constellation diagram similar to Fig. 2-25 has data points at the following coordinates: (1, 1), (1, -1), (-1, 1), and (-1, -1). How many bps can a modem with these parameters achieve at 1200 baud? 一个类似于图2.25的调制解调器星座图有以下几个坐标点(1,1)、(1,-1)、(-1,1)、(-1,-1)。请问一个具备这些参数的调制解调器在1200波特上可以达到多少bps? 每个波特有4 个合法值,因此比特率是波特率的两倍。对应于1200 波特,数据速率是2400bps。 2-28    Ten signals, each requiring 4000 Hz, are multiplexed on to a single channel using FDM. How much minimum bandwidth is required for the multiplexed channel? Assume that the guard bands are 400 Hz wide. 有10个信号,每个都要求4000Hz,现在用FDM将它们复用在一条信道上。对于被复用的信道,最小要求多少带宽?假设防护频段为400Hz宽。 有10个4000Hz信号。我们需要9个防护频段来避免干扰。最小带宽需求是4000×10+400×9 =43,600 Hz. 2-29 Why has the PCM sampling time been set at 125 μsec? 答:125 的采样时间对应于每秒8000 次采样。一个典型的电话通道为4kHz。根据奈奎斯特定理,为获取一个4kHz 的通道中的全部信息需要每秒8000 次的采样频率。 (实际上额定带宽稍有些少,截止点并不清晰) 2-30 What is the percent overhead on a T1 carrier; that is, what percent of the 1.544 Mbps are not delivered to the end user? 每一帧中,端点用户使用193 位中的168(7*24)位,开销占25(=193-168)位,因此开销比例等于25/193=13%。 2-33 What is the difference, if any, between the demodulator part of a modem and the coder part of a codec? (After all, both convert analog signals to digital ones.) 答:有。编码器接受任意的模拟信号,并从它产生数字信号。而解调器仅仅接受调制了的正弦(或余弦)波,产生数字信号。 2-34 A signal is transmitted digitally over a 4-kHz noiseless channel with one sample every 125 μsec. How many bits per second are actually sent for each of these encoding methods? (a) CCITT 2.048 Mbps standard.  (b) DPCM with a 4-bit relative signal value.  (c) Delta modulation. 答:a.CCITT 2.048Mbps 标准用32 个8 位数据样本组成一个125 的基本帧,30 个信道用于传信息,2 个信道用于传控制信号。在每一个4kHz 信道上发送的数据率就是 8*8000=64kbps。 b.差分脉码调制(DPCM)是一种压缩传输信息量的方法,它发送的不是每一次抽样的二进制编码值,而是两次抽样的差值的二进制编码。现在相对差值是4 位,所以对应每个4kHz 信道实际发送的比特速率为4*8000=32bps。 c.增量调制的基本思想是:当抽样时间间隔s t 很短时,模拟数据在两次抽样之间的变化很小,可以选择一个合适的量化值? 作为阶距。把两次抽样的差别近似为不是增加一个?就是减少一个? 。这样只需用1bit 二进制信息就可以表示一次抽样结果,而不会引入很大误差。因此,此时对应每个4kHz 信道实际发送的数据速率为1*8000=8kHz。 2-39What is the essential difference between message switching and packet switching? 信息交换发送到数据单元可以是任意长度。分组交换有最大报文大小限制,任何大于限制的信息将被拆分成多个报文。 2-41    Three packet-switching networks each contain n nodes. The first network has a star topology with a central switch, the second is a (bidirectional) ring, and the third is fully interconnected, with a wire from every node to every other node. What are the best-, average-, and-worst case transmission paths in hops? 三个分组交换网络每个包含n个节点。第一个网络是一个星型拓扑结构,有一个中心交换机;第二个网络是一个双向环;第三个网络是一个全连接结构,从任何一个节点到其他的节点都有一条线路。请问从传输路径的跳数来看,哪个最好?其次?最差? 答:The three networks have the following properties: 星型:最好为2,最差为2,平均为2; 环型:最好为1,最差为n/2,平均为n/4 如果考虑n 为奇偶数, 则n 为奇数时,最坏为(n-1)/2,平均为(n+1)/4 n 为偶数时,最坏为 n/2,平均为n2/4(n 1)  全连接:最好为1,最差为1,平均为1。 2-42    Compare the delay in sending an x-bit message over a k-hop path in a circuit-switched network and in a (lightly loaded) packet-switched network. The circuit setup time is s sec, the propagation delay is d sec per hop, the packet size is p bits, and the data rate is b bps. Under what conditions does the packet network have a lower delay? 请比较一下在一个电路交换网络中和在一个负载较轻的分组交换网络中,沿着k跳到路径发送x位消息的延迟情况。电路建立的时间为s秒,每一跳的传播延迟为d秒,分组的大小为p位,数据传输率为b bps。在什么条件下分组网络的延迟比较短? 对于电路交换, t= s时电路建立起来;t =s+   x /d  时报文的最后一位发送完毕;t =  s+ x/b+kd时报文到达目的地。而对于分组交换,最后一位在t=x/b 时发送完毕。 为到达最终目的地,最后一个分组必须被中间的路由器重发k 1次,每次重发花时间p/ b,所以总的延迟为 为了使分组交换比电路交换快,必须: 所以: 2-43    Suppose that x bits of user data are to be transmitted over a k-hop path in a packet-switched network as a series of packets, each containing p data bits and h header bits, with x p + h. The bit rate of the lines is b bps and the propagation delay is negligible. What value of p minimizes the total delay? 假定x位用户数据将以一系列分组的形式,在一个分组交换网络中沿着一条共有k跳到路径向前传输,每个分组包含p位数据和h位的头,这里x>>p+h。线路的传输率为b bps,传播延迟忽略不计。请问什么样的p值使总延迟最小? 答:所需要的分组总数是x /p ,因此总的数据加上头信息交通量为(p+h)x/p位。 源端发送这些位需要时间为(p+h )x /pb;中间的路由器重传最后一个分组所花的总时间为(k-1)(p +h )/ b 因此我们得到的总的延迟为 对该 关于工期滞后的函关于工程严重滞后的函关于工程进度滞后的回复函关于征求同志党风廉政意见的函关于征求廉洁自律情况的复函 数求p 的导数,得到 令 得到 因为 p>0,所以 故 时能使总的延迟最小。 2-44    In a typical mobile phone system with hexagonal cells, it is forbidden to reuse a frequency band in an adjacent cell. If 840 frequencies are available, how many can be used in a given cell? 在一个典型的移动电话系统中,蜂窝单元为六角形,在相邻的单元内禁止重新使用频段。如果总共有840个频率可以使用的话,则任何一个给定的单元内可以使用多少个频率? 每个单元有6个邻居。如果中间的单元使用频段组合A,它的六个邻居可以分别使用的频段组合B, C, B, C, B, C。换句话说,只需要3个单一的单元。因此,每个单元可以使用280个频率。 2-50 Suppose that A, B, and C are simultaneously transmitting 0 bits, using a CDMA system with the chip sequences of Fig. 2-45(b). What is the resulting chip sequence? FIG 2-45(b) 结果是通过对A、B、C求反再将这三个码片序列相加得到的。 结果是(+3 +1 +1 1 3 1 1 +1). 2-53    A CDMA receiver gets the following chips: (-1 +1 -3 +1 -1 -3 +1 +1). Assuming the chip sequences defined in Fig. 2-45(b), which stations transmitted, and which bits did each one send? 一个CDMA接收器得到了下面的时间片(-1+1-3+1-1-3+1+1)。假设时间片序列如图2.45b中所定义,请问那些移动站传输了数据?每个站发送了什么位? Just compute the four normalized inner products:此处答案中的~疑为-号之误? ( 1 +1 3 +1 1 3 +1 +1) d ( 1 1 1 +1 +1 1 +1 +1)/8 = 1 ( 1 +1 3 +1 1 3 +1 +1) d ( 1 1 +1 1 +1 +1 +1 1)/8 = 1 ( 1 +1 3 +1 1 3 +1 +1) d ( 1 +1 1 +1 +1 +1 1 1)/8 = 0 ( 1 +1 3 +1 1 3 +1 +1) d ( 1 +1 1 1 1 1 +1 1)/8 = 1 结果是 A 和 D 发送了1位, B发送了0位, C 没有发送。 第 3 章 数据链路层 3-1    An upper-layer packet is split into 10 frames, each of which has an 80 percent chance of arriving undamaged. If no error control is done by the data link protocol, how many times must the message be sent on average to get the entire thing through? 一个上层的分组被切分成10帧,每一帧有80%的机会可以无损地到达。如果数据链路协议没有提供错误控制的话,请问,该报文平均需要发送多少次才能完整地到达接收方? 答:由于每一帧有0.8 的概率正确到达,整个信息正确到达的概率为  p=0.810=0.107。 为使信息完整的到达接收方,发送一次成功的概率是p ,二次成功的概率是(1-p)p,三次成功的概率为(1-p )2 p,i 次成功的概率为(1-p)i-1 p,因此平均的发送次数等于: 3-2The following character encoding is used in a data link protocol: A: 01000111; B: 11100011; FLAG: 01111110; ESC: 11100000 Show the bit sequence transmitted (in binary) for the four-character frame: A B ESC FLAG when each of the following framing methods are used: (a) Character count.  (b) Flag bytes with byte stuffing.  (c) Starting and ending flag bytes, with bit stuffing. 结果是 (a) 00000100 01000111 11100011 11100000 01111110 (b) 01111110 01000111 11100011 11100000 11100000 11100000 01111110 01111110 (c) 01111110 01000111 110100011 111000000 011111010 01111110 3-5    A bit string, 0, needs to be transmitted at the data link layer. What is the string actually transmitted after bit stuffing? 位串0需要在数据链路层上被发送,请问,经过位填充之后实际被发送出去的是什么? 输出是0. 3-6    When bit stuffing is used, is it possible for the loss, insertion, or modification of a single bit to cause an error not detected by the checksum? If not, why not? If so, how? Does the checksum length play a role here? 假设使用了位填充成帧方法,请问,因为丢失一位,插入一位,或者篡改一位而引起的错误是否有可能通过校验和检测出来?如果不能的话,请问为什么?如果能的话,请问校验和长度在这里是如何起作用的? 答:可能。假定原来的正文包含位序列01111110 作为数据。位填充之后,这个序列将变成01111010。如果由于传输错误第二个0 丢失了,收到的位串又变成01111110,被接收方看成是帧尾。然后接收方在该串的前面寻找检验和,并对它进行验证。如果检验和是16 位,那么被错误的看成是检验和的16 位的内容碰巧经验证后仍然正确的概率是1/216。如果这种概率的条件成立了,就会导致不正确的帧被接收。显然,检验和段越长,传输错误不被发现的概率会越低,但该概率永远不等于零。 3-16    Data link protocols almost always put the CRC in a trailer rather than in a header. Why? 数据链路协议几乎总是将CRC放在尾部,而不是头部,为什么? 答:CRC 是在发送期间进行计算的。一旦把最后一位数据送上外出线路,就立即把CRC编码附加在输出流的后面发出。如果把CRC 放在帧的头部,那么就要在发送之前把整个帧先检查一遍来计算CRC。这样每个字节都要处理两遍,第一遍是为了计算检验码,第二遍是为了发送。把CRC 放在尾部就可以把处理时间减半。 3-17    A channel has a bit rate of 4 kbps and a propagation delay of 20 msec. For what range of frame sizes does stop-and-wait give an efficiency of at least 50 percent? 一个信道的位速率为4kbps,传输延迟为20ms。请问帧的大小在什么范围内,停-等协议才可以获得至少50%的效率? 答:当发送一帧的时间等于信道的传播延迟的2 倍时,信道的利用率为50%。或者说,当发送一帧的时间等于来回路程的传播延迟时,效率将是50%。而在帧长满足发送时间大于延迟的两倍时,效率将会高于50%。 现在发送速率为4Mb/s,发送一位需要0.25 。 只有在帧长不小于160kb 时,停等协议的效率才会至少达到50%。 3-18    A 3000-km-long T1 trunk is used to transmit 64-byte frames using protocol 5. If the propagation speed is 6 祍ec/km, how many bits should the sequence numbers be? 一条3000公里长的T1骨干线路被用来传输64字节的帧,两端使用了协议5.如果传输速度为6μs/公里,则序列号应该有多少位? 答;为了有效运行,序列空间(实际上就是发送窗口大小)必须足够的大,以允许发送方在收到第一个确认应答之前可以不断发送。信号在线路上的传播时间为 6×3000= 18000 ,即18ms。 在T1 速率,发送64 字节的数据帧需花的时间:64×8÷(1.536×106) = 0.33 。 所以,发送的第一帧从开始发送起,18.33ms 后完全到达接收方。确认应答又花了很少的发送时间(忽略不计)和回程的18ms。这样,加在一起的时间是36.33ms。发送方应该 有足够大的窗口,从而能够连续发送36.33ms。 36. 33/0.33=110 也就是说,为充满线路管道,需要至少110 帧,因此序列号为7 位。 3-19In protocol 3, is it possible that the sender starts the timer when it is already running? If so, how might this occur? If not, why is it impossible? 有可能发生。假设发送方传输率一个帧、很快返回了一个引起误解的确认。主循环将再次被执行,一个帧将在定时器仍在运行的情况下被发送。 3-20    Imagine a sliding window protocol using so many bits for sequence numbers that wraparound never occurs. What relations must hold among the four window edges and the window size, which is constant and the same for both the sender and the receiver. 想象这样一个滑动窗口协议,它的序列号有非常多的位,所以序列号几乎永远不会回转。请问4个窗口边界和窗口大小之间必须满足什么样的关系?这里的窗口大小是固定不变的,并且发送方和接收方的窗口大小相同。 令发送方窗口为(Sl , Su)接收方窗口为(Rl , Ru),令窗口大小为W。二者必须保持的关系是: 0 ≤ Su ? Sl + 1 ≤ W1 Ru ? Rl + 1 = W Sl ≤ Rl ≤ Su + 1 3-21    If the procedure between in protocol 5 checked for the condition a b c instead of the condition a b < c, would that have any effect on the protocol's correctness or efficiency? Explain your answer. 如果协议5中的between过程检查的条件是a<=b<=c,而不是a<=b 报告 软件系统测试报告下载sgs报告如何下载关于路面塌陷情况报告535n,sgs报告怎么下载竣工报告下载 已发现的丢失帧错误,而误认为丢失了的帧已被确认。另一方面,如果采用原先的检查条件,就能够报告丢失帧的错误。所以结论是:为保证协议的正确性,已接收的确认应答号应该小于下一个要发送的序列号。 3-22    In protocol 6, when a data frame arrives, a check is made to see if the sequence number differs from the one expected and no_nak is true. If both conditions hold, a NAK is sent. Otherwise, the auxiliary timer is started. Suppose that the else clause were omitted. Would this change affect the protocol's correctness? 在协议6中,当一个数据帧到达的时候,需要执行一个检查,看它的序列号是否与期望的序列号不同,而且no_nak为真。如果这两个条件都成立,则发送一个NAK,否则的话,启动辅助定时器。假定else字句被省略掉,这种改变会影响协议的正确性吗? 答:可能导致死锁。假定有一组帧正确到达,并被接收。然后,接收方会向前移动窗口。 现在假定所有的确认帧都丢失了,发送方最终会产生超时事件,并且再次发送第一帧,接收方将发送一个NAK。然后NONAK 被置成伪。假定NAK 也丢失了。那么从这个时候开始,发送方会不断发送已经被接收方接受了的帧。接收方只是忽略这些帧,但由于NONAK 为伪,所以不会再发送NAK,从而产生死锁。如果设置辅助计数器(实现“else”子句),超时后重发NAK,终究会使双方重新获得同步。 3-23    Suppose that the three-statement while loop near the end of protocol 6 were removed from the code. Would this affect the correctness of the protocol or just the performance? Explain your answer. 假设在协议6中接近尾部的内含三条语句的while循环被去掉的话,这样会影响协议的正确性吗?还是仅仅影响协议的性能?请解释答案。 答:删除这一段程序会影响协议的正确性,导致死锁。因为这一段程序负责处理接收到的确认帧,没有这一段程序,发送方会一直保持超时条件,从而使得协议的运行不能向前进展。 3-24 Suppose that the case for checksum errors were removed from the switch statement of protocol 6. How would this change affect the operation of the protocol? 这样将使得NAK的作用失效,于是我们将退回到超时。尽管效率会降低,正确性却不会受到影响。NAK不是必不可少的。 3-25    In protocol 6 the code for frame_arrival has a section used for NAKs. This section is invoked if the incoming frame is a NAK and another condition is met. Give a scenario where the presence of this other condition is essential. 在协议6中,针对frame_arrival的代码中有一部分被用于NAK。如果收到的帧是一个NAK,并且另一个条件也满足的话,则这部分代码会被调用到。请给出一个场景,在此场景下这另一个条件是非常关键的。 答:这里要求r.rack+11 时,信道总是过载的,因此在这里信道是过载的。 4-8    How long does a station, s, have to wait in the worst case before it can start transmitting its frame over a LAN that uses (a) the basic bit-map protocol? (b) Mok and Ward's protocol with permuting virtual station numbers? 如果一个LAN使用了下列协议,请问在最差情况下,一个站s在开始传送帧之前必须要等到多长时间?(a)基本的位图协议(b)改变虚拟站序列号的Mok-Ward协议 (a) 最坏的情况是:所有站都想发送,其中s是编号最小的站点。等待时间是N位争用周期+(N-1) ×d 位帧传输,一共是N+(N-1) d位时间; (b) (b) 最坏的情况是:所有站都有帧要传输,s具有其中最小的虚拟站编号。因此,s在其它N-1个站各发送了一个帧之后将获得传输机会,以及每个大小为log2 N 的N个争用周期。 等待时间是(N+1)×d+N×log2 Nbits.??? 4-10    Sixteen stations, numbered 1 through 16, are contending for the use of a shared channel by using the adaptive tree walk protocol. If all the stations whose addresses are prime numbers suddenly become ready at once, how many bit slots are needed to resolve the contention? 16个站的编号从1到16,它们正在竞争使用一个使用了可适应树径协议的共享信道。如果地址编号为素数的所有站突然间全部要发送帧,请问需要多少位时槽才能解决竞争? 答:在自适应树遍历协议中,可以把站点组织成二叉树(见图)的形式。在一次成功的传输之后,在第一个竞争时隙中,全部站都可以试图获得信道,如果仅其中之一需用信道,则发送冲突,则第二时隙内只有那些位于节点B 以下的站(0 到7)可以参加竞争。如其中之一获得信道,本帧后的时隙留给站点C 以下的站;如果B 点下面有两个或更多的站希望发送,在第二时隙内会发生冲突,于是第三时隙内由D 节点以下各站来竞争信道。 本题中,站2、3、5、7、11 和13 要发送,需要13 个时隙,每个时隙内参加竞争的站的列表如下: 第一时隙:2、3、5、7、11、13 第二时隙:2、3、5、7 第三时隙:2、3 第四时隙:空闲 第五时隙:2、3 第六时隙:2 第七时隙:3 第八时隙:5、7 第九时隙:5 第十时隙:7 第十一时隙:11、13 第十二时隙:11 第十三时隙:13 4-14 Six stations, A through F, communicate using the MACA protocol. Is it possible that two transmissions take place simultaneously? Explain your answer. 是的,想像它们排成一条直线,每个站只能到达其最近的邻居。当E向F发送时A也能向B发送。 4-21    Consider building a CSMA/CD network running at 1 Gbps over a 1-km cable with no repeaters. The signal speed in the cable is 200,000 km/sec. What is the minimum frame size? 考虑在一条1km长的电缆(无中继器)上建立一个1Gbps速率的CSMA/CD网络。信号在电缆中的速度为200000km/s。请问最小的帧长度为多少? 答:对于1km 电缆,单程传播时间为1/200000 =5×10-6 s,即5 ,来回路程传播时间为2t =10 。为了能够按照CSMA/CD 工作,最小帧的发射时间不能小于10 。以1Gb/s 速率工作,10 可以发送的比特数等于: 因此,最小帧是10 000 bit 或1250 字节长。 4-22    An IP packet to be transmitted by Ethernet is 60 bytes long, including all its headers. If LLC is not in use, is padding needed in the Ethernet frame, and if so, how many bytes? 一个通过以太网传送到IP分组有60字节长,其中包括所有的头部。如果没有使用LLC的话,则以太网帧中需要填补字节码?如果需要的话,请问需要填补多少字节? 最小的以太帧是64bytes,包括了以太帧头部的二者地址、类型/长度域、校验和。因为头部域占用18 bytes 报文是60 bytes,总的帧长度是78 bytes, 已经超过了64-byte 的最小限制。因此,不需要填补。 4-23 Ethernet frames must be at least 64 bytes long to ensure that the transmitter is still going in the event of a collision at the far end of the cable. Fast Ethernet has the same 64-byte minimum frame size but can get the bits out ten times faster. How is it possible to maintain the same minimum frame size? 快速以太网的最大线路长度是以太网的1/10 。 4-24 Some books quote the maximum size of an Ethernet frame as 1518 bytes instead of 1500 bytes. Are they wrong? Explain your answer. 有效载荷是1500 bytes, 但将目的地址、源地址、类型/长度和校验和域都计算进去的话,总和就是1518. 4-37    Consider the interconnected LANs showns in Fig. 4-44. Assume that hosts a and b are on LAN 1, c is on LAN 2, and d is on LAN 8. Initially, hash tables in all bridges are empty and the spanning tree shown in Fig 4-44(b) is used. Show how the hash tables of different bridges change after each of the following events happen in sequence, first (a) then (b) and so on. (a) a sends to d. (b) c sends to a. (c) d sends to c. (d) d moves to LAN 6. (e) d sends to a. 考虑图4.44中相互连接的LAN。假设主机a和b在LAN1上,主机c在LAN2上,主机d在LAN8上。刚开始的时候,所有的网桥内部的散列表都是空的,并且使用了图4.44b所示的生成树。在下面给出的每个事件依次发生以后,不同网桥的散列表将如何变化。(a)a向d发送帧(b)c向a发送帧(c)d向c发送帧(d)d移动到LAN6上(e)d向a发送帧 第一个帧会被每个网桥转发。这次传输后,每个网桥的散列表会得到一个带有适当端口的目的地为a的项目。例如D的散列表会有一个向在LAN2上的目的地为a转发帧的项目。第二个信息会被网桥B, D和A看到。这些网桥会在它们的散列表中添加一个目的地为c的新项目。例如,网桥D的散列表现在会有另一个向在LAN2上的目的地为c转发帧的项目。第三个信息会被网桥H, D, A和B看到。这些网桥会在它们的散列表中添加一个目的地为d的新项目。第五条信息会被网桥E, C, B, D和A看到。网桥E和C会在他们的散列表添加一个目的地为d的新项目,与此同时,网桥D, B和A 将会更新它们对应目的地d的散列表项目。 4-38    One consequence of using a spanning tree to forward frames in an extended LAN is that some bridges may not participate at all in forwarding frames. Identify three such bridges in Fig. 4-44. Is there any reason for keeping these bridges, even though they are not used for forwarding? 在一个扩展的LAN中使用生成树来转发帧的一个结果是,有的网桥可能根本不参与帧的转发过程。请在图4.44中标出三个这样的网桥。既然这些网桥没有被用于转发帧,那么是否有理由要保留这些网桥呢? 网桥 G, I 和 J 没有被用来转发任何帧。在一个扩展的LAN中具有回路的主要原因是增加可靠性。如果当前生成树中的任何网桥出了故障,(动态)生成树算法重构一个新的生成树,其中可能包括一个或更多不属于先前生成树部分的网桥。 4-42 Briefly describe the difference between store-and-forward and cut-through switches. 存储-转发型交换机完整存储输入的每个帧,然后检查并转发。直通型交换机在输入帧没有全部到达之前就开始转发。一得到目的地址,转发就开始了。 4-43 Store-and-forward switches have an advantage over cut-through switches with respect to damaged frames. Explain what it is. Store-and-forward switches store entire frames before forwarding them. After a frame comes in, the checksum can be verified. If the frame is damaged, it is discarded immediately. With cut=through, damaged frames cannot be discarded by the switch because by the time the error is detected, the frame is already gone. Trying to deal with the problem is like locking the barn door after the horse has escaped. 存储-转发型交换机在转发帧之前存储整个帧。当一个帧到达时,校验和将被验证。如果帧已被损坏,它将被立即丢弃。 在直通型交换机,损坏的帧不能被交换机丢弃。因为当错误被检测到时,帧已经过去了。想要处理这个问题就像是在马已经逃逸之后再锁上牲口棚。 第 5 章 网络层 5-1    Give two example computer applications for which connection-oriented service is appropriate. Now give two examples for which connectionless service is best. 答:文件传送、远程登录和视频点播需要面向连接的服务。另一方面,信用卡验证和其他销售点终端、电子资金转移,及许多形式远程数据库访问生来具有无连接性质,在一个方向上传送查询,在另一个方向上返回应答。 5-2    Are there any circumstances when connection-oriented service will (or at least should) deliver packets out of order? Explain. 答:有。中断信号应该跳过在它前面的数据,进行不遵从顺序的投递。典型的例子是当一个终端用户键入退出(或kill)健时。由退出信号产生的分组应该立即发送,并且应该跳过当前队列中排在前面等待程序处理的任何数据(即已经键入但尚未被程序读取的数据)。 5-3    Datagram subnets route each packet as a separate unit, independent of all others. Virtual-circuit subnets do not have to do this, since each data packet follows a predetermined route. Does this observation mean that virtual-circuit subnets do not need the capability to route isolated packets from an arbitrary source to an arbitrary destination? Explain your answer. 答:不对。为了从任意源到任意目的地,为连接建立的分组选择路由,虚电路网络肯定需要这一能力。 5-5    Consider the following design problem concerning implementation of virtual-circuit service. If virtual circuits are used internal to the subnet, each data packet must have a 3-byte header and each router must tie up 8 bytes of storage for circuit identification. If datagrams are used internally, 15-byte headers are needed but no router table space is required. Transmission capacity costs 1 cent per 106 bytes, per hop. Very fast router memory can be purchased for 1 cent per byte and is depreciated over two years, assuming a 40-hour business week. The statistically average session runs for 1000 sec, in which time 200 packets are transmitted. The mean packet requires four hops. Which implementation is cheaper, and by how much? 答:虚电路实现需要在1000 秒内固定分配5*8=40 字节的存储器。数据报实现需要比虚电路实现多传送的头信息的容量等于(15-3 )  ×4×200=9600字节-跳段。现在的问题就变成了40000 字节-秒的存储器对比9600 字节-跳段的电路容量。如果存储器的使用期为两年,即3600×8×5×52×2= 1.7×107秒,一个字节-秒的代价为1/( 1.5×107) = 6.7×10-8 分,那么40000 字节-秒的代价为2.7 毫分。另一方面,1 个字节-跳段代价是10-6 分,9600 个字节-跳段的代价为10-6 × 9600=9.6×10-3分,即9.6 毫分,即在这1000 秒内的时间内便宜大约6.9 毫分。 5-6 Assuming that all routers and hosts are working properly and that all software in both is free of all errors, is there any chance, however small, that a packet will be delivered to the wrong destination? 答:有可能。大的突发噪声可能破坏分组。使用k 位的检验和,差错仍然有2 k的概率被漏检。如果分组的目的地段或虚电路号码被改变,分组将会被投递到错误的目的地,并可能被接收为正确的分组。换句话说,偶然的突发噪声可能把送往一个目的地的完全合法的分组改变成送往另一个目的地的也是完全合法的分组。 5-7    Consider the network of Fig. 5-7, but ignore the weights on the lines. Suppose that it uses flooding as the routing algorithm. If a packet sent by A to D has a maximum hop count of 3, list all the routes it will take. Also tell how many hops worth of bandwidth it consumes. 路径将依次为下面的路由: ABCD, ABCF, ABEF, ABEG, AGHD, AGHF, AGEB, 和 AGEF. 用到的跳数是24。 5-9    Consider the subnet of Fig. 5-13(a). Distance vector routing is used, and the following vectors have just come in to router C: from B: (5, 0, 8, 12, 6, 2); from D: (16, 12, 6, 0, 9, 10); and from E: (7, 6, 3, 9, 0, 4). The measured delays to B, D, and E, are 6, 3, and 5, respectively. What is C's new routing table? Give both the outgoing line to use and the expected delay. 答:通过B 给出(11,6,14,18,12,8) 通过D 给出(19,15,9,3,12,13) 通过E 给出(12,11,8,14,5,9) 取到达每一目的地的最小值(C 除外)得到:(11,6,0,3,5,8) 输出线路是:(B,B,-,D,E,B) 5-10    If delays are recorded as 8-bit numbers in a 50-router network, and delay vectors are exchanged twice a second, how much bandwidth per (full-duplex) line is chewed up by the distributed routing algorithm? Assume that each router has three lines to other routers. 答:路由表的长度等于8*50=400bit。该表每秒钟在每条线路上发送2 次,因此400*2=800b/s,即在每条线路的每个方向上消耗的带宽都是800 bps。 5-12    For hierarchical routing with 4800 routers, what region and cluster sizes should be chosen to minimize the size of the routing table for a three-layer hierarchy? A good starting place is the hypothesis that a solution with k clusters of k regions of k routers is close to optimal, which means that k is about the cube root of 4800 (around 16). Use trial and error to check out combinations where all three parameters are in the general vicinity of 16. 所谓分级路由,就是将路由器按区(REGION)进行划分,每个路由器只须知道在自己的区内如何为分组选择路由到达目的地的细节,而不用知道其他区的内部结构。对于大的网络,也许两级结构是不够的,还可以把区组合成簇(CLUSTER),把簇再组合成域(ZONE),??对于等级式路由,在路由表中对应所有的本地路由器都有一个登录项,所有其他的区(本簇内)、簇(本域内)和域都缩减为单个路由器,因此减少了路由表的尺寸。 在本题中,4800=15*16*20。当选择15 个簇、16 个区,每个区20 个路由器时(或等效形式,例如20 个簇、16 个区,每个区15 个路由器),路由表尺寸最小,此时的路由表尺寸为15+16+20=51。 5-14 Looking at the subnet of Fig. 5-6, how many packets are generated by a broadcast from B, using (a) reverse path forwarding? (b) the sink tree? 答:在一个子网中,从所有的源到一个指定的目的地的最佳路由的集合形成一棵以该目的地为根的树。这样的树就称作汇集树。汇集树不必是唯一的,其他具有相同通路长度的树可能存在。所有路由选择算法的目标都是要为所有的路由器寻找和使用汇集树。在广播形式的应用中,源主机需要向所有其他的主机发送报文。在称为反向通路转发的广播路由选择中,当广播分组到达路由器时,路由器对此分组进行检查,查看该分组是否来自于通常用于发送分组到广播源的线路,如果是,则此广播分组本身非常有可能是从源路由器来的第一个拷贝。 在这种情况下,路由器将此分组复制转发到进入线路以外的所有线路。然而,如果广播分组到来的线路不是到达源端的线路,那么分组就被当作副本而扔掉。 (1)反向通路转发算法,算法进行到5 个跳段后结束,总共产生28 个分组。 (2)使用汇集树算法,需要4 个跳段,总共产生14 个分组。 5-15 Consider the network of Fig. 5-16(a). Imagine that one new line is added, between F and G, but the sink tree of Fig. 5-16(b) remains unchanged. What changes occur to Fig. 5-16(c)? 节点F目前有两个子节点A和D.它现在获得了第三个——G,但并未构成环路,因为沿着IFG的报文不在汇集树上。节点G除D之外获得第二个子节点,标记为F,它也因没有加入汇集树而没有构成环路。 5-21 As a possible congestion control mechanism in a subnet using virtual circuits internally, a router could refrain from acknowledging a received packet until (1) it knows its last transmission along the virtual circuit was received successfully and (2) it has a free buffer. For simplicity, assume that the routers use a stop-and-wait protocol and that each virtual circuit has one buffer dedicated to it for each direction of traffic. If it takes T sec to transmit a packet (data or acknowledgement) and there are n routers on the path, what is the rate at which packets are delivered to the destination host? Assume that transmission errors are rare and that the host-router connection is infinitely fast. 答:对时间以T 秒为单位分时隙。在时隙中,源路由器发送第一个分组。在时隙2 的开始,第2 个路由器收到了分组,但不能应答。在时隙3 的开始,第3 个路由器收到了分组,但也不能应答。这样,此后所有的路由器都不会应答。仅当目的地主机从目的地路由器取得分组时才会发送第1 个应答。现在确认应答开始往回传播。在源路由器可以发送第2 个分组之前,需要两次穿行该子网,需要花费的时间等于2(n-1)T 秒/分组,显然,这种协议的效率是很低的。
本文档为【计算机网络第四版课后习题答案(中文版)】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_594905
暂无简介~
格式:doc
大小:198KB
软件:Word
页数:45
分类:理学
上传时间:2019-02-20
浏览量:306