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

更新时间:2023-08-12 20:57:01 阅读量: 初中教育 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

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

第 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.

当一个文件在两台计算机之间传输的时候,可能会有两种不同的确认策略。在第一种策略中,该文件被分解成许多个分组,接收方会独立地确认每一个分组,但是文件传输过程作为整体并没有被确认。在第二种策略中,这些分组并没有被单独地确认,但是当整个文件到达的时候,它会被确认。请讨论这两种方案。

如果网络容易丢失分组,那么对每一个分组逐一进行确认较好,此时仅重传丢失的分组。而在另一方面,如果网络高度可靠,那么在不发差错的情况下,仅在整个文件传送的结尾发送一次确认,从而减少了确认的次数,节省了带宽;不过,即使有单个分组丢失,也需要重传整个文件。

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

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(n1)

全连接:最好为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时发送完毕。

为到达最终目的地,最后一个分组必须被中间的路由器重发k1次,每次重发花时间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, 0111101111101111110, needs to be transmitted at the data link layer. What is the string actually transmitted after bit stuffing?

位串0111101111101111110需要在数据链路层上被发送,请问,经过位填充之后实际被发送出去的是什么? 输出是1110111110011111010.

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

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<c,则对于协议的正确性和效率有影响吗?解释你的答案。

答:改变检查条件后,协议将变得不正确。假定使用3 位序列号,考虑下列协议运行过程:

A 站刚发出7 号帧;B 站接收到这个帧,并发出捎带应答ack。A 站收到ack,并发送0~6 号帧。假定所有这些帧都在传输过程中丢失了。B 站超时,重发它的当前帧,此时捎带的确认号是7。考察A 站在r.rack=7 到达时的情况,关键变量是ack_expected=0,r.rack=7,next_frame_to_send_=7。修改后的检查条件将被置成“真”,不会报告已发现的丢失帧错误,而误认为丢失了的帧已被确认。另一方面,如果采用原先的检查条件,就能够报告丢失帧的错误。所以结论是:为保证协议的正确性,已接收的确认应答号应该小于下一个要发送的序列号。

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+1<next_frame_to_send。考虑下列操作细节:

A 站发送0 号帧给B 站。B 站收到此帧,并发送ACK帧,但ACK丢失了。A 站发生超时,重发0 号帧。但B 站现在期待接收1 号帧,应此发送NAK,否定收到的0 号帧。显然,现在A 站最好不重发0 号帧。由于条件r.rack+1<next_frame_to_send 不成立,所以用不着选择性重传0 号帧,可以继续向前推进传送1 号帧。这个例子就说明了这段程序中的另一个条件,即r.rack+1<next_frame_to_send 也是重要的。

3-26 Imagine that you are writing the data link layer software for a line used to send data to you, but not from you. The other end uses HDLC, with a 3-bit sequence number and a window size of seven frames. You would like to buffer as many out-of-sequence frames as possible to enhance efficiency, but you are not allowed to modify the software on the sending side. Is it possible to have a receiver window greater than 1, and still guarantee that the protocol will never fail? If so, what is the largest window that can be safely used?

想象你正在编写一个数据链路层软件,它被用在一条专门给你发送数据的线路上,而不是让你往外发送数据。另一端使用了HDLC,3位序列号和一个可容纳7帧的窗口。你希望将乱序的帧尽可能多地缓存起来,以提高效率,但是你又不允许修改发送方的软件。是否有可能让接收方的窗口大于1,并且仍然保证该协议不会失败呢?如果可能的话,能够安全使用的最大窗口是多少?

答:不可以。最大接收窗口的大小就是1。现在假定该接收窗口值变为2。开始时发送方发送0 至6 号帧,所有7 个帧都被收到,并作了确认,但确认被丢失。现在接收方准备接收7 号和0 号帧,当重发的0 号帧到达接收方时,它将会被缓存保留,接收方确认6 号帧。当7 号帧到来的时候,接收方将把7 号帧和缓存的0 号帧传递给主机,导致协议错误。因此,能够安全使用的最大窗口值为1。

3-28 In protocol 6, MAX_SEQ = 2n - 1. While this condition is obviously desirable to make efficient use of header bits, we have not demonstrated that it is essential. Does the protocol work correctly for MAX_SEQ = 4, for example?

在协议6中,MAX_SEQ=2n-1.这个条件显然是希望尽可能地利用头部的位,但是我们无法证明这个条件确实很关键。例如,协议在MAX_SEQ=4的时候也能够正确地工作吗?

答:不能,协议的运行将会失败。当MaxSeq=4,序列号的模数=4+1=5,窗口大小将等于:NrBufs<=5/2=2.5,即得到,NrBufs=2。因此在该协议中,偶数序号使用缓冲区1。这种映射意味着帧4 和0 将使用同一缓冲区。假定0 至3 号帧都正确收到了,并且都确认应答了,并且都确认应答了。如果随后的4 号帧丢失,且下一个0 号帧收到了,新的0 号帧将被放到缓冲区0 中,变量arrived[0]被置成“真”。这样,一个失序帧将被投递给主机。事实上,采用选择性重传的滑动窗口协议需要MaxSeq 是奇数才能正确的工作。然而其他的滑动窗口协议的实现并不具有这一性质。

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

3-29 Frames of 1000 bits are sent over a 1-Mbps channel using a geostationary satellite whose propagation time from the earth is 270 msec. Acknowledgements are always piggybacked onto data frames. The headers are very short. Three-bit sequence numbers are used. What is the maximum achievable channel utilization for (a) Stop-and-wait. (b) Protocol 5. (c) Protocol 6.

利用地球同步卫星在一个1Mbps的信道上发送1000位的帧,该信道离开地球的传输延迟为270ms。确认信息总是被捎带在数据帧傻姑娘。头部非常短,并且使用3位序列号。在下面的协议中,最大可获得的信道利用率是多少?(a)停-等协议(b)协议5(c)协议6

答:对应三种协议的窗口大小值分别是1、7 和4。

使用卫星信道端到端的典型传输延迟是270ms,以1Mb/s 发送,1000bit 长的帧的发送时间为1ms。我们用t=0 表示传输开始的时间,那么在t=1ms 时,第一帧发送完毕;t=271ms时,第一帧完全到达接收方;t=272ms,对第一帧的确认帧发送完毕;t=542ms,带有确认的帧完全到达发送方。因此一个发送周期为542ms。如果在542ms 内可以发送k 个帧,由于每一个帧的发送时间为1ms,则信道利用率为k/542,因此:

(a) k=1,最大信道利用率=1/542=0.18%

(b) k=7,最大信道利用率=7/542=1.29%

(c) k=4,最大信道利用率=4/542=0.74%

3-30 Compute the fraction of the bandwidth that is wasted on overhead (headers and retransmissions) for protocol 6 on a heavily-loaded 50-kbps satellite channel with data frames consisting of 40 header and 3960 data bits. Assume that the signal propagation time from the earth to the satellite is 270 msec. ACK frames never occur. NAK frames are 40 bits. The error rate for data frames is 1 percent, and the error rate for NAK frames is negligible. The sequence

numbers are 8 bits.

答:使用选择性重传滑动窗口协议,序列号长度是8 位。窗口大小为128。卫星信道端到端的传输延迟是270ms。以50kb/s 发送,4000bit(3960+40)长的数据帧的发送时间是0.02*4000=80ms。我们用t=0 表示传输开始时间,那么,t=80ms,第一帧发送完毕;

t=270+80=350ms,第一帧完全到达接收方;t=350+80=430ms,对第一帧作捎带确认的反向数据帧可能发送完毕;t=430+270=700ms,带有确认的反向数据帧完全到达发送方。因此,周期为700ms,发送128 帧时间

80*128=10240ms,这意味着传输管道总是充满的。每个帧重传的概率为0.01,对于3960 个数据位,头开销为40 位,平均重传的位数为4000*0.01=40位,传送NAK 的平均位数为40*1/100=0.40 位,所以每3960 个数据位的总开销为80.4 位。

因此,开销所占的带宽比例等于80.4/(3960+80.4)=1.99%。

3-32 A 100-km-long cable runs at the T1 data rate. The propagation speed in the cable is 2/3 the speed of light in

vacuum. How many bits fit in the cable?

答:在该电缆中的传播速度是每秒钟200 000km,即每毫秒200km,因此100km 的电缆将会在0.5ms 内填满。T1 速率125传送一个193 位的帧,0.5ms 可以传送4 个T1 帧,即193*4=772bit。

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

第 4 章 介质访问子层

4-1 For this problem, use a formula from this chapter, but first state the formula. Frames arrive randomly at a 100-Mbps channel for transmission. If the channel is busy when a frame arrives, it waits its turn in a queue. Frame length is exponentially distributed with a mean of 10,000 bits/frame. For each of the following frame arrival rates, give the delay experienced by the average frame, including both queueing time and transmission time.

(a) 90 frames/sec. (b) 900 frames/sec. (c) 9000 frames/sec.

(time delay, T // a channel of capacity C bps // with an arrival rate of

frames/sec)

这个公式是4.1.1段落给出的Markov排队问题的标准公式。也就是,。这里C =108 、

sec。对于这三种到达速率,我们得出的是(a) 0.1 msec,(b) 0.11 msec, (c) 1 msec. 对于c

的情况,我们操作一个带来10倍延迟的排队系统

4-2 A group of N stations share a 56-kbps pure ALOHA channel. Each station outputs a 1000-bit frame on an average of once every 100 sec, even if the previous one has not yet been sent (e.g., the stations can buffer outgoing frames). What is the maximum value of N?

N个站共享一个56kbps的纯ALOHA信道。每个站平均每100秒输出一个1000位的帧,及时前面的帧还没有被送出,它也这样进行(比如这些站可以将送出的帧缓存起来)。请问N的最大值是多少?

答:对于纯的ALOHA,可用的带宽是0.184×56 Kb/s =10.304 Kb/ s。每个站需要的带宽为1000/100=10b/s。而N=10304/10≈1030 所以,最多可以有1030 个站,即N 的最大值为1030。

4-3 Consider the delay of pure ALOHA versus slotted ALOHA at low load. Which one is less? Explain your answer.

答:对于纯的ALOHA,发送可以立即开始。对于分隙的ALOHA,它必须等待下一个时隙。这样,平均会引入半个时隙的延迟。因此,纯ALOHA 的延迟比较小。

4-4 Ten thousand airline reservation stations are competing for the use of a single slotted ALOHA channel. The average station makes 18 requests/hour. A slot is 125 µ

sec. What is the approximate total channel load?

每个终端每200(=3600/18)秒做一次请求,总共有10 000 个终端,因此,总的负载是200 秒做10000 次请求。平均每秒钟50 次请求。每秒钟8000 个时隙,所以平均每个时隙的发送次数为50/8000=1/160。

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

4-5 A large population of ALOHA users manages to generate 50 requests/sec, including both originals and retransmissions. Time is slotted in units of 40 msec. (a) What is the chance of success on the first attempt? (b) What is the probability of exactly k collisions and then a success? (c) What is the expected number of transmission attempts needed?

一大群ALOHA用户每秒钟产生50个请求,包括原始的请求和重传的请求。时槽单位为40ms。(a)首次发送成功的几率是多少?(b)恰好k次冲突之后成功的概率是多少? (c)所需传送次数的期望值是多少?

答:(a)在任一帧时间内生成k 帧的概率服从泊松分布

生成0 帧的概率为e-G

对于纯的ALOHA,发送一帧的冲突危险区为两个帧时,在两帧内无其他帧发送的概率是e-G×e –G=e-2G 对于分隙的ALOHA,由于冲突危险区减少为原来的一半,任一帧时内无其他帧发送的概率是e-G 。

现在时隙长度为40ms,即每秒25 个时隙,产生50 次请求,所以每个时隙产生两个请求,G=2。因此,首次尝试的成功率是:e-2 = 1/ e2

(b)

(c)尝试k 次才能发送成功的概率(即前k-1 次冲突,第k 次才成功)为:

那么每帧传送次数的数学期望为

4-6 Measurements of a slotted ALOHA channel with an infinite number of users show that 10 percent of the slots are idle. (a) What is the channel load, G? (b) What is the throughput? (c) Is the channel underloaded or overloaded?

对一个无限用户的分槽ALOHA信道的测试表明,10%的时槽是空闲的。(a)信道载荷G是多少?(b)吞吐量是多少?(c)该信道是载荷不足,还是过载了?

答:(a)从泊松定律得到p0=e –G ,因此G= -lnp0= -ln0.1=2.3

(b) S=G e -G , G =2.3,e -G=0.1

S=2.3×0.1=0.23

(c)因为每当G>1 时,信道总是过载的,因此在这里信道是过载的。

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。

本文来源:https://www.bwwdw.com/article/mvjj.html

Top