Professional Documents
Culture Documents
Behaviour of TCP in Congestion Control
Behaviour of TCP in Congestion Control
Group project done by -Abhishek Reddy Yeruva -Vijay Krishna Nadimpalli -Namratha S Kolli Advisor: Prof. Jed Crandall
Contents
!! Hypothesis !! Working
Introduction
TCP (Transmission Control Protocol)
!! TCP guarantees the reliable, in-order delivery of a stream of bytes. !! It is a full-duplex protocol, meaning that each TCP connection
streams that allows the receiver to limit how much data the sender can transmit at a given time. that allows multiple application programs on any given host to simultaneously carry on a conversation with their peers.
TCP Reliability
!! TCP! must recover data that is damaged, lost, duplicated, or delivered
octet it transmits and requiring a positive acknowledgment (ACK) from the receiving! TCP. If the ACK is not received within the time-out interval, the data is retransmitted. each connection, based on round-trip time.
!! The! TCP! retransmission time-out value is dynamically determined for !! Damage is handled by adding a checksum to each segment transmitted,
Background Information
TCP Slow Start:
!! Source starts out by setting Congestion Window to one
packet.
!! When the ACK for this packet arrives, TCP adds 1 to
Congestion Window and then sends two packets. Upon receiving the corresponding two ACKs, TCP increments Congestion Window by 2one for each ACKand next sends four packets.
!! The end result is that TCP effectively doubles the number
Background Info(contd.)
Fast retransmit:
!! Every time when a data packet arrives at the
receiving side, the receiver responds with an acknowledgment, even if this sequence number has already been acknowledged.
!! When a packet arrives out of orderthat is,
TCP cannot yet acknowledge the data the packet contains because earlier data has not yet ar rivedTCP resends the same acknowledgment it sent the last time.
Image source: Computer Networks A Systems Approach
Goals
!! Record congestion control using TCP connection in
VLC.
!! Record the effect of Iperf during the VLC streaming
process.
!! Record the packets sent by the server and received by
the client in the process at various values of Iperf s and bandwidths and study the behavior of TCP.
between two of the routers by using Iperf in order to generate some traffic and create a congestion in the link.
!! We plan to use VLC media player to act as the tool for streaming
the media file from the server and also capturing the file at the client. VLC media player is used as it provides various options for streaming a file on various transmission protocols such as TCP, UDP, RTP etc. It also acts as client and server.
Design Setup
Hypothesis
Working Steps
STEP 1
!! Setup a minimum of 5 VM's with 3 VMs as routers, VLC
media server running on the server and VLC media player client running on the clients. To make the task of creating 5 VM's easy we initially created one VM and installed Ubuntu server edition. This was cloned to create 4 more VM's. We used the following command to create a clone: VboxManage clonevdi ubuntu1.vdi ubuntu2.vdi
Working Steps(contd.)
STEP 2
!! The client routes through the 3 routers in order to establish a
connection with the server. Each router is a part of 2 subnets. For example, the router 2 is a part of the subnet containing router 1 and router 3.
!! Each router has 3 interfaces (one for NAT(network address
translation) eth0 and other 2 are local host adapters eth1 and eth2) so that the router communicates with machines on both the subnets it appears on.
Working Steps(contd.)
STEP 3:
!! IPERF Command: Iperf is a commonly used network testing
tool that can create TCP and UDP data streams and measure the throughput of a network that is carrying them.
we assume router 2 to be the server which receives the tcp packets sent from router 3
iperf s u
Working Steps(contd.)
Working Steps(contd.)
!! We also consecutively record the TCP dumps in this process
simultaneously.
!! After the video streaming is done, we interrupt the TCP dump to
record and analyze the TCP dump reading i.e number of packets sent and number of packets captured.
!! Then we run the following command to record the number of
the packets sent by the VLC on port 8080 which is the TCP data. sudo tcpdump r dumpfile nnn port 8080 | wc l
Working Steps(contd.)
packets which is the number of TCP packets and number of ARP packets. sudo tcpdump r dumpfile nnn port not 8080 | wc l
Results
obtained at the server, all the routers and the client. These values were recorded for various values of the Iperf values at 0KB, 20KB, 40KB, 60KB, 80KB, 100KB.
!! The following are the graphs obtained by plotting the Iperf
Results(contd.)
Iperf=0 KB Iperf=20 KB
Results(contd.)
Iperf=40 KB Iperf=60 KB
Results(contd.)
Iperf=80 KB Iperf=100 KB
Analysis
!! From the first graph to the last graph the gaps between dots have
!! The meaning that number of dots have decreased from the first
to the last graph means that the number of packets of VLC that were transmitted decreased with the increase in the Iperf value. That is what we noticed looking at the graphical results shown above. reason is congestion that has happened in the network. Just as expected the congestion in the network increased eventually because of the increasing Iperf values.
!! The gaps show that there was no activity in that period and the
Conclusions
the size of its congestion window, so plotting the "unacknowledged" data can give a good approximation of congestion window.
Conclusions(contd.)
Iperf=80 KB Iperf=100 KB
! Sample plots obtained by plotting the unacknowledged data from the streaming processes at Iperf valued at 60 KB and 80 KB.
Conclusions(contd.)
on a link in the network increases (because of increase in Iperf) the streaming of a video from the server to the client becomes really difficult as a result of which we see a bad video stream at the clients side.
!! Therefore a thumbs up to our hypothesis.
Questions