Don’t bother with the virtual machine provided just roll your own it’s really very simple especially so if you have a little bit of Linux experience (and you’ll need that for the course I think). The provided virtual machine uses an old version of Ubuntu and one of the updates you need to do for the end of lecture 2 exercise requires a package that doesn’t exist. To install your own virtual machine:
- Get an ISO of the latest LTS version of Ubuntu Server (current 14.04).
- Install a bare bones version of Ubuntu Server under virtual box. Give it 2GB ram and 2 processors.
- Install SSH, Emacs, Git and Mininet – for Mininet there are instructions here: http://mininet.org/download/
Once that’s all installed go back to following the course instructions for other packages to install etc.
Note: the Mininet project does provide a pre-built virtual machine but it was telling me that it would take about 5 hours to download! YMMV
A simple little web server that displays the contents of the directory it was started in can be started with the command:
python -m SimpleHTTPServer
One issue I did run into on running assignment two was this error:
Cannot find required executable controller. Please make sure that it is installed and available in your $PATH: (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
It would seem that the name of the controller changed from Mininet 2.0 to Mininet 2.1 and the script provided can no longer locate it (I’m not 100% sure about this). The solution is to open the measure.py script and make a minor change.
At the top of the file where you see other statements starting “from” add this line:
from mininet.node import OVSController
This will import the controller. Then scroll down to line 184 and change it so that it explicently names the controller to use like this:
net = Mininet(topo=topo, controller=OVSController, host=host, link=link)
It looks like the above modification will probably be required for most of the scripts.
Lecture 4 Routing
Lecture 6 Congestion Control and Routing
You’ll probably need to install python-setuptools before you can run the easy_install command if you have built your own Mininet machine.
sudo aptitude install python-setuptools
You’ll probably need to read this page to understand the iperf arguments. The -yc argument makes iperf output comma separated values (it’s not document in the linked page).
If you get a message telling you to:
Please shut down the controller which is running on port 6633
Then you need to run the following command to kill the OVS-Controller. This will probably be the case if your application doesn’t exit cleanly.
sudo killall ovs-controller
One thing I noticed was that none of my cwnd.png graphs every showed anything. This was slightly strange as the TCP Probe which gathers the data seemed to be working fine. The graph is generated from the data by a utility called plot_tcpprobe.py which can be found in the util directory. From a quick look at the code I noticed that my TCP Probe was generating 11 columns of output rather than the 10 the utility was expecting. There is a check on line 32 that throws out any row of data that doesn’t have 10 entries – doh! Alter that line to throw out any rows that don’t have 11 entries:
if len(fields) != 11:
You should now get a graph when you re-run the experiment.
Lecture 7 Rate Limiting and Traffic Shaping
You’ll need to make the usual OVSController changes mentioned in the Assignment 2 notes in the bufferbloat.py script.
At the end of the buffer bloat quiz you are asked to plot the results of the download. I found the command given (sudo ./plot_figures.sh experiment-1) didn’t work as there was a problem in the plot_figures.sh script. One of the first things the script does is try to determine the public IP address of the machine the script is running on. It does this by contacting a server running on 169.254.169.254 like this:
IP=`curl http://169.254.169.254/latest/meta-data/public-ipv4 2>/dev/null`
Unfortunately I found that request just timed out. It’s possible that this is because I’ve rolled my own Mininet box. It’s trivial to replace the curl lookup with your own IP address recovered from running ifconfig though. To be honest I’m not sure it’s worth making the change though. As far as I can see the script only uses the IP address to try and output a helpful message and it gets that wrong (it tells you to look on port 8888).
The wording for Q1 isn’t great it currently says: “The response with…”. It would be better if it said “The responsiveness with…” or “The download time with…” (and then correct the logic appropriately).
The graph plotting script suffers from the same problem as assignment 4.
Lecture 8 Content Distribution
The assignment asks you to install some additional packages one of which requires “pip”. This needs to be installed first using:
sudo aptitude install python-pip
Note that I actually had termcolor already installed so it wasn’t strictly necessary to install pip. The usual OVSController changes need to be made to tfo.py. The provided experiment takes a very long time to run.
Lecture 9.1 Programming SDNs
Step 2.5 tells you to run a pox command but if you’ve rolled your own Mininet you probably don’t have POX installed. To correct this switch to your home directory and then run:
git clone https://github.com/noxrepo/pox.git
You can then switch to the pox directory and run the command (it will almost certainly need ./ before the command).
Step 2.6 tells you to fire up a new terminal for each host from inside Mininet. This may work fine on a Linux machine but it doesn’t work under Windows as there’s no X11 server to forward to. All is not lost though as you can install an X11 server called Xming. Once installed make sure Xming is running (the default settings are fine) and then start Putty. Load your regular Mininet settings and then under Connection > SSH > X11 make sure Enable X11 Forwarding is checked then in X Display Location enter “localhost:0.0”. Now when you run the command in step 2.6 you should find that three new terminal windows appear.
Step 3 requires the installation of Pyretic which can be achieved in basically the same way as POX:
git clone https://github.com/frenetic-lang/pyretic.git
To run the command in step 3.4 you must have the “ipaddr” package installed which you can do with this command:
sudo pip install ipaddr
You’ll also need “bitarray” but this requires compilation which means you’ll have to install the python-dev package first:
sudo apt-get install python-dev sudo pip install bitarray
sudo pip install networkx sudo pip install netaddr
I’ve you’ve performed you own mininet install you’ll need to set the PYTHONPATH environment variable to tell Python where pyretic and pox live:
Where <user> is the user account you have installed things under. Now finally you can run step 3.4