OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface...

45
NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS Nancy Alonistioti [email protected] Panagiotis Kontopoulos [email protected] OpenDayLight + Mininet

Transcript of OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface...

Page 1: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Nancy [email protected]

Panagiotis [email protected]

OpenDayLight + Mininet

Page 2: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

What is OpenDayLight

http://scan.di.uoa.gr | Page 2 | 3/20/2017

The Open Daylight Project is a collaborative open source project that

aims to accelerate adoption of Software-Defined Networking (SDN) and

create a solid foundation for Network Functions Virtualization (NFV) for

a more transparent approach that fosters new innovation and reduces

risk. Founded by industry leaders and open to all, the OpenDaylight

community is developing a common, open SDN framework consistingof code and blueprints.

Page 3: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDaylight Project

http://scan.di.uoa.gr | Page 3 | 3/15/2017

Multi-company collaboration under Linux foundation

Many Projects including OpenDaylight Controller

NO-OpenFlow (Not Only OpenFlow): Supports multiple southbound protocols via plug-ins including OpenFlow

Dynamically linked in to a Service Abstraction Layer(SAL) Abstraction: SAL figures out how to fulfill the service

requested by higher layers irrespective of the southbound protocol

Modular design using the OSGi framework

A rich set of North-bound APIs via RESTful services for loosely coupled applications and OSGi services for co-located applications using the same address space

Page 4: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDaylight Releases

http://scan.di.uoa.gr | Page 4 | 3/15/2017

Hydrogen – February 2014

Hellium – October 2014

Lithium – June 2015

Beryllium – February 2016

Boron – November 2016

Includes improvements to several projects such as OpenFlow, OVSDB, FD.io (VPP)

OpenStack-related capabilities have been re-architected within a unified development framework for better scalability and performance, including clustering and persistence

Page 5: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

BORON Architecture

http://scan.di.uoa.gr | Page 5 | 3/25/2017

Page 6: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

ODL – High-Level Architecture

http://scan.di.uoa.gr | Page 6 | 3/25/2017

The SAL figures out how to fulfill the requested service irrespective of the underlying protocol used between the Controller and the network devices

Page 7: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

ODL – SAL

http://scan.di.uoa.gr | Page 7 | 3/25/2017

• Service Abstraction Layer is at the heart of the modular design of the Controller and allows it to support multiple protocols on the Southbound and providing consistent services for modules and Apps

Page 8: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

ODL – SAL

http://scan.di.uoa.gr | Page 8 | 3/25/2017

Southbound plugins provide portions of the overall network model tree

Page 9: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDaylight AD-SAL vs MD SAL

http://scan.di.uoa.gr | Page 9 | 3/15/2017

API-Drivel SAL Model-Drivel SALThe MD-SAL allows both the

NB plugins and SB plugins to

use the same API generated

from a model

NB SAL APIs used by applications

are mapped 1:1 onto SB Plugin

APIs (programmer needs to write

2 APIs)

Provider

Consumer

Notifications RPCs

Page 10: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

ODL – MVC Platform

http://scan.di.uoa.gr | Page 10 | 3/20/2017

MODEL

VIEW

CONTROL

YANG• Model for data, RPC

and notifications

• Used in MD-SAL

architecture

REST API• View self-generated

and accessible

through NB (AD-

SAL) OR RESTconf

(MD-SAL)

Java Code• Handle data

changes, RPC

callbacks

Page 11: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

A new SB plugin: SNMP4SDN

http://scan.di.uoa.gr | Page 11 | 3/15/2017

Control off-the-shelf commodity Ethernet switches

Build SDN using Ethernet switches

Flow configuration can be installed on forwarding tables, ACL and VLAN table. Achieved by SNMP and CLI in SNMP4SDN

Switch discovery is achieved via SNMP trap sent from the switch

Topology discovery is resolved by reading LLDP data on the switches

Page 12: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

HL SNMP4SDN Architecture

http://scan.di.uoa.gr | Page 12 | 3/15/2017

Page 13: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

SNMP4SDN Architecture and Interaction among the modules

http://scan.di.uoa.gr | Page 13 | 3/15/2017

Page 14: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

SNMP4SDN: Switch Discovery

http://scan.di.uoa.gr | Page 14 | 3/15/2017

Source:

https://wiki.opendaylight.org/view/SNMP4SD

N:Architecture_and_Design

Page 15: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Installing OpenDayLight

http://scan.di.uoa.gr | Page 15 | 3/20/2017

Prerequisites:

Ubuntu 14.04 64bit or newer

1x CPUs (minimum)

2x CPUs (recommended minimum)

2GB RAM (minimum)

4GB RAM (recommended minimum)

Java 8

Maven

Page 16: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Installing OpenDayLight (cont.)

http://scan.di.uoa.gr | Page 16 | 3/20/2017

1. Installing Java

1. sudo add-apt-repository ppa:webupd8team/java

2. sudo apt update; sudo apt install oracle-java8-installer

3. javac -version (to check if the correct version was installed)

4. sudo apt install oracle-java8-set-default

5. sudo nano /etc/environment

1. Add: JAVA_HOME="/usr/lib/jvm/default-java"

6. source /etc/environment

7. echo $JAVA_HOME (to check if the change was kept)

8. Usually most linux systems source /etc/environment by default. If your system doesn't do that add the following line to ~/.bashrc

1. source /etc/environment

Page 17: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Installing OpenDayLight (cont.)

http://scan.di.uoa.gr | Page 17 | 3/20/2017

2. Installing Maven

1. sudo apt-get install maven

3. Installing ODL

1. Download ODL from official site ( https://www.opendaylight.org/downloads ) - It has been tested with the Boron Release

1. wget https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.5.4-Boron-SR4/distribution-karaf-0.5.4-Boron-SR4.zip

2. unzip ./distribution-karaf-0.5.4-Boron-SR4.zip

3. cd ./distribution-karaf-0.5.4-Boron-SR4

Page 18: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Installing OpenDayLight (cont.)

http://scan.di.uoa.gr | Page 18 | 3/20/2017

3. Installing ODL

1. Run ODL1. ./bin/karaf –of13 (of13 is used to enable OpenFlow Control v1.3)

2. Inside odl we install some basic features with command:

1. feature:install odl-dlux-all odl-l2switch-switch odl-restconf odl-mdsal-apidocs

• odl-dlux-all: OpenDaylight graphical user interface

• odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

• odl-restconf: Allows access to RESTCONF API

• odl-mdsal-apidocs: Allows access to Yang API

Page 19: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Installing Mininet

http://scan.di.uoa.gr | Page 19 | 3/20/2017

Prerequisites:

Ubuntu Server 14.04 LTS or newer

1x CPUs (minimum)

1GB RAM (minimum)

Git

Page 20: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Installing Mininet (cont.)

http://scan.di.uoa.gr | Page 20 | 3/20/2017

1. git clone git://github.com/mininet/mininet

2. cd mininet3. git tag # list available versions4. git checkout -b 2.2.2 2.2.2 # or whatever version you wish to

install5. cd ..6. mininet/util/install.sh

Typical install.sh options include:1. -a: install everything that is included in the Mininet VM, including

dependencies like Open vSwitch as well the additions like the OpenFlowwireshark dissector and POX. By default these tools will be built in directories created in your home directory.

2. -nfv: install Mininet, the OpenFlow reference switch, and Open vSwitch3. -s mydir: use this option before other options to place source/build trees

in a specified directory rather than in your home directory.

Page 21: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Installing Mininet (cont.)

http://scan.di.uoa.gr | Page 21 | 3/20/2017

7. mininet/util/install.sh –a (we use this option)

8. After installation we test it by running

sudo mn --test pingall

Another way is to download the VM image from https://github.com/mininet/mininet/releases/download/2.2.2/mininet-2.2.2-170321-ubuntu-14.04.4-server-amd64.zip, which includes everything mininet needs

Page 22: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI

http://scan.di.uoa.gr | Page 22 | 3/20/2017

Page 23: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI

http://scan.di.uoa.gr | Page 23 | 3/20/2017

Page 24: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI

http://scan.di.uoa.gr | Page 24 | 3/20/2017

Page 25: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 25 | 3/20/2017

Topology

Page 26: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 26 | 3/20/2017

Nodes

Page 27: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 27 | 3/20/2017

Yang UI

Page 28: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 28 | 3/20/2017

Yang UI

Page 29: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 29 | 3/20/2017

Page 30: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 30 | 3/20/2017

Page 31: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 31 | 3/20/2017

Page 32: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 32 | 3/20/2017

Page 33: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 33 | 3/20/2017

Page 34: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 34 | 3/20/2017

Page 35: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 35 | 3/20/2017

Page 36: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 36 | 3/20/2017

Page 37: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 37 | 3/20/2017

Page 38: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 38 | 3/20/2017

Page 39: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

OpenDayLight GUI (cont.)

http://scan.di.uoa.gr | Page 39 | 3/20/2017

Page 40: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Mininet command line tool and CLIdemo

http://scan.di.uoa.gr | Page 40 | 3/20/2017

# mn

# mn --topo tree,depth=3,fanout=3 --link=tc,bw=10

mininet> xterm h1 h2

h1# wireshark &

h2# python -m SimpleHTTPServer 80 &

h1# firefox &

# mn --topo linear,100

# mn --custom custom.py --topo mytopo

Page 41: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Mininet API basics

http://scan.di.uoa.gr | Page 41 | 3/20/2017

Page 42: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Performance modeling in Mininet

http://scan.di.uoa.gr | Page 42 | 3/20/2017

Page 43: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Mininet command line tool

http://scan.di.uoa.gr | Page 43 | 3/20/2017

# sudo ovs-ofctl -O OpenFlow13 dump-flows s1

Print the flows of switch s1

#sudo ovs-ofctl -O OpenFlow13 del-flows s1

Delete the flows of switch s1

# sudo mn --topo single,2 --mac --switch

ovsk,protocols=OpenFlow13 --controller

remote,ip=<controller ip>

• --topo points to the topology we need to load

• --mac simple form of MAC addresses

Page 44: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Mininet command line tool

http://scan.di.uoa.gr | Page 44 | 3/20/2017

option dict name key: value

--topo topos 'short name':Topo constructor

--switch switches 'short name': Switch constructor

--host hosts 'short name': Host constructor

--controller controllers 'short name': Controller constructor

--link links 'short name': Link constructor

--test test'short name': test function to call with

Mininet object

Page 45: OpenDayLight + Mininet · 2019-03-06 · • odl-dlux-all: OpenDaylight graphical user interface • odl-l2switch-switch: Provides network functionality similar to an Ethernet switch

NATIONAL & KAPODISTRIAN UNIVERSITY OF ATHENS

Mininet command line tool

http://scan.di.uoa.gr | Page 45 | 3/20/2017

• --link=tc (needs mininet.link import TCLink in

our topology file)

• --host=cfs (needs mininet.node import

CPULimitedHost)

#sudo mn --custom ~/mininet/custom/topo-2sw-

2host.py --topo mytopo --mac --switch

ovsk,protocols=OpenFlow13 --controller

remote,ip=<controller ip>

: