ONOS CAN NOT CONNECT TO MININET

69 views
Skip to first unread message

fresh_in_SDN

unread,
Apr 17, 2022, 11:45:44 AM4/17/22
to ONOS Discuss
Hello,
I'm a fresher in ONOS
When I want to connect onos with mininet using "sudo mn --controller=remote,port=6653 --mac", I notice the mininet displays "connecting to remote controller 127.0.0.1:6653" which seems to show that the connection is ready. But when I open the ONOS-UI website, it shows "no devices are connected". What's wrong with it! I have found many articles to solve the problem, but the only answer I can get is "open the app named fwd, openflow". In fact, I'm certain that I really open these apps and it has no function with the connection. 
What's worse, ONOS have no error tips to the disconnection. No responses I can receive.I am nervous.
The ONOS version is 1.4.0,
Mininet version is 2.3.0
karaf version is 3.0.5
maven version is 3.3.9
Dear,  what can I do to solve it? 

Eder

unread,
Apr 17, 2022, 12:15:33 PM4/17/22
to ONOS Discuss, fresh_in_SDN
Hi and welcome to the forum,

1) Make 100% sure that the controller is actually running.

2) Which apps are running in the ONOS controller? There is a way to start the controller with a few apps activated by default: define ONOS_APPS before running the controller. 
 - export ONOS_APPS="drivers,openflow,fwd,proxyarp,lldpprovider"

Alternatively, you can get to the ONOS CLI and activate a few apps at least like this:
- app activate openflow
  app activate fwd 
(etc)

3) Considering the way you run the command, you are not defining any particular IP, so Mininet expects the controller to run in the same machine as the one you run Mininet. Is this actually the case? If not, you should define the IP address of the controller:

sudo mn --controller=remote,ip=192.168.0.1,port=6633 --mac --topo linear,2 #use any other IP

4) Sometimes, it is nice to check the ONOS log (run "onos:tail" in ONOS CLI). You can scroll and check if any errors were printed (not sure if you checked the log before). If you have been running ONOS with the bazel run command (which means you need a separate open terminal apart from the ONOS CLI terminal), then you can probably already see the log output without running the command.

Cheers,

Eder

unread,
Apr 19, 2022, 7:42:00 AM4/19/22
to ONOS Discuss, Eder, fresh_in_SDN
Hi,

Please, do not drop the ONOS list from your replies (always use "reply all"). Else your reply cannot be seen in the forum or email list. Thanks!


Hello, I have checked all the tips mentioned in the email. 
1). I use the maven to manage the ONOS, and using "ok clean" to start the ONOS. Karaf and maven are installed successfully. (posts img1 attached)
I am guessing you use the tar.gz archive right?

2). For apps, I have already activated the necessary apps defaultly. But I think all the apps doesn't matter. 
Can you confirm the applications activated? (run "apps -s -a" in ONOS CLI and post output)

3). I start the mininet and ONOS in different CLI, but the same computer.
Good , then the controller IP is fine to be 127.0.0.1. I recommend using that Ip indeed, like: sudo mn --controller=remote,ip=127.0.0.1,port=6633 --mac --topo linear,2

4). I use karaf : "user":karaf,  "password":karaf. 
Ok.

5) This is the current situation. (posts img2 attached)
the tail command is onos:tail, not sure if tail on its own works in the version you are testing.

I nerver encounter such a problem, I'm so sad.
Sincerely, what can I do to slove? 
Dont't worry we'll find the way to solve the problem :)


Additional comments:
  • You are using ONOS 1.4.0. Please, use a recent version. That version is long, very long, deprecated and unsupported. You could use version 2.5.
  • Can you run "sudo netstat -tlpn" and post the output?

Cheers,
img1.png
img2.png

fresh_in_SDN

unread,
Apr 23, 2022, 7:25:46 AM4/23/22
to ONOS Discuss, Eder, fresh_in_SDN
Hello, thank you for your reply to my questions.
I am sorry the I drop the ONOS list from my replies.I have found the reason why the former question functioning. If I use miniedit to create topo, it can link together normally.
But now I have another question: I want to measure delay from point to point using ONOS.
How can I do it?
Sincerely.

Eder

unread,
Apr 24, 2022, 6:21:45 PM4/24/22
to ONOS Discuss, fresh_in_SDN, Eder
Hi,

Would you mind explaining what you mean by "point to point"?

Is it from host A sends a packet until it reaches host B?
Is it from the moment ONOS sends a packet out until it reaches the destination?
Is it from the moment sends a packet in message to the controller until it reaches back to the switch?

Thanks,

李杰

unread,
Apr 25, 2022, 9:38:57 AM4/25/22
to Eder, ONOS Discuss
Hello, 
What I have said can be understood like the third one.
Can I use some apps existing to finish this gob?🤔🤔
Sincerely!

Eder <gan...@gmail.com> 于2022年4月25日周一 06:21写道:

Eder Ollora

unread,
Apr 25, 2022, 10:20:48 AM4/25/22
to 李杰, ONOS Discuss
Hi,

I do not know any way to measure the latency of what you are exactly asking about. However, I am not an ONOS dev so there might be some stats related to it that are already part of the controller.

Actually what you are asking about is, probably, the latency of the control channel (channel between the switch and the controller). In reality, the way to properly measure this is to get the switch and controller to timestamp packets, both being synchronized to the lowest possible unit of time and margin of error (let's an error of a few microseconds or a millisecond in the worst case). I don't know any switches that timestamp packets for the only purpose of measuring the latency. 

First of all, I am no expert in the exact field of the question you ask about. I imagine, though, you could have several approaches to measure the latency.

1) If I had to guess,  I'd say that you might be able to create an app that tracks Openflow packets (maybe ebpf?). If you can identify a packet (say its hash, or some kind of secret) then you can probably measure the RTT, as close to the interface as possible. In this way you remove any possible userspace delay. 
2) The "easiest" approach would be to track ONOS control messages to a switch (let's say a FLOW_MOD or statistics request), then measure the timestamp when it is sent and then check again when it is received (RTT). It will not be nowhere near as precise as any other method. But if you are measuring tens of milliseconds (or worse), it might work. This latency would also account for the message processing time taken by the switch until it replies back. So this is not the exact "wire" delay of the message.

As said, if there is already something in the controller that offers this information, I cannot tell you anything about it.

Hopefully, other engineers and researchers might have a better answer for you.

Cheers,
 

李杰

unread,
Apr 25, 2022, 10:46:12 PM4/25/22
to Eder Ollora, ONOS Discuss
Hello,
Having received you solution, I'm trying to solve the problem like what you said to me. 
However, When I want to use ONOS the POST-FLOW yesterday, I found the actions in ONOS is so strange. 
Formerly, the actions I learned  can be listed as follows: flood, drop, in_port, normal, controller..... Lately, I read  the ONOS-docs, but the actions mentioned like this: output, group, meter, table....
I'm so confused with that : is there somethingi wrong with my understanding in actions. I hope you can help me. In my country, there are almost no articles concerned with this field in public. 
😣😣
Sincerely!

Eder Ollora <gan...@gmail.com> 于2022年4月25日周一 22:20写道:
Reply all
Reply to author
Forward
0 new messages