0% found this document useful (0 votes)
63 views

Lab TCP

This document describes a lab experiment using Wireshark to capture and analyze a TCP packet trace of transferring a file from a local computer to a remote server. The student is instructed to use Wireshark to capture the TCP segments during an HTTP POST of a 150KB file to a server. The trace is then analyzed to investigate TCP sequence numbers, segment sizes, round trip times (RTTs), and the TCP congestion control behavior during the file transfer. Key steps include identifying the client/server IP addresses and ports, sequence numbers of TCP SYN, SYN-ACK and segments containing the HTTP POST, calculating RTTs and estimated RTTs for the first six segments, determining the advertised receiver buffer size, and using the
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

Lab TCP

This document describes a lab experiment using Wireshark to capture and analyze a TCP packet trace of transferring a file from a local computer to a remote server. The student is instructed to use Wireshark to capture the TCP segments during an HTTP POST of a 150KB file to a server. The trace is then analyzed to investigate TCP sequence numbers, segment sizes, round trip times (RTTs), and the TCP congestion control behavior during the file transfer. Key steps include identifying the client/server IP addresses and ports, sequence numbers of TCP SYN, SYN-ACK and segments containing the HTTP POST, calculating RTTs and estimated RTTs for the first six segments, determining the advertised receiver buffer size, and using the
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Proyecto 2

Lab TCP
In this lab, we’ll investigate the behavior of the celebrated TCP protocol in detail. We’ll
do so by analyzing a trace of the TCP segments sent and received in transferring a 150KB
file (containing the text of Lewis Carrol’s Alice’s Adventures in Wonderland) from your
computer to a remote server.

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


remote server
Before beginning our exploration of TCP, we’ll need to use Wireshark to obtain a packet
trace of the TCP transfer of a file from your computer to a remote server. You’ll do so by
accessing a Web page that will allow you to enter the name of a file stored on your
computer (which contains the ASCII text of Alice in Wonderland), and then transfer the
file to a Web server using the HTTP POST. We’re using the POST method rather than
the GET method as we’d like to transfer a large amount of data from your computer to
another computer. Of course, we’ll be running Wireshark during this time to obtain the
trace of the TCP segments sent and received from your computer.

1
References to figures and sections are for the 8th edition of our text, Computer Networks, A Top-down
Approach, 8th ed., J.F. Kurose and K.W. Ross, Addison-Wesley/Pearson, 2020.
Do the following:
• 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.
If you are unable to run Wireshark on a live network connection, you can download a
packet trace file that was captured while following the steps above on one of the author’s
computers2. You may well find it valuable to download this trace even if you’ve
captured your own trace and use it, as well as your own trace, when you explore the
questions below.

2. A first look at the captured trace


Before analyzing the behavior of the TCP connection in detail, let’s take a high level
view of the trace.

• First, filter the packets displayed in the Wireshark window by entering


“TCP” (lowercase, no quotes, and don’t forget to press return after entering!)
into thedisplay filter specification window towards the top of the Wireshark
window.

What you should see is series of TCP and HTTP messages between your computer and
gaia.cs.umass.edu. You should see the initial three-way handshake containing a SYN
message. You should see an HTTP POST message. Depending on the version of

2
Download the zip file http://gaia.cs.umass.edu/wireshark-labs/wireshark-traces.zip and extract the file tcp-
ethereal-trace-1. The traces in this zip file were collected by Wireshark running on one of the author’s
computers, while performing the steps indicated in the Wireshark lab. Once you have downloaded the
trace, you can load it into Wireshark and view the trace using the File pull down menu, choosing Open, and
then selecting the tcp-ethereal-trace-1 trace file.
Wireshark you are using, you might see a series of “HTTP Continuation” messages being
sent from your computer to gaia.cs.umass.edu. Recall from our discussion in the earlier
HTTP Wireshark lab, that is no such thing as an HTTP Continuation message – this is
Wireshark’s way of indicating that there are multiple TCP segments being used to carry a
single HTTP message. In more recent versions of Wireshark, you’ll see “[TCP segment
of a reassembled PDU]” in the Info column of the Wireshark display to indicate that this
TCP segment contained data that belonged to an upper layer protocol message (in our
case here, HTTP). You should also see TCP ACK segments being returned from
gaia.cs.umass.edu to your computer.

Answer the following questions (Whenever possible,when answering a question you


should hand in a printout of the packet(s) within the tracethat you used to answer the
question asked. Annotate the printout3 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. 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? 10.100.241.130
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? 128.119.245.12
Source Port: 53092
Destination Port: 80
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:

3
What do we mean by “annotate”? If you hand in a paper copy, please highlight where in the printout
you’ve found the answer and add some text (preferably with a colored pen) noting what you found in what
you ‘ve highlight. If you hand in an electronic copy, it would be great if you could also highlight and
annotate.
3. TCP Basics
Sequence Number (raw): 1266329705
Answer the following questions for the TCP segments: Esta en el encabezado TCP del paquete que
contiene el segmento SYN
4. 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? where is
the SYN segment?
5. What is the sequence number of the SYN ACK segment sent by Sequence Number (raw):
gaia.cs.umass.edu to the client computer in reply to the SYN? 4159618439
Sequence Number: 6. What is the sequence number of the TCP segment containing the HTTP POST
152062 (relative command? Note that in order to find the POST command, you’ll need to dig into
sequence number) the packet content field at the bottom of the Wireshark window, looking for a
Sequence Number
segment with a “POST” within its DATA field.
(raw): 1266481767
7. 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 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.

The first RTT would be the first ACK – Sent.

Sent time ACK Received RTT (seconds)


time
Segment 1


Segment n

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

9. 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?

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). You should see a plot that looks similar to the following plot.
Analize the figure that you just obtained!!
Here, each dot represents a TCP segment sent, plotting the sequence number of
the segment versus the time at which it was sent. Note that a set of dots stacked
above each other represents a series of packets that were sent back-to-back by the
sender.

You might also like