Use "Mininet-dashboard" to detect my established network

326 views
Skip to first unread message

Lin Ciou

unread,
Mar 29, 2018, 9:55:40 AM3/29/18
to sFlow-RT
I will use Mininet-dashboard to detect my mininet topology.


And I open my topology is use "sudo python topology.py".
topology.py is use "MiniEdit" create. 

About topology links
h1-eth0<->s1-eth1 (OK OK)
s1-eth2<->s2-eth1 (OK OK)
s1-eth3<->s3-eth1 (OK OK)
s1-eth4<->s4-eth1 (OK OK)
s2-eth2<->s5-eth1 (OK OK)
s3-eth2<->s5-eth2 (OK OK)
s4-eth2<->s5-eth3 (OK OK)
s5-eth4<->h2-eth0 (OK OK)

And I use this command to connect sflow.
ovs-vsctl -- --id=@sflow create sflow agent=lo target=127.0.0.1 sampling=10 polling=10 -- -- set bridge s1 sflow=@sflow -- set bridge s2 sflow=@sflow -- set bridge s3 sflow=@sflow -- set bridge s4 sflow=@sflow -- set bridge s5 sflow=@sflow

But,I watch sflow-rt web,it have no topology information.

Please help me how to use Mininet-dashboard to detect my established network.
Thanks you.
fail.png

Peter Phaal

unread,
Mar 29, 2018, 10:01:46 AM3/29/18
to sFlow-RT
You need to use the --custom extras/sflow.py argument when you start Mininet. The sflow.py script automatically configures sFlow on all the bridges and posts the topology to sFlow-RT (you need to start sFlow-RT before you start Mininet).

Lin Ciou

unread,
Mar 29, 2018, 11:46:24 PM3/29/18
to sFlow-RT
I know that.
But I want to ask have any method can using the sflow.py with I create topolopy??

Peter Phaal於 2018年3月29日星期四 UTC+8下午10時01分46秒寫道:

Peter Phaal

unread,
Mar 30, 2018, 12:46:18 AM3/30/18
to sFlow-RT
On Thursday, March 29, 2018 at 8:46:24 PM UTC-7, Lin Ciou wrote:
But I want to ask have any method can using the sflow.py with I create topolopy??

You have two choices:

1. Copy methods from sflow.py into your Python program that creates the custom topology and starts Mininet. You mentioned using MiniEdit. You can export the program using File>Export Level 2 Script to create the Python program. 

2. A cleaner way is to build your custom topology as a custom topology module, http://mininet.org/walkthrough/#custom-topologies. You can then combine the custom topology with sflow.py on the Mininet command line, e.g.
sudo mn --custom ~/mininet/custom/topo-2sw-2host.py,sflow-rt/extras/sflow.py --topo mytopo

Lin Ciou

unread,
Mar 30, 2018, 5:38:39 AM3/30/18
to sFlow-RT
Thanks for your answer first!
I will try it to my experiment.
If any question I will post in this!!!
When time comes, please help answer again!!!
Thanks you~~~

Peter Phaal於 2018年3月30日星期五 UTC+8下午12時46分18秒寫道:

Lin Ciou

unread,
Apr 3, 2018, 4:31:32 AM4/3/18
to sFlow-RT
Hello Peter
This day I try to use sflow with I create topology.
Then mininet show massage. (Like attachment)
How should I do?
I also saw the mininet-weathermap website.
But I can't to success, Can you help me?

Thanks you~

Peter Phaal於 2018年3月30日星期五 UTC+8下午12時46分18秒寫道:
On Thursday, March 29, 2018 at 8:46:24 PM UTC-7, Lin Ciou wrote:
But I want to ask have any method can using the sflow.py with I create topolopy??

You have two choices:

1. Copy methods from sflow.py into your Python program that creates the custom topology and starts Mininet. You mentioned using MiniEdit. You can export the program using File>E0xport Level 2 Script to create the Python program. 
FAIL.png

Peter Phaal

unread,
Apr 3, 2018, 9:54:05 AM4/3/18
to sFlow-RT
On Tuesday, April 3, 2018 at 1:31:32 AM UTC-7, Lin Ciou wrote:
Hello Peter
This day I try to use sflow with I create topology.
Then mininet show massage. (Like attachment)
How should I do?
I also saw the mininet-weathermap website.
But I can't to success, Can you help me?

What version of Mininet are you using? 
sudo mn --version

The ability to have multiple, comma separated, entries in the --custom field is fairly new. From the error messages you are getting, it looks like the --custom field is not being treated as a list of files, but as a single file, indicating an older Mininet version.

I built version 2.2.2 from sources using the following instructions:

Lin Ciou

unread,
Apr 5, 2018, 5:08:59 AM4/5/18
to sFlow-RT
Oh, No...
My version is

ubuntu@sdnhubvm:~$ mn --version
2.1.0+

so,this version can't use this method???

Peter Phaal於 2018年4月3日星期二 UTC+8下午9時54分05秒寫道:

Lin Ciou

unread,
Apr 5, 2018, 8:30:35 AM4/5/18
to sFlow-RT
Sorry,i mean if I must use 2.1.0 version.
Have any method can do this thing?

Peter Phaal於 2018年4月3日星期二 UTC+8下午9時54分05秒寫道:

Peter Phaal

unread,
Apr 5, 2018, 10:35:09 AM4/5/18
to sFlow-RT
On Thursday, April 5, 2018 at 5:30:35 AM UTC-7, Lin Ciou wrote:
Sorry,i mean if I must use 2.1.0 version.
Have any method can do this thing?

You can load the sflow.py as a library in your custom Mininet Python script:

import sys
sys.path.insert(0,'sflow-rt/extras')
import sflow

Now when your script starts the network, 

net.start()

the switches will be configured to export sFlow and the topology will be exported.

Lin Ciou

unread,
Apr 9, 2018, 12:07:30 AM4/9/18
to sFlow-RT
Thank you very much
I can use examples to test success
Thank you very much for your help
I will use the example to change my topology
Let me make the next study
Thank you

Peter Phaal於 2018年4月5日星期四 UTC+8下午10時35分09秒寫道:

Sakshini Hangloo

unread,
Apr 27, 2018, 9:02:25 AM4/27/18
to sFlow-RT


did the same as mentioned in the link u provided, but got an exception>> import error
also i downloaded the mininet dashboard from  https://blog.sflow.com/2016/05/mininet-dashboard.html , but the dashboard is also not opening

plz help
exception.png

Sakshini Hangloo

unread,
Apr 27, 2018, 9:02:25 AM4/27/18
to sFlow-RT
did the same as mentioned in the link provided by you, but still getting the exception...
i also downloaded mininet dashboard, but the interface if also not opening. i did the same as mentioned in https://blog.sflow.com/2016/05/mininet-dashboard.html

plz help


On Thursday, March 29, 2018 at 7:31:46 PM UTC+5:30, Peter Phaal wrote:

Peter Phaal

unread,
Apr 27, 2018, 9:08:03 AM4/27/18
to sFlow-RT
You need to install the Python requests module:
pip install requests

Lin Ciou

unread,
May 15, 2018, 5:29:23 AM5/15/18
to sFlow-RT
Hello Peter,
I have a new question~
About mininet custom topology,
I want set link "bw" and "delay" and "loss".
How should I key in topology python file?
Like this sample.
http://mininet.org/walkthrough/#custom-topologies

Peter Phaal於 2018年4月27日星期五 UTC+8下午9時08分03秒寫道:

Peter Phaal

unread,
May 15, 2018, 10:36:35 AM5/15/18
to sFlow-RT
I usually set the link parameters using the Mininet command line:
sudo mn --custom ~/mininet/custom/topo-2sw-2host.py --topo mytopo --link tc,bw=10,delay=2ms,loss=1

You can use the parameters defined in the mininet.link.TCIntf Class:

Using command line parameters keeps topology code simple and makes it easier to re-use. 

If you need to specify different values for links within the topology then you need to modify your python script, e.g:

linkopts = dict(bw=10, delay='2ms', loss=1)
topo.addLink(leftSwitch, rightSwitch, **linkopts)

Jakob Wångö

unread,
May 16, 2018, 4:25:15 AM5/16/18
to sFlow-RT
Hi Peter again :) 

After updating the sFlow.py file to detect the newer inteface names, it works perfectly for me. 
But i have a small followup question. 
sFlow agents are active for me and i can see metrics and statistics. Buit when trying to test the mininet-dashboard app, the graphs that are in there are absolutely empty. Not even the graphs are shown, like something that is require to make it work is missing.
See screenshot: http://puu.sh/An7Ec/5a1d5c81c0.png

Would you happen to know why this could be the case ? 
The VM is completly installed from scratch, where sflow, mininet, controller software, java, node and so on is all manually installed.

Peter Phaal

unread,
May 16, 2018, 10:33:34 AM5/16/18
to Jakob Wångö, sFlow-RT
There was an issue with Java 9+. Download the latest version of sFlow-RT - it should fix the problem.

--
You received this message because you are subscribed to the Google Groups "sFlow-RT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sflow-rt+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lin Ciou

unread,
Jun 11, 2018, 5:13:24 AM6/11/18
to sFlow-RT
Hello Peter,
Very thanks you for help so much.
This question according to the practice is be solved!!!
I was so busy, so just have time to test these days.
Sorry for reply later~~~
And very thank you so much~

Peter Phaal於 2018年5月15日星期二 UTC+8下午10時36分35秒寫道:

hamid asadi

unread,
Jun 14, 2019, 2:04:13 PM6/14/19
to sFlow-RT
hello man
i have a question like you!
i created a fat-tree topology in miniedit and export it as a python code. now i want to monitor my topo but can't merge my script and sflow.py.
how should i solve this?
thanks for your cooperation.
Reply all
Reply to author
Forward
0 new messages