High Availability and Load Balancing
of SDN Controllers
Project Guide- Prof.P.A. Jain
-Shrikant Auti
-Ankit Rao
-Gauri Sabnis
-Akhil Koul
1
2
Index
 Problem Definition and Key Terms
 SDN
 State Diagram
 Class Diagram
 Data Flow Diagram
 Approaches to Election Algorithm
 OpenFlow Protocol Specification
 Switch Components
 Actions in POX Controller
 Example DPCTL Control Channel
 Load Balancer
 OpenFlow Programming
 NorthBound API
 Benefits
 Applications
 Learning Switch and Algorithm
 Summary
 Resources referred
3
 Problem Definition
Implementation of High Availability and Load
Balancing in SDN
Controllers(POX/FloodLight/OpenDaylight) to try
and introduce open source solution to current
SDN HA problems
 Key terms :
High Availability, Controller Election, Software Defined
Networking(SDN), Fault Tolerance, OpenFlow.
4
Software Defined Networking
Software-Defined Networking (SDN) is an emerging
architecture that is dynamic, manageable,
cost-effective, and adaptable, making it ideal for the
high-bandwidth, dynamic nature of today's
applications.This architecture decouples the
network control and forwarding functions
enabling the network control to become directly
programmable and the underlying infrastructure to
be abstracted for applications and network services.
The OpenFlow® protocol is a foundational element
for building SDN solutions
SDN Architecture
6
State Diagram
7
Class Diagram
8
Data Flow Diagram
9
Approach to Election algorithm
if this.role == NULL then
while this.role == NULL do
multicast this.priority;
check CIBroadcaster.priority;
if no CIBroadcaster || this.priority > CIBroadcaster.priority then
this.role = CIBroadcaster;
this.IP = virtual IP;
else
this.role = backup;
end if
end while
else if this.role == CIBroadcaster then
while this.role == CIBroadcaster do
multicast heartbeat packets
10
Continued...
Listen to new.priority;
if received new.priority then
send this.priority;
if this.priority < new.priority then
this.role = backup;
end if
end if
end while
else if this.role == backup then
listen to heartbeat packets;
if no heartbeat packets then
this.role == NULL;
end if
end if
11
OpenFlow Protocol Specification
•OpenFlow controller communicates with switch
over a secure channel.
•OpenFlow protocol defines message format
•Purpose of control channel: update flow table
•Logic is executed at controller
12
Switch Components
•Flow Table
- All packets compared to flow table for launch
- Actions depend on match being found
- If no match, traffic is sent to controller
13
Actions in POX Controller
•Forward
-ALL : Send out all interfaces, not including the incoming interface
-CONTROLLER: Encapsulate and send to controller
-LOCAL: Send to switch’s local networking stack
-TABLE: Perform actions in flow table. Only for packet-out messages.
-IN PORT: Send the packet out the input port
•DROP
- A flow entry with no specified action indicated that all matching packets
should be dropped.
14
Example DPCTL Control Channel
Dpctl to communicate with switches
•Switches listen on port 6634
•Can inspect flow table entries, modify flows etc
15
Load Balancer
16
Operation
•Load balancer will be placed in between
OpenVSwitch and SDN Controller.
•Load Balancer will play the following part :-
1.Will efficiently balance the load coming from
different switches to different SDN Controllers.
2.Will redirect the route to the slave SDN
Controller in case of SDN Controller failure.
17
Open Flow:Programming not
easy!
Difficult to perform multiple independent
tasks(eg: routing , access control)
OpenFlow is a low level of abstraction.
Controller only sees events for packets
that the switches do not know how to
handle.
Race conditions, if switch level rules are
not installed properly.
18
Solution:”Northbound API”
19
Programming interface that allows applications
and orchestration systems to program the
network.
Uses for NorthBound Interface:
1)High Availability.
2)Load Balancing.
3)Routing
4)Security
20
What LB does?
 Preemptively ask for the mac addresses of all the servers with crafted
arp requests, in order to associate these mac addresses and the
corresponding switch ports with the real IP addresses of the servers.
This query should be performed upon connection establishment with
the switch in order to avoid hanging client flows waiting to be
forwarded to the correct server.The arp replies by the servers will be
handled as part of the packet-In handler (see code skeleton later).
Answer to arp requests from the clients searching the mac of the
service IP, with proxied arp replies that answer with a fake mac that is
associated with the load balancer(you can use 0A:00:00:00:00:01” for
simplicity). It is useful to store the information contained in the arp
request (source mac address of client, input port of arp request
packet). In this way, when the load balancer needs later to direct flows
towards the clients, it will know their macs and ports to output the
packets.
21
 Answer to arp requests from the servers searching the mac of a client IP, with
proxied arp replies that answer with the fake mac that is associated with the load
balancer.At this point you should already know the mac of the client, since it has
previously requested the mac address of the load balancer .
• Redirect flows from the clients towards the servers using the following load
balancing mechanism: for each new IP flow from a client, select a server at random and
direct the flow to this server. Of course, the server should see packets with their mac
address changed to the mac of the load balancer, but with the source client IP intact.
The destination IP address should obviously be rewritten to the one of the server. Be
careful: the redirection should only happen for flows that stem from client IPs (i.e.,
non-server IPs) and which are directed to the service IP.
 Direct flows from the servers to the clients, after rewriting the source IP address
to the one of the service IP and the source mac address to the load balancer fake
mac. In this way, the clients do not see any redirection happening, and they believe
that all their communication takes place between their machines and the service
IP (the load balancing mechanism is transparent).
22
Who will use the
northbound API?
Sophisticated network operators.
Service providers.
Vendors.
Researchers.
...Anyone who wants to develop
capabilities on top of OpenFlow.
23
Benefits of NorthBound API
Vendor independence.
Ability to quickly modify or customize
control through popular programming
languages.
24
Examples of Applications
Large virtual switch.
Security Appications.
Resource management and control.
Middlebox integration.
25
Currently : No Standard
We will look at various APIs and
programming languages.
Each compiles to OpenFlow rules installed
on the switch.
Goals: orchestration to high level services.
26
Summary
Openflow is a southbound API technology
that provides control over switches.
It makes it possible to program networks
but it does not make it easy.
Northbound API can help:
1)Sophisticated events.
2)Composition of policies.
3)Event handling.

High Availability and Load Balancing of SDN Controllers

  • 1.
    High Availability andLoad Balancing of SDN Controllers Project Guide- Prof.P.A. Jain -Shrikant Auti -Ankit Rao -Gauri Sabnis -Akhil Koul 1
  • 2.
    2 Index  Problem Definitionand Key Terms  SDN  State Diagram  Class Diagram  Data Flow Diagram  Approaches to Election Algorithm  OpenFlow Protocol Specification  Switch Components  Actions in POX Controller  Example DPCTL Control Channel  Load Balancer  OpenFlow Programming  NorthBound API  Benefits  Applications  Learning Switch and Algorithm  Summary  Resources referred
  • 3.
    3  Problem Definition Implementationof High Availability and Load Balancing in SDN Controllers(POX/FloodLight/OpenDaylight) to try and introduce open source solution to current SDN HA problems  Key terms : High Availability, Controller Election, Software Defined Networking(SDN), Fault Tolerance, OpenFlow.
  • 4.
    4 Software Defined Networking Software-DefinedNetworking (SDN) is an emerging architecture that is dynamic, manageable, cost-effective, and adaptable, making it ideal for the high-bandwidth, dynamic nature of today's applications.This architecture decouples the network control and forwarding functions enabling the network control to become directly programmable and the underlying infrastructure to be abstracted for applications and network services. The OpenFlow® protocol is a foundational element for building SDN solutions
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
    9 Approach to Electionalgorithm if this.role == NULL then while this.role == NULL do multicast this.priority; check CIBroadcaster.priority; if no CIBroadcaster || this.priority > CIBroadcaster.priority then this.role = CIBroadcaster; this.IP = virtual IP; else this.role = backup; end if end while else if this.role == CIBroadcaster then while this.role == CIBroadcaster do multicast heartbeat packets
  • 10.
    10 Continued... Listen to new.priority; ifreceived new.priority then send this.priority; if this.priority < new.priority then this.role = backup; end if end if end while else if this.role == backup then listen to heartbeat packets; if no heartbeat packets then this.role == NULL; end if end if
  • 11.
    11 OpenFlow Protocol Specification •OpenFlowcontroller communicates with switch over a secure channel. •OpenFlow protocol defines message format •Purpose of control channel: update flow table •Logic is executed at controller
  • 12.
    12 Switch Components •Flow Table -All packets compared to flow table for launch - Actions depend on match being found - If no match, traffic is sent to controller
  • 13.
    13 Actions in POXController •Forward -ALL : Send out all interfaces, not including the incoming interface -CONTROLLER: Encapsulate and send to controller -LOCAL: Send to switch’s local networking stack -TABLE: Perform actions in flow table. Only for packet-out messages. -IN PORT: Send the packet out the input port •DROP - A flow entry with no specified action indicated that all matching packets should be dropped.
  • 14.
    14 Example DPCTL ControlChannel Dpctl to communicate with switches •Switches listen on port 6634 •Can inspect flow table entries, modify flows etc
  • 15.
  • 16.
    16 Operation •Load balancer willbe placed in between OpenVSwitch and SDN Controller. •Load Balancer will play the following part :- 1.Will efficiently balance the load coming from different switches to different SDN Controllers. 2.Will redirect the route to the slave SDN Controller in case of SDN Controller failure.
  • 17.
    17 Open Flow:Programming not easy! Difficultto perform multiple independent tasks(eg: routing , access control) OpenFlow is a low level of abstraction. Controller only sees events for packets that the switches do not know how to handle. Race conditions, if switch level rules are not installed properly.
  • 18.
  • 19.
    19 Programming interface thatallows applications and orchestration systems to program the network. Uses for NorthBound Interface: 1)High Availability. 2)Load Balancing. 3)Routing 4)Security
  • 20.
    20 What LB does? Preemptively ask for the mac addresses of all the servers with crafted arp requests, in order to associate these mac addresses and the corresponding switch ports with the real IP addresses of the servers. This query should be performed upon connection establishment with the switch in order to avoid hanging client flows waiting to be forwarded to the correct server.The arp replies by the servers will be handled as part of the packet-In handler (see code skeleton later). Answer to arp requests from the clients searching the mac of the service IP, with proxied arp replies that answer with a fake mac that is associated with the load balancer(you can use 0A:00:00:00:00:01” for simplicity). It is useful to store the information contained in the arp request (source mac address of client, input port of arp request packet). In this way, when the load balancer needs later to direct flows towards the clients, it will know their macs and ports to output the packets.
  • 21.
    21  Answer toarp requests from the servers searching the mac of a client IP, with proxied arp replies that answer with the fake mac that is associated with the load balancer.At this point you should already know the mac of the client, since it has previously requested the mac address of the load balancer . • Redirect flows from the clients towards the servers using the following load balancing mechanism: for each new IP flow from a client, select a server at random and direct the flow to this server. Of course, the server should see packets with their mac address changed to the mac of the load balancer, but with the source client IP intact. The destination IP address should obviously be rewritten to the one of the server. Be careful: the redirection should only happen for flows that stem from client IPs (i.e., non-server IPs) and which are directed to the service IP.  Direct flows from the servers to the clients, after rewriting the source IP address to the one of the service IP and the source mac address to the load balancer fake mac. In this way, the clients do not see any redirection happening, and they believe that all their communication takes place between their machines and the service IP (the load balancing mechanism is transparent).
  • 22.
    22 Who will usethe northbound API? Sophisticated network operators. Service providers. Vendors. Researchers. ...Anyone who wants to develop capabilities on top of OpenFlow.
  • 23.
    23 Benefits of NorthBoundAPI Vendor independence. Ability to quickly modify or customize control through popular programming languages.
  • 24.
    24 Examples of Applications Largevirtual switch. Security Appications. Resource management and control. Middlebox integration.
  • 25.
    25 Currently : NoStandard We will look at various APIs and programming languages. Each compiles to OpenFlow rules installed on the switch. Goals: orchestration to high level services.
  • 26.
    26 Summary Openflow is asouthbound API technology that provides control over switches. It makes it possible to program networks but it does not make it easy. Northbound API can help: 1)Sophisticated events. 2)Composition of policies. 3)Event handling.