11 August 2016

OpenFlow in NS3

Installation of OpenFlow in NS3 is a simple task  and here is the method to do that.

NS3 version: ns-3.24.1 and ns-3.25

Assumption: You should have installed #ns3 already in your machine. 

#OpenFlow is a software helpful for Simulating Software Defined Networks (#SDN).

There are some packages needed to enable OpenFlow. Download these packages and try the installation later.

$] sudo apt-get install libboost-all-dev libxml2 libxml2-dev 

Go to the ~ns-allinone-3.24.1/ns-3.24.1 folder and give this command 

$] hg clone http://code.nsnam.org/openflow
(if the above command does not work, the give this command)
$] sudo apt-get install mercurial

$] cd openflow
$] ./waf configure
$] ./waf build 
(if the build failed in the above steps, please give your comments)

$] cd ..
$] ./waf configure --enable-examples --enable-tests --with-openflow=path/to/openflow

In my case 
$] ./waf configure --enable-examples --enable-tests --with-openflow=openflow

After you run the above command, you should get the following screen. (See the selected white line). In the first image, it shows not enabled and the second image shows enabled
OpenFlow
OpenFlow

OpenFlow
OpenFlow

After enabling the openflow give this command 

$] ./waf build 
After this command, ensure that openflow is built as shown below
OpenFlow
OpenFlow





T S Pradeep Kumar