《计算机网络(第四版)》习题答案
《计算机⽹络(第四版)》习题答案
计算机⽹络(第四版) 习题答案
第 1 章概述
1-3 The performance of a client-server system is influenced by two network factors: the bandwidth of the network (how many bits/sec it can transport) and the latency (how many seconds it takes for the first bit to get from the client to the server). Give an example of a network that exhibits high bandwidth and high latency. Then give an example of one with low bandwidth and low latency.
客户-服务器系统的性能会受到两个⽹络因素的影响:⽹络的带宽(每秒可以传输多少位数
据)和延迟(将第⼀个数据位从客户端传送到服务器端需要多少秒时间)。请给出⼀个⽹络的例⼦,它具有⾼带宽和⾼延迟。然后再给出另⼀个⽹络的例⼦,它具有低带宽和低延迟。
答:横贯⼤陆的光纤连接可以有很多千兆位/秒带宽,但是由于光速度传送要越过数千公⾥,时延将也⾼。相反,使⽤56 kbps 调制解调器呼叫在同⼀⼤楼内的计算机则有低带宽和较低的时延。
1-4 Besides bandwidth and latency, what other parameter is needed to give a good characterization of the quality of service offered by a network used for digitized voice traffic?
接收频道信息失败除了带宽和延迟以外,针对数字化的语⾳流量,想要让⽹络提供很好的服务质量,还需要哪个参数?
声⾳的传输需要相应的固定时间,因此⽹络时隙数量是很重要的。传输时间可以⽤标准偏差⽅式表⽰。实际上,短延迟但是⼤变化性⽐更长的延迟和低变化性更糟。
1-6 A client-server system uses a satellite network, with the satellite at a height of 40,000 km. What is the best-case delay in response to a request?
⼀个客户-服务器系统使⽤了卫星⽹络,卫星的⾼度为40000km。在对⼀个请求进⾏响应的时候,最佳情形下的延迟是什么?
答:由于请求和应答都必须通过卫星,因此传输总路径长度为160,000千⽶。在空⽓和真空中的光速为300,000 公⾥/秒,因此最佳的传播延迟为160,000/300,000秒,约533 msec。
1-9 A group of 2n - 1 routers are interconnected in a centralized binary tree, with a router at each tree node. Router i communicates with router j by sending a message to the root of the tree. The root then sends the message back down to j. Derive an approximate expression for the mean number of hops per message for large n, assuming that all router pairs are equally likely.
在⼀个集中式的⼆叉树上,有2n-1个路由器相互连接起来;每个树节点上都有⼀个路由器。路由器i为了
与路由器j进⾏通信,它要给树的根发送⼀条信息。然后树根将消息送下来给j。假设所有的路由器都是等概率出现的,请推导出当n很⼤时每条消息的平均跳数的⼀个近似表达式。
答:这意味着,从路由器到路由器的路径长度相当于路由器到根的两倍。若在树中,根深度为1,深度为n,从根到第n层需要n-1跳,在该层的路由器为0.50(50%)。
从根到n-1 层的路径的路由器为0.25(25%)和n--2跳步。因此,路径长度l为:
表达式归约为 l=n-2,平均的路由器到路由器路径为2n-4。
1-11 What are two reasons for using layered protocols?
请说出使⽤分层协议的两个理由?
答:通过协议分层可以把设计问题划分成较⼩的易于处理的⽚段。分层意味着某⼀层协议的改变不会影
响⾼层或低层的协议。
1-13 What is the principal difference between connectionless communication and connection-oriented communication?
在⽆连接通信和⾯向连接的通信⼆者之间,最主要的区别是什么?
答:主要的区别有两条。
其⼀:⾯向连接通信分为三个阶段,第⼀是建⽴连接,在此阶段,发出⼀个建⽴连接的请求。只有在连接成功建⽴之后,才能开始数据传输,这是第⼆阶段。接着,当数据传输完毕,必须释放连接。⽽⽆连接通信没有这么多阶段,它直接进⾏数据传输。
其⼆:⾯向连接的通信具有数据的保序性,⽽⽆连接的通信不能保证接收数据的顺序与发送数据的顺序⼀致。
1-14 Two networks each provide reliable connection-oriented service. One of them offers a reliable byte stream and the other offers a reliable message stream. Are these identical? If so, why is the distinction made? If not, give an example of how they differ.
两个⽹络都可以提供可靠的⾯向连接的服务。其中⼀个提供可靠的字节流,另⼀个提供可靠的报⽂流。这⼆者是否相同?如果你认为相同的话,为什么要有这样的区别?如果不相同,请给出⼀个例⼦说明它们如何不同。
答:不相同。在报⽂流中,⽹络保持对报⽂边界的跟踪;⽽在字节流中,⽹络不做这样的跟踪。例如,⼀个进程向⼀条连接写了1024 字节,稍后⼜写了另外1024 字节。那么接收⽅共读了2048 字节。对于报⽂流,接受⽅将得到两个报⽂。每个报⽂1024 字节。⽽对于字节流,报⽂边界不被识别。接收⽅把全部的2048 个字节当作⼀个整体,在此已经体现不出原先有两个报⽂的事实。
1-17 In some networks, the data link layer handles transmission errors by requesting damaged frames to be retransmitted. If the probability of a frame's being damaged is p, what is the mean number of transmissions required to send a frame? Assume that acknowledgements are never lost.
在有些⽹络中,数据链路层处理传输错误的做法是,请求重传被损坏的帧。如果⼀帧被损坏的概率为p,那么发送⼀帧所需要的平均传输次数是多少?假设确认帧永远不会丢失。
帧请求正好是k次的概率Pk,就是起初的k-1次尝试都失败的概率。 pk-1 , 乘以第k次传输成功的概率。平均传输次数就是
1-22 What is the main difference between TCP and UDP?
TCP和UDP之间最主要的区别是什么?
TCP 是⾯向连接的,⽽UDP 是⼀种数据报服务。
1-25 When a transferred between two computers, two acknowledgement strategies are possible. In the first one, the chopped up into packets, which are individually acknowledged by the receiver, but the as a whole is not acknowledged. In the second one, the packets are not acknowledged individually, but the entire acknowledged when it arrives. Discuss these two approaches.
当⼀个⽂件在两台计算机之间传输的时候,可能会有两种不同的确认策略。在第⼀种策略中,该⽂件被分解成许多个分组,接收⽅会独⽴地确认每⼀个分组,但是⽂件传输过程作为整体并没有被确认。在第⼆种策略中,这些分组并没有被单独地确认,但是当整个⽂件到达的时候,它会被确认。请讨论这两种⽅案。
如果⽹络容易丢失分组,那么对每⼀个分组逐⼀进⾏确认较好,此时仅重传丢失的分组。⽽在另⼀⽅⾯,如果⽹络⾼度可靠,那么在不发差错的情况下,仅在整个⽂件传送的结尾发送⼀次确认,从⽽减少了确认的次数,节省了带宽;不过,即使有单个分组丢失,也需要重传整个⽂件。
1-27 How long was a bit on the original 802.3 standard in meters? Use a transmission speed of 10 Mbps and assume the propagation speed in coax is 2/3 the speed of light in vacuum.
在原始的802.3标准中,⼀位是多长(按⽶来计算)?请使⽤10Mbps的传输速率,并且假设同轴电缆的传播速度是真空中光速的2/3.
波在同轴电缆中的速度是⼤约200,000 km/sec, 即200 m/µsec. 在10 Mbps, 传输⼀位需要
0.1µsec。因此, 这个位在时间上持续0.1µsec, 在此期间传播20 meters。因此,这⾥的⼀位是20⽶。
1-28 An image is 1024 x 768 pixels with 3 bytes/pixel. Assume the image is uncompressed. How long does it take to transmit it over a 56-kbps modem channel? Over a 1-Mbps cable modem? Over a 10-Mbps Ethernet? Over 100-Mbps Ethernet?
⼀幅图像的分辨率为1024×768像素,每个像素⽤3字节来标识。假设该图像没有被压缩。请问,通过56kbps的调制解调器信道来传输这幅图像需要多长时间?通过1Mbps的电缆调制解调器(cable modem)呢?通过10Mbps的因特⽹呢?通过100Mbps 的因特⽹呢?
图像是1024×768× 3 bytes或2,359,296 bytes. 就是18,874,368 bits. 在56,000 bits/sec速度下, 传输需要⼤约337.042 sec. 在1,000,000 bits/sec,需要⼤约18.874 sec. 在10,000,000 bits/sec, 需要⼤约1.887 s
ec. 在100,000,000 bits/sec, 需要⼤约0.189 sec.
1-30 Wireless networks are easy to install, which makes them inexpensive since installation costs usually far overshadow equipment costs. Nevertheless, they also have some disadvantages. Name two of them.
⽆线⽹络很容易安装,这使得它们并不⾮常昂贵。因为安装费⽤通常会占去整个设备费⽤的很⼤⽐例。然⽽,它们也有⼀些缺点。请说出两个缺点。
⼀个缺点是安全性。每个碰巧在此房屋内的随机发送者都能在⽹络上监听。另⼀个缺点是可靠性。⽆线⽹络造成⼤量错误。第三个潜在的问题是电池寿命,因为多数⽆线设备倾向于可移动性。
1-31 List two advantages and two disadvantages of having international standards for network protocols.
请列举出⽹络协议国际标准化的两个优点和缺点。
优点1:如果每个⼈都使⽤标准,那么每个⼈都可以与其他任何⼈交流;优点2:⼴泛使⽤标准将导致规模经济,⽐如⽣产⼤规模集成电路芯⽚。缺点1:为了取得标准化所需要的政治妥协经常会导致差的标准;缺点2:⼀旦标准被⼴泛采⽤了,要对它再做改变就会⾮常困难,即使发现了新的更好的技术或⽅
法,也难以替换。
第 2 章物理层
2-2 A noiseless 4-kHz channel is sampled every 1 msec. What is the maximum data rate?
⼀条⽆噪声4kHz信道按照每1ms⼀次进⾏采样,请问最⼤数据传输率是多少?
答:⽆噪声信道最⼤数据传输率公式:最⼤数据传输率=2Hlog2V b/s。因此最⼤数据传输率决定于每次采样所产⽣的⽐特数,如果每次采样产⽣16bits,那么数据传输率可达128kbps;如果每次采样产⽣1024bits,那么可达8.2Mbps。注意这是对⽆噪声信道⽽⾔的,实际信道总是有噪声的,其最⼤数据传输率由⾹农定律给出。
2-3 Television channels are 6 MHz wide. How many bits/sec can be sent if four-level digital signals are used? Assume a noiseless channel.
电视频道的带宽是6MHz。如果使⽤4级数字信号,则每秒钟可以发送多少位?假设电视频道为⽆噪声信道。
答:采样频率12MHz,每次采样2bit,总的数据率为24Mbps。
2-4 If a binary signal is sent over a 3-kHz channel whose signal-to-noise ratio is 20 dB, what is the maximum achievable data rate?
如果在⼀条3kHz信道上发送⼀个⼆进制信号,该信道的信噪⽐为20dB,则最⼤可达到的数据传输率为多少?
答:信噪⽐为20 dB 即 S/N =100.由于 log2101≈6.658,由⾹农定理,该信道的信道容量为
3log2(1+100)=19.98kbps。
⼜根据乃奎斯特定理,发送⼆进制信号的3kHz 信道的最⼤数据传输速率为
2*3 log22=6kbps。
所以可以取得的最⼤数据传输速率为6kbps。
2-5 What signal-to-noise ratio is needed to put a T1 carrier on a 50-kHz line?
在50kHz的线路上使⽤T1线路需要多⼤的信噪⽐?
答:为发送T1 信号,我们需要
所以,在50kHz 线路上使⽤T1 载波需要93dB 的信噪⽐。
2-7 How much bandwidth is there in 0.1 micron of spectrum at a wavelength of 1 micron?
在1µm波长上,在0.1µm的频段中有多少带宽?
答:
因此,在0.1的频段中可以有30THz。
2-8 It is desired to send a sequence of computer screen images over an optical fiber. The screen is 480 x 640 pixels, each pixel being 24 bits. There are 60 screen images per second. How much bandwidth is needed, and how many microns of wavelength are needed for this band at 1.30 microns? 现需要在⼀条光纤发送⼀系列计算机屏幕图像,屏幕的分辨率为
480×640像素,每个像素为24位。每秒钟有60幅屏幕图像。请问,需要多少带宽?在1.30µm波长上,这段带宽需要多少µm的波长?
答:数据速率为480×640×24×60bps,即442Mbps。
需要442Mbps 的带宽,对应的波长范围是。
2-18 A simple telephone system consists of two end offices and a single toll office to which each end office is connected by a 1-MHz full-duplex trunk. The average telephone is used to make four calls per 8-hour workday. The mean call duration is 6 min. Ten percent of the calls are long-distance (i.e., pass t
hrough the toll office). What is the maximum number of telephones an end office can support? (Assume 4 kHz per circuit.)
⼀个简单的电话系统包括两个端局和⼀个长途局,每个端局通过⼀条1MHz全双⼯⼲线连接到长途局。在每8⼩时的⼯作⽇中,平均每部电话有4次呼叫,每次呼叫平均6分钟,10%的呼叫是长途(即通过长途局)。请问⼀个端局能够⽀持最多多少部电话?(假设每条线路为4kHz)答:每部电话每⼩时做0.5 次通话,每次通话6 分钟。因此⼀部电话每⼩时占⽤⼀条电路3 分钟,60/3=20,即20 部电话可共享⼀条线路。由于只有10%的呼叫是长途,所以200 部电话占⽤⼀条完全时间的长途线路。局间⼲线复⽤了1000000/4000=250 条线路,每条线路⽀持200 部电话,因此,⼀个端局可以⽀持的电话部数为
200*250=50000。
2-22 A modem constellation diagram similar to Fig. 2-25 has data points at the following coordinates: (1, 1), (1, -1), (-1, 1), and (-1, -1). How many bps can a modem with these parameters achieve at 1200 baud?
⼀个类似于图2.25的调制解调器星座图有以下⼏个坐标点(1,1)、(1,-1)、(-1,1)、(-1,-1)。请问⼀个具备这些参数的调制解调器在1200波特上可以达到多少bps?
每个波特有4 个合法值,因此⽐特率是波特率的两倍。对应于1200 波特,数据速率是
2400bps。
2-28 Ten signals, each requiring 4000 Hz, are multiplexed on to a single channel using FDM. How
400 Hz wide.
有10个信号,每个都要求4000Hz,现在⽤FDM将它们复⽤在⼀条信道上。对于被复⽤的信道,最⼩要求多少带宽?假设防护频段为400Hz宽。
有10个4000Hz信号。我们需要9个防护频段来避免⼲扰。最⼩带宽需求是4000×10+400×9 =43,600 Hz.
2-29 Why has the PCM sampling time been set at 125 µsec?
答:125的采样时间对应于每秒8000 次采样。⼀个典型的电话通道为4kHz。根据奈奎斯特定理,为获取⼀个4kHz 的通道中的全部信息需要每秒8000 次的采样频率。
(实际上额定带宽稍有些少,截⽌点并不清晰)
2-30 What is the percent overhead on a T1 carrier; that is, what percent of the 1.544 Mbps are not deli
vered to the end user?
每⼀帧中,端点⽤户使⽤193 位中的168(7*24)位,开销占25(=193-168)位,因此开销⽐例等于25/193=13%。
2-33 What is the difference, if any, between the demodulator part of a modem and the coder part of a codec? (After all, both convert analog signals to digital ones.)
答:有。编码器接受任意的模拟信号,并从它产⽣数字信号。⽽解调器仅仅接受调制了的正弦(或余弦)波,产⽣数字信号。2-34 A signal is transmitted digitally over a 4-kHz noiseless channel with one sample every 125 µsec. How many bits per second are actually sent for each of these encoding methods?
(a) CCITT 2.048 Mbps standard. (b) DPCM with a 4-bit relative signal value. (c) Delta modulation.
答:a.CCITT 2.048Mbps 标准⽤32 个8 位数据样本组成⼀个125的基本帧,30 个信道⽤于传信息,2 个信道⽤于传控制信号。在每⼀个4kHz 信道上发送的数据率就是
8*8000=64kbps。
b.差分脉码调制(DPCM)是⼀种压缩传输信息量的⽅法,它发送的不是每⼀次抽样的⼆进
道实际发送的⽐特速率为4*8000=32bps。
c.增量调制的基本思想是:当抽样时间间隔s t 很短时,模拟数据在两次抽样之间的变化很⼩,可以选择⼀个合适的量化值?作为阶距。把两次抽样的差别近似为不是增加⼀个?就是减少⼀个? 。这样只需⽤1bit ⼆进制信息就可以表⽰⼀次抽样结果,⽽不会引⼊很⼤误差。因此,此时对应每个4kHz 信道实际发送的数据速率为1*8000=8kHz。
2-39What is the essential difference between message switching and packet switching?
信息交换发送到数据单元可以是任意长度。分组交换有最⼤报⽂⼤⼩限制,任何⼤于限制的信息将被拆分成多个报⽂。
2-41 Three packet-switching networks each contain n nodes. The first network has a star topology with a central switch, the second is a (bidirectional) ring, and the third is fully interconnected, with a wire from every node to every other node. What are the best-, average-, and-worst case transmission paths in hops?
三个分组交换⽹络每个包含n个节点。第⼀个⽹络是⼀个星型拓扑结构,有⼀个中⼼交换机;第⼆个⽹络是⼀个双向环;第三个⽹络是⼀个全连接结构,从任何⼀个节点到其他的节点都有⼀条线路。请问从传输路径的跳数来看,哪个最好?其次?最差?
答:The three networks have the following properties:
星型:最好为2,最差为2,平均为2;
环型:最好为1,最差为n/2,平均为n/4
如果考虑n 为奇偶数,
则n 为奇数时,最坏为(n-1)/2,平均为(n+1)/4

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。