Slide 1

Slide 1 text

Preparing ONOS Devel. Environment Iwan Setiawan

Slide 2

Slide 2 text

ONOS development environment A lightning talk: Many slides crammed in 15 mins some parts would be skipped

Slide 3

Slide 3 text

Starting point for developing ONOS (apps, core, drivers, models, protocols, providers, or else) playing more with

Slide 4

Slide 4 text

Outline ● Software-defined networking (SDN) ● Open Network Operating System (ONOS) ● ONOS development environment setup Disclaimer: I’m not an ONOS Ambassador

Slide 5

Slide 5 text

Banyumas Taipei EE Unsoed

Slide 6

Slide 6 text

Iwan stwn ● CSIE student at NTUST – Cloud Computing and Networking Lab – Graduate student member: ACM SIGCOMM, IEEE Communications Society, IEEE Computer Society ● Learning computing and networking – SDN: Topology discovery schemes, network hypervisors – Cloud-edge computing: Architecture, offloading, federation Computer Science and Information Engineering

Slide 7

Slide 7 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. ● Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Networking Data Plane Application ISA ABI/API Computing Hardware Operating System ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface ISA

Slide 8

Slide 8 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. ● Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Data Plane Operating System Application ISA ABI/API Computing Hardware Networking ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface

Slide 9

Slide 9 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. ● Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane SB API Data Plane Operating System Application ISA ABI/API Computing Hardware SDN ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound

Slide 10

Slide 10 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. ● Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane SB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound

Slide 11

Slide 11 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. ● Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane SB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound

Slide 12

Slide 12 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. ● Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane SB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound

Slide 13

Slide 13 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability ● Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound

Slide 14

Slide 14 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability ● Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API NB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound Northbound

Slide 15

Slide 15 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability ● Current: Different needs, different architectures – Kinds of control plane: centralized, centralized-clustered, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API NB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound Northbound

Slide 16

Slide 16 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability ● Current: Different needs, different architectures – Kinds of control plane: centralized, centralized-clustered, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API NB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound Northbound

Slide 17

Slide 17 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability ● Current: Different needs, different architectures – Kinds of control plane: centralized, centralized-clustered, hybrid – Limitations of OpenFlow, proliferation of white box switches – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API NB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound Northbound Global and local controllers

Slide 18

Slide 18 text

SDN ● Abstraction for networking – Architecture: control plane and data plane – Network management ● Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability ● Current: Different needs, different architectures – Kinds of control plane: centralized, centralized-clustered, hybrid – Limitations of OpenFlow, proliferation of white box switches – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API NB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound Northbound Global and local controllers The other side: programmable data plane

Slide 19

Slide 19 text

Kreutz et al., 2015

Slide 20

Slide 20 text

Kreutz et al., 2015

Slide 21

Slide 21 text

Kreutz et al., 2015

Slide 22

Slide 22 text

https://opennetworking.org/onos/

Slide 23

Slide 23 text

ONOS ● An SDN controller, particularly for service provider networks – Platform with extensible and modular applications +distributed – Considered as “carrier-grade” with many uses in major providers ● Based on Java – LTS release: 2.2 with JDK 11 and Karaf 4 – Southbound: OpenFlow/P4Runtime/gN*, Northbound: REST/gRPC – Future version: µONOS based on with cloud-native in mind ● NG-SDN: “µONOS, Stratum, P4” * https://github.com/opennetworkinglab/ngsdn-tutorial open at least in trial or r&d phase

Slide 24

Slide 24 text

ONOS Architecture ONF, 2020

Slide 25

Slide 25 text

https://opennetworking.org/cord/

Slide 26

Slide 26 text

https://opennetworking.org/xos/

Slide 27

Slide 27 text

ONOS Devel. Environment ● Build system: Bazel via Bazelisk ● Codebase: ONOS 2.2 (LTS)* ● Tools – IDE: IntelliJ IDEA 2019.3 (Community Edition) – Emulator: Mininet with Open vSwitch 2.5+ * Current version: 2.2.6

Slide 28

Slide 28 text

Bazel: A build system ● A tool for building and testing software ● ONOS 1.14+ use Bazel. Prev: Maven, Buck ● Bazelisk, “a user-friendly launcher for Bazel” – A wrapper for Bazel – Picks a good version of Bazel for your system * https://github.com/bazelbuild/bazelisk

Slide 29

Slide 29 text

Bazel: Installing wget -c https://github.com/bazelbuild/bazelisk/releases/download/v1.4.0/bazelisk-linux-amd64 chmod +x bazelisk-linux-amd64 sudo mv bazelisk-linux-amd64 /usr/local/bin/bazel bazel version

Slide 30

Slide 30 text

https://youtu.be/-0YC3c52qsM

Slide 31

Slide 31 text

Cloning ONOS Repository ● Clone ONOS 2.2 branch codebase > git clone -b onos-2.2 https://github.com/opennetworkinglab/onos ● Export ONOS development environment > vim ~/.bashrc export ONOS_ROOT=~/path/to/onos_source source ${ONOS_ROOT}/tools/dev/bash_profile > source ~/.bashrc ● Change directory to $ONOS_ROOT > cd $ONOS_ROOT git checkout 2.2.6

Slide 32

Slide 32 text

https://youtu.be/xAfTJ7mhgHk

Slide 33

Slide 33 text

Building and Running ONOS ● Build ONOS with Bazel > bazel build onos ● Run ONOS locally > bazel run onos-local -- clean debug Wait for ~3 min* Wait for ~8 min* * Processor i7, RAM 16GB ONOS_APPS variable: ONOS_APPS=${ONOS_APPS:-drivers,openflow,gui2,fwd} Notes: - GNU/Linux or Mac OS x86_64 bit - ONOS Application aRchive (OAR) (first time run)

Slide 34

Slide 34 text

https://youtu.be/p4IG-uOsWSM

Slide 35

Slide 35 text

https://youtu.be/J4cJJ_tX6cI

Slide 36

Slide 36 text

Testing ONOS with Mininet ● Mininet, a network emulator ● Available as distro package or VM image ● Use VirtualBox managed with Vagrant > vagrant up mn > vagrant ssh mn mininet.org config.vm.define “mn” do |mn| mn.vm.box = “ubuntu/bionic64” mn.vm.network “private_network”, ip: “192.168.x.y”, virtualbox_intnet: true end sudo mn --controller remote,ip=[controller] --switch=ovsk,protocols=OpenFlow13 --topo tree,3,3

Slide 37

Slide 37 text

https://youtu.be/4msCHMuV234

Slide 38

Slide 38 text

https://youtu.be/--nzOj6IlMM

Slide 39

Slide 39 text

Importing ONOS code to IDEA ● Use IntelliJ IDEA 2019.3 (Community Edition) ● Instal Bazel plugin: Configure-Plugins. Restart IDEA ● Generate ONOS Bazel Project file ● Import Bazel Project, select Workspace, choose $ONOS_ROOT ● Next, select “Copy external,” choose Bazel Project file Next, Finish, *wait for a while*, press “Sync Project with BUILD files” button $ONOS_ROOT/tools/dev/bin/onos-gen-bazel-project > ./onos.bazelproject

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

https://youtu.be/Uz0q0N47A0w

Slide 44

Slide 44 text

https://youtu.be/Bs4K7eGN96I

Slide 45

Slide 45 text

https://youtu.be/W-zM1NkJ-K4

Slide 46

Slide 46 text

ONOS 2.2.6 Codebase ONOS 2.2.6 Built Mininet with OVS 2.5+ IntelliJ IDEA 2019.3 CE Host OF 1.3 VM HT HT* ONOS Devel. Environment HP TD TD* HP* JDK11 Bazel An example for building hostprobing provider: > bazel build //providers/hostprobing:onos-providers-hostprobing-oar

Slide 47

Slide 47 text

ONOS 2.2.6 Codebase ONOS 2.2.6 Built Mininet with OVS 2.5+ IntelliJ IDEA 2019.3 CE Host OF 1.3 VM HT HT* ONOS Devel. Environment HP TD TD* HP* JDK11 Bazel An example for building hostprobing provider: > bazel build //providers/hostprobing:onos-providers-hostprobing-oar

Slide 48

Slide 48 text

Terima kasih @stwn All logos included on the slides are trademarks of their respective owners

Slide 49

Slide 49 text

Systems Approach Book Series ● Computer Networks https://book.systemsapproach.org/ ● Software-Defined Networks https://sdn.systemsapproach.org/ ● 5G Mobile Networks https://5g.systemsapproach.org/ Translation into Indonesian?

Slide 50

Slide 50 text

Reading List ● Developer Quick Start, https://wiki.onosproject.org/- display/ONOS/Developer+Quick+Start ● Getting started developing with ONOS, https://wiki.- onosproject.org/display/ONOS/Getting+started+devel oping+with+ONOS ● Using an IDE with ONOS 1.14 or higher (Bazel build), https://wiki.onosproject.org/pages/viewpage.action? pageId=28836246