Version 12 (modified by, 10 years ago) (diff)


OpenFlow Load Balancer Tutorial

Image Map

2. Implement VLC DASH Client on ExoGENI VLAN

2.1 Setup OpenFlow Switches

  • 2.1.1 Login to VM and get the public IP by executing ifconfig
  • 2.1.2 Login to nodes VM, VM-0, VM-1, VM-2 and execute the following script
    ovs-vsctl add-br test
    ovs-vsctl add-port test eth1
    ovs-vsctl add-port test eth2
    ovs-vsctl add-port test eth3
    ovs-vsctl set-controller test tcp:<IP.OF.CONTROLLER>:6633
    ovs-vsctl set-fail-mode test secure

Replace IP.OF.CONTROLLER above with the public IP address of VM.

2.2 Setup the Apache Server and host DASH Video

In this section, you will be able to install the Apache server on ExoGENI node (VM-3) by logging in and executing the following script.

The first 4 lines of this script install and setup the Apache server. The rest of the script downloads a sample DASH video from and hosts it on the server that you just set up.


apt-get update
apt-get -y install apache2
apt-get -y install apache2-threaded-dev

apache2ctl restart

mkdir /root/DASH_BuckBunny

curl -o /root/

chmod +x /root/

sh /root/

2.3 Install VLC Client

The actual VLC Client which requests the video can be set up using this script. For streaming this video from the Apache server and in order to instrumentize and measure the DASH bit-rate using LabWiki we need to execute the following commands.

This script needs to be executed manually to monitor the progress of VLC Client installation


apt-get install -y --force-yes subversion
echo 'deb /' >> /etc/apt/sources.list.d/oml2.list 
curl -o /root/Release.key
apt-key add - < /root/Release.key  

apt-get -y --force-yes update
apt-get -y --force-yes -f install
apt-get -y --force-yes install oml2

apt-get build-dep -y --force-yes vlc
cd /root/
svn co
cd /root/vlc-2.1.0-git
apt-get install -y --force-yes liboml2-dev checkinstall build-essential cmake libtool automake autoconf git-core ffmpeg libxcb-shm0-dev libxcb-xv0-dev libx11-xcb-dev libcdparanoia-dev libcdio-paranoia-dev libcdio-cdda-dev libqt4-dev qt4-dev-tools qt4-qmake nasm yasm libasm-dev lua5.1

apt-get autoremove

./configure LIBS="-loml2" --enable-run-as-root
make install

2.4 Instrumentize and Measure DASH Bit-Rate using LabWiki

2.4.1 OML Script

defApplication('vlc') do |app|

   app.binary_path = "/usr/local/bin/vlc" 
#   app.path = "/home/cong/work/vlc-2.1.0-git/bin/vlc-static"
   #app.version(2, 1, 0)
   #app.shortDescription = "VLC" 
   app.description = "VLC multimedia player and streamer" 

   app.defProperty("input", "Stream input (e.g. file or network address)", "", 
                   {:type => :string, :dynamic => false})
#   app.defProperty("sout", "Stream output", "--sout", 
#                   {:type => :string, :dynamic => false}) 
   app.defProperty("intf", "Main interface module", "--intf",
                   {:type => :string, :dynamic => false})
#   app.defProperty("extraintf", "Extra interface module(s). Use --extraintf omlstats to enable OML", "--extraintf",
#                   {:type => :string, :dynamic => false})
 #  app.defProperty("mtu", "Specifies the MTU of the network interface", "--mtu",
#                   {:type => :string, :dynamic => false})
#   app.defProperty("quiet", " Deactivates all console messages", "--quiet",
#                   {:type => :boolean, :dynamic => false})
 #  app.defProperty("play-and-exit", "Exit VLC after playing all the items in the input stream list", "--play-and-exit",
 #                  {:type => :boolean, :dynamic => false})

   app.defMeasurement('dashRateAdaptation') do |mp|

   app.defMeasurement('dashDlSession') do |mp|

defProperty('theOne','inside-vlctest','ID sender node')

#defProperty('packetsize', 128, "Packet size (byte) from the sender node")
#defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node")
#defProperty('runtime', 40, "Time in second for the experiment is to run")
defProperty('duration', 100, "Duration of experiment")

defGroup('Sender',property.theOne) do |node|
  node.addApplication("vlc") do |app|
#    app.setProperty('quiet', true)
#    app.setProperty('play-and-exit', false)
    #app.setProperty('intf', 'dummy')
#    app.setProperty('extraintf', 'omlstats')
    app.setProperty('input', '')
#    app.setProperty('mtu', '1200')
    app.measure('dashDlSession', :samples =>1)
    app.measure('dashRateAdaptation', :samples =>1)

onEvent(:ALL_UP_AND_INSTALLED) do |event|
    info "starting"
  after 2 do
    info "All applications started..."
  after 100 do
    info "All applications stopped." 

#defGraph 'DashRate1' do |g|
 #'dashRateAdaptation').select {[:oml_seq, :decisionRate_bps]}
  #g.caption "Dash Rate Adaptation."
 # g.type 'line_chart3'
 # g.mapping :x_axis => :oml_seq, :y_axis => :decisionRate_bps
 # g.xaxis :legend => 'time [s]'
 # g.yaxis :legend => 'Decision Rate', :ticks => {:format => 's'}

defGraph 'DashRate2' do |g|'dashRateAdaptation').select {[:oml_seq, :empiricalRate_bps]}
  g.caption "VLC Buffer Percentage."
  g.type 'line_chart3'
  g.mapping :x_axis => :oml_seq, :y_axis => :empiricalRate_bps
  g.xaxis :legend => 'time [s]'
  g.yaxis :legend => 'Empirical Rate', :ticks => {:format => 's'}

#defGraph 'DashRate3' do |g|
 #'dashDlSession').select {[:oml_seq, :timeChunk_s]}
 # g.caption "read Chunk."
 # g.type 'line_chart3'
 # g.mapping :x_axis => :oml_seq, :y_axis => :timeChunk_s
 # g.xaxis :legend => 'time [s]'
 # g.yaxis :legend => 'read session [bps] ', :ticks => {:format => 's'}

2.4.2 Execute Script

Load the script vlc.oedl from the Prepare window.

Click and Drag the script Icon over to the Execute panel

Change the property to reflect your slicename, inside-<slicename>

You will see a graph similar to the one here.

2.4.3 View Results in iRODs

Attachments (6)