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

发布时间 : 星期二 文章计算机网络第四版习题答案(中文版)更新完毕开始阅读

5-23 Describe two major differences between the warning bit method and the RED method. 第一,警告位方法通过设置一个位明确地发送一个拥塞通知给来源,而RED方法通过简单地丢弃它的一个报文来隐含地通知源;

第二,警告位方法只在没有缓冲空间时才丢弃报文,而RED方法在所有缓冲区耗尽之前就丢弃报文。

5-24 Give an argument why the leaky bucket algorithm should allow just one packet per tick, independent of how large the packet is. 答:通常计算机能够以很高的速率产生数据,网络也可以用同样的速率运行。然而,路由器却只能在短时间内以同样高的速率处理数据。对于排在队列中的一个分组,不管它有多大,路由器必须做大约相同分量的工作。显然,处理10 个100 字节长的分组所作的工作比处理1 个1000 字节长的分组要做的工作多得多。

5-25 The byte-counting variant of the leaky bucket algorithm is used in a particular system. The rule is that one 1024-byte packet, or two 512-byte packets, etc., may be sent on each tick. Give a serious restriction of this system that was not mentioned in the text. 答:不可以发送任何大于1024 字节的分组。

5-27 A computer on a 6-Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 1 Mbps. It is initially filled to capacity with 8 megabits. How long can the computer transmit at the full 6 Mbps? 答:本题乍看起来,似乎以6Mb/s 速率发送用4/3 秒的时间可以发送完桶内8Mb 的数据,使漏桶变空。然而,这样回答是错误的,因为在这期间,已有更多的令牌到达。正确的答案应该使用公式S= C /(M-P ),这里的S表示以秒计量的突发时间长度,M 表示以每秒字节计量的最大输出速率,C 表示以字节计的桶的容量,P 表示以每秒字节计量的令牌到达速率。则:

因此,计算机可以用完全速率6Mb/s 发送1.6 s 的时间。

5-28 Imagine a flow specification that has a maximum packet size of 1000 bytes, a token bucket rate of 10 million bytes/sec, a token bucket size of 1 million bytes, and a maximum transmission rate of 50 million bytes/sec. How long can a burst at maximum speed last? 答:令最大突发时间长度为? t 秒,在极端情况下,漏桶在突发期间的开始是充满的(1MB),在突发期间另有10? t MB 进入桶内。在传输突发期间的输出包含50? t MB。由等式1+10? t=50? t,得到? t=1/40s,即25ms。因此,以最大速率突发传送可维持25ms 的时间。

5-31 Consider the user of differentiated services with expedited forwarding. Is there a guarantee 第 25 页 共 40 页

that expedited packets experience a shorter delay than regular packets? Why or why not? 不能保证。如果过多报文被加快,它们的通道性能可能比常规通道更差。

5-32 Is fragmentation needed in concatenated virtual-circuit internets or only in datagram systems? 答:在这两种情况下都需要分割功能。即使在一个串接的虚电路网络中,沿通路的某些网络可能接受1024 字节分组,而另一些网络可能仅接受48字节分组,分割功能仍然是需要的。

5-34 Suppose that host A is connected to a router R 1, R 1 is connected to another router, R 2, and R 2 is connected to host B. Suppose that a TCP message that contains 900 bytes of data and 20 bytes of TCP header is passed to the IP code at host A for delivery to B. Show the Total length, Identification, DF, MF, and Fragment offset fields of the IP header in each packet transmitted over the three links. Assume that link A-R1 can support a maximum frame size of 1024 bytes including a 14-byte frame header, link R1-R2 can support a maximum frame size of 512 bytes, including an 8-byte frame header, and link R2-B can support a maximum frame size of 512 bytes including a 12-byte frame header. 开头的IP数据报会在I1被拆分成两个IP数据包,不会出现其他的拆分。??? 链路 A-R1:

Length = 940; ID = x; DF = 0; MF = 0; Offset = 0 链路Link R1-R2:

(1) Length = 500; ID = x; DF = 0; MF = 1; Offset = 0 (2) Length = 460; ID = x; DF = 0; MF = 0; Offset = 60 链路 R2-B:

(1) Length = 500; ID = x; DF = 0; MF = 1; Offset = 0 (2) Length = 460; ID = x; DF = 0; MF = 0; Offset = 60

第 26 页 共 40 页

第 6 章 传输层

6-1 In our example transport primitives of Fig. 6-2, LISTEN is a blocking call. Is this strictly necessary? If not, explain how a nonblocking primitive could be used. What advantage would this have over the scheme described in the text? 答:不是。事实上,LISTEN 调用可以表明建立新连接的意愿,但不封锁。当有了建立连接的尝试时,调用程序可以被提供一个信号。然后,它执行,比如说,OK 或REJECT 来接受或拒绝连接。然而,在原先的封锁性方案中,就缺乏这种灵活性。

6-2 In the model underlying Fig. 6-4, it is assumed that packets may be lost by the network layer and thus must be individually acknowledged. Suppose that the network layer is 100 percent reliable and never loses packets. What changes, if any, are needed to Fig. 6-4? 答:从“被动连接建立在进行中”到“已建立”的虚线不再依确认的传输情况而定。该变迁可立即发生。实质上,“被动连接建立在进行中”状态已经消失,因为它们什么时候都不可见。

第 27 页 共 40 页

6-4 Suppose that the clock-driven scheme for generating initial sequence numbers is used with a 15-bit wide clock counter. The clock ticks once every 100 msec, and the maximum packet lifetime is 60 sec. How often need resynchronization take place (a) in the worst case? (b) when the data consumes 240 sequence numbers/min? 答:在具体解答这个问题之前,需要先熟悉一下时钟驱动方案的内容。首先我们引入参数T,假定在发送出一个分组之后等待长度等于T 的时间,我们就可以肯定,所有关于该分组的踪迹都已消失,不管是该分组本身,还是对于它的确认都不会再以外的出现。我们还假定,每个主机都配有一个表示一天的时间的时钟,不同主机上的时钟不必同步。每个时钟都采用二进制计数器的形式,并且以长度一致的间隔时间递增。而且,计数器的比特数必须等于或超过序列号所使用的比特数。最后一点,时钟被假定是连续运行,即使主机关闭时也不间断。 时钟驱动方案的基本思想是同一时间不会有两个活动的TPDUs 使用相同的序列号。在一条连接建立的时候,时钟的低端k 个比特被用作初始序列号(也是k 位)。因此,每条连接可以从不同的序列号开始为TPDU 编号。序列号空间应该足够大,使得当编号循环一周时,具有相同号码的旧的TPDU 已经不复存在。

当主机系统崩溃时会产生一些问题。在重新启动后,主机的传输层实体不知道它曾经处在序列号空间的什么位置。一种解决方法是要求传输实体在恢复后的T 秒内处于空闲状态,让所有老的TPDUs 都消失。然而,在一个复杂的互联网上,T 值可能很大,所以这不是一个好的解决方法。 为了避免从崩溃恢复后的T 秒不工作状态,需要对序列号的使用施加新的限制。在一些编号可能被用作初始序列号之前,必须在长度为T 的时间内禁止使用这些编号。在任何连接上发送TPDU 之前,传输层实体必须读一次时钟,检查该TPDU 的编号是否在禁止区内。

显然,在任何连接上的最大数据率是每个时钟滴答发送一个TPDU。在系统崩溃后重启动时,在打开一条新的连接之前,传输实体必须等待到下一个时钟滴答,以避免同样的号码重复使用。如果数据速率低于始终速率,实际使用的序列号对于时间的曲线将最终从左边进入禁止区。如果这样的情况发生了,要么延迟TPDU 达T 长度时间,或者重新同步序列号。

作为例子,如果在坐标起点发1 号TPDU,到接近时钟大循环编码的末尾才发送第2 个TPDU,此时为避免在下一大循环开始重复使用序列号,就需要在大循环接近末尾处重新同步,使用大的初始序列号,以避免使用禁止区号码。

(a) 时钟大循环周期是215,即32768 滴答,每滴答100ms,即0.1 秒,所以大循环周期是3276.8s 。假定数据产生速率非常低(接近零),那么发送方在3276.8-60=3271.8 秒时进入禁止区,需要进行一次重新同步。 (b) 每分钟使用240 个序列号,即每秒使用4 个号码,如果时间以t 表示(以秒为单位),那么实际的序列号是4t。当接近大循环的末尾时以及在下一大循环的开始阶段,4t 有一定的大小,位于禁止区的上方,现在由于每秒钟10个滴答,禁止区的左边是10(t-3216.8)。令4t =10(t-3216.8),得t=5316.3秒。即当 t=5316.3时,开始进入禁止区,因此当 t=5316.3时需要进行一次重新同步。

第 28 页 共 40 页