TCP 计算机网络实验报告_第1页
TCP 计算机网络实验报告_第2页
TCP 计算机网络实验报告_第3页
TCP 计算机网络实验报告_第4页
TCP 计算机网络实验报告_第5页
已阅读5页,还剩17页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、陕西师范大学计算机网络实验报告实验五 探索TCP协议一、实验目的 1.熟悉并掌握 wireshark的操作。 2.通过实验分析并掌握TCP是如何进行数据传输的,及其如何实现拥塞控制、流量控制等二、实验器材 1.PC机电脑一台。 2下载wireshark软件并安装三、实验内容通过实验分析并掌握TCP是如何进行数据传输的,及其如何实现拥塞控制、流量控制等四、问题回答1. Capturing a bulk TCP transfer from your computer to a remoteServerGo the /wiresharklabs/alic

2、e.txt and retrieve an ASCII copy of Alice in Wonderland. Store this file.somewhere on my computer.Next go to /wireshark-labs/TCP-wireshark-file1.html.Then I cansee a screen that looks like:start up Wireshark and begin packet capture.Returning to browser, press the “Upload alic

3、e.txt file” button to upload the file to the server. Stop Wireshark packet capture. The Wireshark window like this:Then opening the Wireshark captured packet file tcpethereal-trace-1 in /wireshark-labs/wireshark-traces.zip,2. A first look at the captured trac

4、e1. What is the IP address and TCP port number used by the client computer (source)that is transferring the file to ? To answer this question, itsprobably easiest to select an HTTP message and explore the details of the TCPpacket used to carry this HTTP message, using the “details o

5、f the selected packetheader window” (refer to Figure 2 in the “Getting Started with Wireshark” Lab ifyoure uncertain about the Wireshark windows).ip addressTcp port number答:client computer (source): IP address:02TCP port number:11612. What is the IP address of ? On what p

6、ort number is it sendingip address:and receiving TCP segments for this connection?port number答:the IP address of :IP address:2port number:803. If you have been able to create your own trace, answer the following question:What is the IP address and TCP port number used b

7、y your client computer(source) to transfer the file to ?ip address:Tcp port number答:My client computer:IP address:0Then Wireshark do this, select Analyze-Enabled Protocols. Then uncheck the HTTP box andselect OK. now see an Wireshark window that looks like:3. TCP BasicsAns

8、wer the following questions ;4. What is the sequence number of the TCP SYN segment that is used to initiate theTCP connection between the client computer and ? What is itin the segment that identifies the segment as a SYN segment?Syn is 1Sequence number答:sequence number:0 ;syn 被设置为1

9、说明是syn段。5. What is the sequence number of the SYNACK segment sent by to the client computer in reply to the SYN? What is the value of the ACKnowledgement field in the SYNACK segment? How did determine that value? What is it in the segment that identifies the segmen

10、t as a SYNACK segment?The value of the ACKnowledgement fieldSequence number答:The sequence number of the SYNACK segment sent by is:0; SYNACK segment 中 ACKnowledgement 的值为1;ACKnowledgement number的值为SYN消息中sequence number加上1所得;SYN 和Acknowledgement f都置为1说明这是一个SYNACK segment.6. What is t

11、he sequence number of the TCP segment containing the HTTP POSTcommand? Note that in order to find the POST command, youll need to dig intothe packet content field at the bottom of the Wireshark window, looking for asegment with a “POST” within its DATA field.NO.4 segmentPost commandSequence number答:

12、第四号报文段是包含 HTTP POST 命令的TCP segment.且报文段的序列号为1. 7. Consider the TCP segment containing the HTTP POST as the first segment in theTCP connection. What are the sequence numbers of the first six segments in theTCP connection (including the segment containing the HTTP POST)?At what time was each segment s

13、ent? When was the ACK for each segment received?Given the difference between when each TCP segment was sent, and when itsacknowledgement was received, what is the RTT value for each of the sixsegments? What is the EstimatedRTT value (see page 249 in text) after thereceipt of each ACK? Assume that th

14、e value of the EstimatedRTT is equal tothe measured RTT for the first segment, and then is computed using theEstimatedRTT equation on page 249 for all subsequent segments.Note: Wireshark has a nice feature that allows you to plot the RTT foreach of the TCP segments sent. Select a TCP segment in the

15、“listing ofcaptured packets” window that is being sent from the client to server. Then select: Statistics-TCP Stream Graph-Round Trip Time Graph.Segment 1-6 areNo.4,5,7,8,10 Segment 1Sequence number=1Segment 2Sequence number=566Segment 3Sequence number=2026Segment 4Sequence numb

16、er=3486Segment 5Sequence number=4946Segment 6Sequence number=6406答:前6个报文段为No.4,5,7,8,10,11. 对应的ACK分别为 No.6,9,12,14,15,16. 前6个报文段截图如下:报文段的序列号为每个报文段的首字节加1,所以序列号为:Segment 1 sequence number:1Segment 2 sequence number:566Segment 3 sequence number:2026Segment 4 sequence number:3486Segment 5 sequence numbe

17、r:4946Segment 6 sequence number:6406报文段的发送时间和相应ACK 的到达时间如下表::Send timeACK received timeRTT secondsSegment 2746Segment 20.0.0.Segment 30.0.0.Segment 1443Segment 3989Segment 8964EstimatedRTT=0.875* EstimatedRTT+0.125*SampleRTT接受到报文段1之后的EstimatedRTT为:EstimatedRTT=RTT for

18、 segment 1=0.02746 second接受到报文段2之后的EstimatedRTT为:EstimatedRTT=0.875*0.02764+0.125*0.=0.0285 sencond接受到报文段3之后的EstimatedRTT为:EstimatedRTT=0.875*0.0285+0.125*0.=0.0337 second接受到报文段4之后的EstimatedRTT为:EstimatedRTT=0.875*0.0337+0.125*0.11443=0.0438 second接受到报文段5之后的EstimatedRTT为:EstimatedRTT=0.875*0.0438+0.

19、125*0.13989= 0.0558 second接受到报文段6之后的EstimatedRTT为:EstimatedRTT=0.875*0.0558+0.125*0.18964= 0.0725 second8. What is the length of each of the first six TCP segments? 答:前6个段的长度分别为:565、1460、1460、1460、1460、1460字节。9. What is the minimum amount of available buffer space advertised at the receivedfor the e

20、ntire trace? Does the lack of receiver buffer space ever throttle thesender? 接收方通知给发送方的 最低大小为5840字节接收方窗口最大为62780字节答:接收方通知给发送方的最低窗口大小为5840字节,即在服务器端传回的第一个ACK中的窗口大小。 接收方的窗口大小没有抑制发送方的传输速率,因为窗口大小从5840逐步增加到62780,窗口大小始终大于发送方发送的分组的容量。10. Are there any retransmitted segments in the trace file? What did you c

21、heck for (inthe trace) in order to answer this question? 答:没有,从TCP报文段的序列号中可以得出以上结论。从上图中的时间序号图可以看出,从源端发往目的端的序号逐渐递增,如果这其中有重传的报文段,则其序号中应该有小于其临近的分组序号的分组,在图中未看到这样的分组,所以没有被重传的分组。11. How much data does the receiver typically acknowledge in an ACK? Can youidentify cases where the receiver is ACKing every ot

22、her received segment ?答: 右下图得,接收方在一个ACK确认的数据大小一般为1460字节。The Acknowledged sequence number and the Acknowledged data:Acknowledged sequence numberAcknowledged dataACK 1566566ACK 220261460ACK 334861460ACK 449461460ACK 564061460ACK 678661460ACK 790131147ACK 8104731460ACK 9119331460ACK 10133931460ACK 1114

23、8531460 -12621=2920 bytes报文段确认数据为2920bytes=1460*2 bytes,即-12621=2920.12. What is the throughput (bytes transferred per unit time) for the TCP connection?Explain how you calculated this value.The fist ACKThe last ACK答:TCP 吞吐量计算很大程度上取决于所选内容的平均时间。作为一个普通的吞吐量计算,在这问题上,选择整个连接的时间作为平均时间段。然后,此TCP 连接的平均吞吐量为总的传

24、输数据与总传输时间的比值。传输的数据总量为TCP 段第一个序列号(即第4 段的1 字节)和最后的序列号的ACK (第202 段的个字节)之间的差值。因此,总数据是 -1 = 字节。整个传输时间是第一个 TCP 段(即4号段0. 秒)的时间和最后的 ACK(即第202 段5.秒) 时间的差值。因此,总传输时间是5.-0. = 5.4294 秒。因此,TCP 连接的吞吐量为/5.4294 = 30.222 KByte/sec13. Use the Time-Sequence-Graph(Stevens) plotting tool to view the sequence number versu

25、s time plot of segments being sent from the client to the server. Can you identify where TCPs slow start phase begins and ends, and where congestion avoidance takes over? Comment on ways in which the measured data differs from the idealized behavior of TCP that weve studied in the

26、text.答:慢启动阶段即从HTTP POST 报文段发出时开始,但是无法判断什么时候慢启动结束,拥塞避免阶段开始。慢启动阶段和拥塞避免阶段的鉴定取决于发送方拥塞窗口的大小。拥塞窗口的大小并不能从时间序号图(time-sequence-graph)直接获得。然而在一个发送方中未被确认的数据量(即in flight 数据量)不会超过CongWin(拥塞窗口)和RcvWindow(接收窗口)中的最小值,即LastByteSend-LastByteAcked=8192(因为in flight data 从未超过8192)。 但是,从第10题(即从时间序号图)得,没有分组丢失(不管是超时,还是三个冗余

27、ACK),因此无法判断什么时候慢启动结束,拥塞避免阶段开始。发出但未被确认的数据。TypeNo.Seq.ACKed seq.in flight dataData41565Data55662025ACK65661460Data720262920Data834864380ACK920262920Data1049464380Data1164065840ACK1234864380Data1378665527ACK1440964917ACK1560063007ACK1678661147ACK1790130Data1890131460Data19104732920Data20119334380Data21

28、133935840Data22148537300Data23163138192ACK24104736732ACK25119335272ACK26133933812ACK27148532352ACK2816313892ACK29172050Data30172051460Data31186652920Data32201254380Data33215855840Data34230457300Data35245058192ACK36186656732ACK37201255272ACK38215853812ACK39230452352ACK4024505892ACK41253970Data4225397

29、1460Data43268572920Data44283174380Data45297775840Data46312377300Data47326978192ACK48268576732ACK49283175272ACK50297773812ACK51312371752ACK52335890Data53335896732Data54350495272Data55365093812Data56379692352Data5739429892Data58408890ACK59350496732ACK60379693812ACK6140889892ACK62417810Data63417811460D

30、ata64432412920Data65447014380Data66461615840Data67476217300Data68490818192ACK69447015272ACK70476212352ACK71499730Data72499731460Data73514332920Data74528934380Data75543535840Data76558137300Data77572738192ACK78528935272ACK79558132352ACK80581650Data81581651460TCP的发送方会试探性的发送数据(即慢启动阶段),如果太多的数据使网络拥塞了,那么发送

31、方会根据AIMD算法进行调整。但是在实际中,TCP的行为主要依赖于应用程序怎么设计。在这次抓包中,在发送方还可以发送数据的时候,已经没有数据可发了。在web应用中,有些web对象比较小,在慢启动还没有结束之前,传送就结束啦,因此,传送小的web对象受到TCP慢启动阶段的影响,导致较长的延迟。14. Answer each of two questions above for the trace that you have gathered when you transferred a file from your computer to 。答:慢启动阶段即从HTTP POST 报文段发出时开始,但是无法判断什么时候慢启动结束,拥塞避免阶段开始。慢启动阶段和拥塞避免阶段的鉴定取决于发送方拥塞窗口的大小。拥塞窗口的大小并不能从时间序号图(time-sequence-graph)直接获得。然而在一个发送方中未被确认的数据量(即in flight 数据量)不会超过CongWin(拥塞窗口)和RcvWindow(接收窗口)中的最小值,即LastByte

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论