ImageVerifierCode 换一换
格式:DOCX , 页数:7 ,大小:20.31KB ,
资源ID:4496913      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/4496913.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(四川大学林峰计算机网络第三次作业.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

四川大学林峰计算机网络第三次作业.docx

1、四川大学林峰计算机网络第三次作业 Chapter 3 Review QuestionsR3.Describe why an application developer might choose to run an application over UDP rather than TCP? 答:An application developer may not want its application to useTCPs congestion control, which can throttle the applications sending rate at times of congest

2、ion。 Often, designers of IP telephony and IP videoconference applications choose to run their applications over UDP because they want to avoid TCPs congestion control。 Also, some applications do not need the reliable data transfer provided by TCP. R5.Is it possible for an application to enjoy reliab

3、le data transfer even when the application runs over UDP? If so, how?答:是的,在UDP的协议上添加验证的数据,例如给每个包传输时加个头,并且设置返回值。R6。Consider a TCP connection between Host A and Host B. Suppose that the TCP segments traveling from Host A to Host B have source port number x and destination port number y. What are the s

4、ource and destination port numbers for the segments traveling from Host B to Host A?答:The source port number is y, the destination port number is x。R7.Suppose a process in Host C has a UDP socket with port number 6789。 Suppose both Host A and Host B each sends a UDP segment to Host C with destinatio

5、n port number 6789. Will both of these segments be directed to the same socket at Host C? If so, how will the process at Host C know that these two segments originated from two different hosts?答:正确,两个部分将针对同一接口.在套接字接口,对于每个收到的片段,操作系统将提供过程与IP地址确定各段的起源。R8.Suppose that a Web server runs in Host C on port

6、 80。 Suppose this Web server uses persistent connections, and is currently receiving requests from two different Hosts, A and B。 Are all of the requests being sent through the same socket at Host C? If they are being passed through different sockets, do both of the sockets have port 80? Discuss and

7、explain。答:对于每个坚持的连接,web服务器会创建一个连接套接字,每个连接套接字由4个数组定义。当主机C收到一个请求的时候,它会检查数据报和段中的4个区域,以此决定用哪个区域来接收TCP段.因此,A和B传输的套接字是不一样的.每一个套接字的标识符都使用80端口作为目的的,但是不同的资源有不同的IP地址。和UDP不同的是,当传输层传输一个TCP段至应用层的时候,它并不需要明确指定IP地址,因为套接字标识符会协助它指定。R14。Suppose Host A sends two TCP segments back to back to Host B over a TCP connection

8、. The first segment has sequence number 90; the second has sequence number 110。a. How much data is in the first segment?答:110-90=20b. Suppose that the first segment is lost but the second segment arrives at B。 In the acknowledgment that Host B sends to Host A, what will be the acknowledgment number?

9、答:90R15。 True or false?(F) a。 The size of the TCP RcvWindow never changes throughout the duration of the connection.(T) b. Suppose Host A is sending Host B a large file over a TCP connection. The number of unacknowledged bytes that A sends cannot exceed the size of the receive buffer.(F) c. Host A i

10、s sending Host B a large file over a TCP connection。 Assume Host B has no data to send Host A。 Host B will not send acknowledgments to Host A because Host B cannot piggyback the acknowledgments on data.(T) d。 The TCP segment has a field in its header for RcvWindow .(F) e. Suppose Host A is sending a

11、 large file to Host B over a TCP connection. If the sequence number for a segment of this connection is m, then the sequence number for the subsequent segment will necessarily be m + 1。(F) f. Suppose that the last Sample RTT in a TCP connection is equal to 1 sec。 The current value of Timeout Interva

12、l for the connection will necessarily be 1 sec. (T) g. Suppose Host A sends one segment with sequence number 38 and 4 bytes of data over a TCP connection to Host B。 In this same segment the acknowledgment number is necessarily 42.R17.True or false?Consider congestion control in TCP.When the timer ex

13、pires at the sender,the threshold is set to one half of its previous value.ProblemsP1. Suppose Client A initiates a Telnet session with Server S. At about the same time, Client B also initiates a Telnet session with Server S。 Provide possible source and destination port numbers fora. The segments se

14、nt from A to S。The source port number is 467, destination number is 23.b。 The segments sent from B to S。The source port is 513, the destination number is 23。c. The segments sent from S to A.The source port is 23, the destination number is 467.d. The segments sent from S to B。The source port is 23, t

15、he destination number is 513。e。 If A and B are different hosts, is it possible that the source port number in the segments from A to S is the same as that from B to S?Yes。f。 How about if they are the same host?No。P2.Consider Figure 3.5。 What are the sources and destination port values in the segment

16、s flowing from the server back to the clients processes?What are the IP addresses in the networklayer datagrams carrying the transport-layer segments?答:(1)返回值包含了客户端和服务器的IP地址以及port码,还有用户索求的内容.(2)网络层数据报中携带的IP地址包含目的端口的IP地址、port码、传输层添加的头(message)、网络层添加的段(segment)。P5. a。 Suppose you have the following 2

17、bytes: 01011100 and 01010110。 What is the 1s complement of the sum of these 2 bytes?01011100 + 01010110 = 10110010 取反 = 0110010b。 Suppose you have the following 2 bytes: 11011010 and 00110110. What is the 1s complement of the sum of these 2 bytes?11011010 + 00110110 = 100010000去首位补至末位 = 00010001 取反

18、= 11101110c。 For the bytes in part (a), give an example where one bit is flipped in each of the 2 bytes and yet the 1s complement doesnt change.P18.Consider the GBN protocol with a sender window size of 3 and a sequence number range of 1,024。 Suppose that at time t, the next inorder packet that the

19、receiver is expecting has a sequence number of k. Assume that the medium does not reorder messages. Answer the following questions:a. What are the possible sets of sequence numbers inside the senders window at time t? Justify your answer。答:因为窗口大小为3,接收方期待的下一列序号为k,所以t时刻发送窗口中序列号应为k,k+1,k+2。b. What are

20、all possible values of the ACK field in all possible messages currently propagating back to the sender at time t? Justify your answer.答:由于序列号为01024,所以在t时刻,所有可能的ACK 序号应为0 ACK number 1024。P19.Answer true or false to the following questions and briefly justify your answer:(T) a. With the SR protocol, i

21、t is possible for the sender to receive an ACK for a packet that falls outside of its current window.(T) b。 With GBN, it is possible for the sender to receive an ACK for a packet that falls outside of its current window。(T) c。 The alternatingbit protocol is the same as the SR protocol with a sender

22、and receiver window size of 1。(T) d。 The alternatingbit protocol is the same as the GBN protocol with a sender and receiver window size of 1.P21。 Consider the GBN and SR protocols. Suppose the sequence number space is of size k. What is the largest allowable sender window that will avoid the occurre

23、nce of problems such as that in Figure 3.27 for each of these protocols?答:首先我们必须保证发送窗口和接受窗口中序列号都不重复。假设窗口的序列号为x,那么序列号n必须保持n= 2x,才能使窗口中的序列号不重复.P22. We have said that an application may choose UDP for a transport protocol because UDP offers finer application control (than TCP) of what data is sent in a

24、 segment and when。a. Why does an application have more control of what data is sent in a segment?答:Consider sendingan applicationmessage over a transport protocol。 With TCP, theapplicationwritesdatato the connections send buffer and TCP will grab bytes without necessarily putting a single message in

25、 the TCP segment; TCP may putmoreor less than a single message in a segment. UDP, on the other hand, encapsulates in a segment whatever theapplicationgives it; so that, if theapplicationgives UDPan applicationmessage, this message will be the payloadofthe UDPsegment.Thus,withtheUDP, an applicationha

26、smorecontrolofwhatdatais sent in a segment。b. Why does an application have more control on when the segment is sent?答:With TCP, due to flowcontroland congestioncontrol, there may be significant delay from the time whenanapplicationwritesdatato its send buffer until when thedatais given to the networ

27、k layer。 UDPdoesnothavedelays due to flow controland congestioncontrol.P23. Consider transferring an enormous file of L bytes from Host A to Host B。 Assume an MSS (management support system) of 1460 bytes。a。 What is the maximum value of L such that TCP sequence numbers are not exhausted? Recall that

28、 the TCP sequence number field has 4 bytes.答:因为TCP序号范围有4bytes,所以L最大为232 bytesb。 For the L you obtain in (a), find how long it takes to transmit the file. Assume that a total of 66 bytes of transport, network, and data-link header are added to each segment before the resulting packet is sent out over

29、 a 155 Mbps link. Ignore flow control and congestion control so A can pump out the segments back to back and continuously。答:传输速度为155 Mbps,每段加66 bytes大小的头,首先计算一共分多少段:232 bytes / 1460 bytes = 2941758 段每段加一个头,则头大小的和为:2941758 X 66 bytes = 194156028 bytes,总共需传输 194156028 bytes + 232 bytes = 4489123324 by

30、tes = 35912986592 bits 的数据。用10Mbps的速度传输则时间为35912986592 bits / Mbps = 3591s = 59。85 min。P24。 Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126。 Suppose Host A then sends two segments to Host B back-to-back。 The first and second

31、segments contain 70 and 50 bytes of data, respectively。 In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is 80。 Host B sends an acknowledgement whenever it receives a segment from Host A。a. In the second segment sent from Host A to B, w

32、hat are the sequence number, source port number, and destination port number?答:The sequence number is 247, the source number is 302, the destination number is 80.b。 If the first segment arrives before the second segment, in the acknowledgement of the first arriving segment, what is the acknowledgment number, the source port number, and the destination port number?答:The acknowledge number is 197, the source number is 80 and th

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1