【Wireshark Lab v8.0】Lab4:TCP


1.Capturing a bulk TCP transfer from your computer to a remote server

按照下述步骤使用wireshark进行抓包

? Start up your web browser. Go the http://gaia.cs.umass.edu/wiresharklabs/alice.txt and retrieve an ASCII copy of Alice in Wonderland. Store this file somewhere on your computer.

? Next go to http://gaia.cs.umass.edu/wireshark-labs/TCP-wireshark-file1.html.

? You should see a screen that looks like:

? Use the Browse button in this form to enter the name of the file (full path name) on your computer containing Alice in Wonderland (or do so manually). Don’t yet press the “Upload alice.txt file” button.

? Now start up Wireshark and begin packet capture (Capture->Start) and then press OK on the Wireshark Packet Capture Options screen (we’ll not need to select any options here).

? Returning to your browser, press the “Upload alice.txt file” button to upload the file to the gaia.cs.umass.edu server. Once the file has been uploaded, a short congratulations message will be displayed in your browser window.

? Stop Wireshark packet capture. Your Wireshark window should look similar to the window shown below.

抓包结果如下

image-20220225190635387

2.A first look at the captured trace

  1. What is the IP address and TCP port number used by the client computer (source) that is transferring the file to gaia.cs.umass.edu? To answer this question, it’s probably easiest to select an HTTP message and explore the details of the TCP packet used to carry this HTTP message, using the “details of the selected packet header window” (refer to Figure 2 in the “Getting Started with Wireshark” Lab if you’re uncertain about the Wireshark windows.

    image-20220226130601223

  2. What is the IP address of gaia.cs.umass.edu? On what port number is it sending and receiving TCP segments for this connection?

    image-20220226130649476

  3. What is the IP address and TCP port number used by your client computer (source) to transfer the file to gaia.cs.umass.edu?

    image-20220226130601223

3.TCP Basics

  1. What is the sequence number of the TCP SYN segment that is used to initiate the TCP connection between the client computer and gaia.cs.umass.edu? What is it in the segment that identifies the segment as a SYN segment?

    image-20220226131219687

  2. What is the sequence number of the SYNACK segment sent by gaia.cs.umass.edu to the client computer in reply to the SYN? What is the value of the Acknowledgement field in the SYNACK segment? How did gaia.cs.umass.edu determine that value? What is it in the segment that identifies the segment as a SYNACK segment?

    acknowledgement = sequence number+1

    image-20220226131338148

  3. What is the sequence number of the TCP segment containing the HTTP POST command? Note that in order to find the POST command, you’ll need to dig into the packet content field at the bottom of the Wireshark window, looking for a segment with a “POST” within its DATA field.

    image-20220226131718932

  4. Consider the TCP segment containing the HTTP POST as the first segment in the TCP connection. What are the sequence numbers of the first six segments in the TCP connection (including the segment containing the HTTP POST)? At what time was each segment sent? When was the ACK for each segment received? Given the difference between when each TCP segment was sent, and when its acknowledgement was received, what is the RTT value for each of the six segments? What is the EstimatedRTT value (see Section 3.5.3, page 242 in text) after the receipt of each ACK? Assume that the value of the EstimatedRTT is equal to the measured RTT for the first segment, and then is computed using the EstimatedRTT equation on page 242 for all subsequent segments. Note: Wireshark has a nice feature that allows you to plot the RTT for each of the TCP segments sent. Select a TCP segment in the “listing of captured packets” window that is being sent from the client to the gaia.cs.umass.edu server. Then select: Statistics->TCP Stream Graph- >Round Trip Time Graph. (带计算)

    image-20220226150333959

    image-20220226150446747

  5. What is the length of each of the first six TCP segments?

    第一个长度是565,第2个和第6个长度均是1460

    image-20220226150710291

    image-20220226150732797

  6. What is the minimum amount of available buffer space advertised at the received for the entire trace? Does the lack of receiver buffer space ever throttle the sender? (待补充)

  7. Are there any retransmitted segments in the trace file? What did you check for (in the trace) in order to answer this question? (无把握)

    image-20220226151355573

  8. How much data does the receiver typically acknowledge in an ACK? Can you identify cases where the receiver is ACKing every other received segment (see Table 3.2 on page 250 in the text). (待补充)

  9. What is the throughput (bytes transferred per unit time) for the TCP connection? Explain how you calculated this value.

    The alice.txt on the hard drive is 152,138 bytes, and the download time is 1.578736000 (First TCP segment) ‐ 0.271257000 (last ACK) = 1.307479 second. Therefore, the throughput for the TCP connection is computed as 152,138/1.307479=116359.803867 bytes/second(待确认)

4.TCP congestion control in action

  1. Use the Time-Sequence-Graph(Stevens) plotting tool to view the sequence number versus time plot of segments being sent from the client to the gaia.cs.umass.edu server. Can you identify where TCP’s slowstart 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 we’ve studied in the text. (待补充)

  2. Answer each of two questions above for the trace that you have gathered when you transferred a file from your computer to gaia.cs.umass.ed