Tutorial Ericsson RedHat Juniper PDF
Tutorial Ericsson RedHat Juniper PDF
Tutorial Ericsson RedHat Juniper PDF
www.opendaylight.org
Tutorial Agenda
Overview and Introduction
Developer Hands-on Live!
Kickstarter for Developers
End-User Hands-on Live!
www.opendaylight.org
Overview and
Introduction
www.opendaylight.org
What is OpenDaylight
The Open Daylight Project is a collaborative open source
project that aims to accelerate adoption of SoftwareDefined 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 consisting of code and blueprints.
www.opendaylight.org
www.opendaylight.org
Gold
Silver
www.opendaylight.org
www.opendaylight.org
Bootstrap Projects
OpenDaylight Controller
OpenDaylight Virtual Tenant Network (VTN)
Open DOVE
OpenFlow Plugin
Affinity Metadata Service
OpenDaylight OSCP Project
Editions
Base, Virtualization, Service Provider, Extra
Incubation Projects
YANG Tools
LISP Flow Mapping
OVSDB Open vSwitch Database Project
OpenFlow Protocol Library
BGP-LS/PCEP
Defense4All
SNMP4SDN
dlux - openDayLight User eXperience
SDN Simulation Platform
www.opendaylight.org
www.opendaylight.org
www.opendaylight.org
10
Application
Application
GUI/API change
Controller change
Application
API
Network
Representation
Controller
API
API change
Feature change
API
API
Network
Network Element
Network Element
www.opendaylight.org
Application
Application
Application
Auto-update API
API
Autogenerate code
Network
Representation
Controller
API
Load NE Model
API
Feature change
API
Network
Network Element
Network Element
www.opendaylight.org
Model-Driven SAL
Applications
Northbound APIs (Generated & Handcrafted)
Network Service
Plugin
Platform Service
Plugin
Transformer/
Adapter
Internal Plugin
Abstraction
Layer
Network
NE
System
Topology
NE
NE
Flows
Tunnels
Nodes Links
Stats
Tabl
e
Config
Tabl
e
J
Tabl
e
J
Flow Flow
Stats
Tabl
e
Config
Tabl
e
J
Flow Flow
Flow
Flow
Paths
Netconf
OF-Config/OVSDB
OF x.y
Created
by Jan
Medved
Network
Elements
PCEP
BGP-LS
www.opendaylight.org
Model-Driven SAL:
The Software Engineers View
Network
Applications
Netconf
REST
CONF
Platform
Service
Internal
Plugin
SB
Protocol
OfConfig
OVSDB
OF x.y
FCAPS
SAL
Producer
www.opendaylight.org
Applications
Netconf
Platform
Service
Internal
Plugin
REST
CONF
SB
Protocol
OfConfig
OVSDB
OF x.y
FCAPS
SAL
Consumer
Producer
Message Bus
AMQP, 0-MQ...
Container instance
Container Instance
www.opendaylight.org
API: salFlowService
Yang Tools
grouping flow-update {
container original-flow {
uses types:flow;
}
container updated-flow {
uses types:flow;
}
}
rpc add-flow {
input {
uses node-flow;
}
}
ConsumerService
add-flow(AddFlowInput)
remove-flow(RemoveFlowInput)
update-flow(ApdateflowInput)
...
TestFlowService
TestFlowService
TestFlowService
(FlowService1)
(FlowService2)
salFlowService API
Network
Nodes
Routing Table:
Node[key=foo:node:1]
Node [key=foo:node:1]
Node [key=foo:node:2]
add-flow
...
update-fow
remove-flow
Node[key=foo:node:2]
add-flow
...
update-fow
remove-flow
TestFlowService
TestFlowService
(FlowService1)
(FlowService2)
salFlowService API
Network
Nodes
Node[key=foo:node:1]
Node[key=foo:node:2]
Routing Table:
Node [key=foo:node:1]
Node [key=foo:node:2]
add-flow
...
update-fow
remove-flow
add-flow
...
update-fow
remove-flow
TestFlowService
TestFlowService
(FlowService1)
(FlowService2)
salFlowService API
Network
Nodes
Node[key=foo:node:1]
Node[key=foo:node:2]
Routing Table:
Node [key=foo:node:1]
Node [key=foo:node:2]
add-flow
...
update-fow
remove-flow
add-flow
...
update-fow
remove-flow
RpcService
PingAPI
Ping API
Message Bus
Network
Network
Nodes
Routing Table:
Node [key=foo:node:1]
Nodes
Node[key=foo:node:2]
Node[key=foo:node:1]
add-flow
...
update-fow
remove-flow
add-flow
Routing Table:
Node[key=foo:node:2]
Node [key=foo:node:1]
...
update-fow
remove-flow
add-flow
Node[key=foo:node:1]
...
update-fow
remove-flow
add-flow
...
update-fow
remove-flow
RESTCONF
NE1
NE2
NEn
Models
Models
Models
Inventory
Netconf
Network
Inventory
Request Routing
NEn
NE1
Routing Table:
NE1
NE2
NEn
f1
f2
...
...
...
f1
NE2
fn
f1
f2
...
...
fn
...
f2
...
fn
...
...
module node-feature-inventory {
prefix nf;
import opendaylight-inventory {prefix
inv};
21
import yang-ext { prefix ext};
import mount { prefix mount};
augment "/inv:nodes/inv:node" {
ext:context-instance node";
Path: /inv:nodes/inv:node[id=NE1"]/nf:mounted-data/f1
ext:augment-identifier "netconf-node";
mount:mountpoint "mounted-data" {
mount:subtree "/";
}
RESTCONF
NE1
NE2
Models
Models
Inventory
NEn
Netconf
OpenFlow
Models
Network
Inventory
Request Routing
NEn
NE1
Routing Table:
NE1
NE2
NEn
f1
f2
...
...
...
f1
NE2
fn
f1
f2
...
...
fn
...
f2
...
fn
...
...
module node-feature-inventory {
prefix nf;
import opendaylight-inventory {prefix
inv};
22
import yang-ext { prefix ext};
import mount { prefix mount};
augment "/inv:nodes/inv:node" {
ext:context-instance node";
Path: /inv:nodes/inv:node[id=NEn"]/nf:mounted-data/f1
ext:augment-identifier "of-node";
mount:mountpoint "mounted-data" {
mount:subtree "/";
}
www.opendaylight.org
23
Generate APIs 1
Yang Tools
Create API Bundle
Deploy
2
Java API
Java
API
Definition
Generated
API
Definition
Definition
Maven
Build Tools
API
OSGI Bundle
Controller
Maven
Build Tools
Module
Module
Implementations
Plugin
source
Implementations
code
Plugin
OSGI Bundle
3
Create Plugin Bundle
4
Deploy
www.opendaylight.org
24
www.opendaylight.org
25
ARP Handler
Statistics Manager
Flow Programmer
Service
1
6
SAL Notification
Is generated from
Request
Routing
OF Plugin API
MD-SAL
RESTCONF/
NETCONF
OF Plugin
OF Library
OF Plugin
Model
www.opendaylight.org
26
Adding a Flow
Flow Service Model
Is generated from
Controller
Topology Manager
ARP Handler
Statistics Manager
Flow Programmer
Service
1
5
6
7
RPC
Is generated from
OF Plugin API
Request
Routing
4
Flow Service API
Model Data
MD-SAL
RESTCONF/
NETCONF
3
OF Plugin
OF Library
OF Plugin
Model
10
www.opendaylight.org
27
Concepts
Coding mostly done in Java and python
OSGI
Tools
www.opendaylight.org
28
Call to Action
www.opendaylight.org
29
Resources
wiki.opendaylight.org
@openDaylightSDN
#OpenDaylight
www.opendaylight.org
30
Thank you
www.opendaylight.org
31
Developer
Hands-on Live!
Created by Jan Medved
www.opendaylight.org
32
www.opendaylight.org
33
www.opendaylight.org
34
Functions
Class / Object
Created by Jan Medved
Package
www.opendaylight.org
35
OSGi Bundles
www.opendaylight.org
36
www.opendaylight.org
37
www.opendaylight.org
38
OpenFlow + OVSDB
Hands-On Lab
www.opendaylight.org
31
www.opendaylight.org
64
www.opendaylight.org
63
On the Mininet console, ping between 2 hosts using the command : h1 ping h2
and make sure that the ping succeeds.
Refresh the GUI Topology to make sure that the hosts are learnt.
Use the Host VM command : sudo ovs-ofctl dump-flows s1 to observe the
installed Openflow rules.
Created by Jan Medved
www.opendaylight.org
63
www.opendaylight.org
63
www.opendaylight.org
64
ML2 Plug-In
Inventory
Service
Connection
Service
Inventory
Service
Connection
Service
Flow
Programmer
java.nio.socket
Netty io
Netty.io
OpenFlow 1.0
OpenVSwitch
www.opendaylight.org
Kickstarter for
Developers
Created by Jan Medved
www.opendaylight.org
33
1.
2.
3.
4.
www.opendaylight.org
34
www.opendaylight.org
35
Setup Your VM
Copy the VM files from your USB stick to your HDD
Open VirtualBox/Vmware and import
Configure the VM with the following recommended settings
Processor: 4x CPU
RAM: 4GB
Network: 1x NIC, NAT (to share your Internet connection)
Start the VM
Login with mininet/mininet
www.opendaylight.org
36
https://identity.opendaylight.org/carbon/admin/login.jsp
www.opendaylight.org
37
www.opendaylight.org
38
cat ~/.ssh/id_rsa.pub
www.opendaylight.org
39
www.opendaylight.org
40
In a terminal type:
mkdir p opendaylight/controller
cd opendaylight/controller
git clone ssh://<username>@git.opendaylight.org:29418/controller.git
www.opendaylight.org
41
www.opendaylight.org
42
cd
controller/opendaylight/distribution/opendaylight/target/distrib
ution.opendaylight-osgipackage/opendaylight/
./run.sh
Controller normally starts with run.sh but has options (discussed later)
www.opendaylight.org
43
Controller GUI
www.opendaylight.org
44
Thank you
www.opendaylight.org
45
www.opendaylight.org
46
Content
Lab setup
Download and run controller
Explore graphical Interface
Start your own network with mininet
Sample Applications
APIs and tools
Troubleshooting
www.opendaylight.org
47
Lab setup
Copy the VM files in your HDD
Open VirtualBox and do import appliance
Configure the VM with the following recommended settings
Processor: 4x CPU
RAM: 4GB
Network: 1x NIC, NAT (to share your Internet connection)
Start the VM
Login with mininet/mininet
www.opendaylight.org
48
Download options
Download Link:
Installation guides:
https://wiki.opendaylight.org/view/Release/Hydrogen
www.opendaylight.org
49
www.opendaylight.org
50
Start Controller
Controller normally starts with run.sh/run.bat
Run options:
www.opendaylight.org
51
Controller GUI
GUI URL:
http://127.0.0.1:8080
Features:
Switch inventory
Topology show
Flow programming (OF10)
Flow statistics (OF10)
OSGi bundle Management
User management
Save configuration
www.opendaylight.org
52
www.opendaylight.org
53
Mininet (mininet.org)
www.opendaylight.org
54
ARP Handler:
Forwards ARP messages between hosts
Process gateway ARP requests
Host Tracker:
Keeps track of hosts connected to OF switch
Hosts are static or dynamic (ARP Handler)
Simple Forwarding:
www.opendaylight.org
55
--controller 'remote,ip=127.0.0.1'
mininet> h1 ping h4
www.opendaylight.org
56
www.opendaylight.org
57
Restart mininet:
mininet> exit
sudo mn --topo tree,2
--controller 'remote,ip=127.0.0.1'
www.opendaylight.org
58
Stop mininet:
mininet> exit
www.opendaylight.org
59
www.opendaylight.org
60
Troubleshooting
OSGi console:
telnet 127.0.0.1 2400 (after using start option)
Provides real-time controller log
Type help to see command list
Path: opendaylight/logs/opendaylight.log
Log configuration:
Path: opendaylight/configuration/logback.xml
Enable bundle logging and set logging levels
www.opendaylight.org
61