SlideShare a Scribd company logo
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
4
 
 
Table of Contents
Table of Figures ............................................................................................................................................................. 5 
LIST OF TABLES ......................................................................................................................................................... 8 
LIST OF ABBREVIATION .......................................................................................................................................... 9 
ABSTRACT ................................................................................................................................................................ 10 
CHAPTER I – INTRODUCTION ............................................................................................................................... 11 
1.1  Open Daylight Controller (SDN .................................................................................................................. 11 
1.2  How Does SDN or Software Defined Networking Work? ........................................................................... 12 
1.3  Advantages of SDN ..................................................................................................................................... 13 
1.4  General SDN Framework ............................................................................................................................ 14 
1.5  SDN & Open Flow ....................................................................................................................................... 15 
1.6  Layers in SDN with Open Daylight (Current Stable Release.) ..................................................................... 16 
1.7  Mininet ‐ Network topology emulator ....................................................................................................... 16 
1.8  Iperf ............................................................................................................................................................ 17 
1.9  OpenvSwitch with OpenFlow ..................................................................................................................... 17 
1.10  Server Load Balancing ................................................................................................................................ 19 
CHAPTER II – TECHNICAL BACKGROUND ........................................................................................................ 20 
2.1  Objective & Project Scope .......................................................................................................................... 20 
2.2  Setup .......................................................................................................................................................... 21 
CHAPTER III – DESIGN AND IMPLEMENTATION ............................................................................................. 23 
3.1   Topology: .................................................................................................................................................... 23 
3.2   Implementation: ........................................................................................................................................ 24 
3.3   How  to  run our Project: ............................................................................................................................ 25 
3.4   Observation and Results: ........................................................................................................................... 30 
3.4.1  Network Load balancing ................................................................................................................... 30 
Conclusion (Network Load balancing without STP enabled) ............................................................................. 41 
Conclusion (Network Load balancing with STP ) .............................................................................................. 44 
3.4.2   Server Load Balancing Round Robin Demonstration ....................................................................... 44 
3.6.3   Server Load Balancing Random Demonstration ............................................................................... 49 
Conclusion (Sever Load Balancing Round Robin/Random) .............................................................................. 55 
Appendix ..................................................................................................................................................................... 56 
References: .................................................................................................................................................................. 66 
 
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
5
 
 
Table of Figures
Figure 1.1 SDN & Open Flow
Figure 1.2 Open Flow versions & their Release dates
Figure 1.3 High Level Plane distribution of SDN
Figure 1.4 SDN Frame Work
Figure 1.5 Opendaylight SDN Framework
Figure 1.6 SDN Open flow Integration
Figure1.7 Opendaylight Lithium layer Diagram
Figure1.8 Mininet high level layer Diagram
Figure1.9 Open flow Match Action
Figure 1.10 Flow table Components
Figure 2.1 Our Project Problem Description
Figure 3.1 Given Topology with Port Assignement
Figure 3.2 Port assignement in Python Script
Figure 3.3 Running Controller
Figure 3.4 Running Mininet Topology
Figure 3.5 Wireshark Filter
Figure 3.6 Ping Result
Figure 3.7 ODL portal Topology display
Figure 3.8 Shell script to create Server load Balancing Topologies
Figure 3.9 Running Round Robin Topology
Figure 3.10 Running Random Topology
Figure 3.11 Controller message when connecting to Mininet
Figure 3.12 Portal display of OSGI bundles
Figure 3.13 OSGI switch bundles
Figure 3.14 OSGI load Balancer Bundles
Figure 3.15 OSGI Host tracker bundle
Figure 3.16 OSGI Open flow bundle
Figure 3.17 OSGI Topology Manager
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
6
 
 
Figure 3.18 Wireshark arp message display, OFPT_PACKET_IN
Figure 3.19 TCP Packet for ARP
Figure 3.20 ARP PACKET_IN and PACKET_OUT
Figure 3.21 IP Packet and Open flow Packet information
Figure 3.22 Controller instruction OFPT_FLOW_MOD
Figure 3.23 Open flow Packet Details, FLOW_MOD
Figure 3.24 Ports and links
Figure 3.25 Open flow switch port dumps
Figure 3.26 Ping between hosts in mininet
Figure 3.27 Port dump after ping
Figure 3.28 ODL Portal packet stats after ping port between switch 2 and switch 7
Figure 3.29 ODL Portal packet stats after ping port between switch 1 and switch 7
Figure 3.30 ODL Portal packet stats after ping ports between switch 2and switch 6
Figure 3.31 ODL Portal packet stats after ping ports between switch 5 and switch 2
Figure 3.32 ODL Portal packet stats after ping ports between switch 4 and switch 1
Figure 3.33 Enabling STP in ovsdb switches
Figure 3.34 STP convergence switch1 as Root
Figure 3.35 ODL Portal View when Switch1 is root
Figure 3.36 STP convergence switch2 as Root
Figure 3.37 H9 as client 32 iperf flow with only two servers listenin
Figure 3.38 H1 response, two host up and rest down
Figure 3.39 H3 response, two host up and rest down
Figure 3.40 Client H9 32 flows 20MB window and 1 sec delay all hosts up round Robin
Figure 3.41 Server H1 response ,all hosts up round Robin
Figure 3.42 Server H3 response ,all hosts up round Robin
Figure 3.43 Random topology creation
Figure 3.44 Random topology H9 Client 32 flows two servers up
Figure 3.45 Random topology H9 Client Server H1 response
Figure 3.46 Random topology H9 Client ,Server H1 response
Figure 3.47 Random topology H9 Client Server H3 response all servers up
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
7
 
 
Figure 3.48 Random topology H9 Client Server H3 response all servers up
Figure 3.49 Random topology H9 Client Server H1 response all servers up
 
 
 
 
 
 
 
 
 
 
 
 
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
8
 
 
LIST OF TABLES
 
Table Contents
Table 3.1 Host IP Assignment
Table 3.2 Bundle and respective function description
Table 3.3 Filter details wireshark
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
9
 
 
 
 
LIST OF ABBREVIATION
IP Internet Protocol
LAN Local Area Network
SDN Software Defined Networking
ODL Open Day Light
OVS Open Virtual Switch
VIP Virtual IP
ARP Address Resolution Protocol
JDK Java Development Kit
JRE Java Runtime Environment
OSGI Open Service Gateway Initiative
SAL Service Abstraction Layer
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
10
 
 
ABSTRACT
Our Project is to implement and study server load balancing in the Software Defined Networking (SDN)
environment using Round Robin and Random Policy. The load balancing Policies are run at the SDN Controller. Load
balancing is very important concept in Data centers where high availability as well as performance is required.
In this Project we used open source Opendaylight Controller which provides the North Bound interface to
implement the load balancing Policies and also provides the south bound interface to communicate with OpenFlow
switches. The entire data center is emulated in the Mininet platform.
During our work on this project we learned about Software defined networking, how it is different from
traditional Networking, we got a greater insight about ODL, Mininet, and OpenFlow vSwitch.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
The main i
SDN contro
the networ
controller a
1.1 Open
Open D
built f
abstrac
southb
SDN h
uses th
open s
Comm
(Repre
contro
switch
The so
Flow
(SAL)
determ
contro
dea of SDN is
oller. Only the
rking devices t
are made progra
Daylight Con
Daylight (ODL
for SDN deploy
ction platform
bound protocols
has becoming po
his protocol. Al
source project
munity Project
esentational Sta
ller provides f
hing, security etc
outhbound inter
1.0, Open Flow
. The SAL is
mine the best w
ller and the netw
Fo
CH
to decouple the
data plane fun
through the sou
ammable throug
ntroller (SDN
L) is a highly av
yments on mod
that allows u
s.
opular with the
lso Open Dayli
which is writt
under (Open S
ate Transfer - a
framework for
c.
face provides su
w 1.3, BGP-LS
a service whic
way to achieve
work devices.
Following figure
Source (htt
R
HAPTER I
e control plane
nctions left in th
uth bound pro
gh the north bou
N)
vailable, modula
dern heterogen
sers to write a
Open Flow Pro
ight can use oth
ten in Java, it
Services Gatew
web based) AP
pluggable mo
upport for diffe
S, etc. These m
ch links these s
service reques
e illustrates the
Figure 1
tp://www.slides
Ryerson Univer
– INTROD
from the data p
he networking d
tocol, such as
und API.
ar, extensible, s
neous multi-ven
apps that easil
otocol widely ac
her southbound
uses maven f
way initiative)
PI and impleme
odules to perfo
erent protocols (
modules can be
south bound de
sted and take c
Openflow as th
.1(Openflow as
share.net/Vijaya
rsity | Load Bal
O
DUCTION
plane and move
devices. The co
OpenFlow. N
scalable and mu
ndor networks.
ly work across
ccepted as indu
d protocol, not j
for Package D
for the north
ents open flow
orm network t
(via separate p
e linked in real
evices to north
care of the und
he component of
Part of SDN)
aguruJayaram/c
lancing Using S
Open Daylight C
e the control pl
ontroller comm
Network applica
ulti-protocol co
It provides a
s a wide varie
ustry Standard. O
just open flow.
eployment. Op
bound interfa
based policies
tasks. These ta
plugins); some o
l time to Servi
h bound applica
derlying protoc
f SDN Platform
cisco-openflow)
SDN with
Controller
11
lane to the centr
municates and co
ations running
ontroller infrastr
model-driven s
ety of hardwar
Open daylight P
. Open Dayligh
pen Daylight is
ace it exposes
for Southboun
asks include ro
of examples are
ce Abstraction
ations. The SA
col used betwe
m:-
)
ralized
ontrols
at the
ructure
service
re and
Project
ht is an
s open
REST
nd. The
outing,
e Open
Layer
AL will
een the
 
 
 
Follow
flow s
protoc
1.2 How D
Tr
de
S
an
A
an
N
co
wing is the Road
witches for our
ol.
Does SDN or
raditionally, mo
ecouples contro
SDN Controller
nd enables Adm
APIs to send ins
nd is used as s
Northbound API
ontrol and polic
dmap of the Op
r Project Imple
F
Software De
ost network de
ol plane from d
r works as the i
min to program
truction to the
southbound pro
s at the SDN co
ces.
R
pen flow Protoc
ementation. As
Figure 1.2(Versi
fined Networ
evices have con
data plane. The
intelligent part
the underlying
switches and ro
otocol to send
ontroller to com
Ryerson Univer
col implementa
of our Project
ions of OpenFlow
rking Work?
ntrol plane and
control plane is
of the network
Network (switc
outers. OpenFlo
instructions to
mmunicate with
rsity | Load Bal
O
ation. We are us
OF1.4 specific
w with Release
d data plane in
s moved to a ce
k, it offers centr
ches and router
ow is the first s
o underlay netw
external world
lancing Using S
Open Daylight C
sing mininet em
cation is the c
Date)
the same netw
entralized contro
ral control of th
s).The controlle
standard adopte
work. The netw
d to implement t
SDN with
Controller
12
mulator to creat
current release
working device
oller.
he complete ne
er utilizes south
ed by SDN pro
work applicatio
the desirable Ne
te open
of this
e. SDN
etwork,
hbound
viders,
ons use
etwork
 
 
 
1.3 Adva
•
•
•
•
ntages of SDN
Application D
Forwarding fu
Dynamic Co
demand.
Centralized M
the network a
Diagram below
N
Driven: one can
functions.
ontrol: Separatin
Management: N
and for applicat
 
 
R
w shows high le
Figure
n directly progra
ng control from
Network control
ions and instruc
 
Ryerson Univer
vel plane distri
1.3(Simplified S
am Network as
m forwarding
is centralized
ctions provides
Applica
Contro
Contr
Switc
South Interface
rsity | Load Bal
O
ibution of the SD
SDN Plane)
control is separ
allows users t
d in SDN contro
a single logical
ations
l Plane
roller
ches
North InterfaceSouthInterface
lancing Using S
Open Daylight C
DN based netwo
rated from
to adjust netwo
oller which main
l switch.
SDN with
Controller
13
orks.
ork- traffic flo
ntains overall v
ows on
view of
 
 
 
•
In
Si
W
si
pr
In
be
ch
au
1.4 Gener
H
In
w
Based on ope
design and op
n theory SDN sh
ince control is m
When packet is l
ngle packet los
roduction netwo
n SDN Control m
een achieved v
hannels betwee
uxiliary connect
ral SDN Fram
Here is the Gene
S
n the above diag
was that SDN OS
en Standard an
peration and elim
hould be Idea
moved to Centr
lost between the
ss may be tolera
ork deployment
messages could
via some sort o
en one controll
tion will be use
De
So
mework
ral conceptual v
ource (http://big
gram two versi
S and controller
R
nd vendor ind
minates Vendor
al solution to to
ralized Controll
e Controller and
ated to some ex
t.
d get lost and co
of parallelism b
ler and switch
ed for data mess
etailed explanat
ource (https://bo
view of SDN Fr
Figur
gswitch.com/sit
ions of SDN fra
r have been bun
Ryerson Univer
dependent: As S
r dependency.
day’s data netw
er, controller sh
d switches, it w
xtent as these n
ould lead to dela
by using multi
h. Primary conn
sages or for UD
tion for SDN pl
ooks.google.ca/
rame Work
re 1.4(SDN Fram
tes/default/files
amework has b
ndled together in
rsity | Load Bal
O
SDN follows o
working problem
hould be capabl
will have larger
networks have a
ay in transmissi
iple controllers
nnections will b
DP messages.
lanes can be fou
/sdn/ paul_goran
me Work)
s/_/213479.1_sd
been depicted, t
n 2.0 framewor
lancing Using S
Open Daylight C
open Standard,
ms, but it has it
le of handling l
impact, where
always backup
ion or data loss
s with the swit
be used for C
und at :
nsoon/)
dn-blog-graphic
the basic differe
rk.
SDN with
Controller
14
it simplifies ne
ts own disadvan
lot of processin
as in legacy ne
paths available
. Solution to thi
tch or using m
Control message
c.jpeg)
ence between th
etwork
ntages.
g load.
etwork,
e in the
is have
multiple
es and
he two
 
 
 
de
1.5 SDN &
Source (http:
In the diagram
eal with physica
& Open Flow
://www-935.ibm
m . 1.5 ODL fram
al and virtual sw
has s
w
R
Figure 1.5(O
m.com/services/
mework has bee
witches whereas
some extension
Ryerson Univer
Open Daylight S
/image/systems
en shown, this d
s northbound in
ns which perform
rsity | Load Bal
O
SDN Framework
s_networking_s
diagram clearly
nterface deal wi
m all network f
lancing Using S
Open Daylight C
k)
olutions_od_di
y depicts that so
ith client and ap
functions.
SDN with
Controller
15
agram3_rev6.jp
outhbound inter
pplications. Con
pg)
rfaces
ntroller
 
 
 
 
1.6 Layer
S
1.7 Minin
M
us
m
co
To
Th
N
rs in SDN wit
ource(https://w
net - Network
Mininet is the ne
sing single Lin
mininet run ope
ontroller). It pro
opologies.
he following d
Network topolog
Source (http
th Open Dayl
ww.opendaylig
k topology em
etwork emulato
nux kernel. It a
en flow and con
ovides rich API
diagram shows
gy quickly inste
R
Figure1.6
ps://www.clear.
light (Curren
Figure1.7(Ope
ght.org/sites/ww
mulator
or which provid
acts as a real N
nnects to remot
I interface whic
how an emula
ad of using exp
Ryerson Univer
6(SDN Openflow
rice.edu/comp5
t Stable Relea
n daylight Lithi
ww.opendayligh
am_lrgr.jpg
des user a tool
Network once e
te SDN controll
ch provides Ne
ated mininet ne
pensive hardwar
rsity | Load Bal
O
w Integration)
529/www/paper
ase.)
ium layer Diagr
ht.org/files/page
g)
to emulate Net
emulated topol
ler(in our case
etwork engineer
etwork simulati
re testbed.
lancing Using S
Open Daylight C
rs/tutorial_4.pd
ram)
es/images/opend
tworks, it runs
logy is created
we have used O
rs way to emul
ion helps Netw
SDN with
Controller
16
df)
daylight_lithium
emulated Topo
. Switches crea
Opendaylight a
ate different Ne
work engineers
mdiagr
ologies
ated in
as SDN
etwork
to test
 
 
 
Th
us
1.8 Iperf
• Ip
M
• It
• Ip
Ei
• It
1.9 Open
O
O
O
A
fo
w
im
Th
w
he simulated N
sing mininet or
perf is a w used
Measure the thro
can measure th
perf has a client
ither unidirectio
is open source
vSwitch with
Openvswitch is
Openvswitch has
One of them is su
A switch functio
orwarding/flow
which allows ta
mplement these
his setup is dif
which requires n
Source (h
Source
Networks can be
vise versa.
network testing
ughput of a net
he bandwidth an
and server func
onal or bidirecti
software and ru
h OpenFlow
an alternate o
s made enhance
upport of Open
on can be broke
table, and data
aking the cont
Rules.
fferent from the
etwork Admini
ttp://en.community
R
Figure1.8( M
(http://netsemi
e tested on the r
g tool that can c
twork that is car
nd the quality of
ctionality, and c
ional.
uns on various p
f Linux bridge
ement as comp
nFlow protocol.
en into: Control
a plane will foll
rol plane func
e proprietary V
strators to impl
y.dell.com/techcen
Ryerson Univer
Mininet high lev
nar.stanford.ed
real hardware te
create TCP and
rrying them.
f a network link
can measure the
platforms includ
e module and i
pared to other B
l plane, data pla
low these rules
ctionality to ce
Vendor setup in
lement changes
nter/networking/w
rsity | Load Bal
O
vel layer Diagram
du/seminars/11_
est bed once the
UDP data strea
k.
e throughput be
ding Linux, UN
it has been av
Bridges. The de
ane. The contro
s for the incomi
entral controlle
n which these ru
at each node s
w/wiki/3820.openv
lancing Using S
Open Daylight C
m)
_14_13.pdf )
e Network topo
ams and
etween the two e
NIX and Windo
vailable since l
etail is availabl
ol plane is the p
ing packets. Op
er and allows
ules are implem
separately.
vswitch-openflow-
SDN with
Controller
17
ologies are fully
ends,
ws.
inux kernel 2.4
e at openvswitc
plane which cre
penFlow is a pr
central contro
mented at each
lets-get-started)
y tested
4. The
ch.org.
eates a
rotocol
oller to
h node,
 
 
 
OOpenFlow Switc
• Po
• Flo
• Flo
• Ma
• Mo
ch comprises of
orts
ow tables
ows
atch Classifiers
odifiers and Ac
R
f switch data Pla
tions
Ryerson Univer
ane, which inclu
 
Figure1.9(Ope
rsity | Load Bal
O
udes:
 
en flow Match A
lancing Using S
Open Daylight C
Action)
SDN with
Controller
18
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
19
 
 
Figure 1.10(Flow table Components)
Above Diagrams shows how OpenvSwitch works and how match action counter is performed, and once match
found it finally forward the packet to desired port otherwise packet is dropped.
1.10 Server Load Balancing
The main idea of using load balancing is to implement the following three things:-
Scalability: Load can be distributed to different servers
Manageability: Application can be transferred from one server to another within same
cluster (server group).
Availability: To reduce downtime in Production Systems.
In our case load balancer service is running on controller which acts as a reverse proxy to distributes
network traffic across a number of servers based on predefined polices: Round Robin or Random.
Load Balancing in servers can be implemented by two methods:-
Stateless: The controller does not keep track of state of servers and will send the information based on
policy to server even the particular server is down.
State-full: The controller keeps track of state of servers and monitors the state of the related servers.
 
 
 
2.1 O
Se
S1-S7 are O
between s1
bandwidth
The Open
looking for
The first flo
The second
The third fl
The fourth
The fifth flo
Objectiv
etup the follow
OpenVswitches
/s2 and s3/s4/s5
of 400Mbps.
daylight shoul
r is this:
ow between H9
d flow between
low between H9
flow between H
ow between H9
CHAPTE
ve & Pro
wing topology in
(OVSs), H1 to
5/s6 should hav
ld have a built-
9 and a virtual se
H9 and a virtua
9and a virtual se
H9 and a virtual
9 and a virtual s
R
ER II – TEC
oject Sco
n the Mininet:
Figure2.1
o H8 are servers
ve a bandwidth o
-in network loa
erver will use th
al server uses S7
erver uses S7-S
l server uses S7
erver uses S7-S
Ryerson Univer
CHNICAL B
ope
1 (Our Project P
s. H9 is the host
of 100Mbps eac
ad balancer. T
he path S7-S1-S
7-S2-S4-H2;
S1-S5-H3;
7-S2-S6-H4;
S2-S3-H5;
rsity | Load Bal
O
BACKGRO
Problem Descrip
t that generates
ch; the links bet
est if it is the c
S3-H1;
lancing Using S
Open Daylight C
OUND
ption)
traffic to the se
tween s7 and s1
case. The patte
SDN with
Controller
20
ervers. The link
1/s2 have the
rn that you are
s
e
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
21
 
 
The sixth flow between H9and a virtual server uses S7-S1-S4-H6;
And so on …
Study if this is the case. If not, record the paths taken. Use iperf traffic generator to generate TCP traffic and measure the
delay and throughput. Generate 32 flows with data rate of 20Mbps each.
Compare the results with only two servers (says H1 and H2). The idea here is to show that by using more servers, we can
use more available network bandwidth, thus reduce the delay and increase the throughput.
Compare the delay and throughput between the round-robin and random policies.
To accomplish our desired project, we use the following devices and tools:
2.2 Setup
1. Two Virtual Machines each one with Ubuntu 14.04 32 bit
2. Oracle VirtualBox
3. GIT
4. Apache Maven
5. MobaXterm
6. VBox Guest Addition for Linux
7. WireShark
8. Mininet
9. ODL Controller Code
2.2.1: Two Virtual Machines each one with Ubuntu 14.04 32 bit:
We need to download Ubuntu with version 14.04 version 32bit and configure it as virtual Machine. We need two
machines for our project, one will be used as controller and other will be used for Mininet.
2.2.2: Oracle VirtualBox
We have installed our Virtual machines using Oracle Virtual Box.
2.2.3: GIT
GIT is open source version control tool; we have used git to get the current version from ODL repository.
2.2.4: Apache Maven.
Apache Maven is the tool used to build Java projects; we have used Apache Maven to build ODL OSGI bundles
after downloading them, details are in the installation appendix.
2.2.5: MobaXterm
We have used this tool as our ssh client .
2.2.6: VBox Guest Addition:
This is an ISO which is helpful to maximize the size of Linux OS while working in Windows
2.2.7: WireShark:
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
22
 
 
We have used wireshark to analyze open flow packets. This can be configured on Linux and windows both. We
have installed version which includes openflow plugin.
2.2.8: MiniNet:
This tool is used to emulate the network.
2.2.9: ODL :
We downloaded opendaylight(ODL) OSGI bundles using Git and compiled them locally using Maven.
 
 
 
 
 
 
 
3.1 T
The topolo
Our Initial
balancing a
S1-S7 are O
between s1
bandwidth
C
Topology
gy given to us
Study scope
as well and stud
OpenVswitches
1/s2 and s3/s4/
of 400Mbps. C
CHAPTER I
y:
was with 4 ser
was to impleme
dy which ODL b
s (OVSs), H1 t
/s5/s6 should h
ontroller has Ro
R
III – DESIG
Figure3.1
rvers but later i
ent Server load
bundle will be u
to H8 are serve
have a bandwid
ound Robin and
Node IP A
H1 10.0
H2 10.0
H3 10.0
H4 10.0
H5 10.0
H6 10.0
H7 10.0
H8 10.0
H9 10.0
Ryerson Univer
GN AND IM
1(Given Topolo
it was modified
balancing only
used for network
ers. H9 is the h
dth of 100Mbp
d Random Polic
Address Designa
0.0.1 Serv
0.0.2
0.0.3
0.0.4
0.0.5
0.0.6
0.0.7
0.0.8
0.0.9 Client
rsity | Load Bal
O
MPLEMENT
ogy with Port A
d to above topo
y but later we w
rk load balancin
host that genera
ps each; the lin
cies running in
ation
vers
lancing Using S
Open Daylight C
TATION
Assignment)
ology with more
were advised to o
ng.
ates traffic to t
nks between s7
it.
SDN with
Controller
23
e scope of work
observe Networ
the servers. The
7 and s1/s2 ha
k to it.
rk load
e links
ave the
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
24
 
 
3.2 Implementation:
Software tools requirements to install Opendaylight and Mininet. Opendaylight can be installed in more than one way
depending on the intention of the future use; also it can be installed on Linux, UNIX and Windows machine. Opendaylight
has 03 major releases for now, Hydrogen, Helium and Lithium, we have used current Stable release which is Helium. Also
we need to have Java JDK, git and Maven installed on the box before one begins installation of the ODL.
Here are the 03 methods one can use to install ODL:
1. Using Karaf
2. Pulling the code from CLI and build locally using Maven. (We have used this method for our Project) 3. Import
Code into Eclipse and re-compiling using Maven.
1) Installation Using Karaf
This is the easiest way one can install ODL, one needs to be familiar with Karaf commands, this link provides nice
introduction to karaf.
http://www.liquid-reality.de/display/liquid/2011/02/15/Karaf+Tutorial+Part+1+-+Installation+and+First+application
To install ODL on Ubuntu, Opendaylight wiki provides step by step procedure.
https://wiki.opendaylight.org/view/Install_On_Ubuntu_14.04
2) Pulling the code from CLI and build locally using Maven.
We have followed this procedure in our installation; following are the steps we have followed in our ODL setup. This is
specific to Ubuntu.
The detailed Procedure is in the Appendix.
3) Eclipse Installation and build the code in Eclipse using Maven.
This method is used if one is developer and wants to see the code of all the packages or needs to write new custom
application this method should be used; we have imported code in the Eclipse, but haven’t used it for the Project.
Following references can be used to use Eclipse:-
https://wiki.opendaylight.org/view/Getting_Started:Eclipse:Installing_Eclipse_on_Ubuntu
https://wiki.opendaylight.org/view/GettingStarted:_Eclipse
http://networkstatic.net/importing-opendaylight-into-eclipse/
3.4 Load Balancing Methods Used and VIP
VIP (Virtual IP), in server load balancing: VIP acts as the proxy between the external world and the server group. We
have demonstrated opendaylight controller load Balancer bundle
(org.opendaylight.controller.samples.loadbalancer.internal) two features round robin and random policies.
RoundRobin policy: This policy will send traffic to group of servers in orderly manner one after the other
Random policy: This policy will select servers randomly based on random algorithm
 
 
 
3.3 H
We have im
installed, w
VM’s to co
We have cr
scripts whic
As the sna
numbers wh
On the ODL
to Both VM
How to
mplemented ou
whereas on the s
ommunicate.
reated Python s
ch helped us in
apshot shows w
hen the link is b
L box we have
Ms via their Hos
run our
ur project using
second box we
script on the mi
identifying por
we have used th
between switch
wrapper shell s
st only IP’s:
R
Project:
g two virtual m
have installed t
ininet box to ru
rt numbers when
Figure 3.
hree digit port
and host.
scripts which w
Ryerson Univer
:
machines each h
the opendayligh
un the mininet t
n running the te
2 (Port assignm
numbers when
will create the lo
rsity | Load Bal
O
having Ubuntu
ht controller. W
topology; We
ests.
ment in Python S
n the link is be
ad Balancer To
lancing Using S
Open Daylight C
Linux, One ha
We are using ho
have port assig
Script)
etween switche
opologies. Open
SDN with
Controller
25
as mininet, Wir
ost only IP of th
gnment in our P
es and two dig
n Secure CRT to
reshark
he both
Python
git port
o login
 
 
 
ODL VM w
controller t
Once the co
on the mini
we have created
o be up and run
ontroller is runn
inet.
d alias $ctl in th
nning fully. The
ning we will st
R
Figure 3.
he user .bashrc
en you will notic
tart our Python
Figure 3.
Ryerson Univer
3( Running Con
file which start
ce a prompt as O
script for our t
4(Running Min
rsity | Load Bal
O
ntroller)
ts the controller
OSGI> which i
topology in the
ninet topology )
lancing Using S
Open Daylight C
r. It takes from
is prompt of con
Mininet VM, a
)
SDN with
Controller
26
3 to 5 minutes
ntroller.
and run the wir
for the
reshark
 
 
 
We have a
messages.
Once we pi
applied filter on
ing between the
n the particular
e hosts the topol
R
Figure 3.
r port, between
logy will be upd
Figure 3.
Ryerson Univer
5( Wireshark F
n mininet and
dated in the in t
6(Ping Result)
rsity | Load Bal
O
Filter)
ODL VM, and
the ODL portal
lancing Using S
Open Daylight C
d it only filter
.
SDN with
Controller
27
s openflow andd TCP
 
 
 
Then we ha
Robin and R
Above snap
We will run
ave to open ano
Random Policy
pshot shows the
n Round robin P
other instance o
y.
e related scripts
Policy as follow
R
Figure3.7
of Secure CRT
Figure 3.
on the ODL VM
ws:-
Ryerson Univer
7(ODL portal T
and connect it t
8(Shell script to
M:
rsity | Load Bal
O
Topology displa
to controller in
o create Server
lancing Using S
Open Daylight C
ay)
order to run ot
load Balancing
SDN with
Controller
28
ther scripts for
g Topologies)
Round
 
 
 
We have cr
can run Ran
The messag
reated round ro
ndom Topology
ge below shows
obin pool with 8
y by following s
s OSGI info me
R
Figure 3.
8 hosts and add
script.
Figure 3.
essage when min
Ryerson Univer
9(Running Rou
ded them in the
10(Running Ra
ninet connects t
rsity | Load Bal
O
und Robin Topo
e Pool, and assi
andom Topolog
to controller.
lancing Using S
Open Daylight C
ology)
igned VIP to th
gy)
SDN with
Controller
29
hat Pool. Similaarly we
 
 
 
The above
3.4 O
3.4.1 N
First step fo
For this we
Here is the
snapshot shows
Observa
Network Load
or us was to stu
e identified the O
snap shot of th
s OSGI bundle
ation and
d balancing
udy the Open da
OSGI bundles w
e bundles (Swit
R
Figure 3.
Figure 3.
information in O
d Result
aylight should h
which will be us
tch bundles)
Ryerson Univer
11( Controller m
12(Portal displa
ODL Portal.
ts:
have a built-in n
sed during this
rsity | Load Bal
O
message when
ay of OSGI bun
network load ba
study,
lancing Using S
Open Daylight C
connecting to M
ndles)
alancer,
SDN with
Controller
30
Mininet)
 
 
 
Load Balan
Host Track
Openflow
Topology M
We have in
study.
Package/O
org.opendayligh
ncer Bundles
ker bundle
bundle
Manager bundle
ncluded the OS
SGi Bundle  
ht.controller.arphand
e
SGI bundle and
dler.internal
R
Figure 3.
Figure 3.
Figure 3.
Figure 3.
Figure 3.
the functions d
Exporte

Ryerson Univer
13 ( OSGI swit
14(OSGI load B
15(OSGI Host
16(OSGI openf
17(OSGI Topo
description from
ed Interfaces  
IHostFinder
rsity | Load Bal
O
tch bundles)
Balancer Bundl
tracker bundle)
flow bundle)
ology Manager b
m the ODL wik
lancing Using S
Open Daylight C
les)
)
bundle)
ki which are be
Descriptio
Component re
host location.
SDN with
Controller
31
eing used in ou
on  
esponsible for learnin
. It achieves the goal
ur Case
ng about
by
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
32
 
 
 IListenDataPacket looking at the ARP conversation between
an host and the controller. This is an
application that show case a possible host
tracking mechanism, especially useful in
the cases like OpenFlow where the
controller can see all the packets if
instructed to.
org.opendaylight.controller.forwarding.staticrouting.internal
 IForwardingStaticRouting
 ICacheUpdateAware
 IfNewHostNotify
 IConfigurationContainerAware
Provide the necessary hooks to inject in
the area controlled by the controller,
routes to reach traditional IP networks.
org.opendaylight.controller.forwardingrulesmanager.internal
 IContainerListener
 ISwitchManagerAware
 IForwardingRulesManager
 IInventoryListener
 ICacheUpdateAware
 IConfigurationContainerAware
 IFlowProgrammerListener
Manager of all the Forwarding Rules, this
component take case of forwarding rules
and is the one that manage conflicts
between them.
org.opendaylight.controller.hosttracker.internal
 ISwitchManagerAware
 IInventoryListener
 IfIptoHost
 IfHostListener
 ITopologyManagerAware
Track the location of the host relatively to
the SDN network.
org.opendaylight.controller.protocol_plugin.openflow.internal
 IContainerListener
 IController
 IDataPacketListen
 IDataPacketMux
 IDiscoveryService
 IFlowProgrammerNotifier
 IInventoryShimExternalListener
 IMessageListener
Protocol plugin for OpenFlow 1.0. Include
the openflow J library as well the
necessary glue logic to adapt to SAL layer
along with a discovery mechanism for
learning the graph of the OpenFlow
network portion.
 
 
 
org.opendayligh
org.opendayligh
org.opendayligh
org.opendayligh
org.opendayligh
Table3.2( B
Mininet sen
ht.controller.samples
ht.controller.samples
ht.controller.statistic
ht.controller.switchm
ht.controller.topolog
Bundle and resp
nd Packet_IN op
s.loadbalancer.interna
s.simpleforwarding.in
smanager.internal
manager.internal
ymanager.internal
pective function
penflow messag
R










al


nternal











n description)
ge to controller
Ryerson Univer
IOFStatisticsMan
IPluginInDataPac
IPluginInFlowPro
IPluginInInventor
IPluginInReadSer
IPluginInTopolog
IPluginReadServi
IRefreshInternalP
IStatisticsListener
ITopologyService
IListenDataPacke
IConfigManager
IInventoryListene
IfNewHostNotify
IListenRoutingUp
IStatisticsManage
IListenInventoryU
ISwitchManager
ICacheUpdateAw
IConfigurationCo
IListenTopoUpda
ITopologyManag
IConfigurationCo
r to get the path
rsity | Load Bal
O
nager
cketService
ogrammerService
ryService
rvice
gyService
iceFilter
Provider
r
eShimListener
et
er
y
pdates
er
Updates
ware
ontainerAware
ates
ger
ontainerAware
information.
lancing Using S
Open Daylight C
Implementati
This compone
usage of the f
Sample imple
simulating a t
component w
of the functio
Component in
ReadService
several statist
Component h
information f
controller. Al
to have acces
node name or
will find them
component.
Component h
graph. Provid
updates to wh
SDN with
Controller
33
ion of a simple load-b
ent wants to show ca
functional modules.
ementation of an app
traditional IP network
wants to show case th
onal modules.
n charge of using the
from SAL, in order t
tics from the SDN ne
holding the inventory
for all the known nod
ll the components tha
ss to let say a port nam
r any inventory inform
m via query to this
holding the whole net
de notifications on ed
ho wants to listen abo
balancer.
ase the
plication
rk. This
e usage
e
to collect
etwork.
y
des in the
at wants
me or
mation,
twork
dges
out it.
 
 
 
The ARP bbroadcast is showw as below, wh
R
Figure 3.
Figure 3.
hich is sent betw
Figure 3.
Ryerson Univer
18(Wireshark a
19(TCP packet
ween controller
20 (ARP PACK
rsity | Load Bal
O
arp message dis
t for ARP)
and switches w
KET_IN and PA
lancing Using S
Open Daylight C
splay ,OFPT_PA
when there is no
ACKET_OUT)
SDN with
Controller
34
ACKET_IN)
matching entryy.
 
 
 
Controller w
used openf
 
will decide the 
flow 1.0 protoco
best path with
ol between con
R
Figure 3.
 FLOW_MOD w
ntroller and  sw
Figure 3.
Ryerson Univer
21(IP Packet an
which contains 
itches , which u
22 ( Controller
rsity | Load Bal
O
nd Open flow P
flow instructio
use one table fo
instruction OF
lancing Using S
Open Daylight C
Packet informati
on in this case it
or the flows. 
FPT_FLOW_MO
SDN with
Controller
35
ion)
t is flow 0 as w
OD)
e have 
 
 
 
We have us
Message
OFPT_PA
OFPT_PA
OFPT_FL
This is the
between co
We have ta
sed following fi
ACKET_IN
ACKET_OUT
LOW_MOD
e snapshot we
ontroller and Op
aken the list of p
ilters for the wir
Type
Switc
Contr
Contr
had taken befo
penflow switche
ports and links i
R
Figure 3.
reshark trace.
e
ch->Controlle
roller->Switch
roller->Switch
Table 3.3
ore Network di
es for network d
in mininet
Ryerson Univer
23 (Openflow P
Desc
r A pa
table
instr
h Cont
h Cont
table
3 (Filter details
iscovery in the
discovery.
rsity | Load Bal
O
Packet Details,
cription
acket received
e entry , switch
ruction
troller sends to
troller sends to
e
wireshark)
e controller, wh
lancing Using S
Open Daylight C
FLOW_MOD)
d doesn’t matc
h sends to con
o switch one o
o switch to ad
hich were indic
SDN with
Controller
36
)
ch switch flow
ntroller for
or more ports.
dd entry in the
cation arp bein
w
e flow
ng sent
 
 
 
R
Figure 3.
Ryerson Univer
24(Ports and lin
rsity | Load Bal
O
nks)
lancing Using S
Open Daylight C
SDN with
Controller
37
 
 
 
As we have
from each h
snapshot in
e used ping betw
host to host 9 an
n the ODL porta
ween the hosts t
nd once ping co
al and OVSDB s
R
Figure 3.
to observe the N
ompleted, we ob
switch interface
Ryerson Univer
25(Openflow sw
Network load b
bserved the path
es.
rsity | Load Bal
O
witch port dum
alancing featur
hs taken by the
lancing Using S
Open Daylight C
mps)
re of the ODL, w
packets to reac
SDN with
Controller
38
we have sent on
ch host 9 by taki
ne ping
ing the
 
 
 
We observe
interface du
ed that the con
umps at the con
ntroller does loa
ntroller portal an
R
Figure 3.
ad Balancing us
nd in the ovsdb
Ryerson Univer
26(ping betwee
sing simple loa
dump On minin
rsity | Load Bal
O
en hosts in mini
ad Balancer mo
net side.
lancing Using S
Open Daylight C
inet)
odule which is
SDN with
Controller
39
clear from the switch
 
 
 
This snapsh
This is snap
This snapsh
between the
hot shows the d
pshot of switch
hot is between
ese switches) S
dump from ovsd
2 to switch 7 w
switch1---switc
ame is the case
R
Figure 3.
db interfaces
Figure 3.28
which indicates
Figure 3.29
ch 7 and show
between acces
Ryerson Univer
27(Port dump a
8 (ODL Portal pac
4 packets were
9(ODL Portal pack
4 packets were
s level switches
rsity | Load Bal
O
after ping)
cket stats after pin
sent between tw
ket stats after ping
e sent between
s
lancing Using S
Open Daylight C
ng port between sw
wo switches.
g port between swi
n them (which i
SDN with
Controller
40
witch 2 and switch
itch 1 and switch 7
indicates load s
7)
7)
sharing
 
 
 
Switch 6 sn
Switch 5 sn
And all the
From our O
does the Ne
We have ta
napshot 2 pack
napshot 2 packe
e ports connect
C
Observation we
etwork load bal
aken the results
kets received fro
ets received fro
ted have been u
Conclusion (N
e have conclud
ancing along w
one more time,
R
Figure 3.30
om h9
Figure 3.31
om h9
Figure 3.32
used almost equa
Network Loa
ded that ODL b
with Server load
this time we ha
Ryerson Univer
0(ODL Portal pack
1(ODL Portal pack
2(ODL Portal pack
ally.
ad balancing
bundle (org.ope
balancing when
ave enabled ST
rsity | Load Bal
O
ker stats after ping
ker stats after ping
ket stats after ping
without STP
endaylight.cont
n STP is not en
TP in the switch
lancing Using S
Open Daylight C
g port between swi
g port between swi
g port between swi
P enabled)
troller.samples.
nabled.
es.
SDN with
Controller
41
itch 2and switch 6
itch 5 and switch 2
itch 4 and switch 1
loadbalancer.in
)
2)
1)
nternal)
 
 
 
We observeed that all the h
Figu
osts discovered
R
Figure 3.33
ure 3.34( STP con
d H9 by using sw
Ryerson Univer
3(Enabling STP in
nvergence switch
witch1 this time
rsity | Load Bal
O
n ovsdb switches)
1 as Root )
e, switch 2 was
lancing Using S
Open Daylight C
s not used due t
SDN with
Controller
42
to STP.
 
 
 
Whereas onn the 2nd
occasio
Fig
on switch 2 was
Figu
R
ure 3.35( ODL Po
s used and Swit
ure 3.36( STP con
Ryerson Univer
ortal View when S
tch 1 was not us
nvergence switch2
rsity | Load Bal
O
Switch1 is root, all
sed to discover
2 as Root )
lancing Using S
Open Daylight C
l )
H9.
SDN with
Controller
43
 
 
 
From our O
does the Ne
times this w
3.4.2 S
 We have s
describe ou
using 32 ip
H3 as serve
we will hav
Observation we
etwork load bal
was the case afte
erver Load B
uccessfully dem
ur observations
perf flows each
ers and H9 as c
ve time outs wh
Conclus
e have conclud
lancing at the co
er STP was full
Balancing Ro
monstrated both
for Round Rob
with 20MB wi
client, and have
hen client wants
Figu
R
sion (Network
ded that ODL b
ore level switch
ly converged.
ound Robin D
h round Robin a
bin policies. As
indow, and send
e generated resp
to send traffic
ure 3.37 (H9 as cli
Ryerson Univer
k Load balan
bundle (org.ope
hes and it takes
Demonstrati
and Random Se
s our Case stud
d these flows e
pective flows. W
to those hosts ,T
ent 32 iperf flow w
rsity | Load Bal
O
ncing with S
endaylight.cont
a while before
ion
ever Load-balan
dy was to demo
every 1sec.In th
We have kept r
There snapshot
with only two serv
lancing Using S
Open Daylight C
TP )
troller.samples.
it is fully conv
ncing Policies. I
onstrate server R
he first section w
rest of the hosts
t clearly indicat
vers listening)
SDN with
Controller
44
loadbalancer.in
verged. We tried
In this section w
Round Robin P
we have used H
s down, which
tes these time ou
nternal)
d many
we will
Policies
H1 and
means
uts.
 
 
 
We have us
when some
The above
max:7.5 wh
sed jperf, which
e of the Paths w
snapshot indic
hich indicates t
h is GUI based
ere down betwe
Figu
cates we have h
there was clear
R
iperf and our ob
een host and cli
ure 3.38(Server 1 r
had input band
loss of bandwid
Ryerson Univer
bservation indic
ient.
response, two host
dwidth of aroun
dth and not all b
rsity | Load Bal
O
cates we were n
t up and rest down
nd 32 MB/s an
bandwidth was
lancing Using S
Open Daylight C
not able to utiliz
n)
nd each of the h
utilized.
SDN with
Controller
45
ze the max band
host through pu
dwidth
ut was
 
 
 
Same is the
2nd
case: w
time it was
e case of H3.
hen all the host
fully distribute
Figu
ts are up. We h
ed. All servers ru
R
ure 3.39(Server 3 r
have achieved a
unning and 32 f
Ryerson Univer
response, two host
almost 100% eff
flows generated
rsity | Load Bal
O
t up and rest down
fficiency, we ha
d by following s
lancing Using S
Open Daylight C
n)
ad same bandwi
script.
SDN with
Controller
46
idth available bbut this
 
 
 
Snap shot oof the client.
Figu
R
ure 3.40(Client H9
Ryerson Univer
9 32 flows 20MB w
rsity | Load Bal
O
window and 1 sec
lancing Using S
Open Daylight C
delay all hosts up
SDN with
Controller
47
round Robin )
 
 
 
We have ta
sever was g
aken host H1 an
getting approx.
Figu
nd H3 snap shot
at 4MB, and w
R
ure 3.41(Server H1
t this time and w
we have almost r
Ryerson Univer
1 response ,all hos
we can see max
reached 100% e
rsity | Load Bal
O
sts up round Robin
x bandwidth wa
efficiency.
lancing Using S
Open Daylight C
n )
s utilized as we
SDN with
Controller
48
e had 32 MB annd each
 
 
 
3.6.3 S
This time w
two servers
erver Load B
we used STP en
s running, which
Figu
Balancing Ra
nabled Network
h was the case o
Figu
R
ure 3.42 (Server H
andom Demo
k and the rest of
of Round Robin
ure 3.43 (Random
Ryerson Univer
3 response ,all hos
onstration
f the simulation
n sever Simulat
topology creation
rsity | Load Bal
O
sts up round Robi
n setting were s
tion. 
)
lancing Using S
Open Daylight C
in )
same, which me
SDN with
Controller
49
eans first time wwe had
 
 
 
Figu
R
ure 3.44 (Random
Ryerson Univer
topology H9 Clien
rsity | Load Bal
O
nt 32 flows two se
lancing Using S
Open Daylight C
ervers up )
SDN with
Controller
50
 
 
 
Figu
R
ure 3.45 (Random
Ryerson Univer
m topology H9 Clie
rsity | Load Bal
O
ent Server H1 resp
lancing Using S
Open Daylight C
ponse )
SDN with
Controller
51
 
 
 
We almost
servers are
have same resu
up as we can se
ults as Round R
ee from the snap
R
Figure 3.46 (Rand
Robin, even we
pshot.
Ryerson Univer
dom topology H9
changed Netwo
rsity | Load Bal
O
Client Server H3 r
ork to STP enab
lancing Using S
Open Daylight C
response )
bled, we have lo
SDN with
Controller
52
osses when not all the
 
 
 
Figu
R
ure 3.47 (Random
Ryerson Univer
topology H9 Clien
rsity | Load Bal
O
nt 32 flows all ser
lancing Using S
Open Daylight C
rvers up)
SDN with
Controller
53
 
 
 
Figu
R
ure 3.48 (Random
Ryerson Univer
topology H9 Clien
rsity | Load Bal
O
nt Server H3 respo
lancing Using S
Open Daylight C
onse all servers up
SDN with
Controller
54
p )
 
 
 
When we
Robin topo
We have
received ma
Note:- This
but if this is
have all the se
logy also.
C
successfully de
ax throughput w
s is Ideal condit
s not the case th
ervers in listenin
Conclusion (S
emonstrated bo
when all the ser
tion, for STP en
hen we will hav
R
Figure 3.49 (Ran
ng mode in Ran
Sever Load B
oth Round Rob
rvers are availab
nabled Network
ve less throughp
Ryerson Univer
ndom topology H9
ndom LB, we g
Balancing Ro
bin and Random
ble irrespective
k, as network in
put as not all the
rsity | Load Bal
O
Client Server H1
get 100% effici
ound Robin/R
m Server Load
of the load bala
n not overloaded
e links are utiliz
lancing Using S
Open Daylight C
response all serve
iency, which w
Random)
d-balancing an
ancing method.
d , we can achie
zed when STP i
SDN with
Controller
55
ers up )
was the case of
nd concluded th
.
eve 100% throu
is enabled.
Round
hat we
ughput,
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
56
 
 
Appendix
Openday light Wrapper scripts for Load Balancer 
Create_8_load_balance_Round_Robin_topo.bash
echo "Create load balancer pool with round robin load balancing policy "
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://192.168.56.105:8080/one/nb/v2/lb/default/create/pool -
d '{"name":"PoolRR","lbmethod":"roundrobin"}'
if [[ $? == 0 ]] ; then
echo " load balancer pool Created "
fi
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://192.168.56.105:8080/one/nb/v2/lb/default/create/vip -
d '{"name":"VIP-RR","ip":"10.0.0.20","protocol":"TCP","port":"5550","poolname":"PoolRR"}'
echo " Create load balancer VIP "
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://192.168.56.105:8080/one/nb/v2/lb/default/update/vip -d
'{"name":"VIP-RR","poolname":"PoolRR"}'
if [[ $? == 0 ]] ; then
echo " load balancer VIP Created "
fi
echo "Creating Pool Members"
for members in 1 2 3 4 5 6 7 8
do
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST
http://192.168.56.105:8080/one/nb/v2/lb/default/create/poolmember -d '{"name":"PM'$members'","ip":"10.0.0.'$members'","poolname":"PoolRR"}'
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
57
 
 
if [[ $? == 0 ]] ; then
echo " Pool Member PM"$members" Created "
fi
done
Create_load_balance_random.bash
echo "Create load balancer pool with Random load balancing policy "
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://192.168.56.105:8080/one/nb/v2/lb/default/create/pool -
d '{"name":"PoolRA","lbmethod":"random"}'
if [[ $? == 0 ]] ; then
echo " load balancer pool Created "
fi
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://192.168.56.105:8080/one/nb/v2/lb/default/create/vip -
d '{"name":"VIP-RA","ip":"10.0.0.20","protocol":"TCP","port":"5550","poolname":"PoolRA"}'
echo " Create load balancer VIP "
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://192.168.56.105:8080/one/nb/v2/lb/default/update/vip -d
'{"name":"VIP-RA","poolname":"PoolRA"}'
if [[ $? == 0 ]] ; then
echo " load balancer VIP Created "
fi
echo "Creating Pool Members"
for members in 1 2 3 4 5 6 7 8
do
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST
http://192.168.56.105:8080/one/nb/v2/lb/default/create/poolmember -d '{"name":"PM'$members'","ip":"10.0.0.'$members'","poolname":"PoolRA"}'
if [[ $? == 0 ]] ; then
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
58
 
 
echo " Pool Member PM"$members" Created "
fi
done
deletepools_topo.bash
for members in 1 2 3 4 4 5 6 7 8
do
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X DELETE
http://192.168.56.105:8080/one/nb/v2/lb/default/delete/poolmember/PM"$members"/PoolRR
done
echo "Delete VIP"
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X DELETE
http://192.168.56.105:8080/one/nb/v2/lb/default/delete/vip/VIP-RR
echo "Delete Pool"
curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X DELETE
http://192.168.56.105:8080/one/nb/v2/lb/default/delete/pool/PoolRR
Mininet Scripts
Python topology Script
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.link import Link
from mininet.util import quietRun
from mininet.log import setLogLevel, info
from mininet.node import Controller, RemoteController, OVSController
from mininet.node import CPULimitedHost, Host, Node
from mininet.node import OVSKernelSwitch, UserSwitch
from mininet.util import dumpNodeConnections
from mininet.cli import CLI
from mininet.log import setLogLevel, info
from mininet.link import TCLink, Intf
from subprocess import call
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
59
 
 
setLogLevel('info')
net = Mininet(link=TCLink)
# Servers
Host1 = net.addHost('h1',cls=Host, ip="10.0.0.1")
Host2 = net.addHost('h2',cls=Host, ip="10.0.0.2")
Host3 = net.addHost('h3', cls=Host,ip="10.0.0.3")
Host4 = net.addHost('h4', cls=Host,ip="10.0.0.4")
Host5 = net.addHost('h5', cls=Host,ip="10.0.0.5")
Host6 = net.addHost('h6', cls=Host,ip="10.0.0.6")
Host7 = net.addHost('h7', cls=Host,ip="10.0.0.7")
Host8 = net.addHost('h8', cls=Host,ip="10.0.0.8")
# Clients
Host9 = net.addHost('h9', ip="10.0.0.9")
Switch1 = net.addSwitch('s1')
Switch2 = net.addSwitch('s2')
Switch3 = net.addSwitch('s3')
Switch4 = net.addSwitch('s4')
Switch5 = net.addSwitch('s5')
Switch6 = net.addSwitch('s6')
Switch7 = net.addSwitch('s7')
# Adding Switches
#
linksw400 = dict(bw=400)
linksw100 = dict(bw=100)
linkclients = dict(bw=100)
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
60
 
 
linkservers = dict(bw=100)
# links between switches and hosts
net.addLink(Host1, Switch3,port1=13,port2=31 ,**linkservers)
net.addLink(Host5,Switch3,port1=53,port2=35 , **linkservers)
net.addLink(Host2,Switch4,port1=24,port2=42 , **linkservers)
net.addLink(Host6 , Switch4,port1=64,port2=46 ,**linkservers)
net.addLink(Host3 ,Switch5, port1=35,port2=53 ,**linkservers)
net.addLink(Host7, Switch5, port1=75,port2=57 ,**linkservers)
net.addLink(Host4, Switch6 , port1=46,port2=64, **linkservers)
net.addLink(Host8, Switch6 ,port1=86,port2=68 , **linkservers)
net.addLink(Host9, Switch7,port1=97,port2=79 ,**linkclients)
#net.addLink(Host5, Switch7,port1=5711,port2=7511,intf1Name='h7s70-eth570', intf2Name='s7h50-eth70', **linkclients)
# links between switches
# links between switch 2 and 4
net.addLink(Switch2, Switch4 , port1=240, port2=420, intf1Name='s24-eth240', intf2Name='s42-eth420' ,**linksw100)
net.addLink(Switch2, Switch5,port1=250, port2=520, intf1Name='s25-eth250', intf2Name='s52-eth520' , **linksw100)
net.addLink(Switch2, Switch6 , port1=260, port2=620, intf1Name='s26-eth260', intf2Name='s62-eth620' , **linksw100)
net.addLink(Switch2, Switch3 ,port1=230, port2=320, intf1Name='s23-eth230', intf2Name='s32-eth320' ,**linksw100)
net.addLink(Switch1, Switch4 ,port1=140, port2=410, intf1Name='s14-eth140', intf2Name='s41-eth410' ,**linksw100)
net.addLink(Switch1, Switch5 ,port1=150, port2=510, intf1Name='s15-eth150', intf2Name='s51-eth510' ,**linksw100)
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
61
 
 
net.addLink(Switch1, Switch6,port1=160, port2=610, intf1Name='s16-eth160', intf2Name='s61-eth610' ,**linksw100)
net.addLink(Switch1, Switch3 ,port1=130, port2=310, intf1Name='s13-eth130', intf2Name='s31-eth310' ,**linksw100)
net.addLink(Switch7, Switch1, port1=710, port2=170, intf1Name='s71-eth710', intf2Name='s17-eth170' , **linksw400)
net.addLink(Switch7, Switch2, port1=720, port2=270, intf1Name='s72-eth720', intf2Name='s27-eth270' , **linksw100)
net.addController('c0', controller=RemoteController, ip='192.168.56.105', port=6633)
net.build()
net.start()
CLI(net)
#simpleTest()
net.stop() 
Get Interface Stats Script
echo "Port , Transmitted , Recieved " > result.txt
sudo ovs-vsctl list interface|grep name |grep "-"|awk -F":" '{print $2}'|sed -e 's/"//' -e 's/"//' > a.txt
>b.txt
>c.txt
line=$(sudo ovs-vsctl list interface|grep -n name |grep "-"|awk -F":" '{print $1}')
for X in $line
do
let Y=$X;
let Z=$Y+5
sudo ovs-vsctl list interface|awk '(NR=='$Z') {print $0}' |awk -F"rx_packets=" '{print $2}'|awk -F"," '{print ","$1}' >>b.txt
sudo ovs-vsctl list interface|awk '(NR=='$Z') {print $0}' |awk -F"tx_packets=" '{print ","$2}'|sed -e "s/}//" >> c.txt
done
paste a.txt b.txt c.txt >>result.txt 
Enable STP Script
sudo ovs-vsctl set bridge s1 stp_enable=true
sudo ovs-vsctl set bridge s2 stp_enable=true
sudo ovs-vsctl set bridge s3 stp_enable=true
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
62
 
 
sudo ovs-vsctl set bridge s4 stp_enable=true
sudo ovs-vsctl set bridge s5 stp_enable=true
sudo ovs-vsctl set bridge s6 stp_enable=true
sudo ovs-vsctl set bridge s7 stp_enable=true
echo "Bridge s1 status"
sudo ovs-vsctl get bridge s1 stp_enable
echo "Bridge s2 status"
sudo ovs-vsctl get bridge s2 stp_enable
echo "Bridge s3 status"
sudo ovs-vsctl get bridge s3 stp_enable
echo "Bridge s3 status"
sudo ovs-vsctl get bridge s3 stp_enable
echo "Bridge s4 status"
sudo ovs-vsctl get bridge s4 stp_enable
echo "Bridge s5 status"
sudo ovs-vsctl get bridge s5 stp_enable
echo "Bridge s6 status"
sudo ovs-vsctl get bridge s6 stp_enable
 
echo "Bridge s7 status"
sudo ovs-vsctl get bridge s7 stp_enable 
 
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
63
 
 
Installation steps ODL ( Pulling Code from Git Repository and compiling it Locally using Maven
Install Java JDK 8
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
set path
------------
sudo vi .bashrc
------------
#----------------------------
#Java home
#----------------
JAVA_HOME=/usr/lib/jvm/java-8-oracle
export JAVA_HOME
#------------
PATH=$PATH:$JAVA_HOME
export PATH
Maven Install
sudo mkdir -p /usr/local/apache-maven
sudo wget http://ftp.wayne.edu/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
sudo mv apache-maven-3.3.3-bin.tar.gz /usr/local/apache-maven
sudo tar -xzvf /usr/local/apache-maven/apache-maven-3.3.3-bin.tar.gz -C /usr/local/apache-maven/
sudo update-alternatives --install /usr/bin/mvn mvn /usr/local/apache-maven/apache-maven-3.3.3/bin/mvn 1
sudo update-alternatives --config mvn
sudo apt-get install vim
vim ~/.bashrc
------------add
export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.3
export MAVEN_OPTS="-Xms256m -Xmx512m" # Very important to put the "m" on the end
Resource:
https://wiki.opendaylight.org/view/Install_On_Ubuntu_14.04
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
64
 
 
Git Install
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt-get update
sudo apt-get install git
git –version
Resource
http://unix.stackexchange.com/questions/33617/how-can-i-update-to-a-newer-version-of-git-using-apt-get
ODL installation
Once Environment is setup , we can pull code from ODL repository, we have used anonymous
Pull in our setup. Following are the steps:
Move the desired directory, in our case it is user $HOME
git clone https://git.opendaylight.org/gerrit/p/controller.git
saif@saif-SDN:~$ wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml
saif@saif-SDN:~$ cd controller/
saif@saif-SDN:~/controller$ sudo git checkout stable/helium
Checking out files: 100% (3975/3975), done.
Branch stable/helium set up to track remote branch stable/helium from origin.
Switched to a new branch 'stable/helium'
saif@saif-SDN:~/controller$
mvn clean install –DskipTests
It takes a while to install depending on the Machine hardware and memory.
Once Installation is successful , it will show summary of installation on the Screen.
setting up Mininet
git clone git://github.com/mininet/mininet
mininet/util/install.sh -n3f
sudo apt-get install scons
git clone https://github.com/CPqD/ofdissector
cd ofdissector/src
scons install
It may fail with complain
scons: Reading SConscript files ...
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
65
 
 
scons: done reading SConscript files.
scons: Building targets ...
g++ -o openflow-common.os -c -fPIC -I. -I/usr/include/wireshark -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include openflow-common.cpp
In file included from openflow-common.cpp:5:0:
./openflow-common.hpp:10:20: fatal error: config.h: No such file or directory
you need to install
apt-get install wireshark-dev
after that you may get lib missing
scons install
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o openflow-common.os -c -fPIC -I. -I/usr/include/wireshark -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include openflow-common.cpp
In file included from openflow-common.cpp:9:0:
./of13/openflow-130.hpp:12:0: warning: "PROTO_TAG_OPENFLOW_VER" redefined [enabled by default]
apt-get install libgtk2.0-dev
apt-get install glade
pkg-config --list-all | grep glib
vi openflow-common.cpp
scons install
substitute 'dissector_add' with 'dissector_add_uint', not with 'dissector_add_unint'
scons install
resources:
https://github.com/CPqD/ofdissector/issues/14
http://sdn-lab.com/2014/03/19/how-to-analyze-openflow-packets-in-wireshark-at-ubuntu-12-04/
https://github.com/CPqD/ofdissector/issues/13
 
Ryerson University | Load Balancing Using SDN with
Open Daylight Controller
66
 
 
References:
 
https://www.opendaylight.org/sites/opendaylight/files/bk-user-guide.pdf
http://roan.logdown.com/posts/191801-set-openvswitch
http://conferences.sigcomm.org/sigcomm/2012/hotsdn.php
https://wiki.opendaylight.org/view/OpenDaylight_dlux:Dlux_Karaf_Feature
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main
http://blog.jcuff.net/2013/09/my-first-steps-with-openflow.html
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Eclipse_Setup
http://askubuntu.com/questions/420281/how-to-update-maven-3-0-4-3-1-1
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Installation
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Load_Balancer_Service
https://wiki.opendaylight.org/view/OpenDaylight_Toolkit:Main:Windows
http://www.slideshare.net/joelwking/introduction-to-openflow-41257742

More Related Content

What's hot

Building DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPNBuilding DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPN
Cisco Canada
 
Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)
rjain51
 
How to add and delete ont on the olt device
How to add and delete ont on the olt deviceHow to add and delete ont on the olt device
How to add and delete ont on the olt device
Huanetwork
 
SDN Architecture & Ecosystem
SDN Architecture & EcosystemSDN Architecture & Ecosystem
SDN Architecture & Ecosystem
Kingston Smiler
 
SDN Fundamentals - short presentation
SDN Fundamentals -  short presentationSDN Fundamentals -  short presentation
SDN Fundamentals - short presentation
Azhar Khuwaja
 
ACI Hands-on Lab
ACI Hands-on LabACI Hands-on Lab
ACI Hands-on Lab
Cisco Canada
 
Introduction to OpenFlow, SDN and NFV
Introduction to OpenFlow, SDN and NFVIntroduction to OpenFlow, SDN and NFV
Introduction to OpenFlow, SDN and NFVKingston Smiler
 
Software defined networking (sdn) deep dive 3rd-party ecosystem apps and the ...
Software defined networking (sdn) deep dive 3rd-party ecosystem apps and the ...Software defined networking (sdn) deep dive 3rd-party ecosystem apps and the ...
Software defined networking (sdn) deep dive 3rd-party ecosystem apps and the ...
Aruba, a Hewlett Packard Enterprise company
 
Cloud, SDN, NFV
Cloud, SDN, NFVCloud, SDN, NFV
Cloud, SDN, NFV
Igor D.C.
 
A Software Defined WAN Architecture
A Software Defined WAN ArchitectureA Software Defined WAN Architecture
A Software Defined WAN Architecture
Open Networking Summits
 
Securing the Onion: 5G Cloud Native Infrastructure
Securing the Onion: 5G Cloud Native InfrastructureSecuring the Onion: 5G Cloud Native Infrastructure
Securing the Onion: 5G Cloud Native Infrastructure
MyNOG
 
5 g network white paper
5 g network white paper 5 g network white paper
5 g network white paper
Ravi Sharma
 
Introduction to OpenFlow
Introduction to OpenFlowIntroduction to OpenFlow
Introduction to OpenFlow
rjain51
 
Kubernetes networking
Kubernetes networkingKubernetes networking
Kubernetes networking
Sim Janghoon
 
macvlan and ipvlan
macvlan and ipvlanmacvlan and ipvlan
macvlan and ipvlan
Suraj Deshmukh
 
SDN (Software Defined Networking) Controller
SDN (Software Defined Networking) ControllerSDN (Software Defined Networking) Controller
SDN (Software Defined Networking) Controller
Vipin Gupta
 
Introduction to OpenFlow
Introduction to OpenFlowIntroduction to OpenFlow
Introduction to OpenFlow
Joel W. King
 
SDN Project PPT
SDN Project PPTSDN Project PPT
SDN Project PPT
Matthew Chang
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep dive
Winton Winton
 
SDN Presentation
SDN PresentationSDN Presentation
SDN Presentation
Abderrahmane TEKFI
 

What's hot (20)

Building DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPNBuilding DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPN
 
Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)
 
How to add and delete ont on the olt device
How to add and delete ont on the olt deviceHow to add and delete ont on the olt device
How to add and delete ont on the olt device
 
SDN Architecture & Ecosystem
SDN Architecture & EcosystemSDN Architecture & Ecosystem
SDN Architecture & Ecosystem
 
SDN Fundamentals - short presentation
SDN Fundamentals -  short presentationSDN Fundamentals -  short presentation
SDN Fundamentals - short presentation
 
ACI Hands-on Lab
ACI Hands-on LabACI Hands-on Lab
ACI Hands-on Lab
 
Introduction to OpenFlow, SDN and NFV
Introduction to OpenFlow, SDN and NFVIntroduction to OpenFlow, SDN and NFV
Introduction to OpenFlow, SDN and NFV
 
Software defined networking (sdn) deep dive 3rd-party ecosystem apps and the ...
Software defined networking (sdn) deep dive 3rd-party ecosystem apps and the ...Software defined networking (sdn) deep dive 3rd-party ecosystem apps and the ...
Software defined networking (sdn) deep dive 3rd-party ecosystem apps and the ...
 
Cloud, SDN, NFV
Cloud, SDN, NFVCloud, SDN, NFV
Cloud, SDN, NFV
 
A Software Defined WAN Architecture
A Software Defined WAN ArchitectureA Software Defined WAN Architecture
A Software Defined WAN Architecture
 
Securing the Onion: 5G Cloud Native Infrastructure
Securing the Onion: 5G Cloud Native InfrastructureSecuring the Onion: 5G Cloud Native Infrastructure
Securing the Onion: 5G Cloud Native Infrastructure
 
5 g network white paper
5 g network white paper 5 g network white paper
5 g network white paper
 
Introduction to OpenFlow
Introduction to OpenFlowIntroduction to OpenFlow
Introduction to OpenFlow
 
Kubernetes networking
Kubernetes networkingKubernetes networking
Kubernetes networking
 
macvlan and ipvlan
macvlan and ipvlanmacvlan and ipvlan
macvlan and ipvlan
 
SDN (Software Defined Networking) Controller
SDN (Software Defined Networking) ControllerSDN (Software Defined Networking) Controller
SDN (Software Defined Networking) Controller
 
Introduction to OpenFlow
Introduction to OpenFlowIntroduction to OpenFlow
Introduction to OpenFlow
 
SDN Project PPT
SDN Project PPTSDN Project PPT
SDN Project PPT
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep dive
 
SDN Presentation
SDN PresentationSDN Presentation
SDN Presentation
 

Similar to opendayight loadBalancer

Large Scale Data center Solution Guide: eBGP based design
Large Scale Data center Solution Guide: eBGP based designLarge Scale Data center Solution Guide: eBGP based design
Large Scale Data center Solution Guide: eBGP based design
Dhiman Chowdhury
 
Training Report on CCNA
Training Report on CCNA Training Report on CCNA
Training Report on CCNA
AnuragSharma781
 
Sky X Tech Report
Sky X Tech ReportSky X Tech Report
Sky X Tech Report
Shubham Rokade
 
Use of reverse proxies to counter attacks -- TCP flow analysis
Use of reverse proxies to counter attacks -- TCP flow analysisUse of reverse proxies to counter attacks -- TCP flow analysis
Use of reverse proxies to counter attacks -- TCP flow analysis
David Sweigert
 
A Push-pull based Application Multicast Layer for P2P live video streaming.pdf
A Push-pull based Application Multicast Layer for P2P live video streaming.pdfA Push-pull based Application Multicast Layer for P2P live video streaming.pdf
A Push-pull based Application Multicast Layer for P2P live video streaming.pdf
NuioKila
 
SDN - OpenFlow protocol
SDN - OpenFlow protocolSDN - OpenFlow protocol
SDN - OpenFlow protocol
Ulf Marxen
 
wind based measurement and uncertainity using kalman filtering
wind based measurement and uncertainity using kalman filteringwind based measurement and uncertainity using kalman filtering
wind based measurement and uncertainity using kalman filtering
Prasanna Nataraj
 
On-Line Presentation of Data from PMU Stations
On-Line Presentation of Data from PMU StationsOn-Line Presentation of Data from PMU Stations
On-Line Presentation of Data from PMU Stations
Power System Operation
 
Affordable EMCS for GeenHouses
Affordable EMCS for GeenHousesAffordable EMCS for GeenHouses
Affordable EMCS for GeenHousesDumidu Nadeera
 
MODULE TITLE PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
MODULE TITLE    PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docxMODULE TITLE    PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
MODULE TITLE PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
roushhsiu
 
Distributed Traffic management framework
Distributed Traffic management frameworkDistributed Traffic management framework
Distributed Traffic management framework
Saurabh Nambiar
 
Modification of l3 learning switch code for firewall functionality in pox con...
Modification of l3 learning switch code for firewall functionality in pox con...Modification of l3 learning switch code for firewall functionality in pox con...
Modification of l3 learning switch code for firewall functionality in pox con...
eSAT Journals
 
Project final report
Project final reportProject final report
Project final report
ALIN BABU
 

Similar to opendayight loadBalancer (20)

T401
T401T401
T401
 
Ashwin_Thesis
Ashwin_ThesisAshwin_Thesis
Ashwin_Thesis
 
Large Scale Data center Solution Guide: eBGP based design
Large Scale Data center Solution Guide: eBGP based designLarge Scale Data center Solution Guide: eBGP based design
Large Scale Data center Solution Guide: eBGP based design
 
thesis
thesisthesis
thesis
 
etd7288_MHamidirad
etd7288_MHamidiradetd7288_MHamidirad
etd7288_MHamidirad
 
Training Report on CCNA
Training Report on CCNA Training Report on CCNA
Training Report on CCNA
 
Sky X Tech Report
Sky X Tech ReportSky X Tech Report
Sky X Tech Report
 
Use of reverse proxies to counter attacks -- TCP flow analysis
Use of reverse proxies to counter attacks -- TCP flow analysisUse of reverse proxies to counter attacks -- TCP flow analysis
Use of reverse proxies to counter attacks -- TCP flow analysis
 
KHAN_FAHAD_FL14
KHAN_FAHAD_FL14KHAN_FAHAD_FL14
KHAN_FAHAD_FL14
 
A Push-pull based Application Multicast Layer for P2P live video streaming.pdf
A Push-pull based Application Multicast Layer for P2P live video streaming.pdfA Push-pull based Application Multicast Layer for P2P live video streaming.pdf
A Push-pull based Application Multicast Layer for P2P live video streaming.pdf
 
SDN - OpenFlow protocol
SDN - OpenFlow protocolSDN - OpenFlow protocol
SDN - OpenFlow protocol
 
wind based measurement and uncertainity using kalman filtering
wind based measurement and uncertainity using kalman filteringwind based measurement and uncertainity using kalman filtering
wind based measurement and uncertainity using kalman filtering
 
Report
ReportReport
Report
 
On-Line Presentation of Data from PMU Stations
On-Line Presentation of Data from PMU StationsOn-Line Presentation of Data from PMU Stations
On-Line Presentation of Data from PMU Stations
 
Affordable EMCS for GeenHouses
Affordable EMCS for GeenHousesAffordable EMCS for GeenHouses
Affordable EMCS for GeenHouses
 
MODULE TITLE PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
MODULE TITLE    PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docxMODULE TITLE    PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
MODULE TITLE PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
 
Distributed Traffic management framework
Distributed Traffic management frameworkDistributed Traffic management framework
Distributed Traffic management framework
 
Modification of l3 learning switch code for firewall functionality in pox con...
Modification of l3 learning switch code for firewall functionality in pox con...Modification of l3 learning switch code for firewall functionality in pox con...
Modification of l3 learning switch code for firewall functionality in pox con...
 
Project final report
Project final reportProject final report
Project final report
 
Fulltext02
Fulltext02Fulltext02
Fulltext02
 

Recently uploaded

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 

Recently uploaded (20)

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 

opendayight loadBalancer

  • 1.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 4     Table of Contents Table of Figures ............................................................................................................................................................. 5  LIST OF TABLES ......................................................................................................................................................... 8  LIST OF ABBREVIATION .......................................................................................................................................... 9  ABSTRACT ................................................................................................................................................................ 10  CHAPTER I – INTRODUCTION ............................................................................................................................... 11  1.1  Open Daylight Controller (SDN .................................................................................................................. 11  1.2  How Does SDN or Software Defined Networking Work? ........................................................................... 12  1.3  Advantages of SDN ..................................................................................................................................... 13  1.4  General SDN Framework ............................................................................................................................ 14  1.5  SDN & Open Flow ....................................................................................................................................... 15  1.6  Layers in SDN with Open Daylight (Current Stable Release.) ..................................................................... 16  1.7  Mininet ‐ Network topology emulator ....................................................................................................... 16  1.8  Iperf ............................................................................................................................................................ 17  1.9  OpenvSwitch with OpenFlow ..................................................................................................................... 17  1.10  Server Load Balancing ................................................................................................................................ 19  CHAPTER II – TECHNICAL BACKGROUND ........................................................................................................ 20  2.1  Objective & Project Scope .......................................................................................................................... 20  2.2  Setup .......................................................................................................................................................... 21  CHAPTER III – DESIGN AND IMPLEMENTATION ............................................................................................. 23  3.1   Topology: .................................................................................................................................................... 23  3.2   Implementation: ........................................................................................................................................ 24  3.3   How  to  run our Project: ............................................................................................................................ 25  3.4   Observation and Results: ........................................................................................................................... 30  3.4.1  Network Load balancing ................................................................................................................... 30  Conclusion (Network Load balancing without STP enabled) ............................................................................. 41  Conclusion (Network Load balancing with STP ) .............................................................................................. 44  3.4.2   Server Load Balancing Round Robin Demonstration ....................................................................... 44  3.6.3   Server Load Balancing Random Demonstration ............................................................................... 49  Conclusion (Sever Load Balancing Round Robin/Random) .............................................................................. 55  Appendix ..................................................................................................................................................................... 56  References: .................................................................................................................................................................. 66   
  • 2.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 5     Table of Figures Figure 1.1 SDN & Open Flow Figure 1.2 Open Flow versions & their Release dates Figure 1.3 High Level Plane distribution of SDN Figure 1.4 SDN Frame Work Figure 1.5 Opendaylight SDN Framework Figure 1.6 SDN Open flow Integration Figure1.7 Opendaylight Lithium layer Diagram Figure1.8 Mininet high level layer Diagram Figure1.9 Open flow Match Action Figure 1.10 Flow table Components Figure 2.1 Our Project Problem Description Figure 3.1 Given Topology with Port Assignement Figure 3.2 Port assignement in Python Script Figure 3.3 Running Controller Figure 3.4 Running Mininet Topology Figure 3.5 Wireshark Filter Figure 3.6 Ping Result Figure 3.7 ODL portal Topology display Figure 3.8 Shell script to create Server load Balancing Topologies Figure 3.9 Running Round Robin Topology Figure 3.10 Running Random Topology Figure 3.11 Controller message when connecting to Mininet Figure 3.12 Portal display of OSGI bundles Figure 3.13 OSGI switch bundles Figure 3.14 OSGI load Balancer Bundles Figure 3.15 OSGI Host tracker bundle Figure 3.16 OSGI Open flow bundle Figure 3.17 OSGI Topology Manager
  • 3.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 6     Figure 3.18 Wireshark arp message display, OFPT_PACKET_IN Figure 3.19 TCP Packet for ARP Figure 3.20 ARP PACKET_IN and PACKET_OUT Figure 3.21 IP Packet and Open flow Packet information Figure 3.22 Controller instruction OFPT_FLOW_MOD Figure 3.23 Open flow Packet Details, FLOW_MOD Figure 3.24 Ports and links Figure 3.25 Open flow switch port dumps Figure 3.26 Ping between hosts in mininet Figure 3.27 Port dump after ping Figure 3.28 ODL Portal packet stats after ping port between switch 2 and switch 7 Figure 3.29 ODL Portal packet stats after ping port between switch 1 and switch 7 Figure 3.30 ODL Portal packet stats after ping ports between switch 2and switch 6 Figure 3.31 ODL Portal packet stats after ping ports between switch 5 and switch 2 Figure 3.32 ODL Portal packet stats after ping ports between switch 4 and switch 1 Figure 3.33 Enabling STP in ovsdb switches Figure 3.34 STP convergence switch1 as Root Figure 3.35 ODL Portal View when Switch1 is root Figure 3.36 STP convergence switch2 as Root Figure 3.37 H9 as client 32 iperf flow with only two servers listenin Figure 3.38 H1 response, two host up and rest down Figure 3.39 H3 response, two host up and rest down Figure 3.40 Client H9 32 flows 20MB window and 1 sec delay all hosts up round Robin Figure 3.41 Server H1 response ,all hosts up round Robin Figure 3.42 Server H3 response ,all hosts up round Robin Figure 3.43 Random topology creation Figure 3.44 Random topology H9 Client 32 flows two servers up Figure 3.45 Random topology H9 Client Server H1 response Figure 3.46 Random topology H9 Client ,Server H1 response Figure 3.47 Random topology H9 Client Server H3 response all servers up
  • 4.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 7     Figure 3.48 Random topology H9 Client Server H3 response all servers up Figure 3.49 Random topology H9 Client Server H1 response all servers up                        
  • 5.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 8     LIST OF TABLES   Table Contents Table 3.1 Host IP Assignment Table 3.2 Bundle and respective function description Table 3.3 Filter details wireshark                                          
  • 6.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 9         LIST OF ABBREVIATION IP Internet Protocol LAN Local Area Network SDN Software Defined Networking ODL Open Day Light OVS Open Virtual Switch VIP Virtual IP ARP Address Resolution Protocol JDK Java Development Kit JRE Java Runtime Environment OSGI Open Service Gateway Initiative SAL Service Abstraction Layer
  • 7.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 10     ABSTRACT Our Project is to implement and study server load balancing in the Software Defined Networking (SDN) environment using Round Robin and Random Policy. The load balancing Policies are run at the SDN Controller. Load balancing is very important concept in Data centers where high availability as well as performance is required. In this Project we used open source Opendaylight Controller which provides the North Bound interface to implement the load balancing Policies and also provides the south bound interface to communicate with OpenFlow switches. The entire data center is emulated in the Mininet platform. During our work on this project we learned about Software defined networking, how it is different from traditional Networking, we got a greater insight about ODL, Mininet, and OpenFlow vSwitch.                            
  • 8.         The main i SDN contro the networ controller a 1.1 Open Open D built f abstrac southb SDN h uses th open s Comm (Repre contro switch The so Flow (SAL) determ contro dea of SDN is oller. Only the rking devices t are made progra Daylight Con Daylight (ODL for SDN deploy ction platform bound protocols has becoming po his protocol. Al source project munity Project esentational Sta ller provides f hing, security etc outhbound inter 1.0, Open Flow . The SAL is mine the best w ller and the netw Fo CH to decouple the data plane fun through the sou ammable throug ntroller (SDN L) is a highly av yments on mod that allows u s. opular with the lso Open Dayli which is writt under (Open S ate Transfer - a framework for c. face provides su w 1.3, BGP-LS a service whic way to achieve work devices. Following figure Source (htt R HAPTER I e control plane nctions left in th uth bound pro gh the north bou N) vailable, modula dern heterogen sers to write a Open Flow Pro ight can use oth ten in Java, it Services Gatew web based) AP pluggable mo upport for diffe S, etc. These m ch links these s service reques e illustrates the Figure 1 tp://www.slides Ryerson Univer – INTROD from the data p he networking d tocol, such as und API. ar, extensible, s neous multi-ven apps that easil otocol widely ac her southbound uses maven f way initiative) PI and impleme odules to perfo erent protocols ( modules can be south bound de sted and take c Openflow as th .1(Openflow as share.net/Vijaya rsity | Load Bal O DUCTION plane and move devices. The co OpenFlow. N scalable and mu ndor networks. ly work across ccepted as indu d protocol, not j for Package D for the north ents open flow orm network t (via separate p e linked in real evices to north care of the und he component of Part of SDN) aguruJayaram/c lancing Using S Open Daylight C e the control pl ontroller comm Network applica ulti-protocol co It provides a s a wide varie ustry Standard. O just open flow. eployment. Op bound interfa based policies tasks. These ta plugins); some o l time to Servi h bound applica derlying protoc f SDN Platform cisco-openflow) SDN with Controller 11 lane to the centr municates and co ations running ontroller infrastr model-driven s ety of hardwar Open daylight P . Open Dayligh pen Daylight is ace it exposes for Southboun asks include ro of examples are ce Abstraction ations. The SA col used betwe m:- ) ralized ontrols at the ructure service re and Project ht is an s open REST nd. The outing, e Open Layer AL will een the
  • 9.       Follow flow s protoc 1.2 How D Tr de S an A an N co wing is the Road witches for our ol. Does SDN or raditionally, mo ecouples contro SDN Controller nd enables Adm APIs to send ins nd is used as s Northbound API ontrol and polic dmap of the Op r Project Imple F Software De ost network de ol plane from d r works as the i min to program truction to the southbound pro s at the SDN co ces. R pen flow Protoc ementation. As Figure 1.2(Versi fined Networ evices have con data plane. The intelligent part the underlying switches and ro otocol to send ontroller to com Ryerson Univer col implementa of our Project ions of OpenFlow rking Work? ntrol plane and control plane is of the network Network (switc outers. OpenFlo instructions to mmunicate with rsity | Load Bal O ation. We are us OF1.4 specific w with Release d data plane in s moved to a ce k, it offers centr ches and router ow is the first s o underlay netw external world lancing Using S Open Daylight C sing mininet em cation is the c Date) the same netw entralized contro ral control of th s).The controlle standard adopte work. The netw d to implement t SDN with Controller 12 mulator to creat current release working device oller. he complete ne er utilizes south ed by SDN pro work applicatio the desirable Ne te open of this e. SDN etwork, hbound viders, ons use etwork
  • 10.       1.3 Adva • • • • ntages of SDN Application D Forwarding fu Dynamic Co demand. Centralized M the network a Diagram below N Driven: one can functions. ontrol: Separatin Management: N and for applicat     R w shows high le Figure n directly progra ng control from Network control ions and instruc   Ryerson Univer vel plane distri 1.3(Simplified S am Network as m forwarding is centralized ctions provides Applica Contro Contr Switc South Interface rsity | Load Bal O ibution of the SD SDN Plane) control is separ allows users t d in SDN contro a single logical ations l Plane roller ches North InterfaceSouthInterface lancing Using S Open Daylight C DN based netwo rated from to adjust netwo oller which main l switch. SDN with Controller 13 orks. ork- traffic flo ntains overall v ows on view of
  • 11.       • In Si W si pr In be ch au 1.4 Gener H In w Based on ope design and op n theory SDN sh ince control is m When packet is l ngle packet los roduction netwo n SDN Control m een achieved v hannels betwee uxiliary connect ral SDN Fram Here is the Gene S n the above diag was that SDN OS en Standard an peration and elim hould be Idea moved to Centr lost between the ss may be tolera ork deployment messages could via some sort o en one controll tion will be use De So mework ral conceptual v ource (http://big gram two versi S and controller R nd vendor ind minates Vendor al solution to to ralized Controll e Controller and ated to some ex t. d get lost and co of parallelism b ler and switch ed for data mess etailed explanat ource (https://bo view of SDN Fr Figur gswitch.com/sit ions of SDN fra r have been bun Ryerson Univer dependent: As S r dependency. day’s data netw er, controller sh d switches, it w xtent as these n ould lead to dela by using multi h. Primary conn sages or for UD tion for SDN pl ooks.google.ca/ rame Work re 1.4(SDN Fram tes/default/files amework has b ndled together in rsity | Load Bal O SDN follows o working problem hould be capabl will have larger networks have a ay in transmissi iple controllers nnections will b DP messages. lanes can be fou /sdn/ paul_goran me Work) s/_/213479.1_sd been depicted, t n 2.0 framewor lancing Using S Open Daylight C open Standard, ms, but it has it le of handling l impact, where always backup ion or data loss s with the swit be used for C und at : nsoon/) dn-blog-graphic the basic differe rk. SDN with Controller 14 it simplifies ne ts own disadvan lot of processin as in legacy ne paths available . Solution to thi tch or using m Control message c.jpeg) ence between th etwork ntages. g load. etwork, e in the is have multiple es and he two
  • 12.       de 1.5 SDN & Source (http: In the diagram eal with physica & Open Flow ://www-935.ibm m . 1.5 ODL fram al and virtual sw has s w R Figure 1.5(O m.com/services/ mework has bee witches whereas some extension Ryerson Univer Open Daylight S /image/systems en shown, this d s northbound in ns which perform rsity | Load Bal O SDN Framework s_networking_s diagram clearly nterface deal wi m all network f lancing Using S Open Daylight C k) olutions_od_di y depicts that so ith client and ap functions. SDN with Controller 15 agram3_rev6.jp outhbound inter pplications. Con pg) rfaces ntroller
  • 13.         1.6 Layer S 1.7 Minin M us m co To Th N rs in SDN wit ource(https://w net - Network Mininet is the ne sing single Lin mininet run ope ontroller). It pro opologies. he following d Network topolog Source (http th Open Dayl ww.opendaylig k topology em etwork emulato nux kernel. It a en flow and con ovides rich API diagram shows gy quickly inste R Figure1.6 ps://www.clear. light (Curren Figure1.7(Ope ght.org/sites/ww mulator or which provid acts as a real N nnects to remot I interface whic how an emula ad of using exp Ryerson Univer 6(SDN Openflow rice.edu/comp5 t Stable Relea n daylight Lithi ww.opendayligh am_lrgr.jpg des user a tool Network once e te SDN controll ch provides Ne ated mininet ne pensive hardwar rsity | Load Bal O w Integration) 529/www/paper ase.) ium layer Diagr ht.org/files/page g) to emulate Net emulated topol ler(in our case etwork engineer etwork simulati re testbed. lancing Using S Open Daylight C rs/tutorial_4.pd ram) es/images/opend tworks, it runs logy is created we have used O rs way to emul ion helps Netw SDN with Controller 16 df) daylight_lithium emulated Topo . Switches crea Opendaylight a ate different Ne work engineers mdiagr ologies ated in as SDN etwork to test
  • 14.       Th us 1.8 Iperf • Ip M • It • Ip Ei • It 1.9 Open O O O A fo w im Th w he simulated N sing mininet or perf is a w used Measure the thro can measure th perf has a client ither unidirectio is open source vSwitch with Openvswitch is Openvswitch has One of them is su A switch functio orwarding/flow which allows ta mplement these his setup is dif which requires n Source (h Source Networks can be vise versa. network testing ughput of a net he bandwidth an and server func onal or bidirecti software and ru h OpenFlow an alternate o s made enhance upport of Open on can be broke table, and data aking the cont Rules. fferent from the etwork Admini ttp://en.community R Figure1.8( M (http://netsemi e tested on the r g tool that can c twork that is car nd the quality of ctionality, and c ional. uns on various p f Linux bridge ement as comp nFlow protocol. en into: Control a plane will foll rol plane func e proprietary V strators to impl y.dell.com/techcen Ryerson Univer Mininet high lev nar.stanford.ed real hardware te create TCP and rrying them. f a network link can measure the platforms includ e module and i pared to other B l plane, data pla low these rules ctionality to ce Vendor setup in lement changes nter/networking/w rsity | Load Bal O vel layer Diagram du/seminars/11_ est bed once the UDP data strea k. e throughput be ding Linux, UN it has been av Bridges. The de ane. The contro s for the incomi entral controlle n which these ru at each node s w/wiki/3820.openv lancing Using S Open Daylight C m) _14_13.pdf ) e Network topo ams and etween the two e NIX and Windo vailable since l etail is availabl ol plane is the p ing packets. Op er and allows ules are implem separately. vswitch-openflow- SDN with Controller 17 ologies are fully ends, ws. inux kernel 2.4 e at openvswitc plane which cre penFlow is a pr central contro mented at each lets-get-started) y tested 4. The ch.org. eates a rotocol oller to h node,
  • 15.       OOpenFlow Switc • Po • Flo • Flo • Ma • Mo ch comprises of orts ow tables ows atch Classifiers odifiers and Ac R f switch data Pla tions Ryerson Univer ane, which inclu   Figure1.9(Ope rsity | Load Bal O udes:   en flow Match A lancing Using S Open Daylight C Action) SDN with Controller 18
  • 16.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 19     Figure 1.10(Flow table Components) Above Diagrams shows how OpenvSwitch works and how match action counter is performed, and once match found it finally forward the packet to desired port otherwise packet is dropped. 1.10 Server Load Balancing The main idea of using load balancing is to implement the following three things:- Scalability: Load can be distributed to different servers Manageability: Application can be transferred from one server to another within same cluster (server group). Availability: To reduce downtime in Production Systems. In our case load balancer service is running on controller which acts as a reverse proxy to distributes network traffic across a number of servers based on predefined polices: Round Robin or Random. Load Balancing in servers can be implemented by two methods:- Stateless: The controller does not keep track of state of servers and will send the information based on policy to server even the particular server is down. State-full: The controller keeps track of state of servers and monitors the state of the related servers.
  • 17.       2.1 O Se S1-S7 are O between s1 bandwidth The Open looking for The first flo The second The third fl The fourth The fifth flo Objectiv etup the follow OpenVswitches /s2 and s3/s4/s5 of 400Mbps. daylight shoul r is this: ow between H9 d flow between low between H9 flow between H ow between H9 CHAPTE ve & Pro wing topology in (OVSs), H1 to 5/s6 should hav ld have a built- 9 and a virtual se H9 and a virtua 9and a virtual se H9 and a virtual 9 and a virtual s R ER II – TEC oject Sco n the Mininet: Figure2.1 o H8 are servers ve a bandwidth o -in network loa erver will use th al server uses S7 erver uses S7-S l server uses S7 erver uses S7-S Ryerson Univer CHNICAL B ope 1 (Our Project P s. H9 is the host of 100Mbps eac ad balancer. T he path S7-S1-S 7-S2-S4-H2; S1-S5-H3; 7-S2-S6-H4; S2-S3-H5; rsity | Load Bal O BACKGRO Problem Descrip t that generates ch; the links bet est if it is the c S3-H1; lancing Using S Open Daylight C OUND ption) traffic to the se tween s7 and s1 case. The patte SDN with Controller 20 ervers. The link 1/s2 have the rn that you are s e
  • 18.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 21     The sixth flow between H9and a virtual server uses S7-S1-S4-H6; And so on … Study if this is the case. If not, record the paths taken. Use iperf traffic generator to generate TCP traffic and measure the delay and throughput. Generate 32 flows with data rate of 20Mbps each. Compare the results with only two servers (says H1 and H2). The idea here is to show that by using more servers, we can use more available network bandwidth, thus reduce the delay and increase the throughput. Compare the delay and throughput between the round-robin and random policies. To accomplish our desired project, we use the following devices and tools: 2.2 Setup 1. Two Virtual Machines each one with Ubuntu 14.04 32 bit 2. Oracle VirtualBox 3. GIT 4. Apache Maven 5. MobaXterm 6. VBox Guest Addition for Linux 7. WireShark 8. Mininet 9. ODL Controller Code 2.2.1: Two Virtual Machines each one with Ubuntu 14.04 32 bit: We need to download Ubuntu with version 14.04 version 32bit and configure it as virtual Machine. We need two machines for our project, one will be used as controller and other will be used for Mininet. 2.2.2: Oracle VirtualBox We have installed our Virtual machines using Oracle Virtual Box. 2.2.3: GIT GIT is open source version control tool; we have used git to get the current version from ODL repository. 2.2.4: Apache Maven. Apache Maven is the tool used to build Java projects; we have used Apache Maven to build ODL OSGI bundles after downloading them, details are in the installation appendix. 2.2.5: MobaXterm We have used this tool as our ssh client . 2.2.6: VBox Guest Addition: This is an ISO which is helpful to maximize the size of Linux OS while working in Windows 2.2.7: WireShark:
  • 19.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 22     We have used wireshark to analyze open flow packets. This can be configured on Linux and windows both. We have installed version which includes openflow plugin. 2.2.8: MiniNet: This tool is used to emulate the network. 2.2.9: ODL : We downloaded opendaylight(ODL) OSGI bundles using Git and compiled them locally using Maven.        
  • 20.       3.1 T The topolo Our Initial balancing a S1-S7 are O between s1 bandwidth C Topology gy given to us Study scope as well and stud OpenVswitches 1/s2 and s3/s4/ of 400Mbps. C CHAPTER I y: was with 4 ser was to impleme dy which ODL b s (OVSs), H1 t /s5/s6 should h ontroller has Ro R III – DESIG Figure3.1 rvers but later i ent Server load bundle will be u to H8 are serve have a bandwid ound Robin and Node IP A H1 10.0 H2 10.0 H3 10.0 H4 10.0 H5 10.0 H6 10.0 H7 10.0 H8 10.0 H9 10.0 Ryerson Univer GN AND IM 1(Given Topolo it was modified balancing only used for network ers. H9 is the h dth of 100Mbp d Random Polic Address Designa 0.0.1 Serv 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 0.0.8 0.0.9 Client rsity | Load Bal O MPLEMENT ogy with Port A d to above topo y but later we w rk load balancin host that genera ps each; the lin cies running in ation vers lancing Using S Open Daylight C TATION Assignment) ology with more were advised to o ng. ates traffic to t nks between s7 it. SDN with Controller 23 e scope of work observe Networ the servers. The 7 and s1/s2 ha k to it. rk load e links ave the
  • 21.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 24     3.2 Implementation: Software tools requirements to install Opendaylight and Mininet. Opendaylight can be installed in more than one way depending on the intention of the future use; also it can be installed on Linux, UNIX and Windows machine. Opendaylight has 03 major releases for now, Hydrogen, Helium and Lithium, we have used current Stable release which is Helium. Also we need to have Java JDK, git and Maven installed on the box before one begins installation of the ODL. Here are the 03 methods one can use to install ODL: 1. Using Karaf 2. Pulling the code from CLI and build locally using Maven. (We have used this method for our Project) 3. Import Code into Eclipse and re-compiling using Maven. 1) Installation Using Karaf This is the easiest way one can install ODL, one needs to be familiar with Karaf commands, this link provides nice introduction to karaf. http://www.liquid-reality.de/display/liquid/2011/02/15/Karaf+Tutorial+Part+1+-+Installation+and+First+application To install ODL on Ubuntu, Opendaylight wiki provides step by step procedure. https://wiki.opendaylight.org/view/Install_On_Ubuntu_14.04 2) Pulling the code from CLI and build locally using Maven. We have followed this procedure in our installation; following are the steps we have followed in our ODL setup. This is specific to Ubuntu. The detailed Procedure is in the Appendix. 3) Eclipse Installation and build the code in Eclipse using Maven. This method is used if one is developer and wants to see the code of all the packages or needs to write new custom application this method should be used; we have imported code in the Eclipse, but haven’t used it for the Project. Following references can be used to use Eclipse:- https://wiki.opendaylight.org/view/Getting_Started:Eclipse:Installing_Eclipse_on_Ubuntu https://wiki.opendaylight.org/view/GettingStarted:_Eclipse http://networkstatic.net/importing-opendaylight-into-eclipse/ 3.4 Load Balancing Methods Used and VIP VIP (Virtual IP), in server load balancing: VIP acts as the proxy between the external world and the server group. We have demonstrated opendaylight controller load Balancer bundle (org.opendaylight.controller.samples.loadbalancer.internal) two features round robin and random policies. RoundRobin policy: This policy will send traffic to group of servers in orderly manner one after the other Random policy: This policy will select servers randomly based on random algorithm
  • 22.       3.3 H We have im installed, w VM’s to co We have cr scripts whic As the sna numbers wh On the ODL to Both VM How to mplemented ou whereas on the s ommunicate. reated Python s ch helped us in apshot shows w hen the link is b L box we have Ms via their Hos run our ur project using second box we script on the mi identifying por we have used th between switch wrapper shell s st only IP’s: R Project: g two virtual m have installed t ininet box to ru rt numbers when Figure 3. hree digit port and host. scripts which w Ryerson Univer : machines each h the opendayligh un the mininet t n running the te 2 (Port assignm numbers when will create the lo rsity | Load Bal O having Ubuntu ht controller. W topology; We ests. ment in Python S n the link is be ad Balancer To lancing Using S Open Daylight C Linux, One ha We are using ho have port assig Script) etween switche opologies. Open SDN with Controller 25 as mininet, Wir ost only IP of th gnment in our P es and two dig n Secure CRT to reshark he both Python git port o login
  • 23.       ODL VM w controller t Once the co on the mini we have created o be up and run ontroller is runn inet. d alias $ctl in th nning fully. The ning we will st R Figure 3. he user .bashrc en you will notic tart our Python Figure 3. Ryerson Univer 3( Running Con file which start ce a prompt as O script for our t 4(Running Min rsity | Load Bal O ntroller) ts the controller OSGI> which i topology in the ninet topology ) lancing Using S Open Daylight C r. It takes from is prompt of con Mininet VM, a ) SDN with Controller 26 3 to 5 minutes ntroller. and run the wir for the reshark
  • 24.       We have a messages. Once we pi applied filter on ing between the n the particular e hosts the topol R Figure 3. r port, between logy will be upd Figure 3. Ryerson Univer 5( Wireshark F n mininet and dated in the in t 6(Ping Result) rsity | Load Bal O Filter) ODL VM, and the ODL portal lancing Using S Open Daylight C d it only filter . SDN with Controller 27 s openflow andd TCP
  • 25.       Then we ha Robin and R Above snap We will run ave to open ano Random Policy pshot shows the n Round robin P other instance o y. e related scripts Policy as follow R Figure3.7 of Secure CRT Figure 3. on the ODL VM ws:- Ryerson Univer 7(ODL portal T and connect it t 8(Shell script to M: rsity | Load Bal O Topology displa to controller in o create Server lancing Using S Open Daylight C ay) order to run ot load Balancing SDN with Controller 28 ther scripts for g Topologies) Round
  • 26.       We have cr can run Ran The messag reated round ro ndom Topology ge below shows obin pool with 8 y by following s s OSGI info me R Figure 3. 8 hosts and add script. Figure 3. essage when min Ryerson Univer 9(Running Rou ded them in the 10(Running Ra ninet connects t rsity | Load Bal O und Robin Topo e Pool, and assi andom Topolog to controller. lancing Using S Open Daylight C ology) igned VIP to th gy) SDN with Controller 29 hat Pool. Similaarly we
  • 27.       The above 3.4 O 3.4.1 N First step fo For this we Here is the snapshot shows Observa Network Load or us was to stu e identified the O snap shot of th s OSGI bundle ation and d balancing udy the Open da OSGI bundles w e bundles (Swit R Figure 3. Figure 3. information in O d Result aylight should h which will be us tch bundles) Ryerson Univer 11( Controller m 12(Portal displa ODL Portal. ts: have a built-in n sed during this rsity | Load Bal O message when ay of OSGI bun network load ba study, lancing Using S Open Daylight C connecting to M ndles) alancer, SDN with Controller 30 Mininet)
  • 28.       Load Balan Host Track Openflow Topology M We have in study. Package/O org.opendayligh ncer Bundles ker bundle bundle Manager bundle ncluded the OS SGi Bundle   ht.controller.arphand e SGI bundle and dler.internal R Figure 3. Figure 3. Figure 3. Figure 3. Figure 3. the functions d Exporte  Ryerson Univer 13 ( OSGI swit 14(OSGI load B 15(OSGI Host 16(OSGI openf 17(OSGI Topo description from ed Interfaces   IHostFinder rsity | Load Bal O tch bundles) Balancer Bundl tracker bundle) flow bundle) ology Manager b m the ODL wik lancing Using S Open Daylight C les) ) bundle) ki which are be Descriptio Component re host location. SDN with Controller 31 eing used in ou on   esponsible for learnin . It achieves the goal ur Case ng about by
  • 29.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 32      IListenDataPacket looking at the ARP conversation between an host and the controller. This is an application that show case a possible host tracking mechanism, especially useful in the cases like OpenFlow where the controller can see all the packets if instructed to. org.opendaylight.controller.forwarding.staticrouting.internal  IForwardingStaticRouting  ICacheUpdateAware  IfNewHostNotify  IConfigurationContainerAware Provide the necessary hooks to inject in the area controlled by the controller, routes to reach traditional IP networks. org.opendaylight.controller.forwardingrulesmanager.internal  IContainerListener  ISwitchManagerAware  IForwardingRulesManager  IInventoryListener  ICacheUpdateAware  IConfigurationContainerAware  IFlowProgrammerListener Manager of all the Forwarding Rules, this component take case of forwarding rules and is the one that manage conflicts between them. org.opendaylight.controller.hosttracker.internal  ISwitchManagerAware  IInventoryListener  IfIptoHost  IfHostListener  ITopologyManagerAware Track the location of the host relatively to the SDN network. org.opendaylight.controller.protocol_plugin.openflow.internal  IContainerListener  IController  IDataPacketListen  IDataPacketMux  IDiscoveryService  IFlowProgrammerNotifier  IInventoryShimExternalListener  IMessageListener Protocol plugin for OpenFlow 1.0. Include the openflow J library as well the necessary glue logic to adapt to SAL layer along with a discovery mechanism for learning the graph of the OpenFlow network portion.
  • 30.       org.opendayligh org.opendayligh org.opendayligh org.opendayligh org.opendayligh Table3.2( B Mininet sen ht.controller.samples ht.controller.samples ht.controller.statistic ht.controller.switchm ht.controller.topolog Bundle and resp nd Packet_IN op s.loadbalancer.interna s.simpleforwarding.in smanager.internal manager.internal ymanager.internal pective function penflow messag R           al   nternal            n description) ge to controller Ryerson Univer IOFStatisticsMan IPluginInDataPac IPluginInFlowPro IPluginInInventor IPluginInReadSer IPluginInTopolog IPluginReadServi IRefreshInternalP IStatisticsListener ITopologyService IListenDataPacke IConfigManager IInventoryListene IfNewHostNotify IListenRoutingUp IStatisticsManage IListenInventoryU ISwitchManager ICacheUpdateAw IConfigurationCo IListenTopoUpda ITopologyManag IConfigurationCo r to get the path rsity | Load Bal O nager cketService ogrammerService ryService rvice gyService iceFilter Provider r eShimListener et er y pdates er Updates ware ontainerAware ates ger ontainerAware information. lancing Using S Open Daylight C Implementati This compone usage of the f Sample imple simulating a t component w of the functio Component in ReadService several statist Component h information f controller. Al to have acces node name or will find them component. Component h graph. Provid updates to wh SDN with Controller 33 ion of a simple load-b ent wants to show ca functional modules. ementation of an app traditional IP network wants to show case th onal modules. n charge of using the from SAL, in order t tics from the SDN ne holding the inventory for all the known nod ll the components tha ss to let say a port nam r any inventory inform m via query to this holding the whole net de notifications on ed ho wants to listen abo balancer. ase the plication rk. This e usage e to collect etwork. y des in the at wants me or mation, twork dges out it.
  • 31.       The ARP bbroadcast is showw as below, wh R Figure 3. Figure 3. hich is sent betw Figure 3. Ryerson Univer 18(Wireshark a 19(TCP packet ween controller 20 (ARP PACK rsity | Load Bal O arp message dis t for ARP) and switches w KET_IN and PA lancing Using S Open Daylight C splay ,OFPT_PA when there is no ACKET_OUT) SDN with Controller 34 ACKET_IN) matching entryy.
  • 32.       Controller w used openf   will decide the  flow 1.0 protoco best path with ol between con R Figure 3.  FLOW_MOD w ntroller and  sw Figure 3. Ryerson Univer 21(IP Packet an which contains  itches , which u 22 ( Controller rsity | Load Bal O nd Open flow P flow instructio use one table fo instruction OF lancing Using S Open Daylight C Packet informati on in this case it or the flows.  FPT_FLOW_MO SDN with Controller 35 ion) t is flow 0 as w OD) e have 
  • 33.       We have us Message OFPT_PA OFPT_PA OFPT_FL This is the between co We have ta sed following fi ACKET_IN ACKET_OUT LOW_MOD e snapshot we ontroller and Op aken the list of p ilters for the wir Type Switc Contr Contr had taken befo penflow switche ports and links i R Figure 3. reshark trace. e ch->Controlle roller->Switch roller->Switch Table 3.3 ore Network di es for network d in mininet Ryerson Univer 23 (Openflow P Desc r A pa table instr h Cont h Cont table 3 (Filter details iscovery in the discovery. rsity | Load Bal O Packet Details, cription acket received e entry , switch ruction troller sends to troller sends to e wireshark) e controller, wh lancing Using S Open Daylight C FLOW_MOD) d doesn’t matc h sends to con o switch one o o switch to ad hich were indic SDN with Controller 36 ) ch switch flow ntroller for or more ports. dd entry in the cation arp bein w e flow ng sent
  • 34.       R Figure 3. Ryerson Univer 24(Ports and lin rsity | Load Bal O nks) lancing Using S Open Daylight C SDN with Controller 37
  • 35.       As we have from each h snapshot in e used ping betw host to host 9 an n the ODL porta ween the hosts t nd once ping co al and OVSDB s R Figure 3. to observe the N ompleted, we ob switch interface Ryerson Univer 25(Openflow sw Network load b bserved the path es. rsity | Load Bal O witch port dum alancing featur hs taken by the lancing Using S Open Daylight C mps) re of the ODL, w packets to reac SDN with Controller 38 we have sent on ch host 9 by taki ne ping ing the
  • 36.       We observe interface du ed that the con umps at the con ntroller does loa ntroller portal an R Figure 3. ad Balancing us nd in the ovsdb Ryerson Univer 26(ping betwee sing simple loa dump On minin rsity | Load Bal O en hosts in mini ad Balancer mo net side. lancing Using S Open Daylight C inet) odule which is SDN with Controller 39 clear from the switch
  • 37.       This snapsh This is snap This snapsh between the hot shows the d pshot of switch hot is between ese switches) S dump from ovsd 2 to switch 7 w switch1---switc ame is the case R Figure 3. db interfaces Figure 3.28 which indicates Figure 3.29 ch 7 and show between acces Ryerson Univer 27(Port dump a 8 (ODL Portal pac 4 packets were 9(ODL Portal pack 4 packets were s level switches rsity | Load Bal O after ping) cket stats after pin sent between tw ket stats after ping e sent between s lancing Using S Open Daylight C ng port between sw wo switches. g port between swi n them (which i SDN with Controller 40 witch 2 and switch itch 1 and switch 7 indicates load s 7) 7) sharing
  • 38.       Switch 6 sn Switch 5 sn And all the From our O does the Ne We have ta napshot 2 pack napshot 2 packe e ports connect C Observation we etwork load bal aken the results kets received fro ets received fro ted have been u Conclusion (N e have conclud ancing along w one more time, R Figure 3.30 om h9 Figure 3.31 om h9 Figure 3.32 used almost equa Network Loa ded that ODL b with Server load this time we ha Ryerson Univer 0(ODL Portal pack 1(ODL Portal pack 2(ODL Portal pack ally. ad balancing bundle (org.ope balancing when ave enabled ST rsity | Load Bal O ker stats after ping ker stats after ping ket stats after ping without STP endaylight.cont n STP is not en TP in the switch lancing Using S Open Daylight C g port between swi g port between swi g port between swi P enabled) troller.samples. nabled. es. SDN with Controller 41 itch 2and switch 6 itch 5 and switch 2 itch 4 and switch 1 loadbalancer.in ) 2) 1) nternal)
  • 39.       We observeed that all the h Figu osts discovered R Figure 3.33 ure 3.34( STP con d H9 by using sw Ryerson Univer 3(Enabling STP in nvergence switch witch1 this time rsity | Load Bal O n ovsdb switches) 1 as Root ) e, switch 2 was lancing Using S Open Daylight C s not used due t SDN with Controller 42 to STP.
  • 40.       Whereas onn the 2nd occasio Fig on switch 2 was Figu R ure 3.35( ODL Po s used and Swit ure 3.36( STP con Ryerson Univer ortal View when S tch 1 was not us nvergence switch2 rsity | Load Bal O Switch1 is root, all sed to discover 2 as Root ) lancing Using S Open Daylight C l ) H9. SDN with Controller 43
  • 41.       From our O does the Ne times this w 3.4.2 S  We have s describe ou using 32 ip H3 as serve we will hav Observation we etwork load bal was the case afte erver Load B uccessfully dem ur observations perf flows each ers and H9 as c ve time outs wh Conclus e have conclud lancing at the co er STP was full Balancing Ro monstrated both for Round Rob with 20MB wi client, and have hen client wants Figu R sion (Network ded that ODL b ore level switch ly converged. ound Robin D h round Robin a bin policies. As indow, and send e generated resp to send traffic ure 3.37 (H9 as cli Ryerson Univer k Load balan bundle (org.ope hes and it takes Demonstrati and Random Se s our Case stud d these flows e pective flows. W to those hosts ,T ent 32 iperf flow w rsity | Load Bal O ncing with S endaylight.cont a while before ion ever Load-balan dy was to demo every 1sec.In th We have kept r There snapshot with only two serv lancing Using S Open Daylight C TP ) troller.samples. it is fully conv ncing Policies. I onstrate server R he first section w rest of the hosts t clearly indicat vers listening) SDN with Controller 44 loadbalancer.in verged. We tried In this section w Round Robin P we have used H s down, which tes these time ou nternal) d many we will Policies H1 and means uts.
  • 42.       We have us when some The above max:7.5 wh sed jperf, which e of the Paths w snapshot indic hich indicates t h is GUI based ere down betwe Figu cates we have h there was clear R iperf and our ob een host and cli ure 3.38(Server 1 r had input band loss of bandwid Ryerson Univer bservation indic ient. response, two host dwidth of aroun dth and not all b rsity | Load Bal O cates we were n t up and rest down nd 32 MB/s an bandwidth was lancing Using S Open Daylight C not able to utiliz n) nd each of the h utilized. SDN with Controller 45 ze the max band host through pu dwidth ut was
  • 43.       Same is the 2nd case: w time it was e case of H3. hen all the host fully distribute Figu ts are up. We h ed. All servers ru R ure 3.39(Server 3 r have achieved a unning and 32 f Ryerson Univer response, two host almost 100% eff flows generated rsity | Load Bal O t up and rest down fficiency, we ha d by following s lancing Using S Open Daylight C n) ad same bandwi script. SDN with Controller 46 idth available bbut this
  • 44.       Snap shot oof the client. Figu R ure 3.40(Client H9 Ryerson Univer 9 32 flows 20MB w rsity | Load Bal O window and 1 sec lancing Using S Open Daylight C delay all hosts up SDN with Controller 47 round Robin )
  • 45.       We have ta sever was g aken host H1 an getting approx. Figu nd H3 snap shot at 4MB, and w R ure 3.41(Server H1 t this time and w we have almost r Ryerson Univer 1 response ,all hos we can see max reached 100% e rsity | Load Bal O sts up round Robin x bandwidth wa efficiency. lancing Using S Open Daylight C n ) s utilized as we SDN with Controller 48 e had 32 MB annd each
  • 46.       3.6.3 S This time w two servers erver Load B we used STP en s running, which Figu Balancing Ra nabled Network h was the case o Figu R ure 3.42 (Server H andom Demo k and the rest of of Round Robin ure 3.43 (Random Ryerson Univer 3 response ,all hos onstration f the simulation n sever Simulat topology creation rsity | Load Bal O sts up round Robi n setting were s tion.  ) lancing Using S Open Daylight C in ) same, which me SDN with Controller 49 eans first time wwe had
  • 47.       Figu R ure 3.44 (Random Ryerson Univer topology H9 Clien rsity | Load Bal O nt 32 flows two se lancing Using S Open Daylight C ervers up ) SDN with Controller 50
  • 48.       Figu R ure 3.45 (Random Ryerson Univer m topology H9 Clie rsity | Load Bal O ent Server H1 resp lancing Using S Open Daylight C ponse ) SDN with Controller 51
  • 49.       We almost servers are have same resu up as we can se ults as Round R ee from the snap R Figure 3.46 (Rand Robin, even we pshot. Ryerson Univer dom topology H9 changed Netwo rsity | Load Bal O Client Server H3 r ork to STP enab lancing Using S Open Daylight C response ) bled, we have lo SDN with Controller 52 osses when not all the
  • 50.       Figu R ure 3.47 (Random Ryerson Univer topology H9 Clien rsity | Load Bal O nt 32 flows all ser lancing Using S Open Daylight C rvers up) SDN with Controller 53
  • 51.       Figu R ure 3.48 (Random Ryerson Univer topology H9 Clien rsity | Load Bal O nt Server H3 respo lancing Using S Open Daylight C onse all servers up SDN with Controller 54 p )
  • 52.       When we Robin topo We have received ma Note:- This but if this is have all the se logy also. C successfully de ax throughput w s is Ideal condit s not the case th ervers in listenin Conclusion (S emonstrated bo when all the ser tion, for STP en hen we will hav R Figure 3.49 (Ran ng mode in Ran Sever Load B oth Round Rob rvers are availab nabled Network ve less throughp Ryerson Univer ndom topology H9 ndom LB, we g Balancing Ro bin and Random ble irrespective k, as network in put as not all the rsity | Load Bal O Client Server H1 get 100% effici ound Robin/R m Server Load of the load bala n not overloaded e links are utiliz lancing Using S Open Daylight C response all serve iency, which w Random) d-balancing an ancing method. d , we can achie zed when STP i SDN with Controller 55 ers up ) was the case of nd concluded th . eve 100% throu is enabled. Round hat we ughput,
  • 53.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 56     Appendix Openday light Wrapper scripts for Load Balancer  Create_8_load_balance_Round_Robin_topo.bash echo "Create load balancer pool with round robin load balancing policy " curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://192.168.56.105:8080/one/nb/v2/lb/default/create/pool - d '{"name":"PoolRR","lbmethod":"roundrobin"}' if [[ $? == 0 ]] ; then echo " load balancer pool Created " fi curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://192.168.56.105:8080/one/nb/v2/lb/default/create/vip - d '{"name":"VIP-RR","ip":"10.0.0.20","protocol":"TCP","port":"5550","poolname":"PoolRR"}' echo " Create load balancer VIP " curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://192.168.56.105:8080/one/nb/v2/lb/default/update/vip -d '{"name":"VIP-RR","poolname":"PoolRR"}' if [[ $? == 0 ]] ; then echo " load balancer VIP Created " fi echo "Creating Pool Members" for members in 1 2 3 4 5 6 7 8 do curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://192.168.56.105:8080/one/nb/v2/lb/default/create/poolmember -d '{"name":"PM'$members'","ip":"10.0.0.'$members'","poolname":"PoolRR"}'
  • 54.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 57     if [[ $? == 0 ]] ; then echo " Pool Member PM"$members" Created " fi done Create_load_balance_random.bash echo "Create load balancer pool with Random load balancing policy " curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://192.168.56.105:8080/one/nb/v2/lb/default/create/pool - d '{"name":"PoolRA","lbmethod":"random"}' if [[ $? == 0 ]] ; then echo " load balancer pool Created " fi curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://192.168.56.105:8080/one/nb/v2/lb/default/create/vip - d '{"name":"VIP-RA","ip":"10.0.0.20","protocol":"TCP","port":"5550","poolname":"PoolRA"}' echo " Create load balancer VIP " curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://192.168.56.105:8080/one/nb/v2/lb/default/update/vip -d '{"name":"VIP-RA","poolname":"PoolRA"}' if [[ $? == 0 ]] ; then echo " load balancer VIP Created " fi echo "Creating Pool Members" for members in 1 2 3 4 5 6 7 8 do curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://192.168.56.105:8080/one/nb/v2/lb/default/create/poolmember -d '{"name":"PM'$members'","ip":"10.0.0.'$members'","poolname":"PoolRA"}' if [[ $? == 0 ]] ; then
  • 55.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 58     echo " Pool Member PM"$members" Created " fi done deletepools_topo.bash for members in 1 2 3 4 4 5 6 7 8 do curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X DELETE http://192.168.56.105:8080/one/nb/v2/lb/default/delete/poolmember/PM"$members"/PoolRR done echo "Delete VIP" curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X DELETE http://192.168.56.105:8080/one/nb/v2/lb/default/delete/vip/VIP-RR echo "Delete Pool" curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X DELETE http://192.168.56.105:8080/one/nb/v2/lb/default/delete/pool/PoolRR Mininet Scripts Python topology Script from mininet.topo import Topo from mininet.net import Mininet from mininet.link import Link from mininet.util import quietRun from mininet.log import setLogLevel, info from mininet.node import Controller, RemoteController, OVSController from mininet.node import CPULimitedHost, Host, Node from mininet.node import OVSKernelSwitch, UserSwitch from mininet.util import dumpNodeConnections from mininet.cli import CLI from mininet.log import setLogLevel, info from mininet.link import TCLink, Intf from subprocess import call
  • 56.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 59     setLogLevel('info') net = Mininet(link=TCLink) # Servers Host1 = net.addHost('h1',cls=Host, ip="10.0.0.1") Host2 = net.addHost('h2',cls=Host, ip="10.0.0.2") Host3 = net.addHost('h3', cls=Host,ip="10.0.0.3") Host4 = net.addHost('h4', cls=Host,ip="10.0.0.4") Host5 = net.addHost('h5', cls=Host,ip="10.0.0.5") Host6 = net.addHost('h6', cls=Host,ip="10.0.0.6") Host7 = net.addHost('h7', cls=Host,ip="10.0.0.7") Host8 = net.addHost('h8', cls=Host,ip="10.0.0.8") # Clients Host9 = net.addHost('h9', ip="10.0.0.9") Switch1 = net.addSwitch('s1') Switch2 = net.addSwitch('s2') Switch3 = net.addSwitch('s3') Switch4 = net.addSwitch('s4') Switch5 = net.addSwitch('s5') Switch6 = net.addSwitch('s6') Switch7 = net.addSwitch('s7') # Adding Switches # linksw400 = dict(bw=400) linksw100 = dict(bw=100) linkclients = dict(bw=100)
  • 57.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 60     linkservers = dict(bw=100) # links between switches and hosts net.addLink(Host1, Switch3,port1=13,port2=31 ,**linkservers) net.addLink(Host5,Switch3,port1=53,port2=35 , **linkservers) net.addLink(Host2,Switch4,port1=24,port2=42 , **linkservers) net.addLink(Host6 , Switch4,port1=64,port2=46 ,**linkservers) net.addLink(Host3 ,Switch5, port1=35,port2=53 ,**linkservers) net.addLink(Host7, Switch5, port1=75,port2=57 ,**linkservers) net.addLink(Host4, Switch6 , port1=46,port2=64, **linkservers) net.addLink(Host8, Switch6 ,port1=86,port2=68 , **linkservers) net.addLink(Host9, Switch7,port1=97,port2=79 ,**linkclients) #net.addLink(Host5, Switch7,port1=5711,port2=7511,intf1Name='h7s70-eth570', intf2Name='s7h50-eth70', **linkclients) # links between switches # links between switch 2 and 4 net.addLink(Switch2, Switch4 , port1=240, port2=420, intf1Name='s24-eth240', intf2Name='s42-eth420' ,**linksw100) net.addLink(Switch2, Switch5,port1=250, port2=520, intf1Name='s25-eth250', intf2Name='s52-eth520' , **linksw100) net.addLink(Switch2, Switch6 , port1=260, port2=620, intf1Name='s26-eth260', intf2Name='s62-eth620' , **linksw100) net.addLink(Switch2, Switch3 ,port1=230, port2=320, intf1Name='s23-eth230', intf2Name='s32-eth320' ,**linksw100) net.addLink(Switch1, Switch4 ,port1=140, port2=410, intf1Name='s14-eth140', intf2Name='s41-eth410' ,**linksw100) net.addLink(Switch1, Switch5 ,port1=150, port2=510, intf1Name='s15-eth150', intf2Name='s51-eth510' ,**linksw100)
  • 58.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 61     net.addLink(Switch1, Switch6,port1=160, port2=610, intf1Name='s16-eth160', intf2Name='s61-eth610' ,**linksw100) net.addLink(Switch1, Switch3 ,port1=130, port2=310, intf1Name='s13-eth130', intf2Name='s31-eth310' ,**linksw100) net.addLink(Switch7, Switch1, port1=710, port2=170, intf1Name='s71-eth710', intf2Name='s17-eth170' , **linksw400) net.addLink(Switch7, Switch2, port1=720, port2=270, intf1Name='s72-eth720', intf2Name='s27-eth270' , **linksw100) net.addController('c0', controller=RemoteController, ip='192.168.56.105', port=6633) net.build() net.start() CLI(net) #simpleTest() net.stop()  Get Interface Stats Script echo "Port , Transmitted , Recieved " > result.txt sudo ovs-vsctl list interface|grep name |grep "-"|awk -F":" '{print $2}'|sed -e 's/"//' -e 's/"//' > a.txt >b.txt >c.txt line=$(sudo ovs-vsctl list interface|grep -n name |grep "-"|awk -F":" '{print $1}') for X in $line do let Y=$X; let Z=$Y+5 sudo ovs-vsctl list interface|awk '(NR=='$Z') {print $0}' |awk -F"rx_packets=" '{print $2}'|awk -F"," '{print ","$1}' >>b.txt sudo ovs-vsctl list interface|awk '(NR=='$Z') {print $0}' |awk -F"tx_packets=" '{print ","$2}'|sed -e "s/}//" >> c.txt done paste a.txt b.txt c.txt >>result.txt  Enable STP Script sudo ovs-vsctl set bridge s1 stp_enable=true sudo ovs-vsctl set bridge s2 stp_enable=true sudo ovs-vsctl set bridge s3 stp_enable=true
  • 59.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 62     sudo ovs-vsctl set bridge s4 stp_enable=true sudo ovs-vsctl set bridge s5 stp_enable=true sudo ovs-vsctl set bridge s6 stp_enable=true sudo ovs-vsctl set bridge s7 stp_enable=true echo "Bridge s1 status" sudo ovs-vsctl get bridge s1 stp_enable echo "Bridge s2 status" sudo ovs-vsctl get bridge s2 stp_enable echo "Bridge s3 status" sudo ovs-vsctl get bridge s3 stp_enable echo "Bridge s3 status" sudo ovs-vsctl get bridge s3 stp_enable echo "Bridge s4 status" sudo ovs-vsctl get bridge s4 stp_enable echo "Bridge s5 status" sudo ovs-vsctl get bridge s5 stp_enable echo "Bridge s6 status" sudo ovs-vsctl get bridge s6 stp_enable   echo "Bridge s7 status" sudo ovs-vsctl get bridge s7 stp_enable   
  • 60.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 63     Installation steps ODL ( Pulling Code from Git Repository and compiling it Locally using Maven Install Java JDK 8 sudo apt-add-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer set path ------------ sudo vi .bashrc ------------ #---------------------------- #Java home #---------------- JAVA_HOME=/usr/lib/jvm/java-8-oracle export JAVA_HOME #------------ PATH=$PATH:$JAVA_HOME export PATH Maven Install sudo mkdir -p /usr/local/apache-maven sudo wget http://ftp.wayne.edu/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz sudo mv apache-maven-3.3.3-bin.tar.gz /usr/local/apache-maven sudo tar -xzvf /usr/local/apache-maven/apache-maven-3.3.3-bin.tar.gz -C /usr/local/apache-maven/ sudo update-alternatives --install /usr/bin/mvn mvn /usr/local/apache-maven/apache-maven-3.3.3/bin/mvn 1 sudo update-alternatives --config mvn sudo apt-get install vim vim ~/.bashrc ------------add export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.3 export MAVEN_OPTS="-Xms256m -Xmx512m" # Very important to put the "m" on the end Resource: https://wiki.opendaylight.org/view/Install_On_Ubuntu_14.04
  • 61.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 64     Git Install sudo add-apt-repository ppa:git-core/ppa -y sudo apt-get update sudo apt-get install git git –version Resource http://unix.stackexchange.com/questions/33617/how-can-i-update-to-a-newer-version-of-git-using-apt-get ODL installation Once Environment is setup , we can pull code from ODL repository, we have used anonymous Pull in our setup. Following are the steps: Move the desired directory, in our case it is user $HOME git clone https://git.opendaylight.org/gerrit/p/controller.git saif@saif-SDN:~$ wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml saif@saif-SDN:~$ cd controller/ saif@saif-SDN:~/controller$ sudo git checkout stable/helium Checking out files: 100% (3975/3975), done. Branch stable/helium set up to track remote branch stable/helium from origin. Switched to a new branch 'stable/helium' saif@saif-SDN:~/controller$ mvn clean install –DskipTests It takes a while to install depending on the Machine hardware and memory. Once Installation is successful , it will show summary of installation on the Screen. setting up Mininet git clone git://github.com/mininet/mininet mininet/util/install.sh -n3f sudo apt-get install scons git clone https://github.com/CPqD/ofdissector cd ofdissector/src scons install It may fail with complain scons: Reading SConscript files ...
  • 62.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 65     scons: done reading SConscript files. scons: Building targets ... g++ -o openflow-common.os -c -fPIC -I. -I/usr/include/wireshark -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include openflow-common.cpp In file included from openflow-common.cpp:5:0: ./openflow-common.hpp:10:20: fatal error: config.h: No such file or directory you need to install apt-get install wireshark-dev after that you may get lib missing scons install scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... g++ -o openflow-common.os -c -fPIC -I. -I/usr/include/wireshark -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include openflow-common.cpp In file included from openflow-common.cpp:9:0: ./of13/openflow-130.hpp:12:0: warning: "PROTO_TAG_OPENFLOW_VER" redefined [enabled by default] apt-get install libgtk2.0-dev apt-get install glade pkg-config --list-all | grep glib vi openflow-common.cpp scons install substitute 'dissector_add' with 'dissector_add_uint', not with 'dissector_add_unint' scons install resources: https://github.com/CPqD/ofdissector/issues/14 http://sdn-lab.com/2014/03/19/how-to-analyze-openflow-packets-in-wireshark-at-ubuntu-12-04/ https://github.com/CPqD/ofdissector/issues/13
  • 63.   Ryerson University | Load Balancing Using SDN with Open Daylight Controller 66     References:   https://www.opendaylight.org/sites/opendaylight/files/bk-user-guide.pdf http://roan.logdown.com/posts/191801-set-openvswitch http://conferences.sigcomm.org/sigcomm/2012/hotsdn.php https://wiki.opendaylight.org/view/OpenDaylight_dlux:Dlux_Karaf_Feature https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main http://blog.jcuff.net/2013/09/my-first-steps-with-openflow.html https://wiki.opendaylight.org/view/OpenDaylight_Controller:Eclipse_Setup http://askubuntu.com/questions/420281/how-to-update-maven-3-0-4-3-1-1 https://git-scm.com/book/en/v2/Getting-Started-Installing-Git https://wiki.opendaylight.org/view/OpenDaylight_Controller:Installation https://wiki.opendaylight.org/view/OpenDaylight_Controller:Load_Balancer_Service https://wiki.opendaylight.org/view/OpenDaylight_Toolkit:Main:Windows http://www.slideshare.net/joelwking/introduction-to-openflow-41257742