Wiki » History » Version 12

Version 11 (Leonardo Maccari, 11/22/2017 02:56 PM) → Version 12/14 (Leonardo Maccari, 11/22/2017 03:03 PM)

h1. Setup

h2. Mininet

NePA TesT works in conjunction wit Mininet, but it requires advanced features for dealing with fine grained settings for the links.
To this end we have been developing and releasing a "patched version of Mininet":

To install it follow the usual instructions for Mininet (tested on Xubuntu 16.04):
@git clone
@cd mininet@

or build the debian package:
@git clone
@cd mininet@

If necessary install debuild @apt-get install devscripts@

@make deb@

if the command fails, check the output for eventually missing dependencies

You can check if your setup is correct with:
@#>mn --test pingall@

Note that in Fedora, the openswitch-controller package is no longer present, so you have to intall it from source as explained here:
Then for some other reason the ovs-switchd daemon is not started anyway, so you have to start it by hand before running your experiments, otherwise the mn script will hang when trying to create switches.

h3. Installing and running mininet as local user

Instead of calling @util/ do the following steps

# Installing prerequirements requires systemwide libraries in any case :(
@sudo apt-get install gcc make socat psmisc xterm ssh iperf iproute telnet \@
@ python-setuptools cgroup-bin ethtool help2man pyflakes pylint pep8 python-pexpect@
# Install mininet python modules
@python install --user@
# Compile mnexec
@make mnexec@
# Add mininet folders to your PATH in .bashrc, e.g.:
@export PATH=$PATH:/home/username/path/to/mininet@
@export PATH=$PATH:/home/username/path/to/mininet/bin@
# Add PYTHONPATH to your .bashrc to include also your local install directory, e.g.:
@export PYTHONPATH="/home/<USERNAME>:/home/<USERNAME>/.local/lib/python2.7/site-packages/mininet-2.2.1-py2.7.egg:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/home/<USERNAME>/.local/lib/python2.7/site-packages:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat:/usr/lib/python2.7/dist-packages/gtk-2.0:/usr/lib/pymodules/python2.7"@
# Run mininet as sudo. You need to ask the sysadmin do edit the /etc/sudoers file like explained below
@sudo python -f conf/ping.ini -t JSONTest@

h3. Modify /etc/sudoers

# Disable the secure path by commenting out
@Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"@
# Let the user run nepa_test as sudo:
@<USERNAME> ALL=(ALL) /usr/bin/python *@
# Keep env variables when running sudo
@Defaults:<USERNAME> !env_reset,env_delete-=PYTHONPATH,env_delete-=PATH@

h2. NePA TesT

Once installed the modified version of Mininet, to setup NePA TesT do the following:
@git clone
@cd wcn_emulator@
@git submodule init@
@git submodule update@

To run a sample test:
@#>python -f conf/ping.ini -t JSONTest@

To run all the tests:
@#>python -m pytest@

h3. Troubleshooting

* *Exception: Could not find a default OpenFlow controller*: from within the mininet source directory run @./util/install -f@ to install OpenFlow
* *ImportError: No module named [...]*: be sure to install the required python libraries with @sudo pip install networkx scipy numpy matplotlib psutil pytest@