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

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

4-10 Sixteen stations, numbered 1 through 16, are contending for the use of a shared channel by using the adaptive tree walk protocol. If all the stations whose addresses are prime numbers suddenly become ready at once, how many bit slots are needed to resolve the contention? 16个站的编号从1到16,它们正在竞争使用一个使用了可适应树径协议的共享信道。如果地址编号为素数的所有站突然间全部要发送帧,请问需要多少位时槽才能解决竞争? 答:在自适应树遍历协议中,可以把站点组织成二叉树(见图)的形式。在一次成功的传输之后,在第一个竞争时隙中,全部站都可以试图获得信道,如果仅其中之一需用信道,则发送冲突,则第二时隙内只有那些位于节点B 以下的站(0 到7)可以参加竞争。如其中之一获得信道,本帧后的时隙留给站点C 以下的站;如果B 点下面有两个或更多的站希望发送,在第二时隙内会发生冲突,于是第三时隙内由D 节点以下各站来竞争信道。

本题中,站2、3、5、7、11 和13 要发送,需要13 个时隙,每个时隙内参加竞争的站的列表如下: 第一时隙:2、3、5、7、11、13 第二时隙:2、3、5、7 第三时隙:2、3 第四时隙:空闲 第五时隙:2、3 第六时隙:2 第七时隙:3 第八时隙:5、7 第九时隙:5 第十时隙:7

第十一时隙:11、13 第十二时隙:11 第十三时隙:13

4-14 Six stations, A through F, communicate using the MACA protocol. Is it possible that two transmissions take place simultaneously? Explain your answer. 是的,想像它们排成一条直线,每个站只能到达其最近的邻居。当E向F发送时A也能向B发送。

4-21 Consider building a CSMA/CD network running at 1 Gbps over a 1-km cable with no repeaters. The signal speed in the cable is 200,000 km/sec. What is the minimum frame size? 考虑在一条1km长的电缆(无中继器)上建立一个1Gbps速率的CSMA/CD网络。信号在电缆中的速度为200000km/s。请问最小的帧长度为多少? 答:对于1km 电缆,单程传播时间为1/200000?=5×10-6 s,即5,来回路程传播时间为2t =10。为了能够按照CSMA/CD 工作,最小帧的发射时间不能小于10。以1Gb/s 速率工作,10可以发送的比特数等于:

因此,最小帧是10 000 bit 或1250 字节长。

第 17 页 共 40 页

4-22 An IP packet to be transmitted by Ethernet is 60 bytes long, including all its headers. If LLC is not in use, is padding needed in the Ethernet frame, and if so, how many bytes? 一个通过以太网传送到IP分组有60字节长,其中包括所有的头部。如果没有使用LLC的话,则以太网帧中需要填补字节码?如果需要的话,请问需要填补多少字节? 最小的以太帧是64bytes,包括了以太帧头部的二者地址、类型/长度域、校验和。因为头部域占用18 bytes 报文是60 bytes,总的帧长度是78 bytes, 已经超过了64-byte 的最小限制。因此,不需要填补。

4-23 Ethernet frames must be at least 64 bytes long to ensure that the transmitter is still going in the event of a collision at the far end of the cable. Fast Ethernet has the same 64-byte minimum frame size but can get the bits out ten times faster. How is it possible to maintain the same minimum frame size? 快速以太网的最大线路长度是以太网的1/10 。

4-24 Some books quote the maximum size of an Ethernet frame as 1518 bytes instead of 1500 bytes. Are they wrong? Explain your answer. 有效载荷是1500 bytes, 但将目的地址、源地址、类型/长度和校验和域都计算进去的话,总和就是1518.

4-37 Consider the interconnected LANs showns in Fig. 4-44. Assume that hosts a and b are on LAN 1, c is on LAN 2, and d is on LAN 8. Initially, hash tables in all bridges are empty and the spanning tree shown in Fig 4-44(b) is used. Show how the hash tables of different bridges change after each of the following events happen in sequence, first (a) then (b) and so on. (a) a sends to d. (b) c sends to a. (c) d sends to c. (d) d moves to LAN 6. (e) d sends to a. 考虑图4.44中相互连接的LAN。假设主机a和b在LAN1上,主机c在LAN2上,主机d在LAN8上。刚开始的时候,所有的网桥内部的散列表都是空的,并且使用了图4.44b所示的生成树。在下面给出的每个事件依次发生以后,不同网桥的散列表将如何变化。(a)a向d发送帧(b)c向a发送帧(c)d向c发送帧(d)d移动到LAN6上(e)d向a发送帧 第一个帧会被每个网桥转发。这次传输后,每个网桥的散列表会得到一个带有适当端口的目的地为a的项目。例如D的散列表会有一个向在LAN2上的目的地为a转发帧的项目。第二个信息会被网桥B, D和A看到。这些网桥会在它们的散列表中添加一个目的地为c的新项目。例如,网桥D的散列表现在会有另一个向在LAN2上的目的地为c转发帧的项目。第三个信息会被网桥H, D, A和B看到。这些网桥会在它们的散列表中添加一个目的地为d的新项目。第五条信息会被网桥E, C, B, D和A看到。网桥E和C会在他们的散列表添加一个目的地为d的新项目,与此同时,网桥D, B和A 将会更新它们对应目的地d的散列表项目。

第 18 页 共 40 页

4-38 One consequence of using a spanning tree to forward frames in an extended LAN is that some bridges may not participate at all in forwarding frames. Identify three such bridges in Fig. 4-44. Is there any reason for keeping these bridges, even though they are not used for forwarding? 在一个扩展的LAN中使用生成树来转发帧的一个结果是,有的网桥可能根本不参与帧的转发过程。请在图4.44中标出三个这样的网桥。既然这些网桥没有被用于转发帧,那么是否有理由要保留这些网桥呢? 网桥 G, I 和 J 没有被用来转发任何帧。在一个扩展的LAN中具有回路的主要原因是增加可靠性。如果当前

生成树中的任何网桥出了故障,(动态)生成树算法重构一个新的生成树,其中可能包括一个或更多不属于先前生成树部分的网桥。

4-42 Briefly describe the difference between store-and-forward and cut-through switches.

存储-转发型交换机完整存储输入的每个帧,然后检查并转发。直通型交换机在输入帧没有全部到达之前就开始转发。一得到目的地址,转发就开始了。

4-43 Store-and-forward switches have an advantage over cut-through switches with respect to damaged frames. Explain what it is.

Store-and-forward switches store entire frames before forwarding them. After a frame comes in, the checksum can be verified. If the frame is damaged, it is discarded immediately. With cut=through, damaged frames cannot be discarded by the switch because by the time the error is detected, the frame is already gone. Trying to deal with the problem is like locking the barn door after the horse has escaped.

存储-转发型交换机在转发帧之前存储整个帧。当一个帧到达时,校验和将被验证。如果帧已被损坏,它将被立即丢弃。

在直通型交换机,损坏的帧不能被交换机丢弃。因为当错误被检测到时,帧已经过去了。想要处理这个问题就像是在马已经逃逸之后再锁上牲口棚。

第 19 页 共 40 页

第 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? 答:虚电路实现需要在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 毫分。

第 20 页 共 40 页

联系合同范文客服:xxxxx#qq.com(#替换为@)