计算机网络(自顶向下方法)第四版答案(中文版)3chapter
- 格式:doc
- 大小:264.00 KB
- 文档页数:20
计算机网络(第四版) 习题答案第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?除了带宽和延迟以外,针对数字化的语音流量,想要让网络提供很好的服务质量,还需要哪个参数?声音的传输需要相应的固定时间,因此网络时隙数量是很重要的。
物流信息技术复习秘籍TG与其他同学联合出品目录一、《物流信息技术》 (2)条码技术 (2)RFID (4)GPS (5)二、《计算机网络》 (7)第一章 (7)第二章 (7)第三章 (8)第四章 (9)第五章 (10)三、《计算机网络》补充题 (11)第一章 (11)第二章 (15)第三章 (19)第四章 (21)第五章 (25)人员分工: ...................................................... 错误!未定义书签。
一、《物流信息技术》条码技术书本第二章习题1选择题:(1)下列不属于一维条码制是 DA、交叉25码B、EANC、库德巴吗D、49码(3) A 码是美国统一代码委员会制定的一种商品用条码,主要是用于美国和加拿大地区。
A、UPCB、EANC、39D、93(4) A 二维条码形态上是由多行短截的一维条码堆叠而成,它在编码设计、校验原理、识读方式等方面继承了一维条码的一些特点,识读设备与条码印刷与一维条码技术兼容。
A、堆叠式/行排式B、矩阵式C、图像式D、数字式(6)从系统结构和功能上讲,条码识读系统由 D 等部分组成。
A、条码扫描和译码B、光学系统和探测器C、信号放大、滤波、波形整形D、扫描系统、信号整形、译码(7) B 可以识读常用的一维条码,还能识读行排式和矩阵式的二维条码。
A、光笔B、图形式条码识读器C、卡槽式条码识读器D、激光条码识读器(8)条码的编码方法中, A 是指条码符号中,条与空是由标准宽度的模块组合而成。
A、模块组合法B、宽度调节法C、矩阵法D、堆叠法2简答题(2)列举一维条码的主要码制。
一维条码的主要码制:UPC码 EAN码 25码交叉25码 39码库德巴码 128码以及93码(3)简述一维条码的结构。
一维条码的结构:一个完整的一维条码的组成次序依次为:静区(前)、起始符、中间分隔符、校验符、终止符静区(后)。
(4)简述条码识别系统的组成条码识别系统的组成:从系统结构和功能上讲,条码识读系统由扫描系统、信号整形、译码等部分组成。
专业.专注 .。
Chapl: l 、描述in te rn e t 的方法:一种是描述 internet 的具体构成,也就是构成 interne t 的硬件和软件 。
另一种是根据为分布式应用提供服务联网基础设施来描述的。
协议概念: 协议定义了在两个或多个通信实体 之间交换的报文格式和改序 , 以及在报文传输 和接收或其它事件方面所采取的确 3、因特网的面向连接服务包括可靠数据传送 、流控制和拥塞控制。
可靠数据传送 :指一个应用程序能够依赖该连接无差错的和按顺序传递其所有数据。
流控制:确保连接的任何一方都不会过快的发送过量的分组而淹没另一方 。
拥塞控制:有助于防止因特网进入迟滞状态 。
4 、In terne t protocol s t ack口application 应用层:suppor 寸的g network applications 报文 FTP, SMTP,HTTP口transport 运输层;process -process data transfer 报文段 ·:·TC P ,UDP口network 网络层: rout i ng of datagrams from source to destinat i on 数据报 ·:·I P , ro u ting protocols口l i nk 链路层:“t a transfer betwe e n ne i g h boring network e lem e nts 帧 ·:·PPP, Ethernet口phys i cal 物理层:b i ts ”on the w i re"cbap2 应用层l 、3 种主流体系结构 :客户机/服务器结构: P2P 体系结构:两者混合的结构2、web 的应用层协议是 HTTP OfyperText Transfer Protocol ),使用 TCP 而不是 UDP 作为底层传输协议3、TCP 握手方式 :客户机发送一个小 TCP 报文段到服务器 ,服务器用一个小 TCP 报文段确认和响应,最后,客户机向服务器返回确认。
ANDREW S. TANENBAUM 秒,约533 msec.----- COMPUTER NETWORKS FOURTH EDITION PROBLEM SOLUTIONS 8. A collection of five routers is to be conn ected in a poi nt-to-poi nt sub net.Collected and Modified By Yan Zhe nXing, Mail To: Betwee n each pair of routers, the desig ners may put a high-speed line, aClassify: E aEasy, M ^Middle, H Hard , DaDeleteGree n: Importa nt Red: Master Blue: VI Others:Know Grey:—Unnecessary ----------------------------------------------------------------------------------------------ML V Chapter 1 In troductio nProblems2. An alter native to a LAN is simply a big timeshari ng system with termi nals forall users. Give two adva ntages of a clie nt-server system using a LAN.(M)使用局域网模型可以容易地增加节点。
如果局域网只是一条长的电缆,且不会因个别的失效而崩溃(例如采用镜像服务-------------------------------------------器)的情况下,使用局域网模型会更便宜。
Chapter 3 Transport Layer1.One of the main duties of the transport layer is to provide ____________ communication.A) node-to-nodeB) host-to-hostC) process-to-processD) None of the choices are correct2.A client program normally uses ____________ port number. A server program normally uses __________ port number.A) a well-known; an ephemeralB) an ephemeral; a well-knownC) a private; a well-knownD) None of the choices are correct3.A socket address is a combination of __________.A) A MAC address and a logical addressB) A MAC address and a port numberC) a user-specific address and a logical addressD) None of the choices are correct4.______________ means accepting items from more than one source. ______________ means delivering items to more than one source.A) Demultiplexing; MultiplexingB) Multiplexing; DemultiplexingC) Encapsulation; DecapsulationD) Pulling; Pushing5.________ means the producer delivers the items when they are produced. _______ means the consumer takes the items when it is ready to do so.A) Pushing; pullingB) Pulling; pushingC) Forwarding; acceptingD) None of the choices are correct6.In the stop-and-wait protocol, the maximum send window size is ______ and the maximum receive window size is _______ where m is the number of bits in the sequence.A) 1; 1B) 2m; – 1C) 1; 2mD) 2m; 2m7.In the Go-Back-N protocol, the maximum send window size is ______ and the maximum receivewindow size is _______, where m is related to the number of bits in the sequence. number.A) 1; 1B) 1; 2mC) 2m – 1; 1D) 2m – 1; 2m – 18.In the selective-repeat protocol, the maximum send window size is ______ and the maximum receive window size is _______, where m is the number of bits in the sequence.A) 1; 1B) 1; 2m – 1C) 2m – 1; 1D) 2m – 1; 2m – 19.UDP is a ________________ transport protocol.A) connectionless, reliableB) connection-oriented, unreliableC) connectionless, unreliableD) None of the choices are correct10.UDP is an acronym for _______.A) User Delivery ProtocolB) User Datagram ProcedureC) User Datagram ProtocolD) None of the choices are correct11.At the transport layer, to define the processes, we need two identifiers called ____________.A) logical addressesB) physical addressesC) port addressesD) None of the choices are correct12.The ports ranging from 0 to 1,023 are called the ___________ ports. The ports ranging from 1,024 to 49,151 are called ___________ ports. The ports ranging from 49,152 to 65,535 are called the ___________ ports.A) well-known; registered; dynamic or privateB) registered; dynamic or private; well-knownC) private or dynamic; well-known; registeredD) private or dynamic; registered; well-known13.UDP and TCP are two protocols at the ___________ layer.A) data linkB) networkC) transportD) application14.Which of the following functions are performed by UDP?A) process-to-process communicationB) host-to-host communicationC) node-to-node communicationD) None of the choices are correct15.A port number is _______ bits long.A) 8B) 16C) 32D) 6416.Which of the following does UDP provide?A) flow controlB) connection-oriented deliveryC) error controlD) None of the choices are correct17.The source port number on the UDP user datagram header defines _______.A) the sending computerB) the receiving computerC) the process running on the sending computerD) None of the choices are correct18.To use the services of UDP, we need ________ socket addresses.A) fourB) twoC) threeD) None of the choices are correct19.UDP packets are called __________ .A) user datagramsB) segmentsC) framesD) None of the choices are correct20.UDP packets have a fixed-size header of _______ bytes.A) 16B) 8C) 40D) 3221.TCP is a __________ protocol.A) byte-orientedB) message-orientedC) block-orientedD) None of the choices are correct22.TCP groups a number of bytes together into a packet called a ___________.A) user datagramB) segmentC) datagramD) None of the choices are correct23.TCP is a(n) ___________ protocol.A) connection-orientedB) connectionlessC) both connection-oriented and connectionlessD) None of the choices are correct24.TCP is a(n) _______ transport protocol.A) unreliableB) best-effort deliveryC) reliableD) None of the choices are correct25.TCP uses _________________ to check the safe and sound arrival of data.A) an acknowledgment mechanismB) out-of-band signalingC) the services of another protocolD) None of the choices are correct26.The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a __________________.A) 0B) 1C) randomly generated numberD) None of the choices are correct27.In TCP, the sequence number for each segment is the number of the _______ byte (virtual byte) carried in that segment.A) firstB) lastC) middleD) None of the choices are correct28.Communication in TCP is ___________.A) simplexB) half-duplexC) full-duplexD) None of the choices are correct29.In TCP, the value of the acknowledgment field in a sent segment defines the sequence number related to the ______ byte a party expects to receive next.A) firstB) lastC) nextD) None of the choices are correct30.The inclusion of the checksum in the TCP segment is ________.A) optionalB) mandatoryC) depends on the type of dataD) None of the choices are correct31.In TCP, a SYN segment consumes _____ sequence number(s).A) noB) oneC) twoD) None of the choices are correct32.In TCP, a SYN + ACK segment consumes _____ sequence numbers.A) noB) threeC) twoD) one33.In TCP, an ACK segment, if carrying no data, consumes ______ sequence number(s).A) noB) oneC) twoD) None of the choices are correct34.The connection establishment procedure in TCP is susceptible to a serious security problem called the _________ attack.A) ACK floodingB) FIN floodingC) SYN floodingD) None of the choices are correct35.The SYN flooding attack belongs to a group of security attacks known as a _____ attack.A) denial of serviceB) replayC) man-in-the middleD) None of the choices are correct36.In TCP, a FIN segment consumes ____ sequence numbers if it does not carry data.A) twoB) threeC) noD) one37.In TCP, a FIN + ACK segment consumes _____ sequence number(s) if it does not carry data.A) twoB) threeC) oneD) no38.In TCP, one end can stop sending data while still receiving data. This is called a ______ termination.A) half-closeB) half-openC) full-closeD) None of the choices are correct39.TCP sliding windows are __________ oriented.A) packetB) segmentC) byteD) None of the choices are correct40.In TCP, the size of the send window is the ________ of rwnd and cwnd.A) maximumB) sum ofC) minimumD) None of the choices are correct41.In TCP, the window should not be _________.A) openedB) closedC) shrunkD) slide42.In TCP, the receiver can temporarily shut down the window; the sender, however, can always send a segment of _____ byte(s) after the window is shut down.A) tenB) zeroC) oneD) None of the choices are correct43.A serious problem can arise in the sliding window operation when either the sending application program creates data slowly or the receiving application program consumes data slowly, or both. This problem is called the ______.A) silly window syndromeB) unexpected syndromeC) window bugD) None of the choices are correct44.Nagle's algorithm can solve the silly window syndrome created by the _________.A) senderB) receiverC) both sender and receiverD) None of the choices are correct45.Clark's solution can solve the silly window syndrome created by the _________.A) senderB) receiverC) both sender and receiverD) None of the choices are correct46.Delayed acknowledgment can solve the silly window syndrome created by the _________.A) senderB) receiverC) both sender and receiverD) None of the choices are correct47.In TCP, an ACK segments that carry no data consumes _______ sequence number(s).A) noB) oneC) twoD) None of the choices are correct48.In modern implementations of TCP, a retransmission occurs if the retransmission timer expires or ________ duplicate ACK segments have arrived.A) oneB) twoC) threeD) None of the choices are correct49.In TCP, ________ retransmission timer is set for an ACK segment.A) oneB) a previousC) noD) None of the choices are correct50.In TCP, there can be ______ RTT measurement(s) in progress at any time.A) twoB) only oneC) severalD) None of the choices are correct51.We need to multiply the header length field by _______ to find the total number of bytes in the TCP header.A) 2B) 4C) 6D) None of the choices are correct52.In TCP, urgent data requires the urgent pointer field as well as the URG bit (to be set) in the _______ field.A) controlB) offsetC) sequence numberD) None of the choices are correct53.In TCP, if the ACK value is 200, then byte _______ has been received successfully.A) 199B) 200C) 201D) None of the choices are correct54.In TCP, the _______ timer prevents a long idle connection between two TCPs.A) retransmissionB) persistenceC) keepaliveD) None of the choices are correct55.In TCP, the _______ timer is needed to handle the zero window-size advertisement.A) retransmissionB) persistenceC) keepaliveD) None of the choices are correct56.In TCP, Karn's algorithm is used in calculations by the _______ timer.A) retransmissionB) persistenceC) keepaliveD) None of the choices are correct57.In TCP, a special segment called a probe is sent by a sending TCP when the _______ timer goes off.A) transmissionB) persistenceC) keepaliveD) None of the choices are correct58.__________ control refers to the mechanisms and techniques to keep the load below the capacity.A) flowB) errorC) congestionD) None of the choices are correct59.In TCP's ________ algorithm the size of the congestion window increases exponentially until it reaches a threshold.A) congestion avoidanceB) congestion detectionC) slow startD) None of the choices are correct60.In TCP's __________ algorithm the size of the congestion window increases additively until congestion is detected.A) congestion avoidanceB) congestion detectionC) slow startD) None of the choices are correct61.________ treats the two signs of congestion detections, timeout and three duplicate ACKs, in the same way.A) Taho TCPB) Reno TCPC) new Reno TCPD) None of the choices are correct62.In ______ TCP, when the connection is established, TCP starts the slow start algorithms and sets the ssthresh variable to a pre-agreed value (normally 64 or 128 kilobytes) and the cwnd variable to 1 MSS.A) Taho TCPB) Reno TCPC) new Reno TCPD) None of the choices are correct63.The ___________ added a new state to the congestion control FSM, called the fast recovery state.A) Taho TCPB) Reno TCPC) new Reno TCPD) None of the choices are correct64.The ___________ treated the two signals of congestion, timeout and arrival of three duplicate ACKs, differently.A) Taho TCPB) Reno TCPC) new Reno TCPD) None of the choices are correct65.The __________ state in Reno TCP is a state somehow between the slow start and the congestion avoidance states.A) congestion avoidanceB) congestion detectionC) slow recoveryD) None of the choices are correct66.In the Reno TCP, when TCP enters the fast recovery, if duplicate ACKs continue to come, TCP ____________________________________.A) stays in this state, but the cwnd grows additivelyB) stays in this state, but the cwnd grows exponentiallyC) moves to slow start stateD) moves to the congestion avoidance state but deflate the size of the cwnd to ssthresh value67.In the Reno TCP, when TCP enters the fast recovery, if a timeout occurs, TCP ____________________________________.A) stays in this state, but the cwnd grows additivelyB) stays in this state, but the cwnd grows exponentiallyC) moves to slow start stateD) moves to the congestion avoidance state but deflate the size of the cwnd to ssthresh value68.In the Reno TCP, when TCP enters the fast recovery, if a new (non duplicate) ACK arrives TCP.____________________________________.A) stays in this state, but the cwnd grows additivelyB) stays in this state, but the cwnd grows exponentiallyC) moves to slow start stateD) moves to the congestion avoidance state but deflate the size of the cwnd to ssthresh value69.A later version of TCP, called ______ TCP, made an extra optimization on the _______ TCP.A) New Reno; RenoB) New Taho; TahoC) New Reno; TahoD) New Taho; Reno70.In the slow start algorithm, the size of the congestion window grows ______________ until ___________________.A) exponentially; it reaches a thresholdB) exponentially; congestion is detectedC) additively; it reaches a thresholdD) additively; congestion is detected71.In the congestion avoidance algorithm, the size of the congestion window grows ______________ congestion is detected.A) exponentially; it reaches a thresholdB) exponentially; congestion is detectedC) additively; it reaches a thresholdD) additively; congestion is detected72.The congestion window size, after it passes the initial slow start state, follows a saw tooth pattern called _________________________________.A) exponential increase, additive decreaseB) additive increase, exponential decreaseC) multiplicative increase, additive decreaseD) additive increase, multiplicative decreaseCBDBA ACDCC CACAB DCBAB ABACA CACCB BDACA DCACC CCAAB BACCB BAACB ABCCA AABBD BCDAA DD.。
3复习题1.P127 源端口号为y,目的端口号为x。
2.P 131 应用程序开发者可能不想其应用程序使用TCP的拥塞控制,因为这会在出现拥塞时降低应用程序的传输速率。
通常,IP电话和IP视频会议应用程序的设计者选择让他们的应用程序运行在UDP上,因为他们想要避免TCP的拥塞控制。
还有,一些应用不需要TCP提供的可靠数据传输。
3.P131 是的,应用程序开发者可以将可靠数据传输放到应用层协议中完成。
但是这需要相当大的工作量和进行调试。
4.a) false b) false c) true d) false e) true f) false g) false5.a) 20 bytes (110-90=20bytes) b) ack number = 90 P155 第一个包丢失,发送第一个包之前的一个包的ACK6.P155 3个报文段,第一个报文段,客户机到服务器,seq=43,ack=80;第二个报文段,服务器到客户机,seq=80,ack=44;第三个报文段,客户机到服务器,seq=44,ack=81。
7.R/2 P180 R/28.P176 错误,其阈值将被设置为拥塞窗口目前值的一半(乘性减)。
习题1.A →S 源端口号:467 目的端口号:23b) B →S源端口号:513目的端口号:23c) S →A源端口号:23目的端口号:467d) S →B源端口号:23目的端口号:513e) Yes.f) No.2.P128 假设主机A,B,C的IP地址为a,b,c.(a,b,c各不相同)到主机A:源端口=80,源IP地址=b, 目的端口=26145,目的IP地址=a;到主机C:左边进程:源端口=80,源IP地址=b, 目的端口=7532,目的IP地址=c;到主机C:右边进程:源端口=80,源IP地址=b, 目的端口=26145,目的IP地址=c;3.P132 UDP检查和01010101+011100001100010111000101+01001100000100011的补码=11101110为了检测错误,接收方将四个字相加(三个原始字和一个检测字)。
课后习题答案:Chapter 1:Review questions: 1,4,11,13,15,16,18,19,23,25,261没有不同,在本文书中,“主机”和“终端系统”可以互换使用。
终端系统包括PCs ,工作站,Web 服务器,电子邮件服务器,连接Internet 的PDA ,WebTV 等。
41 通过电话线拨号调制解调器:住宅2 通过电话线的DSL :住宅或小型办公室3 光纤电缆:住宅4 100 Mbps 交换以太网:公司5 无线LAN :移动电话6 蜂窝移动接入(例如WAP ):移动电话11电路交换网络可以为一个通话保证特定数量的端到端带宽。
大多数现在分组交换网络(包括Internet )可以提供所有端到端带宽保证。
13在时间t0发送主机开始传输。
在t1 = L/R1时,发送主机完成传输并且整个分组到达路由器(没有传播延迟)。
因为路由器在时间t1拥有整个分组,所以它在时间t1开始向接收主机传输此分组。
在时间t2 = t1 + L/R2,路由器完成传输并且接收主机接收整个分组(也没有传播延迟)。
因此端到端延迟是L/R1 + L/R2。
15a) 可以支持两个用户因为每个用户需要一半的链路带宽。
b) 因为在传输过程中每个用户需要1Mbps ,如果两个或更上用户同时传输,那么最大需要2Mbs 。
因为共享的链路的可用带宽是2Mbps ,所以在链接之前没有排队延迟。
然而,如果三个用户同时传输,那么需要的带宽将是3Mbps ,它大于共享链路的可用带宽,在这种情况下在链接前存在排队延迟。
c) 给定用户传输的概率是0.2。
d) 所有三个用户同时传输的概率是()333133--⎪⎪⎭⎫ ⎝⎛p p = (0.2)3 = 0.008。
因为当所有用户都传输时,队列增加,所以在队列增加的分数(它等于所有三个用户同时传输的概率)是0.008。
16延迟组件是处理延迟,传输延迟,传播延迟和排队延迟。
除了排队延迟是变化的,其它所有延迟都是固定的。
3复习题1.P127 源端口号为y,目的端口号为x。
2.P 131 应用程序开发者可能不想其应用程序使用TCP的拥塞控制,因为这会在出现拥塞时降低应用程序的传输速率。
通常,IP电话和IP视频会议应用程序的设计者选择让他们的应用程序运行在UDP上,因为他们想要避免TCP的拥塞控制。
还有,一些应用不需要TCP提供的可靠数据传输。
3.P131 是的,应用程序开发者可以将可靠数据传输放到应用层协议中完成。
但是这需要相当大的工作量和进行调试。
4.a) false b) false c) true d) false e) true f) false g) false5.a) 20 bytes (110-90=20bytes) b) ack number = 90 P155 第一个包丢失,发送第一个包之前的一个包的ACK6.P155 3个报文段,第一个报文段,客户机到服务器,seq=43,ack=80;第二个报文段,服务器到客户机,seq=80,ack=44;第三个报文段,客户机到服务器,seq=44,ack=81。
7.R/2 P180 R/28.P176 错误,其阈值将被设置为拥塞窗口目前值的一半(乘性减)。
习题1.A →S 源端口号:467 目的端口号:23b) B →S源端口号:513目的端口号:23c) S →A源端口号:23目的端口号:467d) S →B源端口号:23目的端口号:513e) Yes.f) No.2.P128 假设主机A,B,C的IP地址为a,b,c.(a,b,c各不相同)到主机A:源端口=80,源IP地址=b, 目的端口=26145,目的IP地址=a;到主机C:左边进程:源端口=80,源IP地址=b, 目的端口=7532,目的IP地址=c;到主机C:右边进程:源端口=80,源IP地址=b, 目的端口=26145,目的IP地址=c;3.P132 UDP检查和01010101+011100001100010111000101+01001100000100011的补码=11101110为了检测错误,接收方将四个字相加(三个原始字和一个检测字)。
如果结果包含0,那么接收方就知道分组中存在错误。
所有的1bit错误都将被检测出来,但是年个个比特的错误有可能被忽略(例如,如果第一个字的最后一个数变为0,并且第二个字的最后最后一个数变为1)。
4.P138 假设发送方处于“等待来自上层的调用1”状态,接收方处于“等待来自下层的1”。
发送方发送一个带有序列号1的分组,然后转到“等待ACK或NAK1”的状态等待ACK或NAK。
假设现在接收方正确接收到带有序列号1的分组,发送一个ACK,然后转入“等待来自下层的0“状态,等待带有序列号0的分组。
然而,ACK出错了。
当rdt2.1发送方接收到出错的ACK,它就重发带有序列号1的分组。
然而,接收方在等待带有序列号0的分组并在它没有收到带有序列号0的分组时一直发送NAK。
因此发送方会一直发送带有序列号1的分组,这时接收方会一直发送这个分组的NAK信息。
两边都不会从这个状态中跳出,进入了死循环。
5.P140 为了回答这个问题,首先考虑为什么我们需要序列号。
我们看到发送方需要序列号以便于接收方能够区分出一个分组是不是已经接收到的分组的重复。
考虑ACK信息,发送方不需要这个信息(也就是一个ACK 的序列号)来告诉发送方检测到一个重复的ACK.因为当他接收到原始ACK信息后它就转入下一个状态,所以一个重复的ACK信息对rdt3.0的发送方是很明显的。
重复的ACK信息不是发送方需要的ACK信息,因此被red3.0发送方忽略了。
6.P139 rdt3.0协议的发送方与rdt2.2协议的发送方的不同之处在于引入了超时机制.我们已经看到超时机制地引入增加了从发送方到接收方数据流中出现重复分组地可能性.然而,rdt2.2协议地接收方已经能够处理重复分组.(在rdt2.2中当接收方发送地ACK丢失时,发送方就会重传旧的数据.这时接收方就会接收到重复的分组.) 因此rdt3.0中的接收方同rdt2.2中的接收方相同.7.Suppose the protocol has been in operation for some time. The sender is instate “Wait for call from above” (top left hand corner) and the receiver is in state “Wait for 0 from below”. The scenarios for corrupted data and corrupted ACK are shown in Figure 1.Figure 1: rdt 3.0 scenarios: corrupted data, corrupted ACK8.P138 这里,我们加入一个定时器,它的值比我们已知的往返传播时延大.我们在”等待ACK或NAK0”和”等待ACK或NAK1”状态各加入一个超时事件.如果超时事件出现,那么最后传输的分组将被重传.让我们看看为什么这个协议仍然能和rdt2.1的接收方协同工作.假设超时是由数据分组的丢失引起的,比如,一个从发送方到接收方的信道上的分组丢失.在这种情况下,接收方从没有接收过之前传送的分组,从接收方的角度看,如果超时重传的分组被接收到,它看起来就和最初传输的分组被接收是一样的.现在假设一个ACK丢失.接收方最终将由于超时重传分组.但是这个重传动作是和当一个错误ACK出现时的重传动作是完全相同的.因此当出现ACK丢失或出现错误ACK时,发送方的重传动作是一样的.rdt2.1的接收方已经能够处理出现错误ACK的状况.9.协议仍将工作,因为如果接收到的带有错误的分组实际上被丢掉的话,重传就会发生(从接收方的观点看,这两种情况哪一个会发生,或者同时发生是不可知的).要对这个问题进行更进一步的讨论,就必须考虑到定时器超时过早发生的情况.在这种情况下,如果每个超大分组被确认,并且每个接收的超大分组确认信息导致另一个超大分组被发送,当n趋近于无穷时,分组n被发送的次数将无限增加.10.11.在仅使用NAK的协议中,只有当接收到分组x+1时才能检测到分组x的丢失.也就是说接收方接收到x-1然后接收到x+1,只有当接收方接收到x+1时才发现x的丢失.如果在传输x和传输x+1之间有很长时间的延时,那么在只有NAK的协议中,x的修复要花费很长的时间.另一方面,如果要发送大量的数据,那么在只有NAK的协议中修复的速度将很快.并且,如果错误很少,那么NAK只是偶尔发送,并且从不发送ACK.与只有ACK的情况相比,只有NAK的情况将明显减少反馈时间.12.I t takes 8 microseconds (or 0.008 milliseconds) to send a packet. in order forthe senderto be busy 90 percent of the time, we must have util = 0.9 = (0.008n) / 30.016 or n approximately 3377 packets.13.在GBN可靠数据传输协议中,发送方持续发送分组直到它接收到一个NAK.如果到n-1之前的分组已经被正确的接收,这个NAK只是为分组n 产生.也就是说,n总是未被接收的分组的最小序号.当发送方接收到分组n 的NAK,它从分组n开始重传.这和书上讲的GBN协议相类似,除了在流水线上没有未被确认分组的最大数.注意发送方不能确切的直到有多少分组未被确认.如果当前的序号是k,最后一个NAK是分组n的,那么在流水线上或许就有k-(n-1)的分组未被确认.还要注意接收方只有在接收到更高序列号的分组时才能确认分组n的丢失.(接收分组的序列号的空缺告诉接收方位于孔雀位置的分组丢失).因此,对于接收方,当数据速率低时,(比如,两个分组之间的时间比较长),将会比数据速率高时花费更长的时间来确认分组的丢失.14.在我们的解决方案中,发送方在接收到一对报文的ACK(seqnum和seqnum+1)后才开始发送下一对报文.数据分组携带有两bit的序列码.也就是说,游泳的序列号是0,1,2,3.ACK信息携带已经确认的数据分组的序列号.接收方和发送方的FSM由下图所示.注意发送状态记录:(1)当前对没有收到ACKs;(2)只收到seqnum的ACK或只收到seqnum+1的ACK.在本图中,我们假设seqnum由0起始,发送方已经发送第一对数据.15.这个问题是简单停等协议rdt3.0的变种.因为信道有可能丢失数据,还因为在其中一个接收方已经接收到数据的情况下发送方也有可能重传数据.(要么是因为定时器超时过早发生,要么是因为另一个接收方还没有正确的接收数据),所以序列号是必须的.就像是在rdt3.0中一样,在这里一个0-bit序列号是必须的.发送方和接收方的FSM如下图所示.在这个问题中,发送方状态显示发送方是否只从B接收到ACK,只从C接收到ACK,还是从B和C都没有接收到ACK.接收方状态显示是否接收到的序列号是接收方等待的序列号.16.a) 在这里的窗口长度为N=3,假设接收方已经接收到分组k-1,并且已经对该分组以及之前的所有分组进行了确认.如果所有这些确认信息都已经被发送方接收,那么发送方的窗口是[k,k+N-1].接下来假设所有这些ACK都没有被发送方接收.在这种情况下,发送方的窗口包含k-1和直到包括k-1之前的N的分组.因此发送方的窗口是[k-N,k-1].因此,发送方的窗口大小是3,并且从[k-N,k]中的某个数开始.b) 如果接收方在等待分组k,那么它已经接收(并确认)了分组k-1以及在这之前的N-1个分组.如果所有这N的ACK都没有被发送方接收到,那么值为[k-N,k-1]的ACK信息可能仍在回传.因为发送方已经发送了分组[k-N,k-1],那么发送方肯定已经接收到了分组k-N-1的ACK.一旦接收方发送了分组k-N-1的ACK,它就不会在发送低于k-N-1的分组的ACK.因此发送方接收到的所有报文的ACK字段的可能值为从k-N-1到k-1.17.因为A-to-B信道会丢失请求报文.A将需要超时timeout和重传请求信息.(为了能重丢失中恢复过来).因为信道时延是未知且变化的,A有可能发送重复的请求(比如,重传一个已经被B接收到的请求).为了能够检测出重复的请求报文,协议将使用序列号.1-bit序列号就能够满足停/等类型的请求/响应协议的需求.•“Wait for Request 0 from above”这里请求方在等待一个来自上层的请求一个单元数据的命令.当它接收到来自上层的请求是,它就向B发送一个请求报文R0,启动一个计时器并将状态转移到”Wait for D0”等待D0状态.当处于”Wait for Request 0 from above”状态是,A忽略它从B接收到的所有信息.•“Wait for D0”在这里请求方等待来自B的D0数据报文.A的计时器在这个状态是一直运行的.如果计时器超时,A重新发送一个R0报文,重启计时器并保持这个状态.如果接收到来自B的D0报文,A停止计时器,并将状态转移到”Wait for Request 1from above”等待来自上层的调用1.如果A在这个状态接收到一个D1数据报文,它将把此忽略.•“Wait for Request 1 from above”在这里请求方再次等待来自上层的请求一个单元数据的命令.当它从上层接收到一个请求时,它向B发送一个请求报文R1,启动计时器并将状态转移到”Wait for D1”.当处于Wait forRequest 1 from above状态时,A忽略从B接收到的任何数据.•“Wait for D1”.在这里请求方等待来自B的D1数据报文.在这个状态A 的计时器一直在运行.如果计时器超时,A将发送另一个R1报文,重启计时器并保持这个状态.如果接收到来自B的D1报文,A停止计时器,并将状态转移到”Wait for Request 0 from above”在这个状态A将忽略重B接收到的信息.数据提供方B只有两个状态:•“Send D0”.在这种状态,B持续通过发送D0来回应接收到的R0报文.并保持这个状态.如果B接收到一个R1报文,它就直到D0报文已经被正确接收.因此就将这个D0数据丢失(因为它已经被另一端接收).并转移到”Send D1”状态.在这种状态它将用D1回应下一个请求报文. •“Send D1”在这种状态,B持续通过发送D1来回应接收到的R1报文,并保持在这个状态.如果B接收到一个R0报文,它就由此直到D1报文已经被正确接收,并转移到”Send D1”状态.18.为了避免图3.27出现的情况,我们要避免让接受者窗口的最前端(也就是具有最高序列号的那个)与发送窗口的最尾端(发送窗口中的具有最低序列号的那个)交迭在同一个序列号空间中.也就是说,序列号空间必须足够大到让整个接收窗口和整个发送窗口在此序列号空间中不会出现交迭.因此,我们需要测定在任何给定时刻由接收方和发送方覆盖的序列号有多大.假设接收方等待的最低序列号是分组m的序列号.在这种情况下,接收方窗口是[m, m+w-1],并且它已经接收(并确认)了分组m-1和此前的w-1个分组,这里w是窗口的尺寸.如果所有这w个ACK都没有被发送方接收到,那么值为[m-w ,m-1]的ACK报文将仍被传回.如果带有这些ACK号码的ACK都没有被发送方接收,那么发送方的窗口将是[m-w, m-1].因此,发送窗口的最低边界是m-w,接收窗口的最大边界是m+w-1.为了使接收窗口的前沿和发送窗口的后沿不出现交迭,因此序列号空间必须大到能过容纳2w长度的序列号.也就是说,序列号空间长度必须至少使窗口长度的两倍k ≥ 2w.19.a)正确,假设发送方窗口大小为3,在t0时刻发送分组1,2,3.在t1(t1>t0)时刻接收方确认1,2,3.在t2(t2>t1)时刻发送方计时器超时,重发1,2,3.在t3时刻接收到重复的分组并重新确认1,2,3.在t4时刻发送方接收到接收方在t1时刻发送的ACK,并将其窗口前移到4,5,6.在t5时刻发送方接收到接收方在t2发送的ACK1,2,3.这些ACK是在当前窗口之外的报文的ACK.b) 是的,本质上同a中是一样的.c) True.d) 正确.当窗口尺寸为1时,SR,GBN,的比特交替协议在功能上相同.窗口尺寸1排除了失序分组的可能性.在这种情况下,一个累积的ACK就是一个普通的ACK.因为在窗口内它只能与一个分组有关.20.有232 = 4,294,967,296个可能的序列号.a) 序列号不会因报文数增加而有增量,而是随发送数据比特数量的增加而有增量.所以MSS(最大报文长度)的大小与问题无关.能够从A发送到B的文件的最大尺寸能被232≈ 4.19 Gbytes所描述.b) 报文数是: [232/1460]=2,941,758.每个报文增加66bytes的首部,所以总共增加了2,941,758×66=194,156,028 bytes的首部.要传输的总比特数为232 +194,156,028 = 3,591×107 bits因此使用10Mbps链路需要10×106=3,591秒=59分钟来传输文件.21.D enote EstimatedRTT (n) for the estimate after the nth sample.EstimatedRTT (1) = SampleRTT1EstimatedRTT (2) = xSampleRTT1 + (1 − x)SampleRTT2EstimatedRTT (3) = xSampleRTT(1 )+(1-x)[xSampleRTT2 + (1− x) SampleRTT3]= xSampleRTT1 + (1 − x)xSampleRTT2+ (1 − x)2 SampleRTT3EstimatedRTT (4) = xSampleRTT1 + (1 − x)EstimatedRTT(3)= xSampleRTT1 + (1 − x)xSampleRTT2+ (1 − x)2 xSampleRTT3 + (1 − x) 3SampleRTT4b)感觉应该是j-1c)22.让我们看看如果TCP测量重传报文的SampleRTT会出现什么情况.假设源发送分组P1,P1的定时器超时,源接着发送P2---同一个分组的一个新的拷贝.进一步假设源测量P2的SampleRTT(重传的分组).最后假设在传输P2后很快P1的ACK到达.源将错误的把这个ACK当作P2的ACK,并计算出错误SampleRTT值.23.S endBase:是最近未被确认的字节的序号.SendBase-1是接收方已正确按序接收到数据的最后一个字节的序号.LastByteRcvd:从网络中到达的并且已经放入主机B接收缓存中的数据流最后一个字节的编号.在任一给定时刻t,SendBase-1是发送方知道的已经被接收方正确的按序接收的最后一个比特的序列号.在t时刻被接收方(正确的和按序的)接收到的真正的最后一个byte要比在链路上传输的ACK要大所以SendBase–1 ≤ LastByteRcvd24.y:发送方接收到的最新ACK的值在t时刻,发送方接收到的ACK的值为y,据此发送方可以确认接收方已经接收了序号到y-1的数据.如果y ≤SendBase或在线路上有其他的ACK,在t时刻接收方(正确的和按序的)接收到的真正的最后一个byte要比y-1大.所以y-1 ≤ LastByteRvcd25.假设发送了分组n,n+1,n+2,并且分组n被接收并被确认.如果分组n+1和n+2在端到端的路径上被重新排序)也就是说,被以n+2,n+1的顺序接收),那么在收到第一个冗余ACK就重传的策略下,在接收到分组n+2时将产生一个分组n的冗余ACK,这将引起重传发生.在接收到3个冗余ACK才执行重传的策略下,只有在分组n后面的两个分组被正确接收,然而分组n+1没有被接收的情况下,重传才会发生.设计三个冗余ACK策略的设计者可能感觉等待两个分组(而不是一个)是在当需要时触发快速重传和当分组重新排序时不进行过早的重传之间权衡的结果.26.P171 如果在图3.45b中到达速率的增加超过了R/2,那么到达队列的总到达速率将超过队列的容量,这将导致随着到达速率的增加包的丢失也随之增加.当到达速率=R/2时,每3个离开队列的分组中就有1个是重传分组.随着丢失的增加,甚至是离开队列的分组的较大分片都将是重传数据.即使是将离开队列的最大离去速率给定为R/2,并给定随到达速率的增加1/3或更多的数据将被传输.成功递交数据的吞吐量也不会超过λout.同样的原因,如果离开队列的分组中有一般的分组为重传分组,并且输出分组的最大速率是R/2,那么λout的最大值是(R/2)/2 or R/4.27.P178 收到3个冗余ACK后,TCP将拥塞窗口减小一般,然后线性地增长。