A simulator built on top of Mininet and ns-3 for Software-Defined Wireless Local Area Network (SDWLAN)
http://www.slideshare.net/rascov/20140824-open-net
- Complement ns-3 by supporting channel scan behavior on Wi-Fi station (sta-wifi-scan.patch)
- Show CsmaLink and SimpleLink in NetAnim (animation-interface.patch)
- Fix runtime error when access PacketMetadata of CsmaLink [Submitted] (https://www.nsnam.org/bugzilla/show_bug.cgi?id=1787, "ns-3 bugzilla issue 1787")
- OpenNet 1.1 VM image (Fedora 21) : [Download Link] (http://win.cs.nctu.edu.tw/opennet-1.1.zip)
- user: nctuopennet
- pw: nctuopennet
With this VM image, please following the instruction in the "Run OpenNet" section to start the simulation.
OpenNet and corresponding tools can be found under "/home/nctuopennet/workspace".
./install.sh -a
- Support
- CentOS 7
- Ubuntu 14.04.1
- Fedora 21
- Fedora 21 3.17.6-300.fc21.x86_64 or Ubuntu 14.04.1 3.13.0-43-generic
- Fetch [Mininet 2.2.0] (https://github.com/mininet/mininet "Mininet")
$ git clone https://github.com/mininet/mininet.git
- Fetch [ns-3.21] (http://www.nsnam.org/ns-3-21 "ns-3.21")
$ curl -O -k https://www.nsnam.org/release/ns-allinone-3.21.tar.bz2 $ tar xf ns-allinone-3.21.tar.bz2
- Install packages for ns-3.21
Fedora: $ sudo yum install gcc gcc-c++ python python-devel $ sudo yum install make cmake glibc-devel.i686 glibc-devel.x86\_64 Ubuntu: $ sudo apt-get install gcc g++ python python-dev $ sudo apt-get install make cmake gcc-4.8-multilib g++-4.8-multilib
- Fetch and install [pygccxml] (http://sourceforge.net/projects/pygccxml/files/pygccxml/pygccxml-1.0/pygccxml-1.0.0.zip/download "pygccxml-1.0.0")
$ unzip pygccxml-1.0.0.zip $ cd pygccxml-1.0.0 $ python setup.py build $ sudo python setup.py install
- Install gccxml
$ git clone https://github.com/gccxml/gccxml.git $ cd gccxml $ mkdir gccxml-build $ cd gccxml-build $ cmake ../ $ make $ sudo make install $ sudo ln /usr/local/bin/gccxml /bin/gccxml
- Modify pygccxml parser configuration
Fedora: $ sudo sed -e "s/gccxml\_path=''/gccxml\_path='\/usr\/local\/bin'/" -i /usr/lib/python2.7/site-packages/pygccxml/parser/config.py Ubuntu: $ sudo sed -e "s/gccxml\_path=''/gccxml\_path='\/usr\/local\/bin'/" -i /usr/local/lib/python2.7/dist-packages/pygccxml/parser/config.py
- $mn: Directory of Mininet, $ns: Directory of ns-allinone-3.21, $on: Directory of OpenNet
- Install, patch and rebuild Mininet
a. Install mininet
$ cd $mn $ git checkout tags/2.2.0b3 $ sudo util/install.sh -fnpv Fedora: $ sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config $ sudo systemctl stop firewalld.service $ sudo systemctl disable firewalld.service $ sudo setenforce 0 $ sudo systemctl enable openvswitch.service $ sudo systemctl start openvswitch.service
b. Add ns3.py into mininet
$ cp $on/mininet-patch/mininet/ns3.py $mn/mininet
c. Replace mininet/node.py with the one in mininet-patch
$ cp $on/mininet-patch/mininet/node.py $mn/mininet
d. Add WiFi roaming simulation script to example
$ cp $on/mininet-patch/examples/wifiroaming.py $mn/examples
e. Rebuild Mininet
$ sudo util/install.sh -n
- Install, patch and Build ns-3
a. Copy patches to the ns-3.21 folder
$ cd $ns/ns-3.21 `$ cp $on/ns3-patch/*.patch .`
b. Apply patches
$ patch -p1 < animation-interface.patch $ patch -p1 < netanim-python.patch $ patch -p1 < sta-wifi-scan.patch
c. Patch the wscript for [issue] (https://www.nsnam.org/bugzilla/show_bug.cgi?id=1990) about using ns-3.21 with Ubuntu
$ sed -e "s/\['network'\]/\['internet', 'network', 'core'\]/" -i src/tap-bridge/wscript
d. Configure ns-3
$ ./waf configure Make sure Python Bindings : enabled Python API Scanning Support : enabled
e. Scan python API
$ ./waf --apiscan=netanim $ ./waf --apiscan=wifi
f. Build ns-3
$ ./waf build
Launch a controller at localhost:6633, for example, a POX controller installed with Mininet can be running with: $ sudo python pox.py forwarding.l2_learning $ cd $ns/ns-3.21 $ sudo ./waf shell $ cd $mn/examples $ python wifiroaming.py
- Link modeling using ns-3 [Link] (https://github.com/mininet/mininet/wiki/Link-modeling-using-ns-3 "Link modeling using ns-3")