0% found this document useful (0 votes)
55 views11 pages

CN Assignment 2

The document summarizes the details from a network lab experiment analyzing TCP and UDP packets captured in a Wireshark trace. For TCP, it provides the IP addresses and port numbers used in the connection, sequence numbers for different packet types, throughput calculations, and analysis of the slow start and congestion avoidance phases. For UDP, it identifies the fields in the UDP header, maximum payload and port sizes, the UDP protocol number, and relationship between port numbers in request/response packet pairs.

Uploaded by

mayank
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)
55 views11 pages

CN Assignment 2

The document summarizes the details from a network lab experiment analyzing TCP and UDP packets captured in a Wireshark trace. For TCP, it provides the IP addresses and port numbers used in the connection, sequence numbers for different packet types, throughput calculations, and analysis of the slow start and congestion avoidance phases. For UDP, it identifies the fields in the UDP header, maximum payload and port sizes, the UDP protocol number, and relationship between port numbers in request/response packet pairs.

Uploaded by

mayank
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/ 11

Computer Network Lab-2

Mayank Kalsan
2018ucp1489

TCP
1. What is the IP address and TCP port number used by the client computer (source) that is
transferring the file to mnit.ac.in? 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. IP Address is 192.168.18.9 and TCP port number is 62665

2. What is the IP address of mnit.ac.in? On what port number is it sending and receiving TCP
segments for this connection?
Sol. IP address of mnit.ac.in is 210.212.97.131 and it is sending and receiving TCP
segments on port number 80.
3. What is the IP address and TCP port number used by your client computer (source) to
transfer the file to mnit.ac.in?
Sol. IP address of client computer is 192.168.18.9 and TCP port number is 62665.

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?
Sol. Sequence number of TCP SYN segment is 0 since it is used to imitate the TCP
connection between client computer and mnit.ac.in
5. What is the sequence number of the SYNACK segment sent by mnit.ac.in to the client
computer in reply to the SYN? What is the value of the Acknowledgement field in the
SYNACK segment? How did mnit.ac.in determine that value? What is it in the segment that
identifies the segment as a SYNACK segment?
Sol. The sequence number of SYNACK segment sent by mnit.ac.in to computer in
reply to SYN is 1.
The value of acknowledgment field in SYNACK segment is 1.
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.
Sol. The sequence number of the TCP segment is 1.

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 for all subsequent segments.
The HTTP POST segment is considered as the first segment. Segments 1 – 6 are No. 4, 5,
7, 8, 10, and 11 in this trace respectively.
The ACKs of segments 1 – 6 are No. 6, 9, 12, 14, 15, and 16 in this trace.
Segment 1 sequence number: 1
Segment 2 sequence number: 566
Segment 3 sequence number: 2026
Segment 4 sequence number: 3486
Segment 5 sequence number: 4946
Segment 6 sequence number: 6406
The sending time and the received time of ACKs are
Segment 1
SENT TIME =0.026477
ACK RECEIVED TIME= 0.053937
RTT TIME =0.02746
Segment 2
SENT TIME = 0.041737
ACK RECEIVED TIME = 0.077294
RTT TIME = 0.035557
Segment 3
SENT TIME = 0.054026
ACK RECEIVED TIME= 0.124085
RTT TIME =0.070059
Segment 4
SENT TIME = 0.054690
ACK RECEIVED TIME = 0.169118
RTT TIME= 0.11443
Segment 5
SENT TIME = 0.077405
ACK RECEIVED TIME = 0.217299
RTT TIME= 0.13989
Segment 6
SENT TIME= 0.078157
ACK RECEIVED TIME= 0.267802
RTT TIME =0.18964
EstimatedRTT = 0.875 * EstimatedRTT + 0.125 * SampleRTT
EstimatedRTT after the receipt of the ACK of segment 1 = RTT for Segment 1 = 0.02746
second
EstimatedRTT after the receipt of the ACK of segment 2 = 0.875 * 0.02746 + 0.125 * 0.035557
= 0.0285 second
EstimatedRTT after the receipt of the ACK of segment 3 = 0.875 * 0.0285 + 0.125 * 0.070059 =
0.0337 second
EstimatedRTT after the receipt of the ACK of segment 4 = 0.875 * 0.0337+ 0.125 * 0.11443 =
0.0438 second
EstimatedRTT after the receipt of the ACK of segment 5 = 0.875 * 0.0438 + 0.125 * 0.13989 =
0.0558 second
EstimatedRTT after the receipt of the ACK of segment 6 = 0.875 * 0.0558 + 0.125 * 0.18964 =
0.0725 second

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


Sol. Each segment is of length 1412 bytes.
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?
Sol. The minimum amount od available buffer space advertised at the received for the
entire trace is indicated first ACK from the server , its value is 512 bytes.

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. Difference between the acknowledged sequence numbers of two consecutive ACKs
indicates the data received by the server between these two ACKs. By inspecting the
amount of acknowledged data by each ACK, there are cases where the receiver is
ACKing every other
segment. Example here in segment No. 17265 the acknowledged data is 2824 bytes =
1412*2
bytes.

12. What is the throughput (bytes transferred per unit time) for the TCP connection? Explain how
you calculated this value.
Select a TCP segment in the Wireshark’s “listing of captured-packets” window. Then select the
menu : Statistics->TCP Stream Graph-> Time-SequenceGraph(Stevens).
Sol. The average throughput for this TCP connection is computed as the ratio between the
total amount data and the total transmission time. The total amount data transmitted can be
computed by the difference between the sequence number of the first TCP segment and the
acknowledged sequence number of the last ACK.Therefore, the total data is 3546 - 1 = 3545
bytes. The whole transmission time is the difference of the time instant of the first TCP
segment (i.e., 0.0187 sec) and the time instant of the last ACK (0.219 sec). Therefore, the total
transmission time is 0.219-0.0187=0.2003 seconds. Hence, the throughput for the TCP
connection is computed as 3545/0.2003 = 17.698 KByte/sec.
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 mnit.ac.in server. Can you identify where TCP’s
slowstart phase begins and ends, and where congestion avoidance takes over? .
Sol.

UDP
1. Select one UDP packet from your trace. From this packet, determine how many fields there
are in the UDP header.
Sol. UDP header contains 4 fields:
o Source Port
o Destination Port
o Length
o Checksum

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.
Sol. Length of each UDP header field is 2 bytes.
3. The value in the Length field is the length of what?. Verify your claim with your captured
UDP packet.
Sol. The length field specifies the number of bytes in the UDP segment (header plus
data). An explicit length value is needed since the size of the data field may differ from
one UDP segment to the next. The length of UDP payload for selected packet is 32
bytes. 40 bytes - 8 bytes = 32 bytes.

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)
Sol. The maximum number of bytes that can be included in a UDP payload is (2^16 –
1) bytes plus the header bytes. This gives 65535 bytes – 8 bytes = 65527 bytes.
5. What is the largest possible source port number? (Hint: see the hint in 4.)
Sol. The largest possible source port number is (2^16 – 1) = 65535.
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

The IP protocol number for UDP is 0x11 hex, which is 17 in decimal value.
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.
Sol. The source port of the UDP packet sent by the host is the same as the destination
port of the reply packet, and conversely the destination port of the UDP packet sent by
the host is the same as the source port of the reply packet.

You might also like