![Page 1: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/1.jpg)
Enhancing Load Balancer For OpenFlow Compliant
SDN Architecture MIT COLLEGE OF ENGINEERING BY- Pritesh Ranjan
Pankaj Pande Ramesh Oswal Zainab Qurani
![Page 2: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/2.jpg)
Contents
• Introduction to SDN• Project idea• Load balancing methods• Our approach• Controller selection• Environmental setup• Reactive/Proactive approach• Partitioning algorithm• Transitioning algorithm• Questions
![Page 3: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/3.jpg)
Packet Forwarding Hardware
App
App
App
Packet Forwarding Hardware
App
App
App
Hardware Packet Forwarding
App
App
App
Packet Forwarding Hardware
OperatingSystem
OperatingSystem
OperatingSystem
OperatingSystem
App
App
App
Network Operating System
App App App
INTRODUCTION TO SDN
1. Open Interface to HW (South Bound API)
3. Open API for business Applications (NorthBound API)
2. Operating System (controller Platforms)
![Page 4: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/4.jpg)
Load BalancerSwitch
Project Idea
Transform into
![Page 5: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/5.jpg)
The Plan
OpenFlow Compatible
Controller
Load Balancing Module
That’s it !
![Page 6: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/6.jpg)
Our Approach
For Weighted Load Balancing ?
To ensure Connection Persistence ?
For non-uniform traffic pattern?
Partitioning Algorithm
Load Redistribution Algorithm
Transitioning Algorithm
![Page 7: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/7.jpg)
Controller Selection
??
![Page 8: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/8.jpg)
Coming Up Next
Environment Setup Setup a network with 10 hosts on 1 switch
Time Required ??
Setup a network with 100 hosts on 5 switches.
Time Required ??
Tired / Bored ??
Solution : “Mininet”
![Page 9: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/9.jpg)
Switch
10.0.0.10 Port 2 LowSource Subnet Forward to Priority
Rule Table
Default Controller
h1 h2
Srcip=10.0.0.10 Srcip=10.0.0.20
s1
Mininet : Using Inbuilt Wrapper “mn”
![Page 10: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/10.jpg)
Create Custom Network with own Scripts
![Page 11: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/11.jpg)
Controller
![Page 12: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/12.jpg)
Controller Design
To redirect traffic destined for “Service IP” to one of the backend replica servers A/c to assigned weighted load.
Network Design Decisions
Distributed or Centralized ?
Goal of the Application
Flow Based or Aggregated?
Reactive or Proactive?
Centralized
Both – Microflow and wildcard rules
Proactive
![Page 13: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/13.jpg)
Match(exact & wildcard) Action Statistics
Match(exact & wildcard) Action Statistics
Match(exact & wildcard) Action Statistics
Match(exact & wildcard) Action Statistics
---------------
Srcip=10.0.23.23) Output port = 2 No. of Packets=10
Srcip=10.0.0.0/10Priority=Low Output port = 4 No. of bytes
Srcip=10.0.0.0/10Priority=High Send to controller No of received packets
Microflow rules
Wildcard rules
Rules/Flow Entries
![Page 14: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/14.jpg)
Controller
Switch
Source Forward to PriorityRule Table
A R4 MediumB R2 High
R1
R2
R3
R4
Load Balancer
Reactive Approach
Drawback: High Setup time
![Page 15: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/15.jpg)
Controller
Switch
Source Subnet Forward to PriorityRule Table
10.0.0.0/11 R4 Medium10.32.0.0/11 R2 High
R1
R2
R3
R4
Load Balancer
10.64.0.0/11 R1 Low
10.224.0.0/11 R4 Medium
Configuring switch
Table Generated
Proactive Approach
Drawback: Wildcard rules are
expensive
![Page 16: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/16.jpg)
Implementation Details
AIM:
Reduce initial setup timeServers get load in proportion to the assigned weightsMinimum number of wildcard rules
APPROACH:
Proactively install wildcard rules to smaller sub-subnetsAssign each server some subnets according to weighted loadMinimization technique
Coming Up Next
Partitioning Algorithm
![Page 17: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/17.jpg)
Partitioning AlgorithmDeciding the no of subnets:
Server R1Alpha = 2
Server R2Alpha = 3
Server R3Alpha = 1
Total alpha = 2 + 3 + 1 = 6
Nearest 2n = 8
Normalization Factor = 8/6 = 1.333
Weighted Load = 3
Weighted Load = 4
Weighted Load = 1
Weighted Load:R1 = 1.333 * 2 = 2.666 = 3 R2 = 1.333 * 3 = 3.999 = 4 R3 = 1.333 * 1 = 1.333 = 1
No of subnet = 3 + 4 + 1 = 8Partition The subnet into 8
subgroups
![Page 18: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/18.jpg)
10.0.0.0/8
10.128.0.0/910.0.0.0/9
10.0.0.0/10 10.64.0.0/10 10.128.0.0/10 10.192.0.0/10
10.0.0.0/11 10.32.0.0/11
10.64.0.0/11 10.96.0.0/11
10.128.0.0/11 10.160.0.0/11
10.192.0.0/11 10.224.0.0/11
Server R1Weighted Load
= 3
Server R3WL = 1
Server R2Weighted Load = 4
Company Network
Partitioning Algorithm
![Page 19: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/19.jpg)
000*
R1
001*
R1
010*
R1
011*
R2
100*
R2
101*
R2
110*
R2
111*
R3
0 1
0 1 0 1
0 1 0 1 0 1 0 1
/ 8
/ 9
/ 10
/ 11
Number of wild card rules = 8
Partitioning Algorithm – Contd.
![Page 20: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/20.jpg)
Partitioning Algorithm - Analysis
Benefit :
Limitation :
Improvement :
Reduced initial setup timeMinimal involvement of controller
Too Much wildcard rules
Minimization technique
Coming Next
Dynamic Load redistribution
Coming Soon
For uniform client traffic pattern
![Page 21: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/21.jpg)
000*
R1
001*
R1
010*
R1
011*
R2
100*
R2
101*
R2
110*
R2
111*
R3
Swap
011*
111*
Minimization Technique
![Page 22: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/22.jpg)
000*
R1
001*
R1
010*
R1
111*
R2
100*
R2
101*
R2
110*
R2
011*
R3
1*
R2
00*
R1
Number of wild card rules = 4
Minimization Technique
![Page 23: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/23.jpg)
Load Shift Operation
Situation:
Goal:
Conditions:
Solution:
Server R1 needs to be taken down for maintenance.
Traffic of R1 (old) should be allocated to R2 (New)
Ongoing connections should be continued with old server(R1)New connections should be forwarded to new server(R2)R1 can be taken down only when all the connections have expired.
Transitioning Algorithm
![Page 24: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/24.jpg)
Subnet A
Subnet B
R1(Old)
R2(New)
Server R1 is to be taken down, Shift its load
To R2
Ok, let me check the connections
for SYN
Rule Table
Source Subnet Forward to Priority
A R1 Low
B R2 Low
Transitioning Algorithm
![Page 25: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/25.jpg)
Subnet A
Subnet B
R1(Old)
R2(New)
Rule Table
Source Subnet Forward to Priority
A R1 Low
B R2 Low
1. Adds new flow entry2. Modify Old Flow Entry
R2
A Controller High
Rule Table
Source Subnet Forward to Priority
A R2 Low
B R2 Low
A Controller High
Transitioning Algorithm
![Page 26: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/26.jpg)
IP=10.0.0.1Subnet A
Subnet B
R1(Old)
R2(New)
Add micro flow rule
Rule Table
Source Subnet Forward to Priority
A R2 Low
B R2 Low
A Controller High
SYN flag NOT SET
10.0.0.1 R1 Highest
Transitioning Algorithm
![Page 27: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/27.jpg)
IP=10.0.0.1Subnet A
R1(Old)
R2(New)
Add micro flow rule
Rule Table
Source Subnet Forward to Priority
A R2 Low
B R2 Low
A Controller High
SYN flag SET
10.100.0.1 R2 Highest
IP=10.100.0.1Subnet A
Transitioning Algorithm
![Page 28: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/28.jpg)
IP=10.0.0.1Subnet A
R1(Old)
R2(New)
Flow Entries get deleted after Idle time-out
Rule Table
Source Subnet Forward to Priority
A R2 Low
B R2 Low
A Controller High
10.100.0.1 R2 Highest
IP=10.100.0.1Subnet A
Now R1 can be taken down
Transitioning Algorithm
![Page 29: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/29.jpg)
R1 (X=2)
R2 (X=2)
2*x
2*x
00*
01*
10*
11*
x
x
x
x
00* R101* R110* R211* R2
Uniform Client traffic pattern
Each subnet has same no of Connections Each server gets proportional no
of Connections (weighted Load)
![Page 30: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/30.jpg)
R1 (X=2)
R2 (X=2)
2*x
2*x
00*
01*
10*
11*
2*x
1*x
1*x
0*x
00* R101* R110* R211* R2
Non-Uniform Client traffic pattern
Subnets have unequal no of requests Load gets unequally distributed
among servers
![Page 31: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/31.jpg)
R1 (X=2)
R2(X=2)
3*x
1*x
00*
01*
10*
11*
2*x
x
x
0*x
00* R1
Overloaded Server
Underloaded Server
Read StatisticsFind over and underloaded serverShift appropriate load from over to under loaded server
01* R1
10* R2
11* R2
01* R2
2*x
2*x
Load Redistribution Algorithm
![Page 32: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/32.jpg)
Project Demo: Videos
Topology Creation
Partitioning Algorithm- Video 1
Transitioning Algorithm
Load Redistribution Algorithm
Partitioning Algorithm- Video 2
![Page 33: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/33.jpg)
Questions..??
![Page 34: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/34.jpg)
THANK YOU….!!!
![Page 35: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/35.jpg)
Topology
Extra slides
![Page 36: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/36.jpg)
Comparative StudyParameter H/w Load Balancer POX S/w Load Balancer Our Solution
Methods IP Sticky
Round RobinCookie StickyWeighted Load
IP StickyRandom
IP StickyPersistent
Weighted load
Layer Layer 4Layer 7
Layer 4 Layer 4Layer 7
Server health Monitoring
PINGHTTP GET
ARP ARPPING
Speed Fast Slow Slow
Cost Costly Free Free
![Page 37: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/37.jpg)
Switch
10.0.0.1 Port 2 LowSource Subnet Forward to Priority
Rule Table
Default Controller
Default Switch
h1h2
Srcip=10.0.0.1Srcip=10.0.0.2
s1
![Page 38: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/38.jpg)
Controller
Switch
Source Subnet Forward to PriorityRule Table
10.0.0.0/11 R1 Low10.32.0.0/11 R1 Low
R1
R2
R3
R4
Load Balancer
10.64.0.0/11 R1 Low
10.224.0.0/11 R4 Medium
Configuring switch
Table Generated(No. of Wildcard rules 8)
Partitioning Algorithm (Flow Table)
![Page 39: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/39.jpg)
Partitioning Algorithm (Cont.)
000*
R1
001*
R1
010*
R1
011*
R2
100*
R2
101*
R2
110*
R2
111*
R3
0 1
0 1 0 1
0 1 0 1 0 1 0 1
/ 8
/ 9
/ 10
/ 11
Number of wild card rules = 8Achieved Benefit- Reduced initial setup time. Drawbacks- Very large number of rules installed.Improvement-Minimization Techniques
![Page 40: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/40.jpg)
Minimization Technique(Cont.)
000*
R1
001*
R1
010*
R1
011*
R2
100*
R2
101*
R2
110*
R2
111*
R3
Swap
011*
111*
![Page 41: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/41.jpg)
Minimization Technique(Cont.)
000*
R1
001*
R1
010*
R1
111*
R2
100*
R2
101*
R2
110*
R2
011*
R3
1*
R2
00*
R1
Number of wild card rules = 4
![Page 42: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/42.jpg)
Controller
Switch
Source Subnet Forward to PriorityRule Table
10.0.0.0/11 R1 Low10.64.0.0/11 R1 Low
R1
R2
R3
R4
Load Balancer
10.96.0.0/11 R2 Low10.128.0.0/9 R3 Low
Configuring switch
Table Generated
Minimization Technique (Flow Table)
![Page 43: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/43.jpg)
Scapy• Scapy is a Python framework for crafting and
transmitting arbitrary packets
• Scapy also performs very well on a lot of other specific tasks that most other tools can’t handle, like sending invalid frames, injecting your own 802.11 frames
![Page 44: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/44.jpg)
ARP
Replica R1
Replica R2
Replica R3
Replica R4
Replica R5
Source MAC: 00:00:00:00:00:01 Dest MAC: ff:ff:ff:ff:ff:ffSource IP: 10.24.24.24Dest IP :10.0.0.2
![Page 45: Software Load Balancer for OpenFlow Complaint SDN architecture](https://reader030.vdocument.in/reader030/viewer/2022020203/58ee8aea1a28ab4d368b4687/html5/thumbnails/45.jpg)
TCP/HTTP
Replica R1
Replica R2
Replica R3
Replica R4
Replica R5
Source IP: 10.24.24.24Dest IP :10.0.0.2Src Port:RandomDst Port :80Protocol:TCP
Source IP: 10.134.4.2Dest IP :10.0.0.2Src Port:RandomDst Port :80Protocol:TCP