收藏 分享(赏)

计算机网络作业.docx

上传人:scg750829 文档编号:6608350 上传时间:2019-04-18 格式:DOCX 页数:16 大小:301.94KB
下载 相关 举报
计算机网络作业.docx_第1页
第1页 / 共16页
计算机网络作业.docx_第2页
第2页 / 共16页
计算机网络作业.docx_第3页
第3页 / 共16页
计算机网络作业.docx_第4页
第4页 / 共16页
计算机网络作业.docx_第5页
第5页 / 共16页
点击查看更多>>
资源描述

1、Chapter 111. What are two reasons for using layered protocols?(M)通过协议分层可以把设计问题划分成较小的易于处理的片段分层意味着某一层的协议的改变不会影响高层或低层的协议13. What is the principal difference between connectionless communication andconnection-oriented communication?(E) 主要的区别有两条。其一:面向连接通信分为三个阶段,第一是建立连接,在此阶段,发出一个建立连接的请求。第二阶段,只有在连接成功建立之后,保

2、持连接状态,才能开始数据传输。第三阶段,当数据传输完毕,必须释放连接。而无连接通信没有这么多阶段,它直接进行数据传输。其二:面向连接的通信具有数据的保序性, 而无连接的通信不能保证接收数据的顺序与发送数据的顺序一致。18.Which of the OSI layers handles each of the following? (a) Dividing the transmitted bit stream into frames. (b) Determining which route through the subnet to use.Answer: (a) Data link layer

3、. (b) Network layer.22. What is the main difference between TCP and UDP?(E)TCP 是面向连接的,而UDP 是一种数据报服务。25. When a file is transferred between two computers, two acknowledgementstrategies are possible. In the first one, the file is chopped up into packets, which are individually acknowledged by the rece

4、iver, but the file transfer as a whole is not acknowledged. In the second one, the packets are not acknowledged individually,but the entire file is acknowledged when it arrives. Discuss these two approaches.(E)答:如果网络容易丢失分组,那么对每一个分组逐一进行确认较好,此时仅重传丢失的分组。如果网络高度可靠,那么在不发差错的情况下,仅在整个文件传送的结尾发送一次确认,从而减少了确认的次数

5、,节省了带宽;不过,即使有单个分组丢失,也需要重传整个文件。(课堂练习)若待发送数据为:1010001101,现要计算CRC校验和。如果我们选G=110101,1)请给出对应的生成多项式G(X)。2)请给出实际发送出去的数据(比特流)。补充题1:试在下列条件下比较电路交换和分组交换。要传送的报文共 x (bit),从源站到目的站共经过 k 段链路,每段链路的传播时延为d 秒,数据率为 b (bit/s)。在电路交换时电路的建立时间为 s 秒。在分组交换时分组长度为 p (bit),且各结点的排队等待时间可忽略不计。问在怎样的条件下,分组交换的时延比电路交换要小?电路交换时延:s+x/b+kd分

6、组交换时延:x/b+kd+(k-1)p/b x/b+kd+(k-1)p/b (k-1)p/b *但前提是:xp, 或分组数大于链路数. 补充题2:在上题的分组交换网中,设报文和分组长度分别为 x 和 (p+h)(bit),其中 p 为分组的数据部分的长度,而 h 为每个分组所带的控制信息固定长度,与 p 的大小无关。通信的两端共经过 k 段链路。链路的数据率为b(bit/s),但传播时延和结点的排队时延均可忽略不计。若打算使总的时延为最小,问分组的数据部分长度 p 应该取多大?(2010考研)在下图所示的采用“存储-转发”方式的分组交换网络中,所有链路的数据传输速率为100Mbps ,分组大小

7、为1000 B,其中分组头大小为 20 B。若主机H1向主机H2发送一个大小为980 000 B的文件,则在不考虑分组拆装时间和传播延迟的情况下,从H1 发送开始到H2接收完为止,至少需要多少时间?b=100Mbps; x=980 000 Bp=(1000-20) B; h=20B; k=3bhpkbhpxD)(1D=80.16 msec分组长度L=1000B=980B+20B分组数N=980000/980=1000发送1个分组的时间Ttran=(1000x8)/(100x106) =8x10-5 secTtotal=N x Ttran+2 x Ttran= 80.16 msec某局域网采用C

8、SMA/CD协议实现介质访问控制,数据传输速率为10Mbps ,主机甲和主机乙之间的距离为2km,信号传播速度是200 000km/s。请回答下列问题,要求说明理由或写出计算过程。(1) 若主机甲和主机乙发送数据时发生冲突,则从开始发送数据时刻起,到两台主机均检测到冲突时刻止,最短需经过多长时间?最长需以过多长时间?(假设主机甲和主机乙发送数据过程中,其他主机不发送数据)(2) 若网络不存在任何冲突与差错主同甲总是以标准的最长以太网数据帧(1518字节)向主同乙发数据主机乙成功收到一个数据帧后立即发送下一个数据帧。此时主机甲的有效数据传输速率是多少?(不考虑以太网帧的前导码)(1)当甲乙同时向

9、对方发送数据时,两台主机均检测到冲突所需时间最短:1km/200000km/s2=110(-5)s当一方发送的数据马上要到达另一方时,另一方开始发送数据,两台主机均检测到冲突所需时间最长:2km/200000km/s2=210(-5)s(2)发送一帧所需时间:1518B/10Mbps=1.2144ms数据传播时间:2km/200 000km/s=110(-5)s=0.01ms有效的数据传输速率=10Mbps1.2144ms/1.2244ms=9.92MbpsChapter 35. A bit string, 0111101111101111110, needs to be transmitte

10、d at the data linklayer.What is the string actually transmitted after bit stuffing?(E)输出:011110111110011111010.6. When bit stuffing is used, is it possible for the loss, insertion, or modification ofa single bit to cause an error not detected by the checksum? If not, why not? If so,how? Does the che

11、cksum length play a role here?(M)可能。假定原来的正文包含位序列01111110 作为数据。位填充之后,这个序列将变成011111010。如果由于传输错误第二个0 丢失了,收到的位串又变成01111110,被接收方看成是帧尾。然后接收方在该串的前面寻找检验和,并对它进行验证。如果检验和是16 位,那么被错误的看成是检验和的16 位的内容碰巧经验证后仍然正确的概率是1/216。如果这种概率的条件成立了,就会导致不正确的帧被接收。显然,检验和段越长,传输错误不被发现的概率会越低,但该概率永远不等于零。15. A bit stream 10011101 is tran

12、smitted using the standard CRC method described in the text. The generator polynomial is x3 + 1. Show the actual bit string transmitted. Suppose the third bit from the left is inverted during transmission. Show that this error is detected at the receivers end.A: The frame is 10011101. The generator

13、is 1001. The message after appending three zeros is 10011101000. The remainder on dividing 10011101000 by 1001 is 100. So, the actual bit string transmitted is 10011101100. The received bit stream with an error in the third bit from the left is 10111101100. Dividing this by 1001 produces a remainder

14、 100, which is different from zero. Thus, the receiver detects the error and can ask for a retransmission. 16. Data link protocols almost always put the CRC in a trailer rather than in a header. Why?(E)CRC是在发送期间进行计算的。一旦把最后一位数据送上外出线路,就立即把CRC编码附加在输出流的后面发出。如果把CRC 放在帧的头部,那么就要在发送之前把整个帧先检查一遍来计算CRC。这样每个字节都

15、要处理两遍,第一遍是为了计算检验码,第二遍是为了发送。把CRC放在尾部就可以把处理时间减半。17. A channel has a bit rate of 4 kbps and a propagation delay of 20 msec. For what range of frame sizes does stop-and-wait give an efficiency of at least 50 percent?(E)当发送一帧的时间等于信道的传播延迟的2倍时,信道的利用率为50%。或者说,当发送一帧的时间等于来回路程的传播延迟时,效率将是50%。而在帧长满足发送时间大于延迟的两倍时,

16、效率将会高于50%。现在发送速率为4Mb/s,发送一位需要0.25微秒。只有在帧长不小于160kb 时,停等协议的效率才会至少达到50%。18. A 3000-km-long T1 trunk is used to transmit 64-byte frames using protocol 5.If the propagation speed is 6 sec/km, how many bits should the sequence numbers be?(M)为了有效运行,序列空间(实际上就是发送窗口大小)必须足够的大,以允许发送方在收到第一个确认应答之前可以不断发送。信号在线路上的传播

17、时间为31. Consider an error-free 64-kbps satellite channel used to send 512-byte dataframes in one direction, with very short acknowledgements coming back the otherway. What is the maximum throughput for window sizes of 1, 7, 15, and 127? Theearth-satellite propagation time is 270 msec.(M )使用卫星信道端到端的传输

18、延迟为270ms,以64kb/s 发送,周期等于604ms。发送一帧的时间为64ms,我们需要604/64=9 个帧才能保持通道不空。对于窗口值1,每604ms 发送4096 位,吞吐率为4096/0.604=6.8kb/s。对于窗口值7,每604ms 发送4096*7 位,吞吐率为4096*7/0.604=47.5kb/s。对于窗口值超过9(包括15、127),吞吐率达到最大值,即64kb/s。32. A 100-km-long cable runs at the T1 data rate. The propagation speed in thecable is 2/3 the speed

19、 of light in vacuum. How many bits fit in the cable?(E)在该电缆中的传播速度是每秒钟200 000km,即每毫秒200km,因此100km 的电缆将会在0.5ms 内填满。T1 速率125 微秒传送一个193 位的帧,0.5ms 可以传送4 个T1 帧,即193*4=772bit。Chapter 43. Consider the delay of pure ALOHA versus slotted ALOHA at low load. Whichone is less? Explain your answer.(E)对于纯的ALOHA,发送

20、可以立即开始。对于分隙的ALOHA,它必须等待下一个时隙。这样,平均会引入半个时隙的延迟。因此,纯ALOHA 的延迟比较小。16. What is the baud rate of the standard 10-Mbps Ethernet?(E )以太网使用曼彻斯特编码,这就意味着发送的每一位都有两个信号周期。标准以太网的数据率为10Mb/s,因此波特率是数据率的两倍,即20MBaud。19. A 1-km-long, 10-Mbps CSMA/CD LAN (not 802.3) has a propagation speed of200 m/sec. Repeaters are not

21、allowed in this system. Data frames are 256 bits long,including 32 bits of header, checksum, and other overhead. The first bit slot after asuccessful transmission is reserved for the receiver to capture the channel in orderto send a 32-bit acknowledgement frame. What is the effective data rate, excl

22、udingoverhead, assuming that there are no collisions?(M)依题知一公里的在铜缆中单程传播时间为1/200000=510-6 s=5 usec,往返传播时间为2t =10 usec,一次完整的传输分为6步:发送者侦听铜缆时间为10usec,若线路可用发送数据帧传输时间为256 bits / 10Mbps = 25.6 usec数据帧最后一位到达时的传播延迟时间为5.0usec接收者侦听铜缆时间为10 usec,若线路可用接收者发送确认帧用时3.2 usec确认帧最后一位到达时的传播延迟时间为5.0 usec总共58.8sec,在这期间发送了2

23、24 bits 的数据,所以数据传输率为3.8 Mbps.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?(E)对于1km 电缆,单程传播时间为1/200000=510-6 s=5微秒 ,往返传播时间为2t=10 微秒。为了能够按照CSMA/CD 工作,最小帧的发射时间不能小于10 微秒。以1Gb

24、/s速率工作,10 可以发送的比特数等于:(10*10-6)/(1*10-9)=10000因此,最小帧是10000 bit = 1250字节长。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?(E)最小的以太网帧是64 bytes,包含了以太网地址帧头,类型/长度域,以及校验和。由于帧

25、头域占用18 bytes,并且分组是60 bytes,总帧长是78 bytes,这已经超过了64-byte 的最小限制。因此,不必再填充 z 了。23. Ethernet frames must be at least 64 bytes long to ensure that the transmitter isstill going in the event of a collision at the far end of the cable. Fast Ethernet has thesame 64-byte minimum frame size but can get the bits

26、out ten times faster. How is itpossible to maintain the same minimum frame size?(E)将快速以太网的电缆长度至为以太网的1/10即可。24. Some books quote the maximum size of an Ethernet frame as 1518 bytes instead of 1500 bytes. Are they wrong? Explain your answer.(E)以太网一帧中数据占用是1500 bytes,但是把目的地地址,源地址,类型/长度域以及校验和域也算上,帧总长就为15

27、18 bytes26. How many frames per second can gigabit Ethernet handle? Think carefully and take into account all the relevant cases. Hint: the fact that it is gigabit Ethernet matters.(E)最小的以太网帧是64bytes = 512 bits,所以依题1 Gbps 的带宽可得1,953,125 =2*106 frames/sec,然而,这只是在充满最小的帧时是这样,如果没有充满帧,填充短帧至4096 bits,这时每秒

28、处理的帧的最大数量为244,140 bytes,对于最大的帧长12,144 bits,每秒处理的帧的最大数量为82,345 frames/sec.28. In Fig. 4-27, four stations, A, B, C, and D, are shown. Which of the last two stations do you think is closest to A and why?(E)站C最接近 A。因为C最先听到A发出的RTS并且通过插入一个NAV信号作为回应。D 对其没有回应,说明它不在A的频率范围内。29. Suppose that an 11-Mbps 802.11

29、b LAN is transmitting 64-byte framesback-to-back over a radio channel with a bit error rate of 10-7. How many framesper second will be damaged on average?(E)一帧是64bytes=512 bits,位出错率为p=10-7 ,所有512 位正确到达的概率为(1- p)512 = 0.9999488,所以帧被破坏的概率约为5*10-5,每秒钟发送的帧数为11*106/512 = 21,484frames/sec ,将上两个数乘一下,大约每秒钟有

30、一帧被破坏。30. An 802.16 network has a channel width of 20 MHz. How many bits/sec can be sent to a subscriber station?(E)这取决于离子站有多远。如果子站就在附近,那么使用QAM-64 可得带宽120Mbps;中等距离时,使用QAM-16 可得带宽80 Mbps;远程距离,QPSK 可得带宽40 Mbps.(原题给出的是 20mhz 的带宽,要求的是数据率,按照前面的 Nyquist定理,最大数据率应该是: 2HlogN,但是答案没有乘以 2。)31. IEEE 802.16 suppo

31、rts four service classes.Which service class is the best choice for sending uncompressed video?(E)未压缩的视频有一个固定的位速率。每帧都有与前一帧相同的点数量,因此,可能要准确计算需要的带宽。最后,最好选用固定位速率服务。Chapter 51. Give two example computer applications for which connection-oriented serviceis appropriate. Now give two examples for which conn

32、ectionless service is best.(E)文件传送、远程登录和视频点播需要面向连接的服务。另一方面,信用卡验证和其他的销售点终端、电子资金转移,以及许多形式的远程数据库访问生来具有无连接的性质,在一个方向上传送查询,在另一个方向上返回应答。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 h

33、ave 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

34、 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?( H)4 跳意味着引入了5个路由器。实现虚电路需要在1000 秒内固

35、定分配5*8=40 字节的存储器。实现数据报需要比实现虚电路多传送的头信息的容量等于(15-3 )42009600 字节-跳段。现在的问题就变成了40000 字节-秒的存储器对比9600 字节-跳段的电路容量的开销。如果存储器的使用期为两年,即360085522=1.5107 秒,一个字节-秒的代价为1/( 1.5107)= 6.710-8 分,那么40000 字节-秒的代价为2.7 毫分。另一方面,1 个字节-跳段代价是10-6 分,9600 个字节-跳段的代价为10-69600=9.610-3 分,即9.6 毫分,即在这1000 秒内的时间内便宜大约6.9 毫分。7. Consider t

36、he network of Fig. 5-7, but ignore the weights on the lines. Supposethat it uses flooding as the routing algorithm. If a packet sent by A to D has amaximum hop count of 3, list all the routes it will take. Also tell how many hopsworth of bandwidth it consumes.(E )所有的路由选择如下: ABCD, ABCF, ABEF, ABEG, A

37、GHD, AGHF, AGEB, andAGEF,所以总跳数为2410. If delays are recorded as 8-bit numbers in a 50-router network, and delayvectors are exchanged twice a second, how much bandwidth per (full-duplex) line ischewed up by the distributed routing algorithm? Assume that each router has threelines to other routers.(E )

38、路由表的长度等于8*50=400bit。该表每秒钟在每条线路上发送2 次,因此400*2=800b/s,即在每条线路的每个方向上消耗的带宽都是800 bps。17. In Fig. 5-20, do nodes H or I ever broadcast on the lookup shown starting at A?(E)在d中,E,H,I接收到了广播信息之后阴影节点是新的接收节点;箭头显示了可能的逆向路由路径。H 收到分组A后,它广播A;然而,I知道了如何到达I,所以I不广播收到的分组。18. Suppose that node B in Fig. 5-20 has just rebo

39、oted and has no routinginformation in its tables. It suddenly needs a route to H. It sends out broadcasts withTTL set to 1, 2, 3, and so on. How many rounds does it take to find a route?(E)从结点B到H 需要3跳,因此要花3圈来找到路由线路。24. Give an argument why the leaky bucket algorithm should allow just one packet per

40、tick, independent of how large the packet is.(M )通常计算机能够以很高的速率产生数据,网络也可以用同样的速率运行。然而,路由器却只能在短时间内以同样高的速率处理数据。对于排在队列中的一个分组,不管它有多大,路由器必须做大约相同分量的工作。显然,处理10 个100 字节长的分组所作的工作比处理1 个1000 字节长的分组要做的工作多得多。25. The byte-counting variant of the leaky bucket algorithm is used in a particularsystem. The rule is that

41、 one 1024-byte packet, or two 512-byte packets, etc., may besent on each tick. Give a serious restriction of this system that was not mentioned inthe text.(E)不可以发送任何大于1024 字节的分组。28. Imagine a flow specification that has a maximum packet size of 1000 bytes, atoken bucket rate of 10 million bytes/sec,

42、 a token bucket size of 1 million bytes, anda maximum transmission rate of 50 million bytes/sec. How long can a burst atmaximum speed last?(E)令最大突发时间长度为 t 秒。在极端情况下,漏桶在突发期间的开始是充满的(1MB),这期间数据流入桶内10 t MB,流出包含50 t MB,由等式1+10 t=50t,得到 t=1/40s,即25ms。因此,以最大速率突发传送可维持25ms 的时间。32. Is fragmentation needed in c

43、oncatenated virtual-circuit internets or only in datagram systems?(E )都需要分割功能。即使是在一个串接的虚电路网络中,沿通路的某些网络可能接受1024 字节分组,而另一些网络可能仅接受48字节分组,分割功能仍然是需要的。33. Tunneling through a concatenated virtual-circuit subnet is straightforward:the multiprotocol router at one end just sets up a virtual circuit to the ot

44、her end andpasses packets through it. Can tunneling also be used in datagram subnets? If so,how?(E)可以。只需把分组封装在属于所经过的子网的数据报的载荷段中,并进行发送。34. Suppose that host A is connected to a router R 1, R 1 is connected to another router, R 2, and R 2 is connected to host B. Suppose that a TCP message that contain

45、s 900 bytes of data and 20 bytes of TCP header is passed to the IP code at host A for delivery to B. Show the Total length, Identification, DF, MF, and Fragment offset fields of the IP header in each packet transmitted over the three links. Assume that link A-R1 can support a maximum frame size of 1

46、024 bytes including a 14-byte frame header, link R1-R2 can support a maximum frame size of 512 bytes, including an 8-byte frame header, and link R2-B can support a maximum frame size of 512 bytes including a 12-byte frame header.(M)在I1 最初的IP数据报会被分割成两个IP数据报,以后不会再分割了。链路A-R1:Length = 940; ID = x; DF =

47、0; MF = 0; Offset = 0链路R1-R2:(1) Length = 500; ID = x; DF = 0; MF = 1; Offset = 0(2) Length = 460; ID = x; DF = 0; MF = 0; Offset = 60链路R2-B:(1) Length = 500; ID = x; DF = 0; MF = 1; Offset = 0(2) Length = 460; ID = x; DF = 0; MF = 0; Offset = 6036An IP datagram using the strict source routing optio

48、n has to be fragmented. Do you think the option iscopied into each fragment, or is it sufficient to just put it in the first fragment? Explain your answer.Since the information is needed to route every fragment, the option must appear in every fragment.38Convert IP address whose hexadecimal notation

49、 is C22F1582 to dotted decimal notation?The address is 194.47.21.130.39A network on the Internet has a subnet mask of 255.255.240.0. What is the maximum number ofhosts it can handle?The mask is 20 bits long, so the network part is 20 bits. The remaining 12 bits are for the host, so 4096 host addresses exist.40. A large number of consecutive IP address are available starting at 198.16.0.0.Suppose that four organizations, A, B, C, and D, request 4000, 2000, 4000, and 8000 addresses, respectively, and in that order. For each of these, g

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报