How to build openflow in ns 3.38?

522 views
Skip to first unread message

Asha Sarithala

unread,
Jul 13, 2023, 8:41:21 AM7/13/23
to ns-3-users
When I build NS3 3.38, I'm getting openflow module not built. Due to this I'm unable to run openflow-switch.cc example file. 
Please find the attached screenshot below.
Screenshot 2023-07-13 181022.png

Tom Henderson

unread,
Jul 13, 2023, 11:22:49 AM7/13/23
to ns-3-...@googlegroups.com, Asha Sarithala
The openflow library needs to be built to enable openflow examples to be
built.

The easiest way to do this is to build ns-3 using the 'allinone' module
specified in the bake build tool, as described here:

https://www.nsnam.org/docs/release/3.39/tutorial/html/getting-started.html#downloading-ns-3-using-bake
> --
> Posting to this group should follow these guidelines
> https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> <https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting>
> ---
> You received this message because you are subscribed to the Google
> Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ns-3-users+...@googlegroups.com
> <mailto:ns-3-users+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ns-3-users/ad552a32-e911-4db9-abb7-417852e57089n%40googlegroups.com <https://groups.google.com/d/msgid/ns-3-users/ad552a32-e911-4db9-abb7-417852e57089n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Shilpi Mittal

unread,
Jul 13, 2023, 10:38:18 PM7/13/23
to ns-3-...@googlegroups.com
Hi

I also tried to build openflow in ns3.33 using ns3allinone directory but it is not getting enable. I had downloaded openflow in ns3allinone directory and configured openflow and also build it. This build was successful.

But when I execute command

./waf configure by passing path of openflow

It still shows not configured.

I followed the following link for reference

Kindly advise where I am wrong

To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/97fe310c-81d0-4005-7e17-5ead8801b34b%40tomh.org.

Shilpi Mittal

unread,
Jul 14, 2023, 7:02:27 AM7/14/23
to ns-3-...@googlegroups.com
Hi

When I tried to enable openflow through openflow-dev from git hub library.
It  was successful with configuration and build. but try to execute openflow.cc in scratch file, it was showing as below.

Kindly suggest

image.png
 

To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/97fe310c-81d0-4005-7e17-5ead8801b34b%40tomh.org.

Tom Henderson

unread,
Jul 14, 2023, 11:48:16 AM7/14/23
to ns-3-...@googlegroups.com, Shilpi Mittal
Here are some tips on enabling openflow module, in ns-3.33 and ns-3.38.
You are mentioning two different releases with two different build
systems (Waf and CMake).

To enable openflow in the build, Waf (ns-3.33) or CMake (ns-3.38) needs
to find the 'libopenflow.a' library, plus some headers.

Both Waf and CMake have some heuristics to find these items, if they are
built and installed according to how the bake build system builds the
'ns-3-allinone' package.

Namely, if you use 'bake.py' to configure and build ns-3-allinone (or
the 3.33 or 3.38 versions of these), then openflow will be downloaded
and built one directory up from ns-3, and the build systems will find
them there.

If you do not see openflow enabled, check the output of './waf configure
-vvv'; it may give you some hints. Check also that the library
'libopenflow.a' was built, usually in the 'build' directory of openflow
library.

For our latest release (ns-3.39), you should be able to use bake as
follows, and it should be the same for ns-3.38. Below is the output
from my testing of this just now on ns-3.39:

$ cd bake
$ export PATH=$PATH:`pwd`/build/bin
$ export LD_LIBRARY_PATH=`pwd`/build/lib
$ ./bake.py configure -e ns-allinone-3.39
$ ./bake.py show

You should see:

module: openflow-dev (enabled)
depends on:
libxml2-dev (optional:False)
mercurial (optional:False)

If this doesn't say 'enabled', you are missing either mercurial or
libxml2-dev packages on your system.

Then do:

$ ./bake.py download
$ ./bake.py build

You should see this:

>> Building openflow-dev - OK

Then, it should build ns-3.39 with openflow support. If you later clean
and reconfigure in that ns-3.39 directory, the ns3 script should find
the openflow files and report:

ns-3 OpenFlow Integration : ON

The process should be the same for Waf and ns-3.33.

- Tom








On 7/14/23 4:02 AM, Shilpi Mittal wrote:
> Hi
>
> When I tried to enable openflow through openflow-dev from git hub library.
> It  was successful with configuration and build. but try to execute
> openflow.cc in scratch file, it was showing as below.
>
> Kindly suggest
>
> image.png
>
> On Thu, Jul 13, 2023 at 8:52 PM Tom Henderson <to...@tomh.org
> <mailto:to...@tomh.org>> wrote:
>
> The openflow library needs to be built to enable openflow examples
> to be
> built.
>
> The easiest way to do this is to build ns-3 using the 'allinone' module
> specified in the bake build tool, as described here:
>
> https://www.nsnam.org/docs/release/3.39/tutorial/html/getting-started.html#downloading-ns-3-using-bake <https://www.nsnam.org/docs/release/3.39/tutorial/html/getting-started.html#downloading-ns-3-using-bake>
>
> On 7/13/23 05:41, Asha Sarithala wrote:
> > When I build NS3 3.38, I'm getting openflow module not built. Due to
> > this I'm unable to run openflow-switch.cc example file.
> > Please find the attached screenshot below.
> >
> > --
> > Posting to this group should follow these guidelines
> > https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> <https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting>
> > <https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> <https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting>>
> > ---
> > You received this message because you are subscribed to the Google
> > Groups "ns-3-users" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to ns-3-users+...@googlegroups.com
> <mailto:ns-3-users%2Bunsu...@googlegroups.com>
> > <mailto:ns-3-users+...@googlegroups.com
> <mailto:ns-3-users%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ns-3-users/ad552a32-e911-4db9-abb7-417852e57089n%40googlegroups.com <https://groups.google.com/d/msgid/ns-3-users/ad552a32-e911-4db9-abb7-417852e57089n%40googlegroups.com> <https://groups.google.com/d/msgid/ns-3-users/ad552a32-e911-4db9-abb7-417852e57089n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ns-3-users/ad552a32-e911-4db9-abb7-417852e57089n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> Posting to this group should follow these guidelines
> https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> <https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting>
> ---
> You received this message because you are subscribed to the Google
> Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to ns-3-users+...@googlegroups.com
> <mailto:ns-3-users%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ns-3-users/97fe310c-81d0-4005-7e17-5ead8801b34b%40tomh.org <https://groups.google.com/d/msgid/ns-3-users/97fe310c-81d0-4005-7e17-5ead8801b34b%40tomh.org>.
>
> --
> Posting to this group should follow these guidelines
> https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> <https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting>
> ---
> You received this message because you are subscribed to the Google
> Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ns-3-users+...@googlegroups.com
> <mailto:ns-3-users+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ns-3-users/CADeTpUfxG-7-80by1Bidzr_aFkQUdFOyyN%3D_8ggopiMWu-QsFg%40mail.gmail.com <https://groups.google.com/d/msgid/ns-3-users/CADeTpUfxG-7-80by1Bidzr_aFkQUdFOyyN%3D_8ggopiMWu-QsFg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Shilpi Mittal

unread,
Jul 14, 2023, 1:12:01 PM7/14/23
to Tom Henderson, ns-3-...@googlegroups.com
Thanks Tom!

Using bake...
>>Building openflow-dev - OK
is showing now.
can you plz suggest how to enable open flow by giving path..
In my case: bake folder consist openflow in the following two folders:
ns-allinone-3.33//bake/source/openflow-dev
and also
ns-allinone-3.33//bake/source/ns-3.33/src/openflow

Which file path should I use to enable examples of openflow.

Also suggest How to run openflow-switch.cc file using bake. I was using ./waf earlier for ns-3.33.

Thanks


ABDULJABBAR ALSHARIF

unread,
Jul 17, 2023, 3:15:53 AM7/17/23
to ns-3-...@googlegroups.com, Tom Henderson
hello tom good afternoon ,

Actually new versions of ns3 are totally amazing, easy to configure and build  successfully without any error.
My wish Tom  but build and configure lte  topology using python instead of c++ ? I am wondering

 if we can build wireless topology using python ? Can it be configured in ns3  platform  ?

good day 
Jabbar
Screenshot 2023-07-17 12.31.34.png
" if you want the rainbow you have deal with rains"





To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CADeTpUekvBkviWke2--dvZsOySp%2BM9jNWZsDPX-c0%3DGE1NpVkQ%40mail.gmail.com.

Gabriel Ferreira

unread,
Jul 17, 2023, 3:23:27 AM7/17/23
to ns-3-users
Yes Alsharif, you can use python. 
ns3 configure --enable-python-bindings && ns3 run first.py

In fact, if you don't want to change any c++ models, 
you can install ns-3 with a simple `pip install ns3`. 
It comes with Brite, Openflow and Click. 

ABDULJABBAR ALSHARIF

unread,
Jul 18, 2023, 9:14:17 AM7/18/23
to ns-3-...@googlegroups.com
hi ,
while  configure python i get error to obtain result    of first.py error state 1 cmake path of python directory 

i try to build cmak from scratch but filed i did install cyyp version 2.8.1 system satisfy with requirement any suggest before running it aging its crate error the want again to configure while  take amount of time .

is to build again using python -a to avoid cmake cache ?

Jabbar   
" if you want the rainbow you have deal with rains"



Diyar Jamal

unread,
Oct 24, 2023, 4:05:08 PM10/24/23
to ns-3-users
I couldnt import openflow even I did all correctly, did you solve your problem @Shilpi Mittal?

System Dependencies --
 > automake - OK
 > cmake - OK
 > cppyy - OK
 > g++ - OK
 > gi-cairo - OK
 > gir-bindings - OK
 > libxml2-dev - OK
 > mercurial - OK
 > pygobject - OK
 > pygraphviz - OK
 > python3-dev - OK
 > qt - OK

here is the problem:
ns-3 Click Integration        : OFF (missing dependency)
ns-3 OpenFlow Integration     : OFF (missing dependency)
Reply all
Reply to author
Forward
0 new messages