《计算机网络(第四版)》习题答案 下载本文

内容发布更新时间 : 2024/5/17 20:07:33星期一 下面是文章的全部内容请认真阅读。

所以:

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,所以

时能使总的延迟最小。

第 13 页 共 59 页

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 没有发送。

第 14 页 共 59 页

第 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需要在数据链路层上被发送,请问,经过位填充之后实际被发送出去的是什么?

第 15 页 共 59 页

输出是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

第 16 页 共 59 页