计算机网络第四版习题答案(中文版)
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,所以
故

