0% found this document useful (0 votes)
192 views5 pages

Capturing A Bulk TCP Transfer From Your Computer To A Remote Server

This document provides instructions for a lab assignment analyzing TCP and UDP network traffic using Wireshark. For the TCP portion, students are asked to capture traffic from uploading a file to a remote server, then analyze characteristics like sequence numbers, timestamps, throughput calculation. For UDP, students select a packet to examine fields like header length, port numbers, and protocol identifiers. The goal is to learn how TCP and UDP function by directly observing real network packets.

Uploaded by

徐逸明
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
192 views5 pages

Capturing A Bulk TCP Transfer From Your Computer To A Remote Server

This document provides instructions for a lab assignment analyzing TCP and UDP network traffic using Wireshark. For the TCP portion, students are asked to capture traffic from uploading a file to a remote server, then analyze characteristics like sequence numbers, timestamps, throughput calculation. For UDP, students select a packet to examine fields like header length, port numbers, and protocol identifiers. The goal is to learn how TCP and UDP function by directly observing real network packets.

Uploaded by

徐逸明
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Computer Networking Lab

Dr. Mustafa Saed


Assignment-7
WireShark Lab-4 TCP-UDP

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


server

• Start up your web browser. Go the http://gaia.cs.umass.edu/wireshark-


labs/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.

1
Computer Networking Lab
Dr. Mustafa Saed

2. A first look at the captured trace


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

Since this lab is about TCP rather than HTTP, let’s change Wireshark’s “listing of
captured packets” window so that it shows information about the TCP segments
containing the HTTP messages, rather than about the HTTP messages. To have
Wireshark do this, select Analyze->Enabled Protocols. Then uncheck the HTTP box and
select OK. You should now see a Wireshark window that looks like:

2
Computer Networking Lab
Dr. Mustafa Saed

This is what we’re looking for - a series of TCP segments sent between your computer
and gaia.cs.umass.edu.

3. TCP Basics
Answer the following questions for the TCP segments:

2. 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?
3. 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?
4. 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.
5. 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?
3
Computer Networking Lab
Dr. Mustafa Saed
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.
6. What is the length of each of the first six TCP segments? 1
7. 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?
8. Are there any retransmitted segments in the trace file? What did you check for (in
the trace) in order to answer this question?
9. 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).
10. What is the throughput (bytes transferred per unit time) for the TCP connection?
Explain how you calculated this value.

4. TCP congestion control in action

Let’s now examine the amount of data sent per unit time from the client to the server.
Rather than (tediously!) calculating this from the raw data in the Wireshark window,
we’ll use one of Wireshark’s TCP graphing utilities - Time-Sequence-Graph(Stevens) - to
plot out data.
• Select a TCP segment in the Wireshark’s “listing of captured-packets” window.
Then select the menu : Statistics->TCP Stream Graph-> Time-Sequence-
Graph(Stevens).

11. 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.
12. 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.edu

4
Computer Networking Lab
Dr. Mustafa Saed

UDP
Start capturing packets in Wireshark and then do something that will cause your host to
send and receive several UDP packets. It’s also likely that just by doing nothing (except
capturing packets via Wireshark) that some UDP packets sent by others will appear in
your trace. In particular, the Simple Network Management Protocol (sends SNMP
messages inside of UDP, so it’s likely that you’ll find some SNMP messages (and
therefore UDP packets) in your trace.

After stopping packet capture, set your packet filter so that Wireshark only displays the
UDP packets sent and received at your host. Pick one of these UDP packets and expand
the UDP fields in the details window.
Whenever possible, when answering a question below, you should hand in a printout of
the packet(s) within the trace that you used to answer the question asked. Annotate the
printout 2 to explain your answer. To print a packet, use File->Print, choose Selected
packet only, choose Packet summary line, and select the minimum amount of packet
detail that you need to answer the question.

1. Select one UDP packet from your trace. From this packet, determine how many
fields there are in the UDP header. (You shouldn’t look in the textbook! Answer
these questions directly from what you observe in the packet trace.) Name these
fields.
2. By consulting the displayed information in Wireshark’s packet content field for
this packet, determine the length (in bytes) of each of the UDP header fields.
3. The value in the Length field is the length of what? (You can consult the text for
this answer). Verify your claim with your captured UDP packet.
4. What is the maximum number of bytes that can be included in a UDP payload?
(Hint: the answer to this question can be determined by your answer to 2. above)
5. What is the largest possible source port number? (Hint: see the hint in 4.)
6. What is the protocol number for UDP? Give your answer in both hexadecimal and
decimal notation. To answer this question, you’ll need to look into the Protocol
field of the IP datagram containing this UDP segment.
7. Examine a pair of UDP packets in which your host sends the first UDP packet and
the second UDP packet is a reply to this first UDP packet. (Hint: for a second
packet to be sent in response to a first packet, the sender of the first packet should
be the destination of the second packet). Describe the relationship between the
port numbers in the two packets.

You might also like