理这个问题就像是在马已经逃逸之后再锁上牲口棚。
第 31 页 共 59 页
第 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?
第 32 页 共 59 页
答:虚电路实现需要在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.
第 33 页 共 59 页
路径将依次为下面的路由: ABCD, ABCF, ABEF, ABEG, AGHD, AGHF, AGEB, 和 AGEF. 用到的跳数是24。
5-9 Consider the subnet of Fig. 5-13(a). Distance vector routing is used, and the following vectors have just come in to router C: from B: (5, 0, 8, 12, 6, 2); from D: (16, 12, 6, 0, 9, 10); and from E: (7, 6, 3, 9, 0, 4). The measured delays to B, D, and E, are 6, 3, and 5, respectively. What is C's new routing table? Give both the outgoing line to use and the expected delay.
第 34 页 共 59 页
答:通过B 给出(11,6,14,18,12,8) 通过D 给出(19,15,9,3,12,13) 通过E 给出(12,11,8,14,5,9)
取到达每一目的地的最小值(C 除外)得到:(11,6,0,3,5,8) 输出线路是:(B,B,-,D,E,B)
5-10 If delays are recorded as 8-bit numbers in a 50-router network, and delay vectors are exchanged twice a second, how much bandwidth per (full-duplex) line is chewed up by the distributed routing algorithm? Assume that each router has three lines to other routers.
答:路由表的长度等于8*50=400bit。该表每秒钟在每条线路上发送2 次,因此400*2=800b/s,即在每条线路的每个方向上消耗的带宽都是800 bps。
5-12 For hierarchical routing with 4800 routers, what region and cluster sizes should be chosen to
minimize the size of the routing table for a three-layer hierarchy? A good starting place is the hypothesis that a solution with k clusters of k regions of k routers is close to optimal, which means that k is about the cube root of 4800 (around 16). Use trial and error to check out combinations where all three parameters are in the general vicinity of 16.
所谓分级路由,就是将路由器按区(REGION)进行划分,每个路由器只须知道在自己的区内如何为分组选择路由到达目的地的细节,而不用知道其他区的内部结构。对于大的网络,也许两级
第 35 页 共 59 页