计算机网络实验3TCP实验Word文档格式.docx

上传人:b****5 文档编号:19058682 上传时间:2023-01-03 格式:DOCX 页数:17 大小:1.06MB
下载 相关 举报
计算机网络实验3TCP实验Word文档格式.docx_第1页
第1页 / 共17页
计算机网络实验3TCP实验Word文档格式.docx_第2页
第2页 / 共17页
计算机网络实验3TCP实验Word文档格式.docx_第3页
第3页 / 共17页
计算机网络实验3TCP实验Word文档格式.docx_第4页
第4页 / 共17页
计算机网络实验3TCP实验Word文档格式.docx_第5页
第5页 / 共17页
点击查看更多>>
下载资源
资源描述

计算机网络实验3TCP实验Word文档格式.docx

《计算机网络实验3TCP实验Word文档格式.docx》由会员分享,可在线阅读,更多相关《计算机网络实验3TCP实验Word文档格式.docx(17页珍藏版)》请在冰豆网上搜索。

计算机网络实验3TCP实验Word文档格式.docx

SYNACKsegment中ACKnowledgement的值为1;

ACKnowledgementnumber的值为SYN消息中sequencenumber加上1所得;

SYN和Acknowledgementf都置为1说明这是一个SYNACKsegment.

6.WhatisthesequencenumberoftheTCPsegmentcontainingtheHTTPPOST

commandNotethatinordertofindthePOSTcommand,you’llneedtodiginto

thepacketcontentfieldatthebottomoftheWiresharkwindow,lookingfora

segmentwitha“POST”withinitsDATAfield.

第四号报文段是包含HTTPPOST命令的TCPsegment.且报文段的序列号为1.

7.ConsidertheTCPsegmentcontainingtheHTTPPOSTasthefirstsegmentinthe

TCPconnection.WhatarethesequencenumbersofthefirstsixsegmentsintheTCPconnection(includingthesegmentcontainingtheHTTPPOST)AtwhattimewaseachsegmentsentWhenwastheACKforeachsegmentreceivedGiventhedifferencebetweenwheneachTCPsegmentwassent,andwhenitsacknowledgementwasreceived,whatistheRTTvalueforeachofthesixsegmentsWhatistheEstimatedRTTvalue(seepage249intext)afterthereceiptofeachACKAssumethatthevalueoftheEstimatedRTTisequaltothemeasuredRTTforthefirstsegment,andtheniscomputedusingtheEstimatedRTTequationonpage249forallsubsequent:

WiresharkhasanicefeaturethatallowsyoutoplottheRTTforeachoftheTCPsegmentssent.SelectaTCPsegmentinthe“listingofcapturedpackets”windowthatisbeingsentfromtheclienttoserver.Thenselect:

Statistics->

TCPStreamGraph->

RoundTripTimeGraph.

Segment1

Segment2

Segment3

Segment4

Segment5

Segment6

前6个报文段为,5,7,8,10,11.对应的ACK分别为,9,12,14,15,16.

前6个报文段截图如下:

报文段的序列号为每个报文段的首字节加1,所以序列号为:

Segment1sequencenumber:

1

Segment2sequencenumber:

566

Segment3sequencenumber:

2026

Segment4sequencenumber:

3486

Segment5sequencenumber:

4946

Segment6sequencenumber:

6406

报文段的发送时间和相应ACK的到达时间如下表:

:

Sendtime

ACKreceivedtime

RTTseconds

EstimatedRTT=*EstimatedRTT+*SampleRTT

接受到报文段1之后的EstimatedRTT为:

EstimatedRTT=RTTforsegment1=second

接受到报文段2之后的EstimatedRTT为:

EstimatedRTT=*+*=sencond

接受到报文段3之后的EstimatedRTT为:

EstimatedRTT=*+*=second

接受到报文段4之后的EstimatedRTT为:

接受到报文段5之后的EstimatedRTT为:

接受到报文段6之后的EstimatedRTT为:

8.WhatisthelengthofeachofthefirstsixTCPsegments

前6个段的长度分别为:

565、1460、1460、1460、1460、1460字节。

9.Whatistheminimumamountofavailablebufferspaceadvertisedatthereceived

fortheentiretraceDoesthelackofreceiverbufferspaceeverthrottlethe

sender

接收方通知给发送方的最低窗口大小为5840字节,即在服务器端传回的第一个ACK中的窗口大小。

接收方的窗口大小没有抑制发送方的传输速率,因为窗口大小从5840逐步增加到62780,窗口大小始终大于发送方发送的分组的容量。

10.ArethereanyretransmittedsegmentsinthetracefileWhatdidyoucheckfor(in

thetrace)inordertoanswerthisquestion

没有,从TCP报文段的序列号中可以得出以上结论。

从上图中的时间—序号图可以看出,从源端发往目的端的序号逐渐递增,如果这其中有重传的报文段,则其序号中应该有小于其临近的分组序号的分组,在图中未看到这样的分组,所以没有被重传的分组。

11.HowmuchdatadoesthereceivertypicallyacknowledgeinanACKCanyou

identifycaseswherethereceiverisACKingeveryotherreceivedsegment

右下图得,接收方在一个ACK确认的数据大小一般为1460字节。

TheAcknowledgedsequencenumberandtheAcknowledgeddata:

Acknowledgedsequencenumber

Acknowledgeddata

ACK1

ACK2

1460

ACK3

ACK4

ACK5

ACK6

7866

ACK7

9013

1147

ACK8

10473

ACK9

11933

ACK10

13393

ACK11

14853

报文段确认数据为2920bytes=1460*2bytes,即=2920.

12.Whatisthethroughput(bytestransferredperunittime)fortheTCPconnection

Explainhowyoucalculatedthisvalue.

TCP吞吐量计算很大程度上取决于所选内容的平均时间。

作为一个普通的吞吐量计算,在这问题上,选择整个连接的时间作为平均时间段。

然后,此TCP连接的平均吞吐量为总的传输数据与总传输时间的比值。

传输的数据总量为TCP段第一个序列号(即第4段的1字节)和最后的序列号的ACK(第202段的164091个字节)之间的差值。

因此,总数据是164091-1=164090字节。

整个传输时间是第一个TCP段(即4号段秒)的时间和最后的ACK(即第202段秒)时间的差值。

因此,总传输时间是=秒。

因此,TCP连接的吞吐量为164090/=KByte/sec

13.UsetheTime-Sequence-Graph(Stevens)plottingtooltoviewthesequencenumberversustimeplotofsegmentsbeingsentfromtheclienttotheserver.CanyouidentifywhereTCP’sslowstartphasebeginsandends,andwherecongestionavoidancetakesoverCommentonwaysinwhichthemeasureddatadiffersfromtheidealizedbehaviorofTCPthatwe’vestudiedinthetext.

答:

慢启动阶段即从HTTPPOST报文段发出时开始,但是无法判断什么时候慢启动结束,拥塞避免阶段开始。

慢启动阶段和拥塞避免阶段的鉴定取决于发送方拥塞窗口的大小。

拥塞窗口的大小并不能从时间—序号图(time-sequence-graph)直接获得。

然而在一个发送方中未被确认的数据量(即inflight数据量)不会超过CongWin(拥塞窗口)和RcvWindow(接收窗口)中的最小值,即LastByteSend-LastByteAcked<

=min{CongWin,RcvWindow}。

同时,在第9题中看到,接收方通告给发送方的窗口大小并没有遏制发送速率。

因此,未被确认的数据量(即inflight数据量),是由拥塞窗口决定的,所以通过发出而未被确认的数据量(即inflight数据量),我们可以估计拥塞窗口大小的下界。

下表列出了部分inflight数据量,从表中可以看出拥塞窗口的下界>

=8192(因为inflightdata从未超过8192)。

但是,从第10题(即从时间—序号图)得,没有分组丢失(不管是超时,还是三个冗余ACK),因此无法判断什么时候慢启动结束,拥塞避免阶段开始。

Type

No.

Seq.

ACKedseq.

inflightdata

Data

4

565

5

2025

ACK

6

7

2920

8

4380

9

10

11

5840

12

13

5527

14

4096

4917

15

6006

3007

16

17

18

19

20

21

22

7300

23

16313

8192

24

6732

25

5272

26

3812

27

2352

28

892

29

17205

30

31

18665

32

20125

33

21585

34

23045

35

24505

36

37

38

39

40

41

25397

42

43

26857

44

28317

45

29777

46

31237

47

32697

48

49

50

51

1752

52

33589

53

54

35049

55

36509

56

37969

57

39429

58

40889

59

60

61

62

41781

63

64

43241

65

44701

66

46161

67

47621

68

49081

69

70

71

49973

72

73

51433

74

52893

75

54353

76

55813

77

57273

78

79

58165

81

TCP的发送方会试探性的发送数据(即慢启动阶段),如果太多的数据使网络拥塞了,那么发送方会根据AIMD算法进行调整。

但是在实际中,TCP的行为主要依赖于应用程序怎么设计。

在这次抓包中,在发送方还可以发送数据的时候,已经没有数据可发了。

在web应用中,有些web对象比较小,在慢启动还没有结束之前,传送就结束啦,因此,传送小的web对象受到TCP慢启动阶段的影响,导致较长的延迟。

14.Answereachoftwoquestionsaboveforthetracethatyouhavegatheredwhenyoutransferredafilefromyourcomputerto。

=9015(因为inflightdata从未超过9015)。

823

824

2283

2284

3743

3744

5203

5204

6663

6664

8123

8124

9015

7555

6096

9016

10476

11936

13396

14856

16316

17208

18668

20128

21588

23048

24508

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 求职职场 > 简历

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

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