This repository supplies the patches and configuration file to build the DCE-enabled SDN simulation framework in ns-3. Using bake to download and build the necessary libraries for this framework, it can set up the following libraries:
NOTE: If more than one controller node is to be used, simply make copies of the files-0 directory in ns-3-dce, i.e. files-1, files-2, etc.
It is recommended that a VM be used for testing and experimenting, particularly due to the fact that the patched version of libfluid will be installed to the user's /usr directory. An appropriate choice of VM would be the one provided through SDNHub at http://sdnhub.org/tutorials/sdn-tutorial-vm/
Install ns-3 prerequisites: https://www.nsnam.org/wiki/Installation
Install libfluid prerequisites (debian package names provided):
sudo apt-get install autoconf libtool build-essential pkg-config libevent-dev libssl-dev
Install dependencies for compiling the OFSWITCH13 module:
sudo apt-get install libboost-dev libpcap-dev libxerces-c2-dev libpcre3-dev libdb-dev libexpat-dev flex bison cmake
Install dependencies for building Python:
sudo apt-get install libreadline-dev texinfo
Install Cython (for numpy installation with Python): http://docs.cython.org/en/latest/src/quickstart/install.html
Install OpenJDK dependencies:
sudo apt-get install openjdk-7-jdk libX11-dev libxext-dev libxtst-dev libxt-dev libcups2-dev libasound2-dev ccache
Get bake:
hg clone http://code.nsnam.org/bake bake
export BAKE_HOME=`pwd`/bake
export PATH=$PATH:$BAKE_HOME
export PYTHONPATH=$PYTHONPATH:$BAKE_HOME
Get dce-python-sdn (Add -vvv to the download and build instructions if problems occur during installation):
git clone https://github.com/jaredivey/dce-python-sdn
cd dce-python-sdn
# Bake libfluid with elevated privileges
bake.py configure -c bakeconf-sdn.xml -e libfluid
bake.py download
sudo ../bake/bake.py build
rmdir build
rm bakefile.xml
rm bakeSetEnv.sh
# Bake dce-python-sdn
bake.py configure -c bakeconf-sdn.xml -e dce-sdn-1.7
bake.py download
bake.py build
Go to the ns-3-dce directory and run an example script to test:
cd source/ns-3-dce
./waf --run "dce-python-sdn --numControllers=1 --numSwitches=4 --numHosts=4"
Or... Go to the ns-3-dce directory and run another example script to test:
cd source/ns-3-dce
./waf --run "dce-python-bench --benchmark=7"