ONOS Overview and Hands-on

ONOS is an Opensource SDN controller targeted towards Service providers. I had provided a brief overview of ONOS in 1 of my earlier blog. I tried out ONOS software recently and in this blog, I will share my experiences.

ONOS architecture:

Following picture from ONOS architecture guide shows the different layers of ONOS at high level.


Distributed core takes care of clustering. Southbound interface takes care of talking to devices, first release supports only Openflow. Applications talk to ONOS using the Northbound interface. Since the controller is primarily targeted towards Service providers, Scalability, HA and performance of the controller are touted as differentiators. ONOS uses a concept called Intents for applications to talk to ONOS. Intents are highlevel requirements/policies that ONOS translates into flows. An example of an Intent can be a host to host intent where we require 1 host to talk to another. ONOS calculates the best path and installs flows. When there is any failure in the path between the 2 hosts, Intent framework in ONOS automatically calculates a new path and installs the flows. In case new path cannot be found, the particular intent goes to failure state. Intents allows the user to not know the low level details, Intents are equivalent to policies being used by other controllers.

Trying out ONOS

ONOS VM can be downloaded from here. Same VM can be used for basic tutorial, SDN IP Use case, Packet optical use case and Distributed clustering application by logging in with different username and password combinations.

Basic ONOS tutorial:

This tutorial gives a good overview of ONOS CLI, GUI, applications as well as Intents. Login for this tutorial is “tutorial1”, “tutorial1”.

SDN IP Use case:

This tutorial walks through a use case of a SDN application using ONOS where a SDN network is connected to external routers talking BGP. SDN-IP application talks to BGP speaker, learns about the routes and programs the Openflow switches based on the routes learnt. In this usecase, switches are simulated using mininet and routers using Quagga application. Login for this tutorial is “sdnip”, “sdnip”.

Packet Optical use case:

This tutorial walks through a use case of a SDN application using ONOS where a network containing switches and ROADMs are controlled by ONOS to setup paths through the network. Switches are simulated using mininet and ROADMs are simulated using Linc-OE. Login for this tutorial is “optical”, “optical”.

Distributed Clustering:

This tutorial walks through a use case of a distributed application operating on a SDN controller cluster. Each node in the controller takes control of a particular switch and when the node fails, other nodes in the cluster takes over and starts controlling the switch. In this tutorial, the nodes are simulated using a Docker container. Login for this tutorial is “distributed”, “distributed”.

Installing ONOS standalone:

I followed the procedure in this link to install ONOS in my Ubuntu 14.04 VM running in Virtualbox in Windows. I made few minor changes from the procedure indicated.

# Install git
sudo apt-get install git-core

# Install karaf, Maven
cd; mkdir Downloads Applications
cd Downloads
wget http://download.nextag.com/apache/karaf/3.0.2/apache-karaf-3.0.2.tar.gz
wget http://www.apache.org/dist/maven/binaries/apache-maven-3.2.2-bin.tar.gz
tar -zxvf apache-karaf-3.0.2.tar.gz -C ../Applications/
tar -zxvf apache-maven-3.2.2-bin.tar.gz -C ../Applications/ 

# Install Java8
sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer oracle-java8-set-default -y

# Clone ONOS
git clone https://gerrit.onosproject.org/onos -b 1.0.0

# add to .profile:
. ~/onos/tools/dev/bash_profile

# Source .profile
. ~/.profile

# Set username and group
export ONOS_USER=
export ONOS_GROUP=

# Edit ~/Applications/apache-karaf-3.0.2/etc/org.apache.karaf.features.cfg by appending the following line to  featuresRepositories:(add , before)
# Append the following to featuresBoot:

# Set Java path
export JAVA_HOME=/usr/lib/jvm/java-8-oracle

# Build ONOS
cd ~/onos
mvn clean install  # or use the alias 'mci'

# copy ONOS to lib
cp ${ONOS_ROOT}/tools/package/branding/target/onos-branding-1.0.0.jar ${KARAF_ROOT}/lib/

To start ONOS cli

karaf clean

To start ONOS gui in browser:


To connect mininet to ONOS:

sudo mn --controller=remote,ip= --topo tree,3

Since “onos-app-fwd” is installed already, we should be able to ping across the hosts at this point.

My experience with ONOS and comparison to Opendaylight:

  • I had a very smooth experience trying out ONOS and the documentation in their wiki is very good.
  • I found that ONOS is light-weight and this makes it faster to build and run and this includes the GUI. This could be because the number of modules included in ONOS could be much less.
  • Clustering and HA seems to be built from the ground-up in ONOS.
  • The number of north-bound and south-bound interfaces supported by Opendaylight is a lot bigger when compared to ONOS. ONOS supports only Openflow for southbound and minimum REST api for northbound.
  • I feel that Opendaylight can be catered to varied applications while ONOS might be restricted to Service provider space.
  • Considering that Opendaylight has been available for close to 2 yrs, it is much more mature product and a direct comparison might not be correct.


3 thoughts on “ONOS Overview and Hands-on

  1. i am getting the following error ,when triying to connect mininet to onos

    sudo mn –controller=remote,ip= –topo=single,4
    *** Creating network
    *** Adding controller
    Unable to contact the remote controller at
    *** Adding hosts:
    h1 h2 h3 h4
    *** Adding switches:
    *** Adding links:
    *** gave up after 3 retries

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s