In the previous post, Install Mininet and Ryu Controller, the software defined networking (SDN) controller is Ryu. It makes it easy for developers to create network management, control application, and prototyping. However, if you want to deploy SDN in a realistic network environment, it's better to use ONOS and OpenDayLight since they have better support for legacy network, a distributed model for the controller, very good modularity, and GUI. A complete comparison of SDN controllers can be found in Controller selection in software defined networks using best-worst multi-criteria decision-making. This post demonstrates how to build a ONOS controller and connects the it to Mininet.
Environments
I'm running a Ubuntu VM with base memory 65536 MB and virtual disk image (VDI) 100 GB in VitrualBox. Mininet is installed with the following command:
Their versions are:
ONOS is built with Bazel. Follow the instructions here, add Bazel distribution URL as a package source.
Install and update Bazel. Noted that I have to specify the Bazel version as 3.0.0 otherwise there would be errors when building ONOS.
Install a JDK.
Build ONOS from source
Clone the code from the ONOS repository. I've also forked a fixed version of the repository here.
Add the ONOS developer environment to the bash profile.
Build ONOS.
Running ONOS with onos.py (Failed!)
Originally, I was following the steps in Mininet and onos.py workflow. However, as I came to Running ONOS with onos.py, it kept popping out error messages.
The full error message can be found here.
After surveying on this error messages on these discussions:
After setting up ONOS controller with Mininet, we can start to develop network mangement and control application on top of this environment. As the next step, I'm planning to integrate Snort as an intrusion detection system (IDS) to conduct packet checking on network devices inside Mininet.