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

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

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%

第 21 页 共 59 页

(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。

第 22 页 共 59 页

第 23 页 共 59 页

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

第 24 页 共 59 页