50
1 / 50 ONOS Cluster Experiment Eueung Mulyana https://telematika.org/remark/onos3 Intro+Labs | Attribution-ShareAlike CC BY-SA

ONOS SDN Controller - Clustering Tests & Experiments

Embed Size (px)

Citation preview

Page 1: ONOS SDN Controller - Clustering Tests & Experiments

1 / 50

ONOS Cluster ExperimentEueung Mulyanahttps://telematika.org/remark/onos3Intro+Labs | Attribution-ShareAlike CC BY-SA

Page 2: ONOS SDN Controller - Clustering Tests & Experiments

Outline

Experiment Setup

Target Machines

Management VM

stc* & Manual Tests

2 / 50

Page 3: ONOS SDN Controller - Clustering Tests & Experiments

ONOS 1.12.0 2x LattePanda 4G/64G | 1x Raspberry Pi 3B

VirtualBox 5.2.6 | Ubuntu 16.04.3

3 / 50

Page 4: ONOS SDN Controller - Clustering Tests & Experiments

Experiment Setup

4 / 50

Page 5: ONOS SDN Controller - Clustering Tests & Experiments

5 / 50

Target Machine: a machine (physical, virtual,container, ...) where ONOS runs.Cluster: a set of target machines workingtogether as a distributed system.Management Machine: an optional machinemeant for operators, used to deploy andmanage ONOS from a single position on one ormore target machines.

At least one target machine is needed to install and run ONOS. Clusterallows ONOS to spread the load, being able to better scale and improveperformances.

ONOS can be deployed and managed on a target machine either locally(from the machine itself), or from a remote machine, called managementmachine. The management machine is optional. Ref: [Abstractions andde�nitions]

Page 6: ONOS SDN Controller - Clustering Tests & Experiments

Environment Overview 6 / 50

Page 7: ONOS SDN Controller - Clustering Tests & Experiments

7 / 50

NotesWe recommend - and actually require - at least

three nodes if you need fault tolerance.Underlying ONOS in part is several Raft clusters

which require a majority of the cluster to beavailable to make progress... @jordan |

Discussion Thread

Page 8: ONOS SDN Controller - Clustering Tests & Experiments

Management VM | VirtualBox Setting 8 / 50

Page 9: ONOS SDN Controller - Clustering Tests & Experiments

Management VM | VirtualBox Setting 9 / 50

Page 10: ONOS SDN Controller - Clustering Tests & Experiments

Management VM | Xubuntu 16.04.3 10 / 50

Page 11: ONOS SDN Controller - Clustering Tests & Experiments

Target Machines + Mininet Box 11 / 50

Page 12: ONOS SDN Controller - Clustering Tests & Experiments

Target Machines + Mininet Box 12 / 50

Page 13: ONOS SDN Controller - Clustering Tests & Experiments

Target Machines

13 / 50

Page 14: ONOS SDN Controller - Clustering Tests & Experiments

14 / 50

Target MachineInstall OS (Ubuntu Server 16.04.3)Install Dependencies & Set EnvsONOS Manual Installation (Optional)

Page 15: ONOS SDN Controller - Clustering Tests & Experiments

Hardware Speci�cs

LattePanda SBC

15 / 50

Page 16: ONOS SDN Controller - Clustering Tests & Experiments

16 / 50

LattePanda4G/64G

Ubuntu Server 16.04.3

ESCChipset > South Bridge > LPSS & SCC Con�guration > SCCSDIO Support = PCI ModeF4Boot and Install with the HWE kernelInstall Ubuntu Server

Notes: (1) No network interfaces were found -> Continue; (2) Guided - use entire disk

Page 17: ONOS SDN Controller - Clustering Tests & Experiments

17 / 50

PreparationInterface & Network

Access

# console$ sudo ifconfig$ sudo dhclient$ hostname -I

# -----------------------------

# remote $ ssh [email protected]

em@onos181:~$ cat /etc/network/interfaces...auto enx00e04c360a5diface enx00e04c360a5d inet static address 192.168.0.181 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 dns-nameservers 192.168.0.1 8.8.8.8 8.8.4.4

Page 18: ONOS SDN Controller - Clustering Tests & Experiments

~$ ssh [email protected]@192.168.0.181's password:Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.13.0-32-generic x86_64)...Last login: Mon Feb 19 19:12:51 2018 from 192.168.0.210

~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.ori~$ sudo sed -i 's/http:\/\/us.archive.ubuntu.com\/ubuntu\//http:\/\/kambing.ui.ac.id\/ubuntu\/~$ sudo sed -i 's/http:\/\/id.archive.ubuntu.com\/ubuntu\//http:\/\/kambing.ui.ac.id\/ubuntu\/

~$ sudo apt update~$ sudo apt upgrade

# ----------------------------------

# after upgrade~$ ifconfig -aenx00e04c360a5d Link encap:Ethernet HWaddr 00:e0:4c:36:0a:5d inet addr:192.168.0.181 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::2e0:4cff:fe36:a5d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:215 errors:0 dropped:0 overruns:0 frame:0 TX packets:179 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:221681 (221.6 KB) TX bytes:18351 (18.3 KB)

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:160 errors:0 dropped:0 overruns:0 frame:0 TX packets:160 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)

wlan0 Link encap:Ethernet HWaddr 54:c9:df:86:fc:be BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

18 / 50

Update/ Upgrade 

Check

Page 19: ONOS SDN Controller - Clustering Tests & Experiments

Dependencies & Envs

19 / 50

Page 20: ONOS SDN Controller - Clustering Tests & Experiments

20 / 50

PreparationDepsEnvs

$ sudo apt-get install unzip zip tree

$ sudo apt-get install software-properties-common -y && \ sudo add-apt-repository ppa:webupd8team/java -y && \ sudo apt-get update && \ echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-s sudo apt-get install oracle-java8-installer oracle-java8-set-default -y

$ java -versionjava version "1.8.0_161"Java(TM) SE Runtime Environment (build 1.8.0_161-b12)Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

$ which java/usr/bin/java

# ------------------------

$ echo $JAVA_HOME/usr/lib/jvm/java-8-oracle

$ cat .profile...PATH="/opt/onos/bin:$PATH"export LC_ALL="en_US.UTF-8"export LC_CTYPE="en_US.UTF-8"

Page 21: ONOS SDN Controller - Clustering Tests & Experiments

ONOS Manual Installation

21 / 50

Page 22: ONOS SDN Controller - Clustering Tests & Experiments

# Transfer onos-1.12.0.tar.gz$ sftp [email protected]

sftp> put onos-1.12.0.tar.gzUploading onos-1.12.0.tar.gz to /home/em/onos-1.12.0.tar.gzonos-1.12.0.tar.gz 100% 215MB 5.1MB/s 00:42 sftp> quit

# Extract$ sudo mv onos-1.12.0.tar.gz /opt/

$ cd /opt && sudo tar xzf onos-1.12.0.tar.gz

$ sudo rm -f onos-1.12.0.tar.gz$ sudo mv onos-1.12.0 onos

# -------------------------------------

# Test$ /opt/onos/bin/onos-service start

Welcome to Open Network Operating System (ONOS)! ____ _ ______ ____ / __ \/ |/ / __ \/ __/ / /_/ / / /_/ /\ \ \____/_/|_/\____/___/

Documentation: wiki.onosproject.org Tutorials: tutorials.onosproject.orgMailing lists: lists.onosproject.org

Come help out! Find out how at: contribute.onosproject.org

Hit '<tab>' for a list of available commandsand '[cmd] --help' for help on a specific command.Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown ONOS.

onos> apps -s -aService org.onosproject.app.ApplicationService not found

onos> apps -s -a+ 18 org.onosproject.drivers 1.12.0 Default Drivers

22 / 50

ONOS Binary 

Test

Page 23: ONOS SDN Controller - Clustering Tests & Experiments

23 / 50

ONOSService

# ONOS user$ sudo adduser sdn --system --group

# No password$ sudo visudo%sudo ALL=(ALL) NOPASSWD:ALL

# Service user/opt/onos$ nano optionsONOS_USER=sdn

# ------

# Ownership / write access$ sudo chown sdn:sdn /opt/onos -R

# ------

# Service$ sudo cp /opt/onos/init/onos.initd /etc/init.d/onos

$ sudo cp /opt/onos/init/onos.initd /etc/init.d/onos$ sudo cp /opt/onos/init/onos.service /etc/systemd/system/$ sudo systemctl daemon-reload$ sudo systemctl enable onos

$ sudo service onos status

Page 24: ONOS SDN Controller - Clustering Tests & Experiments

em@onos182:~$ onos-user-password em 123em@onos182:~$ onos-user-password onos rocks# note: logout from web ui

em@onos182:~$ onosPassword authenticationPassword:Welcome to Open Network Operating System (ONOS)! ____ _ ______ ____ / __ \/ |/ / __ \/ __/ / /_/ / / /_/ /\ \ \____/_/|_/\____/___/

Documentation: wiki.onosproject.org Tutorials: tutorials.onosproject.orgMailing lists: lists.onosproject.org

Come help out! Find out how at: contribute.onosproject.org

Hit '<tab>' for a list of available commandsand '[cmd] --help' for help on a specific command.Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown ONOS.

onos> ^D

# -----------------------------

em@onos182:~$ ll /opt/onos/bintotal 64drwxrwxrwx 2 sdn sdn 4096 Dec 12 05:04 ./drwxrwxrwx 8 sdn sdn 4096 Feb 25 08:57 ../-rwxrwxrwx 1 sdn sdn 969 Dec 12 05:04 _check-json*-rwxrwxrwx 1 sdn sdn 1347 Dec 12 05:04 _find-node*-rwxrwxrwx 1 sdn sdn 273 Dec 12 05:04 onos*-rwxrwxrwx 1 sdn sdn 3368 Dec 12 05:04 onos-app*-rwxrwxrwx 1 sdn sdn 1287 Dec 12 05:04 onos-backup*-rwxrwxrwx 1 sdn sdn 1960 Dec 12 05:04 onos-cfg*-rwxrwxrwx 1 sdn sdn 1860 Dec 12 05:04 onos-compile-yang*-rwxrwxrwx 1 sdn sdn 1310 Dec 12 05:04 onos-form-cluster*-rwxrwxrwx 1 sdn sdn 197 Dec 12 05:04 onos-jpenable*-rwxrwxrwx 1 sdn sdn 1961 Dec 12 05:04 onos-netcfg*-rwxrwxrwx 1 sdn sdn 1073 Dec 12 05:04 onos-restore*-rwxrwxrwx 1 sdn sdn 2011 Dec 12 05:04 onos-service* 24 / 50

onos-user-password 

onos (Local CLI) 

onos-form-cluster

Page 25: ONOS SDN Controller - Clustering Tests & Experiments

Management / Dev VM

25 / 50

Page 26: ONOS SDN Controller - Clustering Tests & Experiments

26 / 50

TypicalWork�ow

1. Make changes to the code2. Build ONOS with onos-buck buld onos3. Load the cell settings with cell $YOUR_CELL_NAME4. Load your topology with topo $YOUR_TOPO_NAME5. Deploy ONOS target machines with stc setup6. Deploy the Mininet topology with stc net-setup

Ref: [Cells and ONOS test scripts]

Page 27: ONOS SDN Controller - Clustering Tests & Experiments

27 / 50

ManagementVM

Preparation (Deps, Envs, Network)Clone, Checkout & Build (+others: mvnpreparation, archetypes)Cell & TopoSSH Key Setup (incl. Target Machines)onos CLIstc CommandsOther Useful Commands

Page 28: ONOS SDN Controller - Clustering Tests & Experiments

28 / 50

PreparationDepsEnvs

Network

# Some deps$ sudo apt install zip unzip (installed)$ sudo apt install curl tree git openssh-server

# Install JDK$ sudo apt-get install software-properties-common -y && \ sudo add-apt-repository ppa:webupd8team/java -y && \ sudo apt-get update && \ echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-s sudo apt-get install oracle-java8-installer oracle-java8-set-default -y

# -----------------------------$ nano .profileexport JAVA_HOME=/usr/lib/jvm/java-8-oracle/

$source .profile

# Install Maven$sudo apt install maven

# -----------------------------# Host-only network$ cat /etc/network/interfaces...auto enp0s8 iface enp0s8 inet static address 192.168.56.70 netmask 255.255.255.0 ...

# VBox shared folder$ sudo adduser em vboxsf

Page 29: ONOS SDN Controller - Clustering Tests & Experiments

$ git clone https://gerrit.onosproject.org/onos$ cd onos && git checkout 1.12.0

~$ nano .profileexport ONOS_ROOT=/home/em/onossource $ONOS_ROOT/tools/dev/bash_profile

$ source .profile

# Install/Build$ tools/build/onos-buck build onos --show-output

# if failed e.g. NPM, w/h bash_profile# rm -rf bin/ && rm -rf buck-out/

~/onos$ tools/build/onos-buck build onos --show-outputUpdating Buck... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 44.3M 100 44.3M 0 0 227k 0 0:03:19 0:03:19 --:--:-- 253kArchive: cache/buck-v2017.11.30.01.zip...Successfully updated Buck in /home/em/onos/bin/buck to buck-v2017.11.30.01.zip

Not using buckd because NO_BUCKD is set....The outputs are://tools/package:onos-package buck-out/gen/tools/package/onos-package/onos.tar.gz

~/onos$ tree -L 1 -d.|----- apps|----- bin|----- bucklets|----- buck-out|----- buck-tools|----- cli|----- core|----- docs|----- drivers|----- features|----- incubator|----- lib 29 / 50

Checkout 

Build

Page 30: ONOS SDN Controller - Clustering Tests & Experiments

30 / 50

CheckDev Preparation

Some Executables

# DEV preparation~$ cd onos && onos-buck-publish-local

$ cd $ONOS_ROOT/tools/package/archetypes$ mvn clean install (mci)

# -----

# Check~$ which onos/home/em/onos/tools/test/bin/onos

~$ which onos-create-app/home/em/onos/tools/dev/bin/onos-create-app

~$ which onos-app/home/em/onos/tools/package/runtime/bin/onos-app

Page 31: ONOS SDN Controller - Clustering Tests & Experiments

~/onos/tools/test/cells$ cp local local-sbc && nano local-sbc# Local SBC-based ONOS instances 1,2 & ONOS mininet box

export ONOS_NIC=192.168.0.*export OC1="192.168.0.181"export OC2="192.168.0.182"export OCN="192.168.0.155"

export ONOS_APPS="drivers,openflow,fwd,proxyarp,mobility"

ONOS_USER=em

$ cell local-sbcONOS_CELL=local-sbcOCI=192.168.0.181OC1=192.168.0.181OC2=192.168.0.182OCN=192.168.0.155ONOS_APPS=drivers,openflow,fwd,proxyarp,mobilityONOS_GROUP=sdnONOS_MN_PY=/home/em/onos/tools/dev/mininet/onos.pyONOS_NIC=192.168.0.*ONOS_SCENARIOS=/home/em/onos/tools/test/scenariosONOS_TOPO=defaultONOS_USER=emONOS_WEB_PASS=rocksONOS_WEB_USER=onos

# --------------------

# ONOS Client/CLI via SSH$ ssh -p 8101 onos@localhost # rocks

$ ssh -p 8101 onos@$OCI# rocks

# --------------------

~$ cellsbeast # Bare metal cluster (7-node)beast-1 # Bare metal cluster (7-node)beast-3 # Bare metal cluster (7-node)

31 / 50

cell 

onos (via ssh)

Page 32: ONOS SDN Controller - Clustering Tests & Experiments

em@onos-ide:~$ ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/em/.ssh/id_rsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/em/.ssh/id_rsa.Your public key has been saved in /home/em/.ssh/id_rsa.pub.The key fingerprint is:SHA256:x61ayOgkKfOu4Kb1kg6qhzQg1zWtinDbeDRi7XOf8dk em@onos-ideThe key's randomart image is:+---[RSA 2048]----+| . || o . || o . o ||+ = = . . . ||o= O o S o . || o+ *..o.o . ||+.=oooo.o+oo ||+=+= + ooo E ||B+o++ . . |+----[SHA256]-----+

# ----------------

# via ssh-copy-idem@onos-ide:~$ ssh-copy-id [email protected]/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/em/.ssh/id_rsa.pub"/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that a/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is [email protected]'s password:

Number of key(s) added: 1

Now try logging into the machine, with: "ssh '[email protected]'"and check to make sure that only the key(s) you wanted were added.

# via onos-push-keysem@onos-ide:~$ onos-push-keys [email protected]'s password:

em@onos-ide:~$ ONOS_USER=ubuntu onos-push-keys [email protected]'s password:

32 / 50

ssh-keygen 

onos-push-keys 

Test

Page 33: ONOS SDN Controller - Clustering Tests & Experiments

em@onos-ide:~$ onos-secure-ssh# Host [localhost]:8101 found: line 1/home/em/.ssh/known_hosts updated.Original contents retained as /home/em/.ssh/known_hosts.oldusage: onos-user-password user {password|--remove}ID | State | Web-State | Level | Web-ContextPath | Name ------------------------------------------------------------------------------157 | Active | Deployed | 80 | /onos/v1 | onos-rest (1.12.0)159 | Active | Deployed | 80 | /onos/ui | onos-gui (1.12.0)

# Host [localhost]:8101 found: line 1/home/em/.ssh/known_hosts updated.Original contents retained as /home/em/.ssh/known_hosts.old

# Host [localhost]:8101 found: line 1/home/em/.ssh/known_hosts updated.Original contents retained as /home/em/.ssh/known_hosts.oldusage: onos-user-password user {password|--remove}ID | State | Web-State | Level | Web-ContextPath | Name ------------------------------------------------------------------------------157 | Active | Deployed | 80 | /onos/v1 | onos-rest (1.12.0)159 | Active | Deployed | 80 | /onos/ui | onos-gui (1.12.0)

# Host [localhost]:8101 found: line 1/home/em/.ssh/known_hosts updated.Original contents retained as /home/em/.ssh/known_hosts.old

# -----------------------

em@onos-ide:~$ onosWelcome to Open Network Operating System (ONOS)! ____ _ ______ ____ / __ \/ |/ / __ \/ __/ / /_/ / / /_/ /\ \ \____/_/|_/\____/___/

Documentation: wiki.onosproject.org Tutorials: tutorials.onosproject.orgMailing lists: lists.onosproject.org

Come help out! Find out how at: contribute.onosproject.org

Hit ' t b ' f li t f il bl d33 / 50

onos-secure-ssh 

onos (CLI)

Page 34: ONOS SDN Controller - Clustering Tests & Experiments

em@onos-ide:~$ toposem@onos-ide:~$ topo dual

em@onos-ide:~$ ONOS_USER=ubuntu stc net-setup2018-02-25 13:32:41 Net-Setup started2018-02-25 13:32:41 Push-Topos started -- onos-push-topos 192.168.0.1552018-02-25 13:32:41 Stop-Mininet-If-Needed started -- onos-mininet stop2018-02-25 13:32:43 Push-Topos completed2018-02-25 13:32:44 Stop-Mininet-If-Needed completed2018-02-25 13:32:44 Clean-Mininet-If-Needed started -- onos-mininet cleanup2018-02-25 13:32:48 Clean-Mininet-If-Needed completed2018-02-25 13:32:48 Wipe-Out-Data-Before started -- onos-wipe-out2018-02-25 13:32:54 Wipe-Out-Data-Before completed2018-02-25 13:32:54 Initial-Summary-Check started -- onos-check-summary 192.168.0.181 [0-9]* 2018-02-25 13:32:55 Initial-Summary-Check completed2018-02-25 13:32:55 Config-Topo started -- onos-netcfg 192.168.0.181 /home/em/onos/tools/test2018-02-25 13:32:56 Config-Topo completed2018-02-25 13:32:56 Start-Mininet started -- onos-mininet start topos/topo dual.py 192.168.0.2018-02-25 13:37:30 Start-Mininet completed2018-02-25 13:37:30 Wait-For-Mininet started -- onos-mininet wait 102018-02-25 13:37:42 Wait-For-Mininet completed2018-02-25 13:37:42 ARP-Hosts started -- onos-mininet sendAndExpect gratuitousArp --expect .2018-02-25 13:37:45 ARP-Hosts completed2018-02-25 13:37:45 Check-Summary started -- onos-check-summary 192.168.0.181 [0-9]* 2 1 12018-02-25 13:38:05 Check-Summary failed2018-02-25 13:38:05 Balance-Masters started -- onos 192.168.0.181 balance-masters2018-02-25 13:38:05 Balance-Masters completed2018-02-25 13:38:05 Check-Flows started -- onos-check-flows 192.168.0.1812018-02-25 13:38:11 Check-Flows completed2018-02-25 13:38:11 Net-Setup failed5:29 Failed! 11 steps succeeded; 2 steps failed; 0 steps skipped

# openflow only# ONOS_APPS=drivers,openflow,fwd,proxyarp,mobility

34 / 50

topo 

stc net-setup

Page 35: ONOS SDN Controller - Clustering Tests & Experiments

em@onos-ide:~$ ONOS_USER=ubuntu onos-mininet attach[detached from 23035.mininet]Connection to 192.168.0.155 closed.

# ----------------

# mininet 0.155$ sudo visudo (no passwd)

$ sudo apt install screen$ screen -S mininet# screen -list | screen -r | ctrl+a d | screen -X -S 4122 kill

# ----------------

em@onos-ide:~$ ONOS_USER=ubuntu onos-mininet attach^a+d

35 / 50

onos-mininetattach

Page 36: ONOS SDN Controller - Clustering Tests & Experiments

em@onos-ide:~$ ONOS_USER=ubuntu onos-mininet stopem@onos-ide:~$ ONOS_USER=ubuntu onos-mininet cleanup

em@onos-ide:~$ onos-wipe-out pleaseem@onos-ide:~$ onos-netcfg -v $OC1 DELETEem@onos-ide:~$ onos-netcfg -v $OC2 DELETEUsage: onos-netcfg [-v] node file|DELETE [url]

# ----------------

# oneliner$ ONOS_USER=ubuntu onos-mininet stop && ONOS_USER=ubuntu onos-mininet cleanup$ onos-wipe-out please && onos-netcfg -v $OC1 DELETE && onos-netcfg -v $OC2 DELETE

36 / 50

onos-mininetstop 

onos-mininetcleanup 

onos-wipe-out 

onos-netcfg

Page 37: ONOS SDN Controller - Clustering Tests & Experiments

stc* & Manual Tests

37 / 50

Page 38: ONOS SDN Controller - Clustering Tests & Experiments

38 / 50

Test #1topo & stc net-setup

1. Load the cell settings with cell $YOUR_CELL_NAME2. Load / activate apps (onos CLI)3. Load your topology with topo $YOUR_TOPO_NAME4. Deploy the Mininet topology with stc net-setup

Page 39: ONOS SDN Controller - Clustering Tests & Experiments

em@onos-ide:~$ cell local-sbcONOS_CELL=local-sbcOCI=192.168.0.181OC1=192.168.0.181OC2=192.168.0.182OCN=192.168.0.155ONOS_APPS=drivers,openflow,fwd,proxyarp,mobilityONOS_GROUP=sdnONOS_MN_PY=/home/em/onos/tools/dev/mininet/onos.pyONOS_NIC=192.168.0.*ONOS_SCENARIOS=/home/em/onos/tools/test/scenariosONOS_TOPO=defaultONOS_USER=emONOS_WEB_PASS=rocksONOS_WEB_USER=onos

em@onos-ide:~$ toposdefault * # Default US MPLS topology recipedual # Simple Dual topology recipegeant # GEANT & Nordnet topology recipesdnip # SDN-IP topology recipeuk # Simple UK topology recipevpls # Default VPLS topology recipe

em@onos-ide:~$ topoONOS_TOPO=defaultOTH=25OTL=140OTD=25

em@onos-ide:~$ onosWelcome to Open Network Operating System (ONOS)! ____ _ ______ ____ / __ \/ |/ / __ \/ __/ / /_/ / / /_/ /\ \ \____/_/|_/\____/___/

Documentation: wiki.onosproject.org Tutorials: tutorials.onosproject.orgMailing lists: lists.onosproject.org

Come help out! Find out how at: contribute.onosproject.org

39 / 50

cell local-sbc 

topo default 

onos 

Page 40: ONOS SDN Controller - Clustering Tests & Experiments

em@onos-ide:~$ ONOS_USER=ubuntu stc net-setup2018-02-27 18:35:37 Net-Setup started2018-02-27 18:35:37 Push-Topos started -- onos-push-topos 192.168.0.1552018-02-27 18:35:37 Stop-Mininet-If-Needed started -- onos-mininet stop2018-02-27 18:35:40 Push-Topos completed2018-02-27 18:35:42 Stop-Mininet-If-Needed completed2018-02-27 18:35:42 Clean-Mininet-If-Needed started -- onos-mininet cleanup2018-02-27 18:35:46 Clean-Mininet-If-Needed completed2018-02-27 18:35:46 Wipe-Out-Data-Before started -- onos-wipe-out2018-02-27 18:35:51 Wipe-Out-Data-Before completed2018-02-27 18:35:51 Initial-Summary-Check started -- onos-check-summary 192.168.0.181 [0-9]* 2018-02-27 18:35:51 Initial-Summary-Check completed2018-02-27 18:35:51 Config-Topo started -- onos-netcfg 192.168.0.181 /home/em/onos/tools/test2018-02-27 18:35:53 Config-Topo completed2018-02-27 18:35:53 Start-Mininet started -- onos-mininet start topos/topo default.py 192.1682018-02-27 18:35:55 Start-Mininet completed2018-02-27 18:35:55 Wait-For-Mininet started -- onos-mininet wait 102018-02-27 18:36:23 Wait-For-Mininet completed2018-02-27 18:36:23 ARP-Hosts started -- onos-mininet sendAndExpect gratuitousArp --expect .2018-02-27 18:36:27 ARP-Hosts completed2018-02-27 18:36:27 Check-Summary started -- onos-check-summary 192.168.0.181 [0-9]* 25 140 22018-02-27 18:36:28 Check-Summary completed2018-02-27 18:36:28 Balance-Masters started -- onos 192.168.0.181 balance-masters2018-02-27 18:36:29 Balance-Masters completed2018-02-27 18:36:29 Check-Flows started -- onos-check-flows 192.168.0.1812018-02-27 18:36:35 Check-Flows completed2018-02-27 18:36:35 Net-Setup completed0:57 Passed! 13 steps succeeded

em@onos-ide:~$ ONOS_USER=ubuntu onos-mininet attach[detached from 2336.mininet]Connection to 192.168.0.155 closed.

40 / 50

stc net-setup

Page 41: ONOS SDN Controller - Clustering Tests & Experiments

stc net-setup | Topo default

41 / 50

Page 42: ONOS SDN Controller - Clustering Tests & Experiments

onos-mininet attach 42 / 50

Page 43: ONOS SDN Controller - Clustering Tests & Experiments

43 / 50

Test #2Manual

1. Load the cell settings with cell $YOUR_CELL_NAME2. Load / activate apps (onos CLI)3. Run Mininet4. Connect switches to the ONOS instances

Page 44: ONOS SDN Controller - Clustering Tests & Experiments

ubuntu@pi:~$ sudo mn --topo linear,5 --mac --controller=remote,ip=192.168.0.181,port=6633 --sw+++ Creating network+++ Adding controller+++ Adding hosts: h1 h2 h3 h4 h5+++ Adding switches: s1 s2 s3 s4 s5+++ Adding links: (h1, s1) (h2, s2) (h3, s3) (h4, s4) (h5, s5) (s2, s1) (s3, s2) (s4, s3) (s5,+++ Configuring hosts h1 h2 h3 h4 h5+++ Starting controller c0+++ Starting 5 switches s1 s2 s3 s4 s5 ...

# ----------------------------

mininet> sh sudo ovs-vsctl show6535ca1b-67ad-4164-ac9b-8b1b11170705 Bridge "s2" Controller "ptcp:6655" Controller "tcp:192.168.0.181:6633" is_connected: true fail_mode: secure Port "s2-eth2" Interface "s2-eth2" Port "s2-eth1" Interface "s2-eth1" Port "s2-eth3" Interface "s2-eth3" Port "s2" Interface "s2" type: internal Bridge "s1" ... Bridge "s4" ... Bridge "s5" ... Bridge "s3" ... ovs_version: "2.5.2"

# ----------------------------

mininet> sh sudo ovs-vsctl set-controller s1 tcp:192.168.0.181:6633 tcp:192.168.0.182:6633mininet> sh sudo ovs-vsctl set-controller s2 tcp:192.168.0.181:6633 tcp:192.168.0.182:6633

44 / 50

cell 

sudo mn 

set-controller 

Page 45: ONOS SDN Controller - Clustering Tests & Experiments

onos> nodesid=192.168.0.181, address=192.168.0.181:9876, state=READY, version=1.12.0, updated=2m21s ago *id=192.168.0.182, address=192.168.0.182:9876, state=READY, version=1.12.0, updated=2m13s ago

onos> masters192.168.0.181: 5 devices of:0000000000000001 of:0000000000000002 of:0000000000000003

of:0000000000000004 of:0000000000000005192.168.0.182: 0 devices

onos> rolesof:0000000000000001: master=192.168.0.181, standbys=[ ]of:0000000000000002: master=192.168.0.181, standbys=[ ]of:0000000000000003: master=192.168.0.181, standbys=[ ]of:0000000000000004: master=192.168.0.181, standbys=[ ]of:0000000000000005: master=192.168.0.181, standbys=[ ]

# ------------------------------

onos> balance-masters

# ------------------------------

onos> masters192.168.0.181: 3 devices of:0000000000000001 of:0000000000000002 of:0000000000000005192.168.0.182: 2 devices of:0000000000000003 of:0000000000000004

onos> rolesof:0000000000000001: master=192.168.0.181, standbys=[ 192.168.0.182 ]of:0000000000000002: master=192.168.0.181, standbys=[ 192.168.0.182 ]of:0000000000000003: master=192.168.0.182, standbys=[ 192.168.0.181 ]of:0000000000000004: master=192.168.0.182, standbys=[ 192.168.0.181 ]of:0000000000000005: master=192.168.0.181, standbys=[ 192.168.0.182 ]

45 / 50

balance-masters

Page 46: ONOS SDN Controller - Clustering Tests & Experiments

Initial State 46 / 50

Page 47: ONOS SDN Controller - Clustering Tests & Experiments

balance-masters 47 / 50

Page 48: ONOS SDN Controller - Clustering Tests & Experiments

Refs/Resources

48 / 50

Page 50: ONOS SDN Controller - Clustering Tests & Experiments

50 / 50

ENDEueung Mulyanahttps://telematika.org/remark/onos3Intro+Labs | Attribution-ShareAlike CC BY-SA