Wireshark Lab: Analyzing TCP Segments

Overview

In this lab, you will use Wireshark to analyze a TCP connection established between your computer and the server at gaia.cs.umass.edu during the upload of a file. This lab focuses on HTTP over TCP, the TCP three-way handshake, data transmission, and segment-level behavior.


Part 1: File Preparation and Upload

  1. Open your web browser and download an ASCII version of Alice in Wonderland from: http://gaia.cs.umass.edu/wireshark-labs/alice.txt

Save the file as alice.txt on your local computer.

  1. Go to the following URL: http://gaia.cs.umass.edu/wireshark-labs/TCP-wireshark-file1.html

  2. Use the Browse button to select the alice.txt file you just downloaded.

  3. Do not upload yet!

  4. Open Wireshark and begin packet capture. (Use a filter like http or tcp if needed.)

  5. Return to the browser and click the “Upload alice.txt file” button. A short “congratulations” message should appear once the upload is complete.

  6. Stop the Wireshark capture.


Part 2: HTTP POST and TCP Analysis


Questions

1. Client IP and Port


2. Server IP and Port


3. TCP SYN Segment (Client to Server)


4. TCP SYN-ACK Segment (Server to Client)


5. TCP Segment with HTTP POST


6. TCP Timing and RTT

For the segment containing the HTTP POST:

For the second data-carrying segment:

Estimated RTT

Use α = 0.125, and let the initial EstimatedRTT equal the RTT of the first segment.

💡 Tip: Use Statistics → TCP Stream Graph → Round Trip Time Graph in Wireshark for visual RTT inspection.


7. Segment Lengths


8. Receiver Buffer Space (Window Size)


9. Retransmissions


10. Acknowledgment Behavior

Reference: See Table 3.2 in your textbook.


11. TCP Throughput

How to calculate: Throughput = Total Bytes Transferred / Total Transfer Time


Bonus: Time-Sequence Graph (Stevens)

To visualize how data was sent over time:

  1. Select a TCP segment sent from the client.
  2. Go to: Statistics → TCP Stream Graph → Time-Sequence Graph (Stevens)

  3. Observe and describe the shape of the graph:
    • Is it linear?
    • Are there gaps?
    • Any retransmissions?

You may need to adjust axes or zoom in for clarity.


Note: Be sure to save your packet capture file (.pcapng) for submission or reference.

Grading

Submit your lab report, including the packet capture file and screenshots, via Marmoset by the scheduled due date listed in the syllabus.

Note: Label your answers clearly using the question numbers above.

How to Save Your Packet Capture

  1. After stopping the capture in Wireshark, go to the File menu.
  2. Select Save As… or Save.
  3. Choose a location on your computer to save the capture file.
  4. Ensure the file extension is .pcap or .pcapng.
  5. Click Save.

Note: All answers should be derived directly from your Wireshark analysis.