




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、陜西師范大學(xué)計算機(jī)網(wǎng)絡(luò)實驗報告實驗五 探索TCP協(xié)議一、實驗?zāi)康?1.熟悉并掌握 wireshark的操作。 2.通過實驗分析并掌握TCP是如何進(jìn)行數(shù)據(jù)傳輸?shù)?,及其如何實現(xiàn)擁塞控制、流量控制等二、實驗器材 1.PC機(jī)電腦一臺。 2下載wireshark軟件并安裝三、實驗內(nèi)容通過實驗分析并掌握TCP是如何進(jìn)行數(shù)據(jù)傳輸?shù)?,及其如何實現(xiàn)擁塞控制、流量控制等四、問題回答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 被設(shè)置為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、“l(fā)isting 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. 對應(yīng)的ACK分別為 No.6,9,12,14,15,16. 前6個報文段截圖如下:報文段的序列號為每個報文段的首字節(jié)加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報文段的發(fā)送時間和相應(yīng)ACK 的到達(dá)時間如下表::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字節(jié)。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? 接收方通知給發(fā)送方的 最低大小為5840字節(jié)接收方窗口最大為62780字節(jié)答:接收方通知給發(fā)送方的最低窗口大小為5840字節(jié),即在服務(wù)器端傳回的第一個ACK中的窗口大小。 接收方的窗口大小沒有抑制發(fā)送方的傳輸速率,因為窗口大小從5840逐步增加到62780,窗口大小始終大于發(fā)送方發(fā)送的分組的容量。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報文段的序列號中可以得出以上結(jié)論。從上圖中的時間序號圖可以看出,從源端發(fā)往目的端的序號逐漸遞增,如果這其中有重傳的報文段,則其序號中應(yīng)該有小于其臨近的分組序號的分組,在圖中未看到這樣的分組,所以沒有被重傳的分組。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確認(rèn)的數(shù)據(jù)大小一般為1460字節(jié)。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報文段確認(rèn)數(shù)據(jù)為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 吞吐量計算很大程度上取決于所選內(nèi)容的平均時間。作為一個普通的吞吐量計算,在這問題上,選擇整個連接的時間作為平均時間段。然后,此TCP 連接的平均吞吐量為總的傳
24、輸數(shù)據(jù)與總傳輸時間的比值。傳輸?shù)臄?shù)據(jù)總量為TCP 段第一個序列號(即第4 段的1 字節(jié))和最后的序列號的ACK (第202 段的個字節(jié))之間的差值。因此,總數(shù)據(jù)是 -1 = 字節(jié)。整個傳輸時間是第一個 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 報文段發(fā)出時開始,但是無法判斷什么時候慢啟動結(jié)束,擁塞避免階段開始。慢啟動階段和擁塞避免階段的鑒定取決于發(fā)送方擁塞窗口的大小。擁塞窗口的大小并不能從時間序號圖(time-sequence-graph)直接獲得。然而在一個發(fā)送方中未被確認(rèn)的數(shù)據(jù)量(即in flight 數(shù)據(jù)量)不會超過CongWin(擁塞窗口)和RcvWindow(接收窗口)中的最小值,即LastByteSend-LastByteAcked=8192(因為in flight data 從未超過8192)。 但是,從第10題(即從時間序號圖)得,沒有分組丟失(不管是超時,還是三個冗余
27、ACK),因此無法判斷什么時候慢啟動結(jié)束,擁塞避免階段開始。發(fā)出但未被確認(rèn)的數(shù)據(jù)。TypeNo.Seq.ACKed seq.in flight dataData41565Data55662025ACK65661460Data720262920Data834864380ACK920262920Data1049464380Data1164065840ACK1234864380Data1378665527ACK1440964917ACK1560063007ACK1678661147ACK1790130Data1890131460Data19104732920Data20119334380Data21
28、133935840Data22148537300Data23163138192ACK24104736732ACK25119335272ACK26133933812ACK27148532352ACK2816313892ACK29172050Data30172051460Data31186652920Data32201254380Data33215855840Data34230457300Data35245058192ACK36186656732ACK37201255272ACK38215853812ACK39230452352ACK4024505892ACK41253970Data4225397
29、1460Data43268572920Data44283174380Data45297775840Data46312377300Data47326978192ACK48268576732ACK49283175272ACK50297773812ACK51312371752ACK52335890Data53335896732Data54350495272Data55365093812Data56379692352Data5739429892Data58408890ACK59350496732ACK60379693812ACK6140889892ACK62417810Data63417811460D
30、ata64432412920Data65447014380Data66461615840Data67476217300Data68490818192ACK69447015272ACK70476212352ACK71499730Data72499731460Data73514332920Data74528934380Data75543535840Data76558137300Data77572738192ACK78528935272ACK79558132352ACK80581650Data81581651460TCP的發(fā)送方會試探性的發(fā)送數(shù)據(jù)(即慢啟動階段),如果太多的數(shù)據(jù)使網(wǎng)絡(luò)擁塞了,那么發(fā)送
31、方會根據(jù)AIMD算法進(jìn)行調(diào)整。但是在實際中,TCP的行為主要依賴于應(yīng)用程序怎么設(shè)計。在這次抓包中,在發(fā)送方還可以發(fā)送數(shù)據(jù)的時候,已經(jīng)沒有數(shù)據(jù)可發(fā)了。在web應(yīng)用中,有些web對象比較小,在慢啟動還沒有結(jié)束之前,傳送就結(jié)束啦,因此,傳送小的web對象受到TCP慢啟動階段的影響,導(dǎo)致較長的延遲。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 報文段發(fā)出時開始,但是無法判斷什么時候慢啟動結(jié)束,擁塞避免階段開始。慢啟動階段和擁塞避免階段的鑒定取決于發(fā)送方擁塞窗口的大小。擁塞窗口的大小并不能從時間序號圖(time-sequence-graph)直接獲得。然而在一個發(fā)送方中未被確認(rèn)的數(shù)據(jù)量(即in flight 數(shù)據(jù)量)不會超過CongWin(擁塞窗口)和RcvWindow(接收窗口)中的最小值,即LastByte
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 土地使用權(quán)轉(zhuǎn)讓合同
- 油罐清洗施工方案
- 裝飾頂帽施工方案
- 公司員工聘用合同書
- 橋梁施工方案對比
- 纜索吊拱橋施工方案
- 2025年防雷防爆及弱電工程設(shè)備項目建議書
- 拆除溫感煙感探頭施工方案
- 酒店弱電養(yǎng)護(hù)方案
- 滁州商場指示牌施工方案
- (二模)2025年寶雞市高考模擬檢測試題(二)物理試卷(含答案)
- 基地種植合作合同范本
- 露天煤礦安全生產(chǎn)技術(shù)露天煤礦安全管理培訓(xùn)
- 2025年安徽警官職業(yè)學(xué)院單招職業(yè)傾向性測試題庫標(biāo)準(zhǔn)卷
- 2025年浙江寧波市江北區(qū)民政局招聘編外工作人員1人歷年高頻重點模擬試卷提升(共500題附帶答案詳解)
- 2025年湖南大眾傳媒職業(yè)技術(shù)學(xué)院單招職業(yè)技能測試題庫學(xué)生專用
- YB-T 6121-2023 鋼的晶間氧化深度測定方法
- 2025屆中交投資有限公司全球校園招聘來了筆試參考題庫附帶答案詳解
- 2025年南京旅游職業(yè)學(xué)院高職單招職業(yè)技能測試近5年??及鎱⒖碱}庫含答案解析
- 【2025年衛(wèi)生健康宣傳日】世界防治結(jié)核病日
- 物流倉儲的火災(zāi)防范
評論
0/150
提交評論