Using the ONOS app to control the BMv2 switches

In fact, I used a combination of ONOS Mininet and P4 to create a virtual network, like this
“s1 = self.addSwitch(‘s11’, cls=ONOSBmv2Switch, pipeconf=‘’, grpcPort=50001, cpuport=CPU_PORT,longitude=-110,latitude=40)”
Now the ONOS fwd application is activated, and the INT is worked. And I want to know if it is feasible to use an ONOS app to call components such as to send flow rules to the BMv2 switch, like this

I encountered some problems, such as after uploading the written app to ONOS using the .oar method, there was no response, and the log was not updated. In fact, I want to understand the feasibility of this method to determine whether I should continue. Thank you very much, also the version of ONOS is 2.5.9.

@SOUL you definetly can do that, but you have to keep the consistency of tables and actions naming in the control plane. In other word you have to use the same names for actions and tables, defined in the data plane, also in the control plane.

@DavideS thank you very much, I will continue my work. Additionally, I would like to know if ONOS requires any other components to support this work. The components I am currently using are these.


I think you need also:

  • org.onosproject.pipelines.basic
  • org.onosproject.protocols.p4runtime
  • org.onosproject.p4runtime
  • org.onosproject.drivers.p4runtime

If you define a new P4 pipeline you need to write a new onos pipeline program, i.e, org.onosproject.pipelines.YOURP4PIPELINE.

I see. Thank you for your answer.