FORGE Course

Full Height |  Two columns |  Parts | 

TCP Congestion Control Course, Part 3/Exercise 1

TCP Congestion Control Course, Part 3/Exercise 1 University of Patras 23/08/2014 English
FIRE networks control congestion Virtual Wall TCP

Part 1 - Introduction to the Virtual Wall

If you do not have an account in iMinds Virtual Wall go to https://www.wall2.ilabt.iminds.be and create a new one. (instructions can be found here: http://doc.fed4fire.eu/getanaccount.html ). Using your account log in the iMinds Virtual wall and go to your profile page.

TCP Congestion Control Course, Part 3/Exercise 2

TCP Congestion Control Course, Part 3/Exercise 2 University of Patras 23/08/2014 English
FIRE networks control congestion Virtual Wall TCP

Part 2 - Experiment Setup

In the menu "Experimentation" (page header) click the link "Begin an Experiment". You will be redirected to a new page with various options. Click the "New Gui Editor". Using the graphical interface create the topology you see in figure 1. Name one of the nodes "client" and the other "server". Choose for both the nodes (hosts P1, P2) the operating system Ubuntu. The IP addresses and link capacity should be left as default. (Make sure that the two hosts are connected with a link). Save the experiment using any name you wish e.g. myfirstexperiment.
Figure 1


  • From your experiment's list ("My Emulab" > tab: "Experiments"), click on the name of your experiment and go to the experiment management page. From the left menu, click on the link "Swap experiment in" to activate it.
  • If your computer supports IPv6 use the ssh tool and connect to the nodes P1 and P2 (Run a ping between them to make sure that the link between them is working ok). If your computer does not support IPv6, setup a tunnel using openvpn, for IPv4 access. Using the "Modify traffic shaping", try to modify the packet delay between the client and the server.
  • TCP Congestion Control Course, Part 3/Exercise 3

    TCP Congestion Control Course, Part 3/Exercise 3 University of Patras 23/08/2014 English
    FIRE networks control congestion Virtual Wall TCP

    Part3 - TCP congestion control experiment.

    Download to both hosts P1, P2 (client, server) the iperf software.
    iperf - sudo apt-get install iperf

    Insert tcp_probe module (as root) on sending machine (client) and filter for iperf port.
    insmod /lib/modules/x.x.x(kernel_version)/kernel/net/ipv4/tcp_probe_fixed.ko port=5001 full=1

    Capture tcp probe output (on sender) and place in background
    cat /proc/net/tcpprobe >  tcpout &

    Start iperf server on the receiver_host (server)
    iperf -s

    Run iperf test on sender_host (client) for 300 seconds with a report interval 1 sec. As receiver_host use the IP address of the server node.
    iperf -i1 -t300 -c (receiver_host) 

    After the completion of the experiment, a file with the name "tcpout" should exist in the client node. Download this file in your local computer (e.g. with the use of the sftp tool). Use the gnuplot software to create a graphical representation of the results for cwnd and ssthresh. The command you should run is the following.
    $ gnuplot -persist <<"EOF"
    set style data linespoints
    show timestamp
    set xlabel "time (seconds)"
    set ylabel "Segments (cwnd, ssthresh)"
    plot "tcpout" using 1:7 title "snd_cwnd", \
    "tcpout" using 1:($8>=2147483647 ? 0 : $8) title "snd_ssthresh"
    EOF

    Optional *) Remove the tcp_probe module from the kernel and kill the monitoring process.
    rmmod tcp_probe
    kill pid (pid: process id of monitoring process - cat /proc/net/tcpprobe > tcpout)

    After completing the experiment, go to the experiment management page (the page you are redirected if you click on the experiment name in your experiment's list ("My Emulab" > tab "Experiments"). In the left menu click on the link "Swap experiment out". This action will release all the resources that were reserved in the iMinds Virtual Wall for your experiment. From the same menu in the experiment management page, click on the link "Terminate Experiment" to delete your experiment. *This is an optional step because when we swap an experiment out, Virtual Wall does not save the modifications made in the Operating System of the nodes of the experiment. Each time an experiment is swapped in, the Virtual Wall loads to its nodes the predefined Operating System (in our case Ubuntu OS). This also means that iperf will not be installed in the client and server nodes, if we swap this experiment in again in the future.