Tuesday, 24 May 2016

Wireshark Lab DNS Solution

Link to download document down below! (Microsoft Word format)

1.  Locate the DNS query and response messages. Are they sent over UDP or TCP?

Answer: They sent over UDP.




2.  What is the destination port for the DNS query message? What is the source port of DNS response message?

Answer: 
Destination port: domain (53)
Source port: domain (53)


3.  To what IP address is the DNS query message sent? Use ipconfig to determine the IP address of your local DNS server. Are these two IP addresses the same?

Answer: 172.18.41.2, yes the two IP addresses are the same.


4.  Examine the DNS query message. What “Type” of DNS query is it? Does the query message contain any “answers”?

Answer: Type: A (Host address), the query message does not contain any “answers”.



5.  Examine the DNS response message. How many “answers” are provided? What does each of these answers contain?

Answer: 
1 “answers” is provided.
The answer contains: www.ietf.org: type A, class IN, addr 12.22.58.30


6.  This web page contains images. Before retrieving each image, does your host issue new DNS queries?

Answer:
No.

Download Link:

How To Download:
Please disable any Ad Block software if any beforehand or this may not work properly.

1. Please wait for 5 seconds.


2. Click on "Skip Ad".


3. Click on "Download through your browser".


Wireshark Lab DHCP Solution

Link to download document down below! (Microsoft Word format)

1.  Are DHCP messages sent over UDP or TCP?

Answer: DHCP messages are sent over UDP (User Datagram Protocol).



2.  Draw a timing datagram illustrating the sequence of the first four-packet Discover/Offer/Request/ACK DHCP exchange between the client and server. For each packet, indicated the source and destination port numbers. Are the port numbers the same as in the example given in this lab assignment?

Answer: The port numbers are the same as the example given in this lab assignment.


3.  What is the link-layer (e.g., Ethernet, MAC) address of your host?

Answer: The link-layer address of my host is (00:25:64:e7:3b:2e)


4.  What values in the DHCP discover message differentiate this message from the DHCP request message?

Answer: The values which differentiate the Discover message from the Request message are in “Option: (t=53,l=1) DHCP Message Type”



5.  What is the value of the Transaction-ID in each of the first four (Discover/Offer/Request/ACK) DHCP messages? What are the values of the Transaction-ID in the second set (Request/ACK) set of DHCP messages? What is the purpose of the Transaction-ID field?

Answer: 
Discover - Transaction ID 0x752c8ad1
Offer    - Transaction ID 0x752c8ad1
Request - Transaction ID 0x752c8ad1
ACK      - Transaction ID 0x752c8ad1


6.  A host uses DHCP to obtain an IP address, among other things. But a host’s IP address is not confirmed until the end of the four-message exchange! If the IP address is not set until the end of the four-message exchange, then what values are used in the IP datagrams in the four-message exchange? For each of the four DHCP messages (Discover/Offer/Request/ACK DHCP), indicate the source and destination IP addresses that are carried in the encapsulating IP datagram.

Answer: The DCHP client and server both use 255.255.255.255 as the destination address. The client uses source IP address 0.0.0.0, while the server uses its actual IP address as the source.


7.  What is the IP address of your DHCP server?

Answer: The IP address of the DHCP server is 172.18.218.1

8.  What IP address is the DHCP server offering to your host in the DHCP Offer message? Indicate which DHCP message contains the offered DHCP address.

Answer: The DHCP server offered the IP address 172.18.218.105 to my client machine. The DHCP message with “DHCP Message Type = DHCP Offer” contained the offered IP.


9.  Explain the purpose of the router and subnet mask lines in the DHCP offer message.

Answer: The router line indicates to the client what its default gateway should be. The subnet mask line tells the client which subnet mask it should use.



10.  In the example screenshots in this assignment, the host requests the offered IP address in the DHCP Request message. What happens in your own experiment?

Answer: In my experiment, the host requests the offered IP address in the DHCP Request message.



11.  Explain the purpose of the lease time. How long is the lease time in your experiment?

Answer: The lease time is the amount of time the DHCP server assigns an IP address to a client. During the lease time, the DHCP server will not assign the IP given to the client to another client, unless it is released by the client. Once the lease time has expired, the IP address can be reused by the DHCP server to give to another client. In my experiment, the lease time is 8 days.




12.  What is the purpose of the DHCP release message? Does the DHCP server issue an acknowledgment of receipt of the client’s DHCP request? What would happen if the client’s DHCP release message is lost?

Answer: The client sends a DHCP Release message to cancel its lease on the IP address given to it by the DHCP server. The DHCP server does not send a message back to the client acknowledging the DHCP Release message. If the DHCP Release message from the client is lost, the DHCP server would have to wait until the lease period is over for that IP address until it could reuse it for another client.

Download Link:

How To Download:
Please disable any Ad Block software if any beforehand or this may not work properly.

1. Please wait for 5 seconds.


2. Click on "Skip Ad".


3. Click on "Download through your browser".


Wireshark Lab HTTP Solution

Link to download document down below! (Microsoft Word format)


1.  Is your browser running HTTP version 1.0 or 1.1?  What version of HTTP is the server running? 

Answer: Both are running HTTP version 1.1




2.  What languages (if any) does your browser indicate that it can accept to the server?

Answer: Accept-Language: en-us


3.  What is the status code returned from the server to your browser? 

Answer: HTTP/1.1 200 OK (text/html)



4.  When was the HTML file that you are retrieving last modified at the server? 

Answer: Last-Modified: Thu, 12 Sep 2013 08:03:01 GMT


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

Answer: 382 bytes


6.  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.

HTTP/1.1 404 Not Found (text/html)

The server did not explicitly return the contents of the file because the file could not be found.




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 two.

Answers: No, all headers can be found in the raw data.

Download Link:

How To Download:
Please disable any Ad Block software if any beforehand or this may not work properly.

1. Please wait for 5 seconds.


2. Click on "Skip Ad".


3. Click on "Download through your browser".




Wireshark Lab TCP Solution

Link to download document down below! (Microsoft Word format)


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.

Answer:
The client IP address is 172.19.217.58, TCP port number is 50403

Screenshot
Figure 1: SYN packet



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?

Answer:
gaia.cs.umass.edu’s IP address is 128.119.245.12, port number is 80

Screenshot
Figure 2: SYN ACK packet


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? What is it in the segment that identifies the segment as a SYN segment?

Answer: The sequence number of the TCP SYN segment is 0 since it is used to imitate the TCP connection between the client computer and gaia.cs.umass.edu. According to the screenshot below, in the Flags section, the SYN flag is set to 1 which indicates that this segment is a SYN segment.

Screenshot
Figure 3: SYN seq num + flag



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

Answer: According to the screenshot below, the sequence number of the SYN_ACK segment sent by gaia.cs.umass.edu to the client computer in reply to the SYN is 0. The value of the acknowledgement field in the SYN_ACK segment is determined by the server gaia.cs.umass.edu. The server adds 1 to the initial sequence number of the SYN segment from the client computer. For this case, the initial sequence number of the SYN segment from the client computer is 0, thus the value of the acknowledgement field in the SYN_ACK segment is 1. A segment will be identified as a SYN_ACK segment if both SYN flag and ACKnowledgement flag in the segment are set to 1.

Screenshot




6.     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.

Answer: The sequence number of the TCP segment containing the HTTP Post command is 1.

Screenshot
Figure 4: HTTP Post

7.     Consider the TCP connection.
a.     What are the sequence numbers of the first six segments in the TCP connection?

Answer: Sequence number for segment 1 is 1, sequence number for segment 2 is 1401.

Screenshot:



b.     At what time was each segment sent?

Answer: 1.738554 s for segment 1 and 2.026161 s for segment 2.

Screenshot:



c.     When was the ACK for each segment received?

Answer: ACK for segment 1 was received at 2.026105 s and ACK for segment 2 is received at 2.311435 s.

Screenshot:






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

Answer:
RTT for segment 1 is 0.287551 seconds, RTT for segment 2 is 0.285274 seconds, RTT for segment 3 is 0.285261 seconds, RTT for segment 4 is 0.285369 seconds, RTT for segment 5 is 0.000176 seconds, RTT for segment 6 is 0.286297 seconds.

Segment
Packet Number
Sequence Number
Time Sent(s)
Time ACK received(s)
RTT(s)
1
38
1
1.738554
2.026105
0.287551
2
43
1401
2.026161
2.311435
0.285274
3
44
2801
2.026174
2.311435
0.285261
4
45
4201
2.026180
2.311549
0.285369
5
49
5601
2.311505
2.311681
0.000176
6
50
7001
2.311512
2.597809
0.286297

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

Answer:
The length of each of the first 6 TCP segments is 1400 bytes.

Segment
Packet Number
Sequence Number
Length(bytes)
Time Sent(s)
Time ACK received(s)
RTT(s)
1
38
1
1400
1.738554
2.026105
0.287551
2
43
1401
1400
2.026161
2.311435
0.285274
3
44
2801
1400
2.026174
2.311435
0.285261
4
45
4201
1400
2.026180
2.311549
0.285369
5
49
5601
1400
2.311505
2.311681
0.000176
6
50
7001
1400
2.311512
2.597809
0.286297

Screenshot:

Figure 5: Segment 1 Length


Figure 6: Segment 2 Length

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?

Answer:
The minimum amount of available buffer space advertised at the received is 17536 bytes.
Segment
Available Buffer Space Advertised At The Received
1
17536
2
20480
3
23424
4
26368
5
29312
6
32128

Screenshot:

Figure 7: Segment 1 Buffer


Figure 8: Segment 2 Buffer

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

Answer:
No there is no retransmitted segments in the trace file. This can be explained by packets with same sequence number at different time is not found.

Screenshot:



11.  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 247 in the text).

Answer: According to the screenshot below, we can see that the ACK numbers increase in the sequence of 1401, 2801, 4201, and so on. The ACK numbers increases by 1400 each time, indicating that the receiver is acknowledging 1400 bytes.

Screenshot:


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

Answer:



Screenshot:

Figure 9: Time Send First Segment


Figure 10: Time Send Last Segment


13.  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 slow start phase begins and ends, and where congestion avoidance takes over? Comment on ways in which the measured data differs from the idealized behaviour of TCP that we’ve studied in the text.

Answer:
By observing the plot, we can see that the slow-start phase only lasts for first 1-1.5 second. Afterwards, it seems that the TCP session is always in congestion avoidance state. In this case, we do not observe the expected linear increase behaviour, i.e. the TCP transmit window does not grow linearly during this phase. In fact, it appears that the sender transmits packets in batches of 6. This does not seem to be caused by flow control since the receiver advertised window is significantly larger than 5 packets. The reason for this behaviour might be due to the fact that the HTTP server has enforced a rate-limit of some sort.

Screenshot:


Download Link:

How To Download:
Please disable any Ad Block software if any beforehand or this may not work properly.

1. Please wait for 5 seconds.


2. Click on "Skip Ad".


3. Click on "Download through your browser".