Two or more SDN / Openflow Switch Example in NS3

1,776 views
Skip to first unread message

dh1...@bristol.ac.uk

unread,
Feb 3, 2017, 9:02:43 AM2/3/17
to ns-3-users
Greetings everyone. I am a PhD student looking at using NS3 for my work on SDN. I haven't been using NS3 that long but have mastered how to create a network with multiple domains using bridges / switches, nodes and so on.

However. I need to create a large network that uses many SDN switch controlled by one controller. Unfortunately, I am unable to get two SDN switches to work within one topology with various errors of which I have no been able to resolve. So my questions today are:-

1) Is there a kind sole willing to part with a working NS3 SDN example that has two SDN switches so I can fid out where mine went wrong and using it as a template to build a larger SDN network.

2) Does anyone know if it is possible when using a SDN Controller in NS3, to access and edit the forwarding tables used by the controller and where to find them?

Thank you all and I will forward to your responses.

Best Regards

Douglas


Luciano Jerez Chaves

unread,
Feb 3, 2017, 9:22:26 AM2/3/17
to ns-3-users
Hi Douglas,

I'm not sure how far you can reach using the ns-3 OpenFlow module. I've tried to use this module for my research but it was unable to meet my requirements. So, I've implemented a new OpenFlow 1.3 module for ns-3, available at http://www.lrc.ic.unicamp.br/ofswitch13/index.html. There you can find examples and a complete documentation on how to use the module.

I hope it can help you on your PhD.

Regards,
Luciano.

dh1...@bristol.ac.uk

unread,
Feb 3, 2017, 10:00:11 AM2/3/17
to ns-3-users
Hi Luciano. That is greatly appreciated. I will take a details look at your code and I will of course reference it if used, thank you.

One final question, are the flow tables accessible and editable in your implementation?

Best Regards

Douglas

Luciano Jerez Chaves

unread,
Feb 3, 2017, 10:11:03 AM2/3/17
to ns-3-users
Hi,

What do you mean by accessible and editable flow tables? On both OpenFlow implementations (ns-3 default OpenFlow and OFSwitch13), the controller can create and send OpenFlow messages to create, modify and delete entries on flow tables inside switches. The controller can also query the switch about flow entries. However, there's no direct access to these tables.

Regards,
Luciano.

dh1...@bristol.ac.uk

unread,
Feb 3, 2017, 10:16:57 AM2/3/17
to ns-3-users

Hi again.  I wanted to know if it was possible to manually edit those tables. You just answered my question the last bit "there is not direct access to these tables."

Thanks again,

Douglas

Regime Zhao

unread,
Aug 24, 2019, 4:16:38 AM8/24/19
to ns-3-users
Hello!
I also have the same question。That is “Are the flow tables accessible and editable in the implementation”
I want to know whether I can define the flowtable in the beginning of the simulation.That is mean whether I can define the flowtable to make the routing rule.

Best Regards

Zhao

在 2017年2月3日星期五 UTC+8下午11:16:57,dh1...@bristol.ac.uk写道:

Douglas Harewood-Gill

unread,
Aug 24, 2019, 4:39:59 AM8/24/19
to ns-3-...@googlegroups.com

Hi there. After I posted the question here, I found the answer from another source.


At the time, the answer was no, the flow tables were not accessible or editable. Also, you could not use two or more SDN switches together in one topology. I also believe you could not connect an external SDN controller such as Ryu or OpenDaylight to the simulation.


I have no idea if this is still the case now, it is possible that NS-3 was updated to resolve these issues. At the time, I switched to Mininet where you can do all of these things. Depending on what you are looking to do, it might be worth giving Mininet a look.


Best Regards


Douglas


From: ns-3-...@googlegroups.com <ns-3-...@googlegroups.com> on behalf of Regime Zhao <zzq275...@gmail.com>
Sent: 24 August 2019 09:16:38
To: ns-3-users <ns-3-...@googlegroups.com>
Subject: Re: Two or more SDN / Openflow Switch Example in NS3
 
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/6AjXY18mG1g/unsubscribe.
To unsubscribe from this group and all its topics, 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/4536b1f2-c573-499e-82f6-d6926f89c4e3%40googlegroups.com.
Message has been deleted

Douglas Harewood-Gill

unread,
Aug 26, 2019, 12:27:49 PM8/26/19
to ns-3-...@googlegroups.com

Hi Zhao,


That is correct or at least it was. Not sure if it is the case now but at the time, there was no access to the flow tables and you could not connect together multiple SDN switches. More than one switch and the simulation would not run. I do not know if it was the fault of the controller not being able to control multiple switches or ther simulation simply not supporting it. 


Hope this helps and goodluck in your work. Let me know if you want to know anything else.


Cheers


Douglas


Sent: 24 August 2019 14:37:28

To: ns-3-users <ns-3-...@googlegroups.com>
Subject: Re: Two or more SDN / Openflow Switch Example in NS3
 
Hi,Douglas。

Thanks for your answer。
That is to say, in ns3, it is impossible to modify the flow table with code at the beginning of the simulation and  one controller cannot control multiple switches.
Am I right?

Best Regards

Zhao


在 2017年2月3日星期五 UTC+8下午10:02:43,dh1...@bristol.ac.uk写道:

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/6AjXY18mG1g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
Message has been deleted

Hessam Alizadeh

unread,
Jun 24, 2020, 1:57:52 AM6/24/20
to ns-3-users
Hi Douglas and Zhao,
I am using the OFSwitch13 developed by Luciano Jerez Chavez. In the documentation there are examples with multiple switches and controllers and even multiple domains in one simulation. Here is the documentation:
http://www.lrc.ic.unicamp.br/ofswitch13/ofswitch13.pdf
If you want to modify the flow-tables directly in the implementation, you would need to modify the existing classes.
To unsubscribe from this group and all its topics, send an email to ns-3...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages