You are on page 1of 25

Behavior of TCP in Congestion Control Mechanism using VLC media player

Group project done by -Abhishek Reddy Yeruva -Vijay Krishna Nadimpalli -Namratha S Kolli Advisor: Prof. Jed Crandall

Contents

!! Introduction !! TCP Reliability

!! Hypothesis !! Working

!! Background Information !! Results !! Goals !! Design !! Analysis !! Conclusion

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

supports a pair of byte streams, one flowing in each direction.

!! It also includes a flow-control mechanism for each of these byte

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.

!! Finally, like UDP, TCP supports a de-multiplexing mechanism

TCP Reliability
!! TCP! must recover data that is damaged, lost, duplicated, or delivered

out of order by the Internet.!

!! TCP! achieves this reliability by assigning a sequence number to each

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,

checking it at the receiver, and discarding damaged segments.

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

of packets it has in transit every RTT( Round Trip Time).


Image source: Computer Networks A Systems Approach

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.

Design for network


!! We have a client who wants to stream some media from a server

in a network of 3 routers, a client and a server.


!! During the streaming process, we congest a particular link

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

(Diagram provided by instructor to class in 2011 CS-585 class)

Hypothesis

!! Study the behavior of TCP while streaming

Media (Video) at different levels of congestion on a link in a network.


!! We think that if the congestion on a link in the

network increases, the quality of the video stream decreases.

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.

!! To introduce the traffic on the link between router 2 and router 3,

we assume router 2 to be the server which receives the tcp packets sent from router 3
iperf s u

Working Steps(contd.)

!! Assuming the router 3 to be the client we use the following

iperf command: iperf c 192.168.58.254 b 0.16m t 245


c indicates client, b indicates bandwidth, t indicates time and the time is given as 245 which is the total time of the video and 192.168.58.254 is the IP address of the router 2 on eth2
!! NOTE: Start the iperf on router 2 and then on router 3 after

streaming the video on server and client.

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

!! We then use the following command to record the iperf

packets which is the number of TCP packets and number of ARP packets. sudo tcpdump r dumpfile nnn port not 8080 | wc l

Results

!! A spreadsheet has been recorded containing the details

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

values and the number of packets obtained during the stream:

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

increased and also the number of dots in the graphs decreased.

!! 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

!! As the Iperf value increases the congestion in the network

increases and lesser number or percentage of VLC packets are transmitted.


!! The sender will never transmit more unacknowledged data than

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

!! It is evident that as the Iperf value or say as the congestion

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

You might also like