0% found this document useful (0 votes)
25 views12 pages

Lab2 Watermark

This document describes a lab experiment on computer networks. It includes sections on capturing TCP transfers, analyzing TCP basics, introducing the Netsim simulator, implementing scenarios in Netsim, and connection establishment and termination policies. Figures and tables are provided to illustrate network topologies, packet captures, and results of simulations.

Uploaded by

Sun Tzu
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)
25 views12 pages

Lab2 Watermark

This document describes a lab experiment on computer networks. It includes sections on capturing TCP transfers, analyzing TCP basics, introducing the Netsim simulator, implementing scenarios in Netsim, and connection establishment and termination policies. Figures and tables are provided to illustrate network topologies, packet captures, and results of simulations.

Uploaded by

Sun Tzu
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/ 12

IT304 Computer Networks

Lab 2

Soham Viradiya 202101472

Dhirubhai Ambani Institute of Information and


Communication Technology

August 23, 2023


August 23, 2023

Contents
1 Capturing a bulk TCP transfer from your computer to a remote server 2
1.1 Experiment Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Analysis of TCP basics 3


2.1 Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Introduction to Netsim 6
3.1 Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

4 Implementing a simple scenario in Netsim 7


4.1 Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 Connection Establishment and Connection Termination policy 8


5.1 Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.2 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

List of Figures
1 IP address and TCP port number used by the client computer: 192.168.1.102
and 1161 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 IP address and TCP port number used by the gaia.cs.umass.edu computer:
128.119.245.12 and 80 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 IP address and TCP port number used by the my computer: 10.100.77.96
and 54625 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4 the TCP SYN segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5 the TCP SYN ACK segment . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6 HTTP post command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
7 Network Topology of a simple network . . . . . . . . . . . . . . . . . . . . . . 7
8 Trace file of the network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
9 Network Topology of wired nodes and routers . . . . . . . . . . . . . . . . . . 8
10 Simple scenario Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . 8
11 Topology of Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
12 Trace file with certain data fields and only Control packets . . . . . . . . . . 9
13 Trace file with only TCP ACK and TCP FIN . . . . . . . . . . . . . . . . . . 10
14 the 1st SYN control packet and the 1st FIN control packet . . . . . . . . . . 10
15 only FIN packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1
August 23, 2023

1 Capturing a bulk TCP transfer from your computer


to a remote server
1.1 Experiment Questions

Figure 1: IP address and TCP port number used by the client computer: 192.168.1.102
and 1161

Figure 2: IP address and TCP port number used by the gaia.cs.umass.edu computer:
128.119.245.12 and 80

2
August 23, 2023

Figure 3: IP address and TCP port number used by the my computer: 10.100.77.96
and 54625

2 Analysis of TCP basics


2.1 Experiment

Figure 4: the TCP SYN segment

3
August 23, 2023

Figure 5: the TCP SYN ACK segment

Figure 6: HTTP post command

2.2 Questions

Problem 1

1 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?

2 What is the sequence number of the SYNACK segment sent by gaia.cs.umass.edu

4
August 23, 2023

to the client computer in reply to the SYN? What is the value of the Acknowl-
edgement 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?

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

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

5 What is the length of each of the first six TCP segments?

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

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

8 How much data does the receiver typically acknowledge in an ACK? Can you
identify cases where the receiver is ACKing every other received segment.

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

Solution.

1 The TCP connection is initiated with a sequence number of 0, and the message’s
SYN flag signifies its nature as a SYN segment.

2 The SYNACK segment has a sequence number of 0, with an acknowledgement


field value of 1 derived from the initial sequence number +1, and the message is
identified as a SYN ACK through its included flags.

3 The sequence number of the TCP segment containing the HTTP Post Command
is 1.

5
August 23, 2023

Seg TCP Seq. Num Sent time ACK time RTT Est RTT ACK
1 4 0.0264 0.0539 0.0274 0.02746 6
2 5 0.0417 0.0772 0.0355 0.0285 9
3 7 0.0540 0.1240 0.0700 0.0337 12
4 8 0.0546 0.1691 0.1144 0.0438 14
5 10 0.0774 0.2172 0.1398 0.0558 15
6 11 0.0781 0.2678 0.1896 0.0725 16

Table 1: Segment data with time values, RTT information, TCP connection numbers,
and ACK segment numbers.

5 619 or 1514

6 With a listed minimum available buffer space of 65535, the sender remains un-
throttled due to the window capacity never reaching full.

7 Segment numbers were not repeated so there are no retransmitted segments in


the trace file.

8 The receiver usually acknowledges 565 bits, occasionally alternating acknowledg-


ments in consecutive instances.

9 The throughput can be calculated as (164,091 - 1) / 1.5 = 109,394

3 Introduction to Netsim
3.1 Experiment

6
August 23, 2023

Figure 7: Network Topology of a simple network

Figure 8: Trace file of the network

4 Implementing a simple scenario in Netsim


4.1 Experiment

7
August 23, 2023

Figure 9: Network Topology of wired nodes and routers

Figure 10: Simple scenario Simulation Results

5 Connection Establishment and Connection Termina-


tion policy
5.1 Experiment

8
August 23, 2023

Figure 11: Topology of Network

Figure 12: Trace file with certain data fields and only Control packets

for TCP SYN is_syn: True is_ack: False

9
August 23, 2023

Figure 13: Trace file with only TCP ACK and TCP FIN

for TCP FIN is_syn: False is_ack: False is_fin: True

Figure 14: the 1st SYN control packet and the 1st FIN control packet

10
August 23, 2023

Figure 15: only FIN packets

5.2 Questions

Problem 2

1 What is the Sequence number of the 1st SYN control packet and its acknowl-
edgement?

2 What is the sequence number of the 1st FIN control packet and its acknowledge-
ment?

4 Why TCP uses 4 way finishing for connection termination instead of 3way like
connection establishment?

5 How many sessions it takes to transfer all data in this application?

Solution.

1 250000 and 250005


2 270006 and 270011
4 A four-way handshake is essential in this scenario since the initial FIN flag sent from
the client to the server signifies a termination request, and the subsequent ACK received
by the client serves as a response to the FIN.
5 As the number of TCP_FINs are 36. total number of sessions are 36/2 = 18.

11

You might also like