Professional Documents
Culture Documents
Table of Figures.............................................................................................................................................................5
LIST OF TABLES.........................................................................................................................................................8
LIST OF ABBREVIATION..........................................................................................................................................9
ABSTRACT................................................................................................................................................................10
CHAPTER I INTRODUCTION...............................................................................................................................11
1.1
OpenDaylightController(SDN..................................................................................................................11
1.2
HowDoesSDNorSoftwareDefinedNetworkingWork?...........................................................................12
1.3
AdvantagesofSDN.....................................................................................................................................13
1.4
GeneralSDNFramework............................................................................................................................14
1.5
SDN&OpenFlow.......................................................................................................................................15
1.6
LayersinSDNwithOpenDaylight(CurrentStableRelease.).....................................................................16
1.7
MininetNetworktopologyemulator.......................................................................................................16
1.8
Iperf............................................................................................................................................................17
1.9
OpenvSwitchwithOpenFlow.....................................................................................................................17
1.10
ServerLoadBalancing................................................................................................................................19
Objective&ProjectScope..........................................................................................................................20
2.2
Setup..........................................................................................................................................................21
Topology:....................................................................................................................................................23
3.2
Implementation:........................................................................................................................................24
3.3
HowtorunourProject:............................................................................................................................25
3.4
ObservationandResults:...........................................................................................................................30
3.4.1
3.6.3
Table of Figures
Figure 1.1
Figure 1.2
Figure 1.3
Figure 1.4
Figure 1.5
Figure 1.6
Figure1.7
Figure1.8
Figure1.9
Figure 1.10
Figure 2.1
Figure 3.1
Figure 3.2
Figure 3.3
Running Controller
Figure 3.4
Figure 3.5
Wireshark Filter
Figure 3.6
Ping Result
Figure 3.7
Figure 3.8
Figure 3.9
Figure 3.10
Figure 3.11
Figure 3.12
Figure 3.13
Figure 3.14
Figure 3.15
Figure 3.16
Figure 3.17
Figure 3.18
Figure 3.19
Figure 3.20
Figure 3.21
Figure 3.22
Figure 3.23
Figure 3.24
Figure 3.25
Figure 3.26
Figure 3.27
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
Figure 3.34
Figure 3.35
Figure 3.36
Figure 3.37
Figure 3.38
Figure 3.39
Figure 3.40
Client H9 32 flows 20MB window and 1 sec delay all hosts up round Robin
Figure 3.41
Figure 3.42
Figure 3.43
Figure 3.44
Figure 3.45
Figure 3.46
Figure 3.47
Figure 3.48
Figure 3.49
LIST OF TABLES
Table
Contents
Table 3.1
Host IP Assignment
Table 3.2
Table 3.3
LIST OF ABBREVIATION
IP
LAN
SDN
ODL
OVS
VIP
ARP
JDK
JRE
OSGI
SAL
Internet Protocol
Local Area Network
Software Defined Networking
Open Day Light
Open Virtual Switch
Virtual IP
Address Resolution Protocol
Java Development Kit
Java Runtime Environment
Open Service Gateway Initiative
Service Abstraction Layer
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.
10
CH
HAPTER I INTROD
DUCTION
The main idea of SDN is to decouple thee control plane from the data pplane and movee the control pllane to the centrralized
SDN contro
oller. Only the data plane fun
nctions left in th
he networking ddevices. The coontroller comm
municates and coontrols
the networrking devices through
t
the sou
uth bound protocol, such as OpenFlow. N
Network applicaations running at the
controller are
a made prograammable throug
gh the north bou
und API.
1.1 Open Daylight Con
ntroller (SDN
N)
Open Daylight
D
(ODL
L) is a highly av
vailable, modulaar, extensible, sscalable and muulti-protocol coontroller infrastrructure
built for
f SDN deploy
yments on mod
dern heterogen
neous multi-venndor networks. It provides a model-driven sservice
abstracction platform that allows users to write apps
a
that easilly work acrosss a wide varieety of hardwarre and
southb
bound protocolss.
SDN has
h becoming po
opular with the Open Flow Pro
otocol widely acccepted as induustry Standard. O
Open daylight P
Project
uses th
his protocol. Allso Open Dayliight can use oth
her southboundd protocol, not jjust open flow.. Open Daylighht is an
open source
s
project which is writtten in Java, it uses maven ffor Package Deployment. Oppen Daylight iss open
Comm
munity Project under (Open Services
S
Gatew
way initiative) for the north bound interfaace it exposes REST
(Repreesentational Staate Transfer - a web based) AP
PI and implemeents open flow based policies for Southbounnd. The
controller provides framework
f
for pluggable mo
odules to perfoorm network ttasks. These taasks include roouting,
switch
hing, security etcc.
The so
outhbound interface provides su
upport for diffeerent protocols ((via separate pplugins); some oof examples aree Open
Flow 1.0, Open Flow
w 1.3, BGP-LS
S, etc. These modules
m
can bee linked in reall time to Service Abstraction Layer
s
bound deevices to northh bound applicaations. The SA
AL will
(SAL). The SAL is a service whicch links these south
mine the best way
w to achieve service requessted and take ccare of the undderlying protoccol used betweeen the
determ
controller and the netw
work devices.
Following
Fo
figuree illustrates the Openflow as thhe component off SDN Platform
m:-
Source (htttp://www.slidesshare.net/VijayaaguruJayaram/ccisco-openflow))
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
11
Follow
wing is the Road
dmap of the Op
pen flow Protoccol implementaation. We are ussing mininet em
mulator to creatte open
flow switches for ourr Project Impleementation. As of our Project OF1.4 specificcation is the ccurrent release of this
protocol.
Figure
F
1.2(Versiions of OpenFlow
w with Release Date)
SDN
S
Controllerr works as the intelligent
i
part of the networkk, it offers centrral control of thhe complete neetwork,
an
nd enables Adm
min to program the underlying Network (switcches and router s).The controlleer utilizes southhbound
APIs
A
to send instruction to the switches and ro
outers. OpenFloow is the first sstandard adopteed by SDN providers,
an
nd is used as southbound
s
pro
otocol to send instructions too underlay netw
work. The netw
work applicatioons use
Northbound
N
APIs at the SDN co
ontroller to com
mmunicate with external worldd to implement tthe desirable Neetwork
co
ontrol and policces.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
12
Diagram below
w shows high level plane distriibution of the SD
DN based netwoorks.
Applicaations
NorthInterface
ControlPlane
Contrroller
South
Interface
SouthInterface
Switcches
Figure 1.3(Simplified S
SDN Plane)
Application Driven:
D
one can
n directly prograam Network as control is separrated from
Forwarding functions.
fu
Dynamic Co
ontrol: Separatin
ng control from
m forwarding allows users tto adjust netwoork- traffic floows on
demand.
Centralized Management:
M
Network
N
control is centralizedd in SDN controoller which mainntains overall vview of
the network and
a for applications and instrucctions provides a single logicall switch.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
13
n theory SDN sh
hould be Ideaal solution to todays data netw
working problem
ms, but it has itts own disadvanntages.
In
Siince control is moved
m
to Centrralized Controller, controller shhould be capablle of handling llot of processing load.
When
W
packet is lost
l between thee Controller and
d switches, it w
will have larger impact, where as in legacy neetwork,
single packet losss may be toleraated to some ex
xtent as these nnetworks have aalways backup paths availablee in the
ork deploymentt.
prroduction netwo
In
n SDN Control messages
m
could
d get lost and co
ould lead to delaay in transmissiion or data loss. Solution to thiis have
beeen achieved via
v some sort of
o parallelism by
b using multiiple controllerss with the swittch or using m
multiple
ch
hannels betweeen one controlller and switch
h. Primary conn
nnections will bbe used for C
Control messagees and
au
uxiliary connecttion will be useed for data messsages or for UD
DP messages.
Deetailed explanattion for SDN pllanes can be fouund at :
So
ource (https://bo
ooks.google.ca//sdn/ paul_gorannsoon/)
gswitch.com/sittes/default/filess/_/213479.1_sddn-blog-graphicc.jpeg)
Source (http://big
n the above diag
gram two versiions of SDN fraamework has bbeen depicted, tthe basic differeence between thhe two
In
was
w that SDN OS
S and controllerr have been bun
ndled together inn 2.0 frameworrk.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
14
Figure 1.5(Open
O
Daylight S
SDN Frameworkk)
Source (http:://www-935.ibm
m.com/services//image/systemss_networking_solutions_od_diagram3_rev6.jppg)
In the diagram
m . 1.5 ODL fram
mework has beeen shown, this ddiagram clearlyy depicts that soouthbound interrfaces
witches whereass northbound innterface deal wiith client and appplications. Conntroller
deeal with physicaal and virtual sw
has some
s
extension
ns which perform
m all network ffunctions.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
15
Figure1.6
6(SDN Openflow
w Integration)
Source (http
ps://www.clear.rice.edu/comp5529/www/paperrs/tutorial_4.pddf)
1.7 Minin
net - Network
k topology em
mulator
Mininet
M
is the neetwork emulato
or which provid
des user a tool to emulate Nettworks, it runs emulated Topoologies
ussing single Lin
nux kernel. It acts
a
as a real Network
N
once eemulated topollogy is created. Switches creaated in
mininet
m
run opeen flow and con
nnects to remotte SDN controlller(in our case we have used O
Opendaylight aas SDN
co
ontroller). It pro
ovides rich APII interface whicch provides Neetwork engineerrs way to emulate different Neetwork
To
opologies.
Th
he following diagram
d
shows how an emulaated mininet neetwork simulatiion helps Netw
work engineers to test
Network
N
topolog
gy quickly instead of using exp
pensive hardwarre testbed.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
16
Figure1.8( Mininet
M
high levvel layer Diagram
m)
Source (http://netseminar.stanford.eddu/seminars/11__14_13.pdf )
Th
he simulated Networks
N
can bee tested on the real
r hardware teest bed once thee Network topoologies are fullyy tested
ussing mininet or vise versa.
1.8 Iperf
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
17
OpenFlow
O
Switcch comprises off switch data Plaane, which incluudes:
Po
orts
Flo
ow tables
Flo
ows
Maatch Classifiers
Mo
odifiers and Actions
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
18
1.10
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.
19
CHAPTE
ER II TEC
CHNICAL B
BACKGRO
OUND
2.1 Objectiv
O
ve & Pro
oject Sco
ope
Seetup the follow
wing topology in
n the Mininet:
Figure2.1
1 (Our Project P
Problem Descripption)
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
20
2.2 Setup
1.
2.
3.
4.
5.
6.
7.
8.
9.
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:
21
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.
22
CHAPTER
C
III
I DESIG
GN AND IM
MPLEMENT
TATION
3.1 Topology
T
y:
Figure3.1
1(Given Topoloogy with Port A
Assignment)
The topology given to us was with 4 serrvers but later it
i was modifiedd to above topoology with moree scope of workk to it.
were advised to oobserve Networrk load
Our Initial Study scope was to implemeent Server load balancing onlyy but later we w
balancing as
a well and stud
dy which ODL bundle
b
will be used
u
for network
rk load balancinng.
S1-S7 are OpenVswitches
O
s (OVSs), H1 to
t H8 are serveers. H9 is the hhost that generaates traffic to tthe servers. Thee links
between s1
1/s2 and s3/s4//s5/s6 should have
h
a bandwid
dth of 100Mbpps each; the linnks between s77 and s1/s2 haave the
bandwidth of 400Mbps. Controller has Ro
ound Robin and
d Random Policcies running in it.
Node
H1
H2
H3
H4
H5
H6
H7
H8
H9
IP Address
A
0.0.1
10.0
0.0.2
10.0
0.0.3
10.0
0.0.4
10.0
0.0.5
10.0
0.0.6
10.0
0.0.7
10.0
0.0.8
10.0
0.0.9
10.0
Designaation
Servvers
Client
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
23
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 havent 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
24
3.3 How
H
to run our Project::
We have im
mplemented ou
ur project using
g two virtual machines
m
each hhaving Ubuntu Linux, One haas mininet, Wirreshark
installed, whereas
w
on the second
s
box we have installed the
t opendaylighht controller. W
We are using hoost only IP of thhe both
VMs to co
ommunicate.
We have crreated Python script
s
on the miininet box to ru
un the mininet ttopology; We have port assiggnment in our P
Python
scripts whicch helped us in identifying porrt numbers when
n running the teests.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
25
ODL VM we
w have created
d alias $ctl in th
he user .bashrc file which startts the controllerr. It takes from 3 to 5 minutes for the
controller to be up and run
nning fully. Theen you will noticce a prompt as O
OSGI> which iis prompt of conntroller.
Once the co
ontroller is runn
ning we will sttart our Python script for our ttopology in the Mininet VM, aand run the wirreshark
on the miniinet.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
26
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
27
Figure3.7
7(ODL portal T
Topology displaay)
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
28
The messag
ge below showss OSGI info meessage when min
ninet connects tto controller.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
29
3.4 Observa
O
ation and
d Resultts:
3.4.1
Network
N
Load
d balancing
First step fo
or us was to stu
udy the Open daaylight should have
h
a built-in nnetwork load baalancer,
For this wee identified the OSGI
O
bundles which
w
will be ussed during this study,
Here is the snap shot of the bundles (Swittch bundles)
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
30
Load Balan
ncer Bundles
Exporte
edInterfaces
IHostFinder
Descriptio
on
Component reesponsible for learninng about
host location.. It achieves the goal by
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
31
org.opendaylight.controller.forwarding.staticrouting.internal
org.opendaylight.controller.forwardingrulesmanager.internal
org.opendaylight.controller.hosttracker.internal
org.opendaylight.controller.protocol_plugin.openflow.internal
IListenDataPacket
IForwardingStaticRouting
ICacheUpdateAware
IfNewHostNotify
IConfigurationContainerAware
IContainerListener
ISwitchManagerAware
IForwardingRulesManager
IInventoryListener
ICacheUpdateAware
IConfigurationContainerAware
IFlowProgrammerListener
ISwitchManagerAware
IInventoryListener
IfIptoHost
IfHostListener
ITopologyManagerAware
IContainerListener
IController
IDataPacketListen
IDataPacketMux
IDiscoveryService
IFlowProgrammerNotifier
IInventoryShimExternalListener
IMessageListener
32
IOFStatisticsMannager
IPluginInDataPaccketService
IPluginInFlowProogrammerService
IPluginInInventorryService
IPluginInReadSerrvice
IPluginInTopologgyService
IPluginReadServiiceFilter
IRefreshInternalP
Provider
IStatisticsListenerr
ITopologyServiceeShimListener
IListenDataPackeet
IConfigManager
IInventoryListeneer
IfNewHostNotifyy
IListenRoutingUppdates
org.opendayligh
ht.controller.statisticsmanager.internal
IStatisticsManageer
org.opendayligh
ht.controller.switchm
manager.internal
IListenInventoryU
Updates
ISwitchManager
ware
ICacheUpdateAw
IConfigurationCoontainerAware
IListenTopoUpdaates
ITopologyManagger
IConfigurationCoontainerAware
org.opendayligh
ht.controller.sampless.loadbalancer.internaal
org.opendayligh
ht.controller.sampless.simpleforwarding.in
nternal
org.opendayligh
ht.controller.topologymanager.internal
Table3.2( Bundle
B
and resp
pective function
n description)
Mininet sen
nd Packet_IN op
penflow messag
ge to controllerr to get the path information.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
33
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
34
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
35
Message
OFPT_PA
ACKET_IN
Typee
Switcch->Controller
OFPT_PA
ACKET_OUT
OFPT_FL
LOW_MOD
Contrroller->Switch
h
Contrroller->Switch
h
Desccription
A paacket receivedd doesnt matcch switch flow
w
tablee entry , switchh sends to conntroller for
instrruction
Conttroller sends too switch one oor more ports.
Conttroller sends too switch to addd entry in thee flow
tablee
Table 3.3
3 (Filter details wireshark)
This is thee snapshot we had taken befo
ore Network diiscovery in thee controller, whhich were indiccation arp beinng sent
between co
ontroller and Op
penflow switchees for network discovery.
d
We have taaken the list of ports
p
and links in
i mininet
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
36
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
37
Figure 3.25(Openflow sw
witch port dum
mps)
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
38
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
39
Figure 3.28
8 (ODL Portal paccket stats after pinng port between sw
witch 2 and switch 7)
This is snap
pshot of switch 2 to switch 7 which
w
indicates 4 packets were sent between tw
wo switches.
Figure 3.29
9(ODL Portal packket stats after pingg port between swiitch 1 and switch 77)
This snapsh
hot is between switch1---switcch 7 and show 4 packets weree sent betweenn them (which iindicates load ssharing
between theese switches) Same is the case between access level switchess
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
40
Figure 3.30
0(ODL Portal packker stats after pingg port between swiitch 2and switch 6)
Switch 6 sn
napshot 2 pack
kets received fro
om h9
Figure 3.31
1(ODL Portal packker stats after pingg port between swiitch 5 and switch 22)
Switch 5 sn
napshot 2 packeets received fro
om h9
Figure 3.32
2(ODL Portal packket stats after pingg port between swiitch 4 and switch 11)
Conclusion
C
(N
Network Loa
ad balancing without STP
P enabled)
From our Observation
O
wee have conclud
ded that ODL bundle
b
(org.opeendaylight.conttroller.samples.loadbalancer.innternal)
does the Neetwork load balancing along with
w Server load balancing whenn STP is not ennabled.
We have taaken the results one more time, this time we haave enabled ST
TP in the switch es.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
41
Figure 3.33
3(Enabling STP inn ovsdb switches)
Figu
ure 3.34( STP con
nvergence switch 1 as Root )
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
42
Whereas on
n the 2nd occasio
on switch 2 wass used and Swittch 1 was not ussed to discover H9.
Figu
ure 3.36( STP con
nvergence switch22 as Root )
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
43
Conclussion (Network
k Load balan
ncing with STP )
From our Observation
O
wee have conclud
ded that ODL bundle
b
(org.opeendaylight.conttroller.samples.loadbalancer.innternal)
does the Neetwork load ballancing at the co
ore level switch
hes and it takes a while before it is fully convverged. We triedd many
times this was
w the case afteer STP was fullly converged.
Figu
ure 3.37 (H9 as client 32 iperf flow w
with only two servvers listening)
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
44
Figu
ure 3.38(Server 1 response,
r
two hostt up and rest downn)
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
45
Figu
ure 3.39(Server 3 response,
r
two hostt up and rest downn)
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
46
Figu
ure 3.40(Client H9
9 32 flows 20MB w
window and 1 sec delay all hosts up round Robin )
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
47
Figu
ure 3.41(Server H1
1 response ,all hossts up round Robinn )
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
48
Figu
ure 3.42 (Server H3 response ,all hossts up round Robiin )
3.6.3
This time we
w used STP en
nabled Network
k and the rest off the simulationn setting were ssame, which meeans first time w
we had
two serverss running, which
h was the case of
o Round Robin
n sever Simulattion.
Figu
ure 3.43 (Random topology creation )
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
49
Figu
ure 3.44 (Random topology H9 Cliennt 32 flows two seervers up )
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
50
Figu
ure 3.45 (Random
m topology H9 Clieent Server H1 respponse )
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
51
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
52
Figu
ure 3.47 (Random topology H9 Cliennt 32 flows all serrvers up)
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
53
Figu
ure 3.48 (Random topology H9 Cliennt Server H3 respoonse all servers upp )
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
54
Conclusion
C
(S
Sever Load Balancing
B
Roound Robin/R
Random)
We have successfully deemonstrated bo
oth Round Rob
bin and Random
m Server Loadd-balancing annd concluded thhat we
received maax throughput when
w
all the serrvers are availab
ble irrespective of the load balaancing method..
Note:- Thiss is Ideal condittion, for STP en
nabled Network
k, as network inn not overloadedd , we can achieeve 100% throuughput,
but if this iss not the case th
hen we will hav
ve less throughp
put as not all thee links are utilizzed when STP iis enabled.
Ryerson
R
Univerrsity | Load Ballancing Using S
SDN with
O
Open Daylight C
Controller
55
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
if [[ $? == 0 ]] ; then
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"
http://192.168.56.105:8080/one/nb/v2/lb/default/create/poolmember -d '{"name":"PM'$members'","ip":"10.0.0.'$members'","poolname":"PoolRR"}'
-X
56
POST
if [[ $? == 0 ]] ; then
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
if [[ $? == 0 ]] ; then
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"
http://192.168.56.105:8080/one/nb/v2/lb/default/create/poolmember -d '{"name":"PM'$members'","ip":"10.0.0.'$members'","poolname":"PoolRA"}'
-X
if [[ $? == 0 ]] ; then
57
POST
-H
"Content-type:
application/json"
-X
DELETE
application/json"
-H
"Content-type:
application/json"
-X
DELETE
application/json"
-H
"Content-type:
application/json"
-X
DELETE
done
echo "Delete VIP"
curl
--user
"admin":"admin"
-H
"Accept:
http://192.168.56.105:8080/one/nb/v2/lb/default/delete/vip/VIP-RR
Mininet Scripts
58
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
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)
59
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)
60
CLI(net)
#simpleTest()
net.stop()
61
62
Installation steps ODL ( Pulling Code from Git Repository and compiling it Locally using Maven
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
set path
-----------sudo vi .bashrc
-----------Install Java JDK 8
#---------------------------#Java home
#---------------JAVA_HOME=/usr/lib/jvm/java-8-oracle
export JAVA_HOME
#-----------PATH=$PATH:$JAVA_HOME
export PATH
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
Maven Install
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
63
git version
Resource
http://unix.stackexchange.com/questions/33617/how-can-i-update-to-a-newer-version-of-git-using-apt-get
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.
ODL installation
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 ...
64
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
65
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
66