Install ONOS Controller
Install ONOS Controller
Created by Admin, last modified by Docs Team on Nov 12, 2018 Go to start of
metadata
Open Network Operating System (ONOS) is an open source network operating system for
software-defined networks (SDN). Intended to run on white box switches, ONOS is
targeted at mission critical networks, including service providers. It provides
benefits including:
ONOS is intended to help service providers migrate their existing networks to white
box switches, thus lowering CapEx and OpEx. It was developed in conjunction with
service providers including AT&T and NTT Communications.
INSTALLING ONOS :-
2) ONOS REQUIREMENTS
System requirements
Software requirements
i) Maven
$ cd ~
$ mkdir Applications
$ wget http://archive.apache.org/dist/maven/maven-
3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
NOTE: Although ONOS has been migrated to Buck, maven was used in earlier
releases.
ii) Karaf
$ cd ~
$ cd Applications
$ wget http://archive.apache.org/dist/karaf/3.0.5/apache-karaf-
3.0.5.tar.gz
i) Java 8
$ export JAVA_HOME=/usr/lib/jvm/java-8-oracle
JAVA_HOME=/usr/lib/jvm/java-8-oracle
$ cd onos
6) ENVIRONMENTAL VARIABLES
The ONOS source comes with a sample bash_profile that can set these variables for
you.
i) Edit ~/.bashrc
$ nano ~/.bashrc
. ~/onos/tools/dev/bash_profile
iii) Reload .bashrc or log out and log in again to apply the changes
. ~/.bashrc
iv) Once you run the above command, you will see in the output of the env
command that several new variables, such as ONOS_ROOT, MAVEN, and KARAF_ROOT, have
been set.
ONOS_ROOT=/Users/nirmalkaria/onos
MAVEN=/Users/nirmalkaria/Applications/apache-maven-3.3.9
KARAF_ROOT=/Users/nirmalkaria/Applications/apache-karaf-
3.0.8
i) Edit ~/Applications/apache-karaf-
3.0.5/etc/org.apache.karaf.features.cfg file by appending the following line to
featuresRepositories:
$ nano ~/Applications/apache-karaf-
3.0.5/etc/org.apache.karaf.features.cfg
ii) Locate the featuresRepositories and append this line (will need a comma
before appending the text to separate from the previous value)
mvn:org.onosproject/onos-features/1.10.0-SNAPSHOT/xml/features
$ cd ~/onos
9) Selecting IP address
$ export ONOS_IP=10.1.9.255
$ export ONOS_NIC=10.1.9.*
10) Selecting ONOS apps to activate
$ export ONOS_APPS=drivers,openflow,proxyarp,mobility,fwd
$ ok clean
/ __ \/ |/ / __ \/ __/
/ /_/ / / /_/ /\ \
\____/_/|_/\____/___/
onos>
At this point, typing help onos at the prompt should still bring up a list of
available commands. Pressing Ctrl-D or logout will exit the CLI.
METHOD 2
i) Java 8
$ export JAVA_HOME=/usr/lib/jvm/java-8-oracle
JAVA_HOME=/usr/lib/jvm/java-8-oracle
$ cd onos
$ export ONOS_ROOT=~/onos
$ source $ONOS_ROOT/tools/dev/bash_profile
$ cd $ONOS_ROOT
$ tools/build/onos-buck test
$ tools/build/onos-buck project
5) Run ONOS
$ cd $ONOS_ROOT
$ tools/test/bin/onos localhost
ii) To open your default browser on the ONOS GUI page, simply type: