You are on page 1of 8

EXPERIMENT 4: TCP

STUDENT’S NAME: AMNA AZMAT RAZA MALIK


STUDENT’S ID: 20161934
DATE OF SUBMISSION: 15 Dec 2018
AIM

The aim of this experiment is to get familiar with TCP and how it is
initialized. Also, to calculate the RTT and understand the transfer of packets.

INTRODUCTION

TCP (Transmission Control Protocol) is a standard that defines how to


establish and maintain a network conversation via which application
programs can exchange data. TCP works with the Internet Protocol (IP),
which defines how computers send packets of data to each other. Together,
TCP and IP are the basic rules defining the Internet. TCP is a connection-
oriented protocol, which means a connection is established and maintained
until the application programs at each end have finished
exchanging messages. It determines how to break application data into
packets that networks can deliver, sends packets to and accepts packets from
the network layer, manages flow control, and because it is meant to provide
error-free data transmission handles retransmission of dropped or garbled
packets as well as acknowledgement of all packets that arrive.

PROCEDURE

1. 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.
2. Next go to http://gaia.cs.umass.edu/wireshark-labs/TCP-wireshark-
file1.html.
3. 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.
4. 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).
5. 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.
6. Stop Wireshark packet capture
QUESTIONS AND ANSWERS

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?
2.
IP address: 192.168.1.102
TCP port number: 1161

3. What is the IP address of gaia.cs.umass.edu? On what port number is


it sending and receiving TCP segments for this connection?
IP address: 128.119.245.12
port number: 80

4. What is the IP address and TCP port number used by your client
computer (source) to transfer the file to gaia.cs.umass.edu?
IP address: 192.168.1.102
TCP port number: 1161

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?

Sequence number is 0
The SYN flag is 1 so it is a SYN segment.
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?

The Sequence number is 0.The Acknowledgement is 1. The ACK


field is obtained by adding 1 to the initial sequence number of SYN
segment from the client computer .The SYN flag and
Acknowledgement flag in the segment were set to 1 that indicates
that it is SYNACK .

6. What is the sequence number of the TCP segment containing the


HTTP POST command?
No. 4 segment is the TCP segment containing the HTTP POST
command. The sequence number of this segment has the value of 1.
7. Consider the TCP segment containing the HTTP POST as the first
segment in the
N Segm Sent AC Sam Estimated RTT
o ent Tim K ple
. e Tim RTT
e

1 4 0.02 0.05 0.02 0


6477 3937 746
2 5 0.04 0.07 0.03 3.4325*10^-3
1737 7294 5557

3 7 0.05 0.12 0.07 7.4481*10^-3


4026 4085 0059

4 8 0.05 0.16 0.11 0.01527


4690 9118 4428

5 10 0.07 0.21 0.13 0.02767


7405 7299 9894

6 11 0.07 0.26 0.18 0.04170


8157 7802 9645

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


The length of the First tcp segment is 565bytes and the length of
the remaining is 1460 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?
It is available at packet 2. The minimum amount of buffer space
advertised at gaia.cs.umass.edu for the entire trace is 5840 bytes which is
obtained in the first acknowledgement from the server. This receiver
window increases until a maximum receiver buffer size of 62780 bytes.

1
10.Are there any retransmitted segments in the trace file? What did you
check for (in the trace) in order to answer this question?
There are no retransmitted segments in the trace file. It can be obtained
by checking the sequence numbers of the TCP segments in the trace
file.

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

The ratio between the total amount of data and the total transmission time .
The total data :164091-1 =164090 bytes .
Total transmission time =5.455830 -0.026477=5.4294 seconds .
Throughput = 164090/5.4294=30.222 Kbyte/sec.

CONCLUSION
In this experiment with got familiar with the transport layer protocol TCP .
We learnt how the packets are delivered through TCP. We were able to
calculate the RTT.

You might also like