Final Project
Load Balancer Using Software-Defined Network - POX
Team Group 4
7-Dec 2015
1
Group Name SJSU ID Class ID Roles
Group member 1 Avanish Gupta 010129847 22 Code analysis and debug
Group member 2 Kunal Goswami 010772541 20 Code analysis and debug
Group member 3 Ayush Sharma 010034141 71 Design, code and implement
Group member 4 Ikwhan Chang 010754107 9 Design, code and test
INDEX
• Part1: SDN Analysis
• POX Controller: OpenFlow
• OpenFlow Startup events
• OpenFlow Module
• Flow of Control
• Components
• Part2: Development
• Introduction
• Modifications
• Test CDN Environments
• Performance Analysis
• Architecture & Topology
• Demo
• Q&A
2
Part 1:
SDN
Analysis
• POX Controller: OpenFlow
• POX Startup events.
• OpenFlow Module
• Flow of Control
• Components
3
POX Controller:
OpenFlow
• POX is an open source controller developed in
python language for software defined
networking.
• For the part 1 of our project, we have chosen
the OpenFlow module for our analysis. The
following image shows the important
components of the OpenFlow module.
4
5
POX startup events
OpenFlow Module
• In the accompanying diagram, we go through
the outline of the OpenFlow module.
• The discovery and keep alive components of
OpenFlow provide input to the topology
module so as to create and manipulate the
network topology.
• The libopenflow module communicates with
the lib.packet module in order to handle the
packets as well as the events that are fired
through the network.
6
Flow of Control
• The flow of control in POX controller can be understood as an
outline of the actual flow.
• We consider the outline/overview for the POX controller flow
because of the interdependency between the modules in it.
• There are well defined classes and events for every single event that
occurs in a network, however they’re utilized by multiple components
of the POX controller and the flow of control keeps jumping from one
component to another.
7
Flow of control
• The startup of the POX controller transfers the control from the main
“pox.py” to openflow/libopenflow component of POX.
• This file contains the events for the packets that are transferred
amongst the switches.
• The topology is updated simultaneously with the discovery
component and the topology component of the POX controller.
• We now discuss the important components of the OpenFlow module
in POX.
8
Component: libopenflow
9
• This file contains the definition
of various classes and
constants such as the
openflow messages in the
specification, the methods
which deal with the statistics of
the packets exchanged.
• This module is called by the
main execution script, pox at
the startup as well as it is
continuously in scope while
checking the topology and
manipulating it.
• Corresponding diagram shows
the example of one such class.
Component: of_01
• The name of_01 denotes the version of the openflow protocol that
POX supports, that is version 01.
• This component deals with the switches with events like
connectionUp, connectionDown, portStatus etc. It informs the user
about the topology, whether or not a switch is connected to the
network.
• All the communication from the controller to the switches goes
through this code, the messages that are sent, the statistics that are
received from the switches. These messages can be displayed with
the help of the logger available in POX.
• The unpacked information that is available from the libopenflow
module, which is received from the packets that are exchanged is
used in this component to send different requests such as HELLO,
ECHO, FLOW_REMOVED etc.
10
Component: Discovery
• The discovery component in openflow deals with the discovery of
the nodes in the network. The switches as well as the hosts, this
component then communicates with the topology component in
Openflow module.
• The topology component acts like a bridge between POX’s topology
module and Openflow module and helps the controller to set up and
manipulate the network topology.
• This module communicates with the flow table as well to determine
the flow rules for the switches, it updates the flow rules as well as
discovers them upon startup.
11
Difficulties faced
• The very first obstacle that lied on our path was the interdependency
of the python modules with each other. We solved it using line by
line execution with the help of pdb.set_trace() from the python
debugger.
• Determining the flow of control in the openflow module wasn’t easy,
for the same purpose we referred the API calls from one function to
another in order to check the flow of control manually.
12
Part 2: Load
Balancing in
SDN
• Introduction
• Modifications
• Test CDN Environments
• Performance Analysis
• Architecture & Topology
• Demo
• Q&A
13
Introduction
• Project Goals
• POX is a popular Python based open source SDN controller with the help of which we can easily check the
configuration of a customized networking environment.
• Our project will easily setup the CDN(Content-Delivery Network) environments using POX loadbalancer
• The POX loadbalancer is modified by our team using Round-Robin Algorithm(prev: Random Select)
• What is CDN?
• A large distributed system of proxy servers deployed in multiple data centers via the Internet.
• Project Requirements
• SDN Controller: POX
• Language: Python 1.7 based on POX controller
• Topology/VM: Mininet VM Seed
• WAS: Node.js / Express.js
14
(Left) Single server distribution
(Right) CDN scheme of distribution
• Select the server(self._pick_server())
• Set up the table entry towards selected
server
• Set up Openflow actions using selected
server’s ip/mac
• Set up Openflow match based on request
packet(packet, inport)
• Set up the open flow’s message using
customised action/match
• Send message using OpenFlow
Load Balancer Algorithms
15
Modifications
• Default LB: Random Selection
• /pox/misc/ip_loadbalancer.py
line(193~197)
• Implemented simple random selection.
16
• Modified: Round Robin Selection
• /pox/misc/loadbalancer_cmpe207.py
• Add the get_next_server() in order to get the index based on
round robin
• If there is live server(self.live_servers), get_next_server() will
pick the live server and then return in order to connect the
client’s requests.
Load Balancer Algorithms
17
sudo mn --arp --topo single,5 --mac --switch ovsk --controller remote -x
Test Environments
18
Server: index.js
Running on 10.0.0.1/10.0.0.2/10.0.0.3/10.0.0.4
Client: Ajax Requestwith AngularJS
Static
Resources:
Client: HTML View
Test Environments
19
1. Running LB on 10.0.0.254
2. Run Server Application into each servers
3. Connect client’s web page using Firefox
Test Environments
20
1. Set the # of image from server
2. LB will separate the packet into each servers
3. The static resource will be requested by each servers.
4. Images are loaded
Test Environments
21
Performance Analysis
22
0 4 8 12 16
5
10
20
50
Response Time(sec)
HTTPRequest#
Random R-R
Demo
23
https://www.youtube.com/watch?v=1_1hJZFYn_E
Conclusion
• SDN works as cutting-edge technologies of Network Virtualization
• Modified load balancer module to perform round robin scheduling
• Improved the performance of web resources from servers
• Showed the improved results in terms of fetching image from the servers
24
Q & A 25
Thanks! 26
SJSU Fall-2015 CMPE207 Group 4 Final Project Presentation

SDN Project PPT

  • 1.
    Final Project Load BalancerUsing Software-Defined Network - POX Team Group 4 7-Dec 2015 1 Group Name SJSU ID Class ID Roles Group member 1 Avanish Gupta 010129847 22 Code analysis and debug Group member 2 Kunal Goswami 010772541 20 Code analysis and debug Group member 3 Ayush Sharma 010034141 71 Design, code and implement Group member 4 Ikwhan Chang 010754107 9 Design, code and test
  • 2.
    INDEX • Part1: SDNAnalysis • POX Controller: OpenFlow • OpenFlow Startup events • OpenFlow Module • Flow of Control • Components • Part2: Development • Introduction • Modifications • Test CDN Environments • Performance Analysis • Architecture & Topology • Demo • Q&A 2
  • 3.
    Part 1: SDN Analysis • POXController: OpenFlow • POX Startup events. • OpenFlow Module • Flow of Control • Components 3
  • 4.
    POX Controller: OpenFlow • POXis an open source controller developed in python language for software defined networking. • For the part 1 of our project, we have chosen the OpenFlow module for our analysis. The following image shows the important components of the OpenFlow module. 4
  • 5.
  • 6.
    OpenFlow Module • Inthe accompanying diagram, we go through the outline of the OpenFlow module. • The discovery and keep alive components of OpenFlow provide input to the topology module so as to create and manipulate the network topology. • The libopenflow module communicates with the lib.packet module in order to handle the packets as well as the events that are fired through the network. 6
  • 7.
    Flow of Control •The flow of control in POX controller can be understood as an outline of the actual flow. • We consider the outline/overview for the POX controller flow because of the interdependency between the modules in it. • There are well defined classes and events for every single event that occurs in a network, however they’re utilized by multiple components of the POX controller and the flow of control keeps jumping from one component to another. 7
  • 8.
    Flow of control •The startup of the POX controller transfers the control from the main “pox.py” to openflow/libopenflow component of POX. • This file contains the events for the packets that are transferred amongst the switches. • The topology is updated simultaneously with the discovery component and the topology component of the POX controller. • We now discuss the important components of the OpenFlow module in POX. 8
  • 9.
    Component: libopenflow 9 • Thisfile contains the definition of various classes and constants such as the openflow messages in the specification, the methods which deal with the statistics of the packets exchanged. • This module is called by the main execution script, pox at the startup as well as it is continuously in scope while checking the topology and manipulating it. • Corresponding diagram shows the example of one such class.
  • 10.
    Component: of_01 • Thename of_01 denotes the version of the openflow protocol that POX supports, that is version 01. • This component deals with the switches with events like connectionUp, connectionDown, portStatus etc. It informs the user about the topology, whether or not a switch is connected to the network. • All the communication from the controller to the switches goes through this code, the messages that are sent, the statistics that are received from the switches. These messages can be displayed with the help of the logger available in POX. • The unpacked information that is available from the libopenflow module, which is received from the packets that are exchanged is used in this component to send different requests such as HELLO, ECHO, FLOW_REMOVED etc. 10
  • 11.
    Component: Discovery • Thediscovery component in openflow deals with the discovery of the nodes in the network. The switches as well as the hosts, this component then communicates with the topology component in Openflow module. • The topology component acts like a bridge between POX’s topology module and Openflow module and helps the controller to set up and manipulate the network topology. • This module communicates with the flow table as well to determine the flow rules for the switches, it updates the flow rules as well as discovers them upon startup. 11
  • 12.
    Difficulties faced • Thevery first obstacle that lied on our path was the interdependency of the python modules with each other. We solved it using line by line execution with the help of pdb.set_trace() from the python debugger. • Determining the flow of control in the openflow module wasn’t easy, for the same purpose we referred the API calls from one function to another in order to check the flow of control manually. 12
  • 13.
    Part 2: Load Balancingin SDN • Introduction • Modifications • Test CDN Environments • Performance Analysis • Architecture & Topology • Demo • Q&A 13
  • 14.
    Introduction • Project Goals •POX is a popular Python based open source SDN controller with the help of which we can easily check the configuration of a customized networking environment. • Our project will easily setup the CDN(Content-Delivery Network) environments using POX loadbalancer • The POX loadbalancer is modified by our team using Round-Robin Algorithm(prev: Random Select) • What is CDN? • A large distributed system of proxy servers deployed in multiple data centers via the Internet. • Project Requirements • SDN Controller: POX • Language: Python 1.7 based on POX controller • Topology/VM: Mininet VM Seed • WAS: Node.js / Express.js 14 (Left) Single server distribution (Right) CDN scheme of distribution
  • 15.
    • Select theserver(self._pick_server()) • Set up the table entry towards selected server • Set up Openflow actions using selected server’s ip/mac • Set up Openflow match based on request packet(packet, inport) • Set up the open flow’s message using customised action/match • Send message using OpenFlow Load Balancer Algorithms 15
  • 16.
    Modifications • Default LB:Random Selection • /pox/misc/ip_loadbalancer.py line(193~197) • Implemented simple random selection. 16 • Modified: Round Robin Selection • /pox/misc/loadbalancer_cmpe207.py • Add the get_next_server() in order to get the index based on round robin • If there is live server(self.live_servers), get_next_server() will pick the live server and then return in order to connect the client’s requests.
  • 17.
    Load Balancer Algorithms 17 sudomn --arp --topo single,5 --mac --switch ovsk --controller remote -x
  • 18.
    Test Environments 18 Server: index.js Runningon 10.0.0.1/10.0.0.2/10.0.0.3/10.0.0.4 Client: Ajax Requestwith AngularJS Static Resources: Client: HTML View
  • 19.
    Test Environments 19 1. RunningLB on 10.0.0.254 2. Run Server Application into each servers 3. Connect client’s web page using Firefox
  • 20.
    Test Environments 20 1. Setthe # of image from server 2. LB will separate the packet into each servers 3. The static resource will be requested by each servers. 4. Images are loaded
  • 21.
  • 22.
    Performance Analysis 22 0 48 12 16 5 10 20 50 Response Time(sec) HTTPRequest# Random R-R
  • 23.
  • 24.
    Conclusion • SDN worksas cutting-edge technologies of Network Virtualization • Modified load balancer module to perform round robin scheduling • Improved the performance of web resources from servers • Showed the improved results in terms of fetching image from the servers 24
  • 25.
  • 26.
    Thanks! 26 SJSU Fall-2015CMPE207 Group 4 Final Project Presentation