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

C

The document is a lab assignment for Week #2 focused on HTTP and TCP protocols, detailing various tasks and questions related to packet traces. It includes answers regarding HTTP versions, IP addresses, status codes, and TCP segment details. The assignment covers interactions such as basic HTTP GET requests, conditional GET responses, retrieving long documents, and HTTP authentication.

Uploaded by

Aryan Maurya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

C

The document is a lab assignment for Week #2 focused on HTTP and TCP protocols, detailing various tasks and questions related to packet traces. It includes answers regarding HTTP versions, IP addresses, status codes, and TCP segment details. The assignment covers interactions such as basic HTTP GET requests, conditional GET responses, retrieving long documents, and HTTP authentication.

Uploaded by

Aryan Maurya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

NETWORK LAB

LAB ASSIGNMENT for Week # 2


HTTP
Name: Danapana Rahul Reddy
Reg.No.: 20223078
Section: A
1. The Basic HTTP GET/response interaction
Note: Answer the following questions using the http-ethereal-trace-1 packet trace to
answer the questions below
1. Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is the server
running?
Sol:

The version of http is 1.1 .


2. What languages (if any) does your browser indicate that it can accept to the server?
Sol: The accepted languages by the server is en-us, en.
3. What is the IP address of your computer? Of the gaia.cs.umass.edu server?
Sol: The IP address of my computer is 172.31.133.57
And the IP server of gaia.cs.umass.edu is 128.119.245.12

4. What is the status code returned from the server to your browser?
Ans) The status code returned from the server is 200.
5. When was the HTML file that you are retrieving last modified at the server?
Sol: The HTML file last modified at the server was Tue,23 Sep 2003 05:29:00 GMT\r\n.

6. How many bytes of content are being returned to your browser?


Ans) The length of contents returned by browser is 73 bytes.
7.By inspecting the raw data in the packet content window, do you see any headers within
the data that are not displayed in the packet-listing window? If so, name one.
Sol: No headers.

2. The HTTP CONDITIONAL GET/response interaction


Note: Answer the following questions using the http-ethereal-trace-2 packet trace to
answer the questions below
8. Inspect the contents of the first HTTP GET request from your browser to the server. Do
you see an “IF-MODIFIED-SINCE” line in the HTTP GET?
Sol: There is no line like that.
9. Inspect the contents of the server response. Did the server explicitly return the contents of
the file? How can you tell?
Sol: Yes.

10. Now inspect the contents of the second HTTP GET request from your browser to the
server. Do you see an “IF-MODIFIED-SINCE:” line in the HTTP GET? If so, what
information follows the “IF-MODIFIED-SINCE:” header?
sol: Yes .

11. What is the HTTP status code and phrase returned from the server in response to this
second HTTP GET? Did the server explicitly return the contents of the file? Explain.
Sol: The HTTP status code is 304 and the response phrase is “Not Modified”.

No the server did not return the contents of the file as it has not been modified since
the
given date.

3. Retrieving Long Documents


Note: Answer the following questions using the http-ethereal-trace-3 packet trace to
answer the questions below
12. How many HTTP GET request messages did your browser send? Which packet number
in the trace contains the GET message for the Bill or Rights?
Sol: There is only one HTTP GET request messages in the file. The packet number that
contains the trace of GET message is 8.

13. Which packet number in the trace contains the status code and phrase associated with
the response to the HTTP GET request?
Sol: The packet number that contains the status code and response phrase is 14.

14. What is the status code and phrase in the response?


Sol: The status code is 200 and The response phrase is ”OK”.
15. How many data-containing TCP segments were needed to carry the single HTTP
response and the text of the Bill of Rights?
Sol: The segment count is 4.

4. HTML Documents with Embedded Objects


Note: Answer the following questions using the http-ethereal-trace-4 packet trace to
answer the questions below
16. How many HTTP GET request messages did your browser send? To which Internet
addresses were these GET requests sent?

Sol: There are 3 HTTP GET request messages.


IP.Dst: 128.119.245.12,
IP.Dst: 165.193.123.218,
IP.Dst: 134.241.6.82 .
17. Can you tell whether your browser downloaded the two images serially, or whether they
were downloaded from the two web sites in parallel? Explain.

Sol: No they are not downloaded parallely as their times are different.
Since the second image request was made before getting response of the first image request.

5. HTTP Authentications
Note: Answer the following questions using the http-ethereal-trace-5 packet trace to answer
the questions below
18. What is the server’s response (status code and phrase) in response to the initial HTTP
GET message from your browser?
Ans) The status code is 200 and phrase is OK in response to initial HTTP.

19. When your browser’s sends the HTTP GET message for the second time, what new field
is included in the HTTP GET message?
Sol: A new field called Refer is added in the HTTP GET Message.

TCP
1. A first look at the captured trace
Note: Answer the following questions using the tcp-ethereal-trace-1 packet trace to answer
the questions below
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”.
Sol: The source IP address is 192.168.1.102 and the source port number is 1161.

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?
Sol: The destination IP address is 128.119.245.12 receiving on port 80

2. TCP Basics
Note: Answer the following questions using the tcp-ethereal-trace-1 packet trace to answer
the questions below:
3. 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?
Sol: Sequence number of the TCP SYN segment that is used to initiate the TCP connection
between the client computer and gaia.cs.umass.edu. The value is 0 in this trace.

The SYN flag is set to 1 and it indicates that this segment is a SYN segment.
4.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?
Sol:

Sequence number of the SYNACK segment from gaia.cs.umass.edu to the client computer
in reply to the SYN has the value of 0 in this trace. The value of the acknowledgement field
in the SYNACK segment is 1. The value of the acknowledgement field in the SYNACK
segment is determined by gaia.cs.umass.edu by adding 1 to the initial sequence number of
SYN segment from the client computer (i.e. the sequence number of the SYN segment
initiated by the client computer is 0.).

The SYN flag and Acknowledgement flag in the segment are set to 1 and they indicate that
this segment is a SYNACK segment.
5.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.
Sol: The sequence number of the TCP segment is 1.

6. 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?
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.
Sol:
Sequence Number:
1 t=0.026477 Ack= 0.053937 RTT=0.02746
566 t=0.041737 Ack=0.077294 RTT=0.035557
2026 t=0.054026 Ack=0.124085 RTT=0.070059
3486 t=0.054690 Ack=0.169118 RTT=0.114428
4946 t=0.077405 Ack=0.217299 RTT=0.139894
6406 t=0.078157 Ack=0.267802 RTT=0.189645

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


Sol:
565
1460
1460
1460
1460
1460

8. 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?
Sol:

9. Are there any retransmitted segments in the trace file? What did you check for (in the
trace) in order to answer this question?
Sol: No
10. How much data does the receiver typically acknowledge in an ACK? Can you identify
cases where the receiver is ACKing every other received segment.
Sol: 1460.
11. What is the throughput (bytes transferred per unit time) for the TCP connection? Explain
how you calculated this value.p
Sol: TCP Segment Len : 1460 bytes
First packet sent at 0.288472s
Last packet sent at 0.322191s
Throughput=Total Time Taken (in seconds)/Total Data Transferred (in bytes).
= 1460 / 0.033719
= 43299.030 bytes/s.

You might also like