ONOS provides the control plane for software-defined networks, managing network components and running applications. It can run distributed across servers for high availability and scalability. The document introduces ONOS and its architecture, and provides steps to install ONOS, run it with Mininet, and interact with its REST API. Key applications like reactive forwarding are demonstrated.
5. 5 / 63
ONOS
Open Network
OS
ONOS provides the control plane for a software-de ned
network (SDN), managing network components, such as
switches and links, and running software programs or modules
to provide communication services to end hosts and
neighboring networks.
ONOS applications and use cases often consist of customized communication routing,
management, or monitoring services for software-de ned networks.
ONOS can run as a distributed system across multiple servers, allowing it to use the CPU
and memory resources of multiple servers while providing fault tolerance in the face of
server failure and potentially supporting live/rolling upgrades of hardware and software
without interrupting network tra c.
Ref: ONOS - Wiki
6. 6 / 63
ONOS
Architecture
Tenets
High-availability, scalability and performance (required to
sustain demands of service provider & enterprise
networks)
Strong abstractions and simplicity (required for
development of apps and solutions)
Protocol and device behaviour independence (avoid
contouring and deformation due to protocol speci cs)
Separation of concerns and modularity (allow tailoring and
customization without speciating the code-base)
Ref: ONOS Distributed Tutorial
13. 13 / 63
Installation
Download
Extract
# direct download
$ wget -c http://downloads.onosproject.org/release/onos-1.12.0.tar.gz
# indirect: download first + sftp
$ sftp -oPort=22 em@192.168.56.70
sftp> put onos-1.12.0.tar.gz
$ ssh em@192.168.56.70
$ tar xzf onos-1.12.0.tar.gz
$ cd onos-1.12.0/bin
~/onos-1.12.0/bin$ ./onos-service start
14. ~/onos-1.12.0/bin$ ./onos-service clean
Welcome to Open Network Operating System (ONOS)!
____ _ ______ ____
/ __ / |/ / __ / __/
/ /_/ / / /_/ /
____/_/|_/____/___/
Documentation: wiki.onosproject.org
Tutorials: tutorials.onosproject.org
Mailing lists: lists.onosproject.org
Come help out! Find out how at: contribute.onosproject.org
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown ONOS.
onos> apps -s -a
+22 org.onosproject.drivers 1.12.0 Default Drivers
onos> feature:list -i
Name | Version | Installed | Repository | Descriptio
----------------------------------------------------------------------------------------------
onos-thirdparty-base | 1.12.0 | x | onos-1.12.0 | ONOS 3rd p
onos-thirdparty-web | 1.12.0 | x | onos-1.12.0 | ONOS 3rd p
onos-api | 1.12.0 | x | onos-1.12.0 | ONOS servi
onos-core | 1.12.0 | x | onos-1.12.0 | ONOS core
onos-incubator | 1.12.0 | x | onos-1.12.0 | ONOS core
onos-rest | 1.12.0 | x | onos-1.12.0 | ONOS REST
onos-gui | 1.12.0 | x | onos-1.12.0 | ONOS GUI c
onos-cli | 1.12.0 | x | onos-1.12.0 | ONOS admin
standard | 3.0.8 | x | standard-3.0.8 | Karaf stan
http | 3.0.8 | x | standard-3.0.8 | Implementa
war | 3.0.8 | x | standard-3.0.8 | Turn Karaf
webconsole | 3.0.8 | x | standard-3.0.8 | Base suppo
ssh | 3.0.8 | x | standard-3.0.8 | Provide a
scr | 3.0.8 | x | standard-3.0.8 | Declarativ
onos-drivers-default | 1.12.0 | x | onos-drivers-default-1.12.0 | Default Dr
pax-jetty | 8.1.19.v20160209 | x | org.ops4j.pax.web-3.2.9 | Provide Je
pax-http | 3.2.9 | x | org.ops4j.pax.web-3.2.9 | Implementa
pax-http-whiteboard | 3.2.9 | x | org.ops4j.pax.web-3.2.9 | Provide HT
pax-war | 3.2.9 | x | org.ops4j.pax.web-3.2.9 | Provide su
14 / 63
Run ONOS
27. 27 / 63
REST Interface
ONOS uses Swagger to auto-generate
REST API documentation. This can be
viewed from any running ONOS
instance at the URL:
<IP>:8181/onos/v1/docs/
O ers a nice way to directly run queries or copy & paste
curl commands for testing.
Endpoints contributed by non-core applications can be
reached through the top menu.
The REST API exists primarily to provide an easy (but slow)
way for web applications and scripting languages to
interact with the ONOS system. It is not recommended for
routing or high-performance network applications, but can
be useful for human-timescale tasks such as system
management. It can also be useful for testing and
debugging.
Ref: Introduction to the ONOS APIs
35. 35 / 63
Compile &
Run
# Java JDK + Env as before
$ git clone https://gerrit.onosproject.org/onos
$ cd onos && export ONOS_ROOT=$(pwd)
~/onos$ git checkout 1.12.0
~/onos$ tools/build/onos-buck build onos --show-output
...
The outputs are:
//tools/package:onos-package buck-out/gen/tools/package/onos-package/onos.tar.gz
# cd onos && export ONOS_ROOT=$(pwd)
~/onos$ tools/build/onos-buck run onos-local -- clean debug
Ref: Developer Quick Start - ONOS
36. # run server
$ cd onos && export ONOS_ROOT=$(pwd)
~/onos$ tools/build/onos-buck run onos-local -- clean debug
# http://192.168.56.70:8181/onos/ui
# run client; attach to the ONOS CLI console
~/onos$ export ONOS_ROOT=$(pwd) && tools/test/bin/onos localhost
Welcome to Open Network Operating System (ONOS)!
____ _ ______ ____
/ __ / |/ / __ / __/
/ /_/ / / /_/ /
____/_/|_/____/___/
Documentation: wiki.onosproject.org
Tutorials: tutorials.onosproject.org
Mailing lists: lists.onosproject.org
Come help out! Find out how at: contribute.onosproject.org
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown ONOS.
onos> apps -s -a
24 org.onosproject.drivers 1.12.0 Default Drivers
onos> app activate org.onosproject.openflow
Activated org.onosproject.openflow
onos> app activate org.onosproject.fwd
Activated org.onosproject.fwd
onos> apps -s -a
+ 12 org.onosproject.hostprovider 1.12.0 Host Location Provider
+ 13 org.onosproject.lldpprovider 1.12.0 LLDP Link Provider
+ 14 org.onosproject.optical-model 1.12.0 Optical Network Model
+ 15 org.onosproject.openflow-base 1.12.0 OpenFlow Base Provider
+ 16 org.onosproject.openflow 1.12.0 OpenFlow Provider Suite
+ 24 org.onosproject.drivers 1.12.0 Default Drivers
+ 138 org.onosproject.fwd 1.12.0 Reactive Forwarding
36 / 63
Quick Start
43. mininet-onos> onos:apps -s -a
client: JAVA_HOME not set; results may vary
Logging in as onos
697 [sshd-SshClient[7dc7cbad]-nio2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAll
+ 12 org.onosproject.hostprovider 1.12.0 Host Location Provider
+ 13 org.onosproject.lldpprovider 1.12.0 LLDP Link Provider
+ 14 org.onosproject.optical-model 1.12.0 Optical Network Model
+ 15 org.onosproject.openflow-base 1.12.0 OpenFlow Base Provider
+ 16 org.onosproject.openflow 1.12.0 OpenFlow Provider Suite
+ 24 org.onosproject.drivers 1.12.0 Default Drivers
+ 51 org.onosproject.mobility 1.12.0 Host Mobility
+ 89 org.onosproject.proxyarp 1.12.0 Proxy ARP/NDP
+ 138 org.onosproject.fwd 1.12.0 Reactive Forwarding
mininet-onos>
mininet-onos> onos
client: JAVA_HOME not set; results may vary
Logging in as onos
658 [sshd-SshClient[7dc7cbad]-nio2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAll
Welcome to Open Network Operating System (ONOS)!
____ _ ______ ____
/ __ / |/ / __ / __/
/ /_/ / / /_/ /
____/_/|_/____/___/
Documentation: wiki.onosproject.org
Tutorials: tutorials.onosproject.org
Mailing lists: lists.onosproject.org
Come help out! Find out how at: contribute.onosproject.org
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown ONOS.
onos> ^D
mininet-onos>
43 / 63
onos.py