关键词不能为空

当前您在: 主页 > 英语 >

【优质】四川大学林峰计算机网络第三次作业

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-15 14:15
tags:

-

2021年2月15日发(作者:右翼分子)



Chapter 3 Review Questions


R3.


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 use


TCP



s


congestion


control,


which


can


throttle


the


application



s


sending


rate at times of congestion. Often, designers of IP telephony and IP


videoconference


applications


choose


to


run


their


applications


over


UDP


because they want to avoid TCP



s congestion control. Also, some


applications do not need the reliable data transfer provided by TCP.




R5.


Is


it


possible


for


an


application


to


enjoy


reliable


data


transfer


even


when the application runs over UDP? If so, how?




:


是的,在


UDP

< br>的协议上添加验证的数据,例如给每个包传输时加个头,并且


设置返回值。





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 source 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


destination


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?


< /p>



:


正确


,


两个部分将针对同一接口。在套接字接口,对于每个收到的片段,操


作系统将提供过程与


IP


地址确定各段的起源。





R8.


Suppose that a Web server runs in Host C on port 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


explain.




:


对于每个坚持的连接,


web

服务器会创建一个连接套接字,每个连接套接字



4


个数组定义。当主机


C


收到一个请求的时候, 它会检查数据报和段中的


4


个区域,以此决定用哪个区域来接收


TCP


段。因此,


A

< br>和


B


传输的套接字是不一


样的。 每一个套接字的标识符都使用


80


端口作为目的的,但是不同的 资源有不


同的


IP


地址。和

< p>
UDP


不同的是,当传输层传输一个


TCP


段至应用层的时候,它


并不需要明确指定


IP


地址,因为套接字标识符会协助它指定。





R14.


Suppose Host A sends two TCP segments back to back to Host B over a


TCP


connection.


The


first


segment


has


sequence


number


90;


the


second


has


sequence number 110.



a.



How much data is in the first segment?



:110-90=20


b. 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?



:90




R15.


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


is


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


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 Interval 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



the


timer


expires at the sender,the threshold is set to one half of its previous


value.





Problems


P1.


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 for


a. The segments sent 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, the 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


segments


flowing


from


the


server


back


to


the


clients



processes?


What are the IP addresses in the network-layer datagrams carrying the


transport-layer segments?


< /p>



:(1)


返回值包含了客户端和服务器 的


IP


地址以及


port


码,


还有用户索求的内


容。



(2)


网络层数据报中携带的


IP


地址包含目的端口的


IP


地址、

< p>
port


码、传输层添


加的头(

< br>message



、网络层添加的段(

< br>segment






P5


.


a. Suppose you have the following 2 bytes: 01011100 and 01010110. What


is the 1s complement of the sum of these 2 bytes?


01011100 + 01010110 = 10110010


取反


= 0110010


b. 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


取反


= 11101110


c. 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 doesn



t 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 in-order packet


that the 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 sender



s


window at time t? Justify your answer.




:


因为窗口大小为


3



接收方期待的下一列序号为


k

< p>


所以


t


时刻发送窗口中 序


列号应为


k,k+1,k+2




b.


What


are


all


possible


values


of


the


ACK


field


in


all


possible


messages


currently


propagating


back


to


the


sender


at


time


t?


Justify


your


answer.




:


由于序列号为


0-1024


,所以在


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, it 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 alternating-bit protocol is the same as the SR protocol with


a sender and receiver window size of 1.


(T)


d.


The


alternating-bit


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 occurrence of problems such as that in Figure 3.27 for each of these


protocols?



:


首先我们必须保证发送窗口和接受窗口中序列号都不重复。假设窗口的序列


号为


x


,那么序列号


n


必须保持


n>= 2x


,才能使窗口中的序列号不重复。



-


-


-


-


-


-


-


-



本文更新与2021-02-15 14:15,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/655406.html

【优质】四川大学林峰计算机网络第三次作业的相关文章

  • 余华爱情经典语录,余华爱情句子

    余华的经典语录——余华《第七天》40、我不怕死,一点都不怕,只怕再也不能看见你——余华《第七天》4可是我再也没遇到一个像福贵这样令我难忘的人了,对自己的经历如此清楚,

    语文
  • 心情低落的图片压抑,心情低落的图片发朋友圈

    心情压抑的图片(心太累没人理解的说说带图片)1、有时候很想找个人倾诉一下,却又不知从何说起,最终是什么也不说,只想快点睡过去,告诉自己,明天就好了。有时候,突然会觉得

    语文
  • 经典古训100句图片大全,古训名言警句

    古代经典励志名言100句译:好的药物味苦但对治病有利;忠言劝诫的话听起来不顺耳却对人的行为有利。3良言一句三冬暖,恶语伤人六月寒。喷泉的高度不会超过它的源头;一个人的事

    语文
  • 关于青春奋斗的名人名言鲁迅,关于青年奋斗的名言鲁迅

    鲁迅名言名句大全励志1、世上本没有路,走的人多了自然便成了路。下面是我整理的鲁迅先生的名言名句大全,希望对你有所帮助!当生存时,还是将遭践踏,将遭删刈,直至于死亡而

    语文
  • 三国群英单机版手游礼包码,三国群英手机单机版攻略

    三国群英传7五神兽洞有什么用那是多一个武将技能。青龙飞升召唤出东方的守护兽,神兽之一的青龙。玄武怒流召唤出北方的守护兽,神兽之一的玄武。白虎傲啸召唤出西方的守护兽,

    语文
  • 不收费的情感挽回专家电话,情感挽回免费咨询

    免费的情感挽回机构(揭秘情感挽回机构骗局)1、牛牛(化名)向上海市公安局金山分局报案,称自己为了挽回与女友的感情,被一家名为“实花教育咨询”的情感咨询机构诈骗4万余元。

    语文