Golinelli Master
Golinelli Master
Networking evaluation
approach to distributing load
Using POX, Floodlight and BIG-IP 1600
Emil Sylvio Golinelli
Master’s Thesis Spring
2015
A Software Defined Networking evaluation
approach to distributing load
i
iv
Contents
I Introduction 1
1 Introduction 3
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . .
4
1.3 Thesis Structure . . . . . . . . . . . . . . . . . . . . . . . . . .
5
1.4 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
1.4.1 OpenFlow-Based Server Load Balancing Gone Wild . 6
1.4.2 OpenFlow Based Load Balancing . . . . . . . . . . . . 6
1.4.3 Aster*x: Load-Balancing as a Network Primitive . . .6
1.4.4 Load Balancing in a Campus Network using Soft-
ware Defined Networking . . . . . . . . . . . . . . . . 7
2 Background 9
2.1 The OSI model . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
2.1.1 Layer 1 . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
2.1.2 Layer 2 . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
2.1.3 Layer 3......................................................................................10
2.1.4 Layer 4......................................................................................10
2.1.5 Layer 7......................................................................................10
2.2 Traditional Networks.........................................................................10
2.2.1 Networking devices..............................................................11
2.2.2 Hub.............................................................................................11
2.2.3 Switch........................................................................................11
2.2.4 Router........................................................................................11
2.3 Load balancer......................................................................................12
2.4 Hardware load balancing.................................................................12
2.4.1 F5 hardware load balancer................................................13
2.5 SDN load balancing...........................................................................14
2.6 Software Defined Networking (SDN)...........................................16
2.6.1 Application Layer...................................................................17
v
2.6.2 Control Layer..........................................................................17
2.6.3 Infrastructure Layer.............................................................18
2.7 OpenFlow...............................................................................................18
2.7.1 Network Flows........................................................................19
2.7.2 OpenFlow Flow Table...........................................................20
2.7.3 OpenFlow PipeLine...............................................................20
2.7.4 OpenFlow versions...............................................................22
II The project 31
III Conclusion 47
v
4.2.1 httperf tests............................................................................52
4.2.2 ab tests.....................................................................................52
4.3 Performance test results for the virtual environment..........55
4.3.1 Mininet performance issue................................................55
Appendices 79
A Mininet scripts 81
B Raw data 89
v
vi
List of Figures
i
4.7 Proactive and reactive performance diagram for httperf tests
of few bytes...........................................................................................66
x
4.8 Proactive and reactive performance diagram for httperf tests
of 1MiB...................................................................................................67
i
List of Tables
x
x
Preface
I would like to thank the following people for their support with my
master thesis:
• Desta Haileselassie Hagos for his support and help.
• Kyrre Begnum for providing the hardware load balancers.
• My friends, Arne and Samrin for helping me proof-read my thesis.
Finally, I would like to extend my gratitude to HiOA and UiO for five
rewarding years as a student, and for the opportunity to attend the
network and system administration programme.
x
x
Part I
Introduction
1
Chapter 1
Introduction
1.1 Motivation
3
including what was earlier a job for dedicated hardware into the
network itself. What SDN can achieve may redefine the norm
of how networks
4
are built, as there already is a transition from traditional
networking to SDN with the OpenFlow approach in particular.
However, there are more and more vendors expanding into SDN
and providing their own SDN approaches. In regards to the
computer industry analogy, networks may now run their own
operation system on common hardware, instead of being
limited to a specific provider.
What is good about SDN is that it opens up a possibility for
simplification for network administrators. By reducing the
complexity for the parities involved, it provides an easier way into
the understanding of networking. A way to look at SDN is that it
provides an API for interaction with the network. With such an API,
applications may be available to the end users in such an easy
way as we are getting accommodated to by app stores on our
phones (Johnson, 2012). A fully defined and provisioned SDN
standard can support apps to be installed with a push of a button.
Configuration can therefore be user specific as the SDN framework
handles the complexity. For a business setting up a new service,
the network may be reconfigured with ease instead of weeks of
planning and box-to-box reconfiguring to support the new service.
In summary SDN will shape networking in the following ways
(McKeown, 2011):
1. It will empower the people involved with networking, as it can
be customized to fit local needs and eliminate unneeded
features. It may also include desired features like load
balancing.
2. It will increase the speed of innovation, as it provides
innovation at the speed of which software is developed as in
comparison to hardware development. For instance is rapid
development available in emulated environments like
Mininet, with the ability to push virtualization developed code
directly into the live physical networks with no changes to the
code.
3. It will diversify the supply chain, as more vendors and
software suppliers all can contribute to the same platform.
4. It will build a strong foundation for abstracting the networking
control.
5
only have a limited amount of simultaneously users. If the limit
has been reached, no additional users can access the server.
Load balancing is a solution that enables more users to access
the service, but it is a challenge for network administrators.
6
Today’s solutions works, but it requires expensive dedicated
hardware that does not support fast changes in the network
topology. BIG-IP is some of the working load balancers products
that deliver load balancing via dedicated hardware. These load
balancers come at a hefty price tag and must be replaced when
maximum capacity is reached. A Software Defined Networking
(SDN) load balancer could replace the dedicated hardware, and
instead run on commodity hardware.
8
1.4 Related Work
SDN is a hot topic for research these days; meaning that there are
many published papers about different SDN related investigation.
Some of those that are related to the problem statement is
discussed next.
1
by some of the same authors in 2009 (Handigol, Seetharaman,
Flajslik, McKeown, & Johari, 2009).
1
1
Chapter 2
Background
The OSI model is a model of the layers that are in play in what is
commonly know as the Internet-as-a-Service terminology. In Figure
2.1 the OSI model is shown with information about what is
contained in the different levels. Some of the levels that this thesis
will depend upon will be described in more detail.
2.1.1 Layer 1
2.1.2 Layer 2
1
Figure 2.1: OSI-model (Zito, 2013)
2.1.3 Layer 3
2.1.4 Layer 4
2.1.5 Layer 7
1
This means every device contains their own configuration and
flows. This makes configuration complex and it is therefore hard to
achieve a good network. This also means that when there are
changes to the network, upgrading the devices to accommodate
the increasing load is expensive. This approach has typically been
in conflict with business requirements. That is it being to static, as
it does not allow any interaction with the upper layers of the OSI
model. It also makes the networks very complex, meaning that to
upgrade a system with a new application, may involve rebuilding
parts of the data center to accommodate the innovation (Morin,
2014). The main point to take is that changing the traditional
network structure is time consuming, so that when the change is in
place the business decision to change the network may be out-
dated.
2.2.2 Hub
A network hub is often called a repeater and does not manage any
of the traffic. This means that for any packet coming through, it
sends it out on every other port, except for the port it originated
from (Pacchiano, 2006). A hub works only in the Layer 1 of the OSI
model, so it’s repeating function cause packet collisions which
affect the network capacity (Contemporary Control Systems, 2002).
2.2.3 Switch
2.2.4 Router
1
A router’s job is different from a switch. As the router is typically
used to connect at least two networks like Local Area Networks
(LANs) or Wide
1
Area Networks (WANs). A router is placed in the network as
gateways, which is where two networks meet. Using packet
header information and forwarding tables, a router can determine
the best path to forward a packet (Pacchiano, 2006). Compared to
a unmanaged switch, all routers are configurable in the sense that
they use protocols like IMCP to communicate with other routers in
order to figure out the best route between two hosts (Pacchiano,
2006).
1
Figure 2.2: Load Balancer example for web-traffic balancing
Companies that sell load balancers often call their HDL devices for
Local Traffic Managers (LTM), This is because they manage the
local traffic, as they ship with more features than just direct load
balancing. This is possible because the traffic "flows" through the
LTM device. One of the well-known companies besides CISCO is F5
and their product BIG-IP 1600 is explained in the next section.
According to their sales pitch, the LTM from F5, BIG-IP 1600
series is a powerful traffic management system for enterprises
designed for high performance at an affordable cost. (Armor,
n.d.). It provides intelligent load balancing in addition to advanced
application security, acceleration and optimization (Armor, n.d.). It’s
a powerful solution for improving application performance and
increasing the capacity of existing infrastructure. BIG-IP LTM is a
device used to reduce traffic volumes and minimize the effect of
client connection bottlenecks as well as Internet latency.
2
The BIG-IP 1600 series security feature is described as a
firewall that block attacks while still serving legitimate users. It
provides network and protocol level security for filtering application
attacks. Placing the BIG-IP LTM is recommended at a critical
gateway to the most valuable resources in the network (Armor,
n.d.). Another selling point for the BIG-IP 1600 series is that it
removes single points of failure by dynamic and static load
balancing methods. Some of the available balancing methods are
dynamic ratio, least connections, observed load balancing and
round robin.
The BIG-IP 1600 series is specified to work as a load balancer of
any TCP/IP operating systems like Windows 32-64 bit, Unix based
platforms and Mac OS (F5, n.d.). The specifications of the device is
listed in Table 2.1.
Info Specification
CPU Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz
Cores 2
Connector Type RJ-
45 Ethernet ports 4
Speed 1 Gbps
RAM 4GB
Storage Capacity 160GB
Table 2.1: Specifications for the BIG-IP 1600 series
Some use full commands for the BIG-IP are listed below: Do note
that the LTM device uses one TMM process for each CPU. This
means that the 1600- series has two TMM processes.
2
there has been experiments which involved changing the slices
over time to accommodate load changes. There has however been
some problems with this approach in situations with fluctuation
with the incoming traffic as it takes time for
2
Figure 2.3: SDN Load Balancing in a OpenFlow network using a
Reactive approach.
2
from a request to request basis (case to case basis). This works
by the switches send the first packets to the controller, and then
the controller programs the switches by updating their flow table to
handle the rest of the flow. The problem with this approach is that
it can overload the controller when the network load exceeds the
processing power. It also leads to longer processing time in the
switch for new requests. This means that for short burst of load,
reactive balancing may be too slow to be feasible, but for longer
flows letting SDN run load balancing can be beneficial (Phaal,
2013).
The difference between these modes of operation are explained in
figures
2.3 and 2.4. They show that in a reactive environment nothing
happens until a packet enters the switch, which forwards the
packet to the controller because it does not know what to do with
it. From here the SDN controller has to decide what to do with the
packet before installing a flow in the switch. Now that the switch
has a flow rule of what to do with client1’s packets, it forwards all
incoming packets from client1 to server 2.
In the proactive mode of operation the SDN controller programs the
flow rules into the switch before any packets has been received.
This way when client1 sends a packet the switch just forwards the
packets to server 2, according to the flow rule.
2
(Feamster, Rexford, & Zegura, 2013). The control plane is the
system that makes decisions
2
about where traffic is sent, where as the data plane is the
underlying systems that forward traffic to the decided destination.
Because SDN offers a logically centralized controller, it lets
administrators dynamically adjust the traffic flow for the whole
network to accommodate changing needs. (open networking
foundation, 2015)
Services that can run in the network OS of SDN:
• Routing
• Multicast
• Security
• Access control
• Bandwidth management
• Traffic engineering
• QoS
• Energy efficiency
2
packets in the network. Many controllers exist, but they all
follow the same principle. The interaction with hardware is often
refereed to as the southbound protocol, because it is the layer
below. This makes the control layer the glue that binds the planes
together. The most widespread and talked about southbound
protocol is OpenFlow. There are vendor specific alternatives to
OpenFlow, but they all are common protocols for interaction
between the layers.
2.7 OpenFlow
OpenFlow was the first standard interface between the control and
data plan layers in networking. It aims to ease the work for the
network administrators by implementing a SDN open common
protocol (Feamster et al., 2013).
2
Figure 2.6: OpenFlow enabled network vs traditional
– Protocol
2
2.7.2 OpenFlow Flow Table
Figure 2.7 shows the fields that OpenFlow can match packets
against according to the OpenFlow v1.0 specification (OpenFlow,
2009).
3
in Figure 2.8. The figure
3
Figure 2.8: The pipeline of OpenFlow (OpenFlow, 2013). (a) for the
whole pipeline. (b) for one table in the pipeline
assumes multiple flow tables as the pipeline with only a single flow
table is greatly simplified.
In OpenFlow pipelining the flow tables are sequentially numbered,
starting at 0. The processing of packets always starts at the first
flow table (0), where a packet is match against the flow entries it
contains. Depending on the outcome of the packet processing in
the first table, they other tables may be used (OpenFlow, 2013).
Every packet in OpenFlow has an action set associated with it. This
is by default empty and follows the packet through the whole
pipeline process as shown in Figure 2.8. The action set can be
modified by flow entries, accommodating changes until it reaches
the execute action at the end of the pipeline. When a flow table
processes a packet, it is matched against the flow entries of that
flow table. If a matching flow entry is found, the actions set
(instructions) for that flow entry is executed. A instruction may
contain the use of the GotoTable action where the packet is sent to
another table where the same process happens again. Do note
that the GotoTable action may only direct a packet to a flow table
with a lager table number than itself. This means that the pipeline
processing cannot go backwards only forward. Obviously, then for
the last table there cannot be any GoToTable instructions. If there
is not any GotoTable instructions in a flow table that matches for a
specific packet, the pipeline processing stops and executes the
action set it has acquired so far (OpenFlow, 2013).
On the other hand, if a packet does not match any flow entries in a
flow table it is a table miss. What a switch should do with
3
missed packets
3
depends on the configuration in the form of a table miss flow entry.
These options for the switch are to drop the packet, pass them to
another table or send them to the controller (OpenFlow, 2013).
Because a switch that runs the OpenFlow protocol has it’s decision
making taking away from it, it differs from a normal switch. In a
way this simplifies the switches as they don’t think for them self,
but rather have their decisions taken by a central controller.
(Limoncelli, 2012). Every OpenFlow switch has to have the support
of at least one flow table, which is changed by the controller via
add, delete or update. A flow table contains flows; namely a rule for
a specific packet occurrence. These flow rules specify what to
do with a packet if it matches the criteria of the flow rule.
3
support very fine grained control, there may be many rules
required and running out of TCAM space to store the rules is a
problem.
2.9.1 POX
3
• openflow.spanning_tree: This component uses the
information from the openflow.discovery component to
provide a loop free network. It works sort of a Spanning Tree
protocol, but it is not the exact same thing.
2.9.2 Floodlight
2.10 Testbeds
3
As OpenFlow enabled devices are not common hardware at the
University of Oslo, working with SDN networking will require a
virtual environment
3
Figure 2.9: Floodlight GUI at start
2.10.1 Mininet
2.11.1 Iperf
2.11.2 Wireshark
2.11.3 Tcpdump
4
command line tool. It runs on most Linux systems and will be used
on the individual virtual hosts in Mininet to analyze network
behavior.
4
Figure 2.10: WireShark GUI with OpenFlow traffic packets captured
For this thesis VirtualBox will be used to run the Mininet image on a
OSX host computer.
4
2.11.5 ethstats
This tool is useful for the Mininet installation, as it allows for quick
overview of Ethernet statistics for the whole network.
2.11.6 httperf
Of these options the rate will be the most important, but without
setting the others it is not possible to achieve a correct test.
Below is an explanation of the outputted information from httperf:
• Num-conns: The total number of requests to send.
4
2.11.7 ApacheBench (ab) - Apache HTTP server
benchmarking tool
4
4
Part II
The project
4
Chapter 3
3
is installed as a Virtual Machine in VirtualBox. The specifications for
the virtual environment are shown in Table 3.1.
Type Specification
VirtualBox version 4.3.20
Mininet version 2.2.0
Virtual OS Ubuntu 14.04
Virtual RAM 1 GB
Virtual HDD 8 GB
Virtual NIC 1 Bridged
Adapter Amount of CPU’s 1
Host OS OS X 10.10
Switch Type OpenVswitch
Table 3.1: Specifications for the virtual environment
sudo mn
sudo mn --controller=remote,ip=127.0.0.1,port=6633
3
3.1.1.1 Limitations and solutions of the virtual environment
3
and the complexity is increased, the overall performance is slower
as you add more servers, which is normally not a desired result.
To overcome this problem every virtual hosts in the Mininet
environment must have a CPU limit parameter. We aim to achieve
around 10 % CPU allocation for each host, this means that 1 server
can throughput 10 percent of the CPU and 2 servers 20 percent.
This means that when adding servers the resource allocation works
like a physical setup.
The suggested parameters for host configuration are finalised in
the network boot script, but below are the parameters just for CPU
limit:
3
the next section covers the steps on
3
Figure 3.2: Final hardware setup.
First, before any commands for VLAN tagging can be run, the
interface file has to be configured for VLAN tagging with it’s VLAN
ID. Below is an example of how the interface file looks like on client
1:
/etc/networking/interface content for VLAN enabled NIC
auto eth0.20 # 0.20 -> VLAN id = 20 on eth0
iface eth0.20 inet static address 10.20.0.11
# eth0.20 to static IP
netmask 255.255.255.0 vlan-raw-device
# address
eth0 of eth0.20
# netmask /24
# what physical device eth0.20 is for
4
3.2.2 GUI configuration of BIG-IP 1600
• 1.2: Client 2
• 1.3: Server 1
• 1.4: Server 2
Which clients and servers that are installed on which ports are
important in regards to the VLAN setup of the BIG-IP. This is
because they are going to be on separated VLANs and the VLANs
are tagged to specific ports. The two VLANs are public and
private, with the private VLAN containing servers, and the public
contain the clients.
• Private, VLAN tag = 10, subnet 10.0.0.0. Ports = 1.3, 1.4
There are two parts needed to be setup for load balancing, which
both are a part of the Local Trafic settings of BIG-IP:
• Virtual IP: An IP clients queries for their requests, but not
actually bound to a server.
4
• Backend pool: The servers responding to a request sent to
the virtual IP.
4
Hostname: emilload.master.no IP Address:
Date: 192.168.0.200
Jan 4, 2002User: admin Log out
Partition: Common
Time: 2:08 AM (CET)Role: Administrator
Unit: Active
General Properties
Templates and Wizards Name bridge
Create common application traffic and system configurations.
Partition Common
Local Traffic
Configuration
Control the delivery of application traffic for a local area network.
Members: Available:
private public
<<
Network VLANs
Interfaces Routes Self IPs
Packet Filters Rate Shaping Spanning Tree Trunks
Route Domains VLANs >>
ARP
Transparency Mode Translucent
Migration Keepalive
MAC Masquerade
Unit: Active
Properties
Overview
Access statistics, performance graphs, and links to helpful tools.
Configuration
Templates and Wizards IP Address
10.0.0.50
Create common application traffic and system configurations.
Partition
Common
255.255.255.0
Netmask
Local Traffic
VLAN
Control the delivery of application traffic for a local area network. bridge
Port Lockdown Allow Defaul
Network
Update Cancel Delete
Interfaces Routes Self IPs
Packet Filters Rate Shaping Spanning Tree Trunks
Route Domains VLANs
ARP
The settings for the Backend Pool is found under the menu "Local
Traffic ›› Pools : Pool List" which covers the backend (pool) setup.
In this example, even though the name of the pool can be generic
it is named "Backend- servers". Here there are two parts that
completes the pool, the properties of the pool and the members
it have. The first settings page as shown in
4
Figure 3.5: Inner workings of the F5 VLAN bridge and the Load
Balancing module.
Figure 3.6 is important because the BIG-IP needs to know that the
backend servers are working before it forwards any requests to
them. So unless it is not configured correctly the load balancing
won’t function.
Unit: Active
General Properties
Templates and Wizards Name Backend-servers
Create common application traffic and system configurations.
Partition Common
Local Traffic
Availability Available (Enabled) - The pool is available
Configuration: Basic
Network
VirtualMap
Servers Active Available
http tcp gateway_icmp http_test https
<<
Health Monitors
Profiles
iRules
>> https_443 inband
Pools
Update Delete
Nodes
Monitors
Traffic Class SNATs
SSL Certificates
Network
Configure network elements for routing and switching.
The second most important part is the Virtual IP, for this example
the IP chosen is 10.20.0.100, and the name for it’s configuration is
Virtuel-server-
4
Hostname: emilload.master.noDate: Jan 4, 2002User: admin
Partition: Common Log out
IP Address: 192.168.0.200Time: 2:46 AM (CET)Role: Administrator
Unit: Active
Properties MembersStatistics
Overview
Welcome
Traffic Summary Performance Statistics Dashboard
Load Balancing
Round Robin
Load Balancing
Priority Group Method
Activation Disabled
Update
100. Do note that the IP is part of the public VLAN as that is where
the clients are connected, as they are the machines that will be
using the Virtual IP. The complete set up for this is shown in Figure
3.8, which is the first settings page. Here it is configured for
Standard load balancing on port 80, but other ports or protocols
can be selected. The second page "resources" is not shown, but
on this page the backend "Backend-servers" is selected as those
servers should respond to requests at this virtual IP.
Reactive gives more fine grained control, but are limited by the
processing power of the controller and slowing down every request.
In contrast to proactive that gives less control, but limits the use of
processing power and request completion time. Depending on the
network, using both modes for different setups/services may be
beneficial. As for some services it may be acceptable with
higher strain on the controller if it copes with network changes
better. Finding out how the two modes behave will be part
of the process of determining how SDN-based load balancing
functions in comparison to a hardware solution.
4
Hostname: emilload.master.no IP Address:
Date:192.168.0.200
May 6, 2015 Time: 12:20
User:
AM (CEST)
admin
Role: Administrator Log out
Partition: Common
Unit: Active
Main Help About Local Traffic ›› Virtual Servers : Virtual Server List ›› Virtuelserver100
General Properties
Templates and Wizards Virtuel-server-100
Name
Create common application traffic and system configurations.
Partition
Common
State
Service Port Enabled
Configuration: Basic
Standard
Type TCP
OneConnect Profile
Protocol None
NTLM Conn Pool
None
HTTP Profile
None
Network
Configure network elements for routing and switching. None
SSL Profile (Client)
FTP Profile None
SSL Profile (Server)
None
POX has been chosen over NOX as it is the latest controller for
scientific research recommended by the developers of both
controllers. As POX is Python-based, it officially requires Python 2.7.
Newest version is the eel branch which is available at GitHub, but
the carp version that ships with Mininet is updated. This means that
the latest branch will need to be manual downloaded and used
for tests in this thesis. The default port for a POX controller is 6633
which therefore should be included in the mn startup command.
The startup command is described in the 3.1.1 section. POX can
be started as a l2 learning switch SDN controller with the following
terminal command:
4
POX start
./pox.py forwarding.l2_learning
To run the POX controller with the load balancer module, the
following command should be executed from the pox directory. Do
note that –ip is for the virtual server address and the –servers
parameter is for the actual servers. There are no port options as
this load balancer works in Network layer of the OSI model as
shown in Figure 2.1.
POX load balancer example
sudo mn --controller=remote,ip=127.0.0.1,port=6653
4
Listing 3.3: Configure load balancing
1 #! / bin / sh
2 c u r l −X POST −d ’{ " i d " : " 1 " , "name" : " vip 1 " , " p r o to c o l " : " tcp " , " ad d re s s " : "
'→ 1 0 . 0 . 0 . 1 0 0 " , " port " : " 80 " } ’ http :/ / l o c a l h o s t : 8080 / quantum/ v1 . 0 /
'→ v i p s /
3 c u r l −X POST −d ’{ " i d " : " 1 " , "name" : " pool " , " p r o to c o l " : " tcp " , " vip_id " : " 1 "
'→ } ’ http :/ / l o c a l h o s t : 8080 / quantum/ v1 . 0 / p o o l s /
4 c u r l −X POST −d ’{ " i d " : " 2 " , " ad d re s s " : " 1 0 . 0 . 0 . 3 " , " port " : " 80 " , " pool_id " :
'→ " 1 " } ’ http :/ / l o c a l h o s t : 8080 / quantum/ v1 . 0 / members/
5
c u r l −X POST −d ’{ " i d " : " 3 " , " ad d re s s " : " 1 0 . 0 . 0 . 4 " , " port " : " 80 " , " pool_id " :
'→ " 1 " } ’ http :/ / l o c a l h o s t : 8080 / quantum/ v1 . 0 / members/
This sections breaks down the problem statement into tasks that
needs to be completed and in the order they should happen in
order to answer the problems statements.
1. Build and configure the hardware environment, which is
already covered in the approach section.
2. Benchmark the hardware environment for baseline results
3. Determine link speed (bandwidth) parameter for virtual
environ- ment from hardware tests.
4. Build and configure the virtual environment
5. Benchmark reactive SDN solutions (POX vs Floodlight) using
an automated Mininet high-level CLI approach.
6. Develop a proactive solution with focus on performance
4
there are not many complete solutions in the benchmarking world
of client/server relationships. The most widespread ones are over
the HTTP protocol, like the benchmarking tools httperf and ab.
The tests are needed to determine the improvement for the load
balancing scheme in comparison to not running one for both
environments. This means that we must do performance test of
both systems running HTTP- servers. To find out how does not using
load-balance compare to using load-balance. I.E for SDN test
using only load balancing algorithm and then forward algorithm.
For the httperf tests, what defines its rate limit; e.g when is a setup
performing at max capacity, will be when the requested rate is no
longer the same as the response rate. When defining
parameters for httperf, it is intended to set the number of
connections to a number that matches around 60 seconds for
the test to complete. This is to ensure that the tests are more
reliable than using short burst tests at only a few seconds. The
actual performance parameters we are looking for are summarized
in this list:
4
in a scenario where the application fails at a request rate of 50, it
does then have some hard limit in it’s programing, and therefore
increasing the resources would not increase the rate above this
number.
5
• For the virtual environment these are the questions we want
to answer for the scalability of SDN:
3.7 Experiments
This section covers the exact test that are going to be conducted,
that are in direct correlation with answering the problem
statement. Other tests that are used to define network
parameters are not listed here.
1. Small HTTP page test for all setups: Physical,
POX(proactive/reactive), Floodlight(proactive/reactive)
(c) When necessary, e.g results from test 1-2 does not show a
result: load balancing (3 server).
2. Large load e.g big file transfer test for all setups:
Physical, POX(proactive/reactive),
Floodlight(proactive/reactive)
(c) When necessary, e.g results from test 1-2 does not show a
result: load balancing (3 server).
5
Part III
Conclusion
5
5
Chapter 4
As shown in Figure 3.2 the setup have two networks, one routed
through a normal switch and one through the BIG-IP. This test is
primarily about finding out what the actual link speed and latency
of the physical links are, in order to set equivalent parameters in
Mininet. However, as the BIG-IP lacks specialized hardware it is
going to affect the performance. How the performance is affected
is only discovered by testing a normal switch in addition to the BIG-
IP unit. That is why routing through a switch will also be tested as
a comparison.
4.1.0.1 Latency
Latency, measured in ms have been tested using the ping command with
-c parameter 100 in Linux and a average score have been
calculated and plotted into Figure 4.1 for both routes.
4
Latency (ms)
0,414
0,113
BIP-‐IP SWITCH
four clients are pushing the four links it seems that the iperf test is
affected by the latency, so that it does not show the true
throughput.
For a normal gigabit switch the results from iperf shows that a link
is not as fasts as it theoretical limit of 1 Gbps (1000 Mbit/s), but
close at "937 Mbit/s" for both the UDP and TCP tests. This means
that a physical link does 93,7 percent of it’s theoretical limit on a
normal switch. However, you should note that the 1GB link is
pushing one billion bps, but that data transfers are based on some
limiting factors such as frame size, which results in a lower data
throughput.
With regards to latency, the Mininet FAQ states that the link delay
speed should be sat four times lower than what the intended delay
5
is, as a packet travels through four links for a client to server test.
This means that the ping delay of 0.414 ms should be 0.414/4 ≈
0, 1 ms.
5
4.1.1.1 Parameters tested versus the real parameters
5
environment. An example of doing so is shown in the POX Appendix
A.1.
5
4.2 Performance test results for the physical
environ- ment
For the httperf test, it was unable to find the saturation point due to
the fact that it exits with error code "*** buffer overflow detected
***: httperf terminated" when running the following command,
which generates less traffic than the system maximum:
httperf command at overflow parameters
5
httperf --server 10.20.0.100 --uri ’/index.html’ --num-conn 13680 --num-call 100 --rate 228 --
timeout
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
This means that no valid httperf test could be gathered from the
physical environment, as the software has errors in it.
4.2.2 ab tests
5
4.2.2.1 Few bytes test
For two and even three servers in the back end, it is clear that the
initiator is at it’s max capacity. Because increasing the server
pool so that they only operate at 77% capacity (Table 4.2) does not
induce more load on the BIG- IP or provide any significant
increase in performance.≈ This is shown by multiple parameters, as
500 more requests per second is not a significant improvement.
The same ≈ holds true for 3 servers being 1 second faster and
outputting 200 more Kbytes/s. Finally this is backed up by the
fact that the amount of concurrent requests is not increased as
shown in the Table 4.1.
Table 4.2: BIG-IP, results for few bytes (94) CPU load
BIG-IP CPU load HTTP Servers CPU
load:
(1 server) Direct Core1=16%, 100 %
(1 server) Via f5 Core2=16%
Core=1=44%, 100 %
Load balance (2 Core2=44%
Core=1=56%, 92 %
servers)
Load balance (3 Core2=56%
Core=1=56%, 77 %
servers) Core2=56%
Because the initiator fails before the BIG-IP its saturation point is
unknown. As the only proven thing is that the BIG-IP works, as a
load balancer the next thing is the actual saturation of the BIG-IP.
But because the previously tests has shown that the initiator is not
capable alone of pressuring the BIG- IP to the maximum, the next
test was done using three servers and running different -c
parameters until we had enough to draw a line showing where the
BIG-IP most likely would fail.
5
tests this has not been taken into consideration, due to the fact
that available memory is 1400 MB for each core. System usage of
back end servers are also not considered
≈ as it stays below 77% for
all tests. As a final precaution network bandwidth is not an issue
either, as the test at maximum uses approximately 26 MB/s. The
data recorded is for 1-256 increments of 2x, as shown in Figure 4.2.
It increases until -c 64 before at -c128 it stays the same and -c256
degrades the performance. From the calculated line in the
figure, the BIG-IP would be able to load-balance approximately
40000 requests before being at maximum capacity.
30000
GH
I
F
20000
D
10000
B
A
0
0 10 20 30 40 50 60 70 80 90 100
This test was conducted in the same way as for the few bytes
test; by running ab with -concurrency parameter from 1 and up to
32 on a 1 MiB file served by the HTTP backend servers.
Measuring the 1 MiB test for the physical environment reviled that
for this test the Ethernet bandwidth was the limiting factor. This is
shown by multiple parameters in Table 4.3, for instance that the
Mb/s does not increase from 90 MB/s, neither does the BIG-IP CPU
usage and as stated in approach when the RPS is going down the
system is saturated. However, in this case the link is the saturated
5
part, which means that this test won’t explain anything about load
balancing, as there is only one outgoing link to the initiator.
5
Table 4.3: BIG-IP, results for 1 MiB
- c RPS BIG-IP CPU Mb/s (max)
1 63 16 70
2 82 26 88
4 70 25 90
8 66 25 90
16 67 26 90
32 68 25 89
Initially did the script created in Section 4.1.3 boot up the services that
5
needed to run in the environment for it to be complete. However,
what was discovered was that when the HTTP server was started
in this fashion the performance did equal the performance of
manually starting the server via the XTerm CLI window. For our
normal environment two tests are listed below, one for manually
starting the HTTP server (4.2) and one for letting the script
automatically starting it in the background (4.1). The test listed is
with httperf and POX, but both controllers and benchmarking tools
produced the same results.
Listing 4.1: Automatic started
1 Total : c o n n e c t i o n s 2520 r e q u e s ts 830 r e p l i e s 555 te s t −d u rati o n 133 . 878
'→ s
2 Request r a te : 6 . 2 req / s ( 1 6 1 . 3 ms/ req )
3 Erro rs : t o t a l 1965 l i e n t −timo 1965 socket −timo 0 co n n re f u s e d 0
'→ c o n n r e s e t 0
For the automatic test, as shown in Listing 4.1 the rate is well
below the expected performance for this environment at a rate of
20 requests per second, however of the 2520 requests sent 1965 of
them did result in client timeout error in httperf. This is not
acceptable as the expected result is 0 client timeout errors as
shown in the result from the manually started test in Listing
4.2. This means that for all performance tests the HTTP-
servers was started manually as shown in Figure 4.3 to avoid this
limitation.
4.3.1.1 Solution
The solution to this lies within the console output buffer, the
background terminals windows have. Every server or test that runs
in the background must either output no information at all or
redirect all its output to somewhere else than the console, for
instance like a file. This means that the console server like
python’s SimpleHTTPServer cannot be used, as it has no silent
operation mode.
4.3.2.1 Results for tests with a small HTTP page (few bytes)
6
The first test was completed with ApacheBench (ab) and is shown in
Table
4.4. This table is for the results of running no load balance (1 server)
6
and then running the load balancing component for 2 and 3
servers. The final line is for running both components, meaning
that the forwarding component and the load balancing component
are both loaded at the same time. It is included to show a real use
case scenario, as a SDN controller should as a minimum do normal
packet forwarding in addition to load balancing. The ab parameters
shown in the table are explained in the background section at
Section 2.11.7.
Table 4.5: POX Controller, results for few bytes (215) httperf
Num- Request rate asked: Completed Duratio
conns (req/s) rate n
1 Server 2 820 47 46,6 60,54s
2 Servers 4860 81 80,3 60,45s
3 Servers 6000 100 85 70s
both 30 2 1,6 14,5s
For the httperf test, system usage was also recorded. How much
CPU was used is shown in Table 4.6. Do note that the results were
very fluctuating so it is therefore shown as the range they varied
within during the course of the tests. For all tests the switch CPU
usage is very consistent with the request rate being processed, as
it close to doubles as the rate increases from 1 to 2 servers. It
also stays consistent as the rate is only marginally increased from
2 to 3 servers, by only using a bit more CPU. However, for the
controller the load balancing module drastically increases its CPU
6
usage. And because the controller have peaks that uses almost
all the
6
available CPU, the rate does not increase as it did from 1 to 2
servers. The limitation here is therefore the available CPU the
controller have.
This section covers the results gathered from the tests where the
file transferred is much lager than the first test, which was only a
few byte. In this test the file transferred ≈is 1048576 bytes
( 1MB), that is 4877 times lager than 215 bytes for the first test.
This is meant to simulate a scenario for large file transfers or
heavy load on the back-end for each client request. In these
results as shown in Table 4.7, there are no results for both
modules loaded as the test with both modules loaded crashes the
controller application and the following error message is outputted
for the switch:
Error message from OVS
This error message is related to the OVS switch not being able to
talk to the SDN controller. This is because the controller has
stopped responding. In some rare cases the OVS proses ovs-
vswitchd crashes as well because of this error. Do note that for this
test, only the benchmarking tool httperf was used as the few
bytes test has shown that both applications show the same trends.
For the ≈ 1MB test one server was able to serve 2 requests each
second as shown in Table 4.7. When a higher rate of 3 was tested,
it resulted in 2,8 req/s but with almost all requests timing out. The
same applies to the 2 and 3 server tests, so the rates shown in
6
Table 4.7 are the limits for this scenario without errors as described
in the approach.
6
Table 4.8: POX Controller, results for 1 MiB CPU usage httperf
Switch CPU usage Controller CPU usage
% %
1 server 3% 2,5%
2 servers 4% 3,5%
3 servers 5% 4,5%
As shown in Table 4.8, the POX controller uses a low amount of CPU
when the requests are much more intensive on the servers. This is
because it needs to install fewer flow rules than for small HTTP
requests.
Because of the CPU limitations and the transfer time that follows
the 2 MiB test, it is the largest test supported in the virtual
environment. Because performing tests on 3 MiB or more only
results in one server not being capable to transferring the files
without being considered timeouts.
The results from the ≈ 2MB test, shows that the load balancing
algorithm is working. It is increasing the possible rate from 1 for
one server, with 1 for each server that is added. From the raw
output it is able to achieve 1.8,2.8,3.8 as the completed rates when
asking for 2,3,4 on the 1-3 server scenarios, but that results in
more than a 10% error rate for each test, which is not feasible. So
the maximum feasible rate achieved is presented in Table
4.9. In this table it shows some duration differences, but it is
negligible as more results gathered only produces a duration result
average closer to 60 seconds.
6
3 servers 4% 3,5%
6
4.3.3 Floodlight Controller
4.3.3.1 Results for tests with a small HTTP page (few bytes)
The same tests where done for the Floodlight controller as they
were with POX. In Table 4.11 the tool ab was used to
benchmark 1 and 2 servers. Do note that because Floodlight runs
forwarding by default, there is no additional test with both modules
loaded. This is because load balancing is applied on top of the
normal forwarding using a curl script. Running the tests this way is
also the most realistic scenario for using the SDN controller.
The ab results show that running the load balancing module on
top of the forwarding module reduces the service performance
from 40 RPS to 20 RPS. It also reduces the possible concurrent
requests from 500 to 1.
Table 4.12: Floodlight Controller, results for few bytes (215) httperf
Num- Request rate asked: Completed Duratio
conns (req/s) rate n
1 Server 3060 51 50 62
2 Servers 540 9 9 60
3 Servers 540 9 9 60
Floodlight does not stress the CPU according to Table 4.13. It does
however have some high peaks in CPU usage up to 20 % for the
6
load balancing algorithm.
6
Table 4.13: Floodlight Controller, results(few bytes) httperf CPU
percentage Switch CPU usage % Controller CPU
usage %
1 server 30% 10-14%
2 servers 2-4% 5-6% (normal), 10-20% (peak)
3 servers 2-4% 5-6% (normal), 10-20% (peak)
7
Figure 4.4, shows that
7
for POX changing the forwarding module to the load balancing
module does in fact increase the performance of the system as
a load balancer should. This is shown by one server doing 44 RPS
and two servers doing better as the load is shared between them
and that three servers doing approximately one server better in
RPS than two servers. This is consistent with the results from the
physical environment, and the general idea about load balancing.
It is easier to spot in the transfer rate as it increases in clearer
increments from one to three servers as shown in Table 4.4.
120
102
100
POX AB POX HTTPERF
80 FLOODLIGHT AB
85 FLOODLIGHT HTTPERF
44 80
60
40 47 50
20
40 20
20
9 9
0 2 SERVERS
1 SERVER 3 SERVERS
For Floodlight the results in Figure 4.4, are worse than for POX due
to the fact that POX could run one component at at a time.
Because when enabling load balancing on the running Floodlight
environment the performance of adding servers is actually
degraded, which is the opposite of the desired effect. Adding
computing resources should result in performance
≈ gain to be a
viable solution. But Floodlight handles 50 RPS in the ab test for one
server and then degrades the performance of the system when
introducing load balancing down to about 20 RPS. The controller
CPU usage from Table
4.13 shows that the CPU was not fully utilized during the test. This
means that the slowdown in Floodligth is not in the CPU, but as a
hard limit in the software code.
For Floodlight the benchmark tools are not presenting the exact
same numbers, but they do show the same trend. This is only
partially true for POX as the httperf test does not curve the same
way as ab in Figure 4.4. The explanation for these results is that
all virtual hosts have the same 10 % CPU allocation, but because
httperf is a more CPU consuming application than ab. It is not
capable to producing the same pressure as ab is. This is shown by
process monitoring and httperf output detailing the usage split
7
between user and system, which is (user 9.5% system 0.5% total
10.0%) for the 3 server test of httperf. The 10 percent is the limit
the virtual hosts have on the CPU, and it was used by httperf in the
ratio 9.5/0.5.
7
4.3.4.2 Large/intensive HTTP requests
4
POX
3
Floodlight
2
0
1 Server 2 Servers 3 Servers
Figure 4.5: SDN as a Load Balancing algorithm results for large load
7
Appendix A.3. It is compatible and used in conjunction with the
Mininet start up script presented in the Mininet configuration
section. It is used in the next section, which covers the
proactive load balancing benchmark results. For the development
of this script, tcpdump and Wireshark was use to debug the
traffic flows, it was by using these tools we were able to determine
that the order of the commands for the flow rule builder in POX
matter. As during tests packets arrived at the correct machine but
did not have their IP correctly rewritten. This did mean that the
receiving server did not respond to the packets, but the packets
were visible with tcpdump at their networking interface. This is
noted in the script, to avoid any confusion for the users.
For this test 9 data points was captured and standard deviation,
confidence interval at 90 percent using t.test and mean was
calculated. The calculated data is shown in Table 4.16, and from it
it is clear that the completed rate and duration is a reasonable
accurate number as the standard deviation is very low. Our
confidence interval of 60,93661-61,48561 would contain the
average of all the estimates 90% of the time if we continued the
experiment additional times in the exact same way.
As with the other tests, the CPU usage was also recorded and for
one server the switch used 5-7 percent CPU. The controller used
only 0-2 percent CPU at operation as when the rules are installed it
does not need to do any specific actions.
For this test 8 data points was captured and standard deviation,
confidence interval at 90 percent using t.test and mean was
calculated. The calculated data is shown in Table 4.17
The CPU usage for two servers is at this point close to linear at about
11-13
% used by the switch. The controller does not use more CPU than it
7
did for the 1 server test, this means that it stays at 0-2 percent.
7
Table 4.17: Proactive POX httperf test of 2 servers at saturation
point - Request rate requested: 84 (42x2) (req/s), B.2
Num-conns Rate Completed rate Duration
requested:
Standard deviation 84 (42x2) 0,34375 0,080622222
90% CI interval,(t.test) 84 (42x2) 82,99482- 60,23185-
5040(2520x2)
Mean 84 (42x2) 83,75518
83,375 60,31815
61,21111
The test with 1 MiB is presented in Table 4.18. Here the controller
has a low CPU usage at about 0-2 percent. As for the≈switch it uses
2% for
≈ 1 server and 4% for 2 servers. This means that the
switch CPU usage scales with the RPS completed.
The proactive solution where rules are installed into the switch
before a packet arrives gives a linear curve for this test scenario as
shown in Figure
4.6. Because this solution does load balancing based on source IP
for one virtual IP (VIP), there must be on client for each server.
This also means as long as the CPU usage of the system is not
at maximum, it is possible to continue to add new servers and
clients to get more RPS total. One notation is that the CPU usage
of the controller stays at 1% as it does not need to actively
interact with the switches.
As for the test with bigger load, it behaves in the same fashion as
for the small HTTP requests, because increasing servers does
linearly increase the RPS possible.
7
best performance. However, it will require
7
Proac&ve load balancing POX
100 83,375
41,3
12 RPS
10 % CPU Switch
% CPU Controller
6
1 1
1 2 Servers
1 Server
Figure 4.6: Proactive load balancing POX for few bytes in httperf.
Figure in base10, shows relativity between CPU usage of switch
and RPS achieved.
3 Servers
2 Servers
8
As seen in Figure 4.8 the proactive solution is not faster than the
reactive for large loads. This is shown as both solutions
performed at RPS rate of 2 for each server added. It does however
reduce the amount of CPU used by the POX controller from ≈ 3, 5%
down to ≈ 1%.
3
1 Server 1 Server
2
0
POX PROACTIVE POX REACTIVE
8
requests, did both controllers perform in a similar fashion. The POX
controller performs best with only the load balance component
loaded as it doubles the system performance
8
from 1 to 2 servers as load balancer should. What is disappointing
however is that when POX is started in a realistic scenario with
both forwarding and load balancing it can not sustain a feasible
RPS or kbytes/s throughput for both the httperf and ab test. What is
the most surprising about this, is that it is not a system resource
limitation as it only uses a few percent of the CPU, so the limit here
lies within the programing itself. This means that it won’t be a
viable solution in a full-scale environment as adding more
resources would not solve this limitation of the setup. The odds are
further stacked against SDN load balancing as the Floodlight setup
encounters the same limit with both components loaded as POX
did. That unfortunately means that the slight performance
advantage it has is negligible as that is just for the baseline results
without load balancing.
The results for the scenario with large file transfers are where the
controllers show their clear differences. Both components are
loaded on both controllers for this scenario and in these results
POX is actually functioning as a load balancer where as Floodlight is
not. Because POX has a linear expansion curve as shown in Figure
4.5, however for Floodlight in this figure the line is flat. The line
is flat because Floodlight does not manage to increase the RPS for
the large file transfers scenario.
This means that, if choosing between POX and Floodlight that POX
is the obvious choice for large file transfer load balancing. It
however also proves that none of the tested SDN controllers should
be used as a replacement for a dedicated hardware load
balancer for small file transfers/requests. With that in mind it,
from Figure 4.7 it seems feasible to run a proactive load balancer
using the POX controller. Because doing so, the only real limitation
is in the switches themselves and not in the controller. It
would however mean that for it to be used in a production
environment, that it were more advanced so it could handle a
larger variation of incoming clients and automatically distributing
the source IP ranges over the available back-end servers based on
availability.
If the traffic that needs to be load balanced is for large file transfers
or computing heavy requests, so that the amount of concurrent
requests are lower than for instance a typical web page with a high
number of users it seems reasonable to run SDN load balancing but
only as long as there is no forwarding needed. If the network
needs a forwarding controller as well, as a typical production
network does, using SDN load balancing for large requests is not
feasible. As in terms of scalability of the solutions, does the
controllers use the most CPU. This is because the clients and
servers are limited, but the controller application could use as
much CPU as the virtual environment had available. This means
that for a full-scale solution if the controller needs to work in a
reactive mode, the network throughput is solely dependent on the
8
speed of the controller.
8
Chapter 5
The HTTP tests used for benchmarking have produced valid and
intended data. The results are valid because they show clear
patterns of the tested solutions and from the results themselves
there were no surprises. Although, in what the results told when
analysed was surprising with regards to the controllers using
multiple components. Some comparable data is hard to find, as
the BIG-IP does not have a HTTP load balancing rate listed in its
hardware specification sheet. This is also true for the virtual
environment, as the load balancing algorithms have not been
tested in this type of setup. To reproduce the same results for
another researcher would be trivial for the virtual environment, as
it only uses free to use tools. However, for the physical
environment a BIG-IP LTM device would be an expensive hardware
to acquire for the same test.
All the papers explored in the related work section, that had some
success with SDN-based balancing tested unstructured network
topologies, where there is no clear source of client requests. There
were, however no papers that tested a scenario as if SDN could
replace a dedicated hardware load balancer in a structured or
random network. However, this thesis only looks into a
structured network, because that is the main configuration for a
dedicated load balancing unit.
8
cases that it is possible to make predictions about:
8
1. Small requests
2. Big requests
The two last cases, 2 and 3 are possible to merge as they are
similar in the way that the controller only needs installed a few flow
rules. What was shown in the analysis Section 4.5 with regards to
these cases is that SDN- based load balancing is probably not in
the near future going to replace a dedicated unit for case 1.
Because both tested solutions did not handle a high RPS
satisfactorily, and would clearly have some limitations with
respect to system resources. This limitation is based on the fact
that the dedicated unit has a higher CPU to RPS ratio even just
for forwarding, which was what the controllers supported for best
performance.
8
5.1.4 Mininet bug, implications on recorded data
When the 1 and 2 MiB test files where created, it was the intention
to create 1 MB files for the simple denomination. However the
inputted multiplier was 1024 instead of 1000 for the dd command,
resulting in 1 and 2 Mebibyte (MiB) size files. This error was not
uncovered until multiple experiments had been conducted, and
was therefore not corrected. The only implication of this however, is
9
the denominator for the tests as the byte difference does not make
any impact on the test as both controllers were tested using the
same MiB files.
9
5.1.6 Problem statement
The main idea of the problem statement of this thesis was to find
out if SDN-based load balancing could in some way replace a
dedicated LTM unit. For this it also needed to configure an LTM
device to have something to compare the SDN solutions to. This
did however require time which if not needed could have been
spent on benchmarking additional SDN controllers’ load balancing
algorithms.
9
based device to be compared too. The results how- ever
and the process of obtaining them are useful as the
methods could be applied to the understanding and
benchmarking of the virtual systems.
9
3. Compare an SDN load balancer to a hardware load balancer in
terms of scalability and performance.
(a) Performance:
(b) Scalability:
9
as heavily as in the virtual environment.
From the results gathered, it is clear that processing power is the
main limitation of an SDN-based load balancing. This means
that expanding the work into more powerful controller applications
would be a good research field. An example of this is an SDN
controller that can run in a cluster for more processing power. This
could be made possible with the Helium OpenDaylight SDN cluster
and a OpenFlow switch that supports the OpenFlow 1.3.2
specification OFPCR_ROLE_EQUAL, which can set multiple
controllers to control one switch. Another possibility is dividing the
OpenFlow switch into different slices for different network traffic,
like one slice for TCP (HTTP) and the other for IP switching with the
FlowVisor software. This may possibly open up opportunities to
either divide the roles of the controllers so that only one controller
handles load balancing or increase the total throughput for the
controller’s load balancing algorithm. Either solution is an
interesting topic for future research, as they both may make SDN
load balancing viable.
There are many SDN controllers to chose from that supports
load balancing, and while some are commercial grade like Vyatta,
not all are. For instance is the OpenDaylight controller not
commercial, and it comes bundled with a load balancing service.
This means that it is possible to test even more controllers to help
determining if some controllers can replace a dedicated unit.
However, does Mininet not provide a direct comparison between a
physical unit as it a virtualization. So to fully compare the
SDN controllers to a physical unit; using an OpenFlow enables
switch would enable that comparison. Unfortunately it was not an
option during this thesis but it could be for other future projects.
This means that both approaches are good future projects and if
exploring additional controllers in Mininet, the high-level CLI script
that has been developed in this thesis, is a good tool for
benchmarking as only small changes would be required to support
other controllers.
9
Bibliography
9
Ghaffarinejad, A. & Syrotiuk, V. (2014, March). Load balancing in
a campus network using software defined networking. In
Research and educational experiment workshop (gree), 2014
third geni (pp. 75–76). doi:10.1109/GREE.2014.9
Handigol, N., Seetharaman, S., Flajslik, M., Johari, R., &
McKeown, N. (2010, November). Aster*x: load-balancing as
a network primitive. 9th GENI Engineering Conference
(Plenary).
Handigol, N., Seetharaman, S., Flajslik, M., McKeown, N., &
Johari,
R. (2009). Plug-n-serve: load-balancing web traffic using
openflow. Sigcomm Demonstration.
Iperf. (2014). What is iperf? Retrieved January 28, 2015, from
https://iperf. fr/
Jesse. (2015). Bip-ip 1600 vlan bridge performance degradation.
Retrieved March 8, 2015, from
https://devcentral.f5.com/questions/bip- ip- 1600-vlan-bridge-
performance-degradation
Johnson, S. (2012). A primer on northbound apis: their role in a
software- defined network. Retrieved January 30, 2015, from
http://searchsdn. techtarget.com/feature/A-primer-on-
northbound-APIs-Their-role- in-a-software-defined-network
Laboratories, H.-P. R. (n.d.-a). 2 an example of using httperf.
Retrieved from
http://www.hpl.hp.com/research/linux/httperf/wisp98/html/
doc003.html
Laboratories, H.-P. R. (n.d.-b). Httperf(1) - linux man page.
Retrieved from http://linux.die.net/man/1/httperf
Limoncelli, T. A. (2012, June). Openflow: a radical new idea in
networking.
Queue, 10(6), 40:40–40:46. doi:10.1145/2246036.2305856
McCauley, J. (2013). Arp responder.py. Retrieved May 4, 2015, from
https:
//github.com/CPqD/RouteFlow/blob/master/pox/pox/misc/
arp_responder.py
McCauley, M. & Al-Shabibi, A. (2014). Pox wiki. Retrieved February
7, 2015, from https://openflow.stanford.edu/display/ONL/POX+Wiki
McKeown, N. (2011). How sdn will shape networking. Retrieved
February
9, 2015, from https://www.youtube.com/watch?v=c9-
K5O_qYgA Morin, J. (2014). Conflicting trends part 2: sdn and
converged in-
frastructure. Retrieved January 26, 2015, from http : / / www .
extremenetworks . com / conflicting - trends - part - 2 - sdn -
and - converged-infrastructure
NOXRepo.org. (2015). About pox. Retrieved January 29, 2015, from
http:
//www.noxrepo.org/pox/about-pox/
Oliver, B. (2014). Pica8: first to adopt openflow 1.4; why isn’t
anyone else? Retrieved February 7, 2015, from http : / / www.
tomsitpro . com / articles/pica8-openflow-1.4-sdn-switches,1-
1927.html
open networking foundation. (2015). Software-defined networking
9
(sdn) definition. Retrieved January 30, 2015, from https : / /
www . opennetworking.org/sdn-resources/sdn-definition
OpenFlow. (2009). Openflow switch specification. Retrieved
February 4, 2015, from http : / / archive . openflow. org /
documents / openflow - spec-v1.0.0.pdf
9
OpenFlow. (2013). Openflow switch specification 1.3.3. Retrieved
February 4, 2015, from
https://www.opennetworking.org/images/stories/
downloads/sdn-resources/onf-specifications/openflow/openflo
w- spec-v1.3.3.pdf
OpenFlow. (2014). Openflow switch specification 1.5. Retrieved
February 4, 2015, from
https://www.opennetworking.org/images/stories/
downloads/sdn-resources/onf-specifications/openflow/openflo
w- switch-v1.5.0.noipr.pdf
Pacchiano, R. (2006). The difference between hubs, switches and
routers. Retrieved January 27, 2015, from http : / / www.
webopedia . com /
DidYouKnow/Hardware_Software/router_switch_hub.asp
Phaal, P. (2013). Sdn and large flows. Retrieved February 3, 2015, from http:
//blog.sflow.com/2013/02/sdn-and-large-flows.html
Pronschinske, M. (2013). Controllers q&a: nox/pox , trema ,
beacon ,
floodlight , routeflow. Retrieved January 26, 2015, from http : /
/ architects.dzone.com/articles/controllers-qa-noxpox-trema
Richard Wang, J. R., Dana Butnariu. (2011). Openflow-based server
load balancing gone wild. Princeton University.
Rouse, M. (2007). Hardware load-balancing device (hld). Retrieved
Febru- ary 3, 2015, from http : / / searchnetworking .
techtarget . com / definition/hardware-load-balancing-device
Salisbury, B. (2012). Tcams and openflow – what every sdn
practitioner must know. Retrieved February 7, 2015, from
https : / / www . sdxcentral . com / articles / contributed / sdn -
openflow - tcam - need - to-know/2012/07/
Team, M. (2014). Introduction to mininet. Retrieved February 23,
2015, from https : / / github . com / mininet / mininet / wiki /
Introduction - to - Mininet
Team, M. (2015). Mininet overview. Retrieved January 28, 2015, from http:
//mininet.org/overview/
Uppal, H. & Brandon, D. (n.d.). Openflow based load balancing.
University of Washington - Project Report CSE561: Networking.
Retrieved February 11, 2015, from
http://courses.cs.washington.edu/courses/
cse561/10sp/project_files/cse561_openflow_project_report.pdf
Wang, K.-C. (2012). Load balancer. Retrieved February 22, 2015, from http:
/ / www. openflowhub . org / display / floodlightcontroller / Load +
Balancer
Wireshark. (2015). About. Retrieved January 28, 2015, from
https://www. wireshark.org/about.html
Zito, P. (2013). What is the osi model. Retrieved January 27, 2015, from http:
//blog.buildingautomationmonthly.com/what-is-the-osi-model/
1
1
Appendices
1
1
Appendix A
Mininet scripts
8
Listing A.1: POX Mininet
1 #! / u sr / bin / python
2
3 from mininet . topo import Topo
4 from mininet . net import Mininet
5 from mininet . l i n k import TCLink
6 from mininet . c l i import CLI
7 from mininet . node import C o n t r o l l e r
8
9 from mininet . l i n k import TCIntf
10 from mininet . u t i l import custom , quietRun
11 from mininet . node import CPULimitedHost
12 from mininet . l o g import set Log Level , i n f o
13
14
15
16 from f u n c t o o l s import p a r t i a l
17 import os
18
19 c l a s s Single Switch Topo ( Topo ) :
20 " S i n g l e � s w i tch � c onne c te d � to �n� h o s ts . "
21 d e f b u i l d ( s e l f , n=2) :
22 s w i tch = s e l f . add Switch ( ’ s1 ’ )
23 f o r h i n range ( n ) :
24 host = s e l f . addHost ( ’ h%s ’ % ( h + 1 ) )
25 # De f ine network parameters l i k e d e lay and
' speed :
→
26 s e l f . ddLink ( host , switch , bw=820 , d e lay = ’ 0 .
a 07
27 '→ ms ’ , l o s s =0 , use_htb=True )
28
29 class POXload ( C o n t r o l l e r ) :
30 " C o n t r o l l e r � c l a s s � to � s t a r t � the � c o n t r o l l e r "
31 def start( self ):
32 " Sta r t �POX� component� o f � your � c h o i s e : "
33 s e l f . pox = ’% s / pox/ pox . py ’ % os . e n v i ro n [ ’HOME’
]
34 # Forwarding :
35 #s e l f . cmd( s e l f . pox , ’ f o rw ard i n g . l 2 _ l e a r n i n g
&’ )
36 # R ea c ti ve Load b a l a n c e :
37 #s e l f . cmd( s e l f . pox , ’ misc . i p _ l o ad bal an ce r −
ip
'→ = 1 0 . 1 . 2 . 3 − s e r v e r s = 1 0 . 0 . 0 . 2 , 1 0 . 0
.0.3,10.0.0.4
38 # P' → o &’
a v ) Load ba la nc e :
r cti e
39 s e l f . cmd( s e l f . pox , ’ load arp_responder
'→ − − 10 . 0 . 0 . 10 = 00 : 00 : 00 : 00 : 10 : f e f o rw
ard i n g .
' l 2 _ l e a r n i n g &’ )
→
40 d e f stop ( s e l f ) :
41 " Stop �POX"
42 s e l f . cmd( ’ k i l l %’ + s e l f . pox )
43
44 c o n t r o l l e r s = { ’ poxload ’ : POXload }
45
46 d e f s t a r t s t u f f () :
47 # De f ine to p o lo g y ( I . E number o f h o s ts ) :
48 topo = Single Switch Topo ( n=4)
49 # De f ine CPU l i m i t s f o r h o s ts :
50 host = custom ( CPULimitedHost , sched =’ c f s ’ , period_us
=10000 ,
51 # D' → cpu =.025
f in k )
e e networ :
52 # auto SetMacs=True i s e q u i v a l e n t to mac
−
parameter
53 net = Mininet ( topo=topo , l i n k=TCLink , c o n t r o l l e
8
r=POXload ( ’ c0
' ’ , ip=’127.0.0.1’, port =6633 ) , host=host ,
→
auto SetMacs=
54 # S' →r tTrue )rk :
ta netwo
55 net . s t a r t ()
56 # Sta r t te r m i n a l s
57 #net . start Terms ( )
8
58
59 # Sta r t i p e r f s e r v e r s on h3 & h4 ( s e r v e r s ) h3 = net . g e t ( ’ h3 ’ )
60
61 #h3 . cmd ( ’ i p e r f −s & ’)
62 #h3 . cmd ( ’ http −s e r v e r −p 80 −s & ’)
h4 = net . g e t ( ’ h4 ’ )
64 6
65 #h4 . cmd ( ’ i p e r f −s & ’)
66 #h4 . cmd ( ’ http −s e r v e r −p 80 −s & ’)
# I n s e r t benchmark command here :
68 6 # For i n s ta n c e l i k e so : h1 = net . g e t ( ’ h1 ’ )
69
70
71 # h1 . cmd ( ’ h t t p e r f 1 0 . 0 . 0 . 1 0 > l o g f i l e −h t t p e r f . txt ’ )
72 # h1 . cmd ( ’ ab 1 0 . 0 . 0 . 1 0 > l o g f i l e −ab . txt ’ )
# Can be expanded i n to a more automated s c r i p t l o o k i n g f o r
7 '→ s a tu r a t i o n ,
74 # f o r i n s ta n c e to run a s e p a r a te s a tu r a t i o n f i n d i n g s c r i p t :
75 # h1 . cmd ( ’ . / s a tu r a t i o n . py −s 1 0 . 0 . 0 . 1 0 −u "/ index . html " −c 1 −
'→ o POX−f orward Test . dat ’ )
76 # S ta r ts the CLI , remove to q u i t the network a f t e r t h i s l i n e .
77
'→ ( f o r example i f automated t e s t i s done ) :
78 CLI( net )
79 # K i l l s the network net . stop ( )
80
81 if name== ’ main ’ :
82 s e t Lo g Le v e l ( ’ i n f o ’ ) s t a r t s t u f f ( )
83
84
8
Listing A.2: Floodlight Mininet
1 #! / u sr / bin / python
2
3 from mininet . topo import Topo
4 from mininet . net import Mininet
5 from mininet . l i n k import TCLink
6 from mininet . c l i import CLI
7 from mininet . node import C o n t r o l l e r
8
9 from mininet . l i n k import TCIntf
10 from mininet . u t i l import custom , quietRun
11 from mininet . node import CPULimitedHost
12 from mininet . l o g import set Log Level , i n f o
13
14
15 from f u n c t o o l s import p a r t i a l
16 import os
17
18 c l a s s Single Switch Topo ( Topo ) :
19 " S i n g l e � s w i tch � c onne c te d � to �n� h o s ts . "
20 d e f b u i l d ( s e l f , n=2) :
21 s w i tch = s e l f . add Switch ( ’ s1 ’ )
22 f o r h i n range ( n ) :
23 host = s e l f . addHost ( ’ h%s ’ % ( h + 1 ) )
24 # De f ine network parameters l i k e d e lay and
' speed :
→
25 s e l f . ddLink ( host , switch , bw=820 , d e lay = ’ 0 .
a 07
26 '→ ms ’ , l o s s =0 , use_htb=True )
27 class Floodload ( C o n t r o l l e r ) :
28 def start( self ):
29 " Sta r t � Fl o o d l i g h t � c o n t r o l l e r "
30 s e l f . pox = ’ bash %s / f l o o d l i g h t / f l o o d l i g h t . sh ’
% os .
31 s e l 'f →ce n v i ro n
p [ ’HOME’ ]
. md( s e l f . ox , ’ ’ )
32 d e f stop ( s e l f ) :
33 " Stop �POX"
34 s e l f . cmd( ’ k i l l %’ + s e l f . pox )
35
36 controllers = { ’floodload ’: Floodload }
37
38 def s t a r t s t u f f () :
39 # De f ine to p o lo g y ( I . E number o f h o s ts ) :
40 topo = Single Switch Topo ( n=4)
41 # De f ine CPU l i m i t s f o r h o s ts :
42 host = custom ( CPULimitedHost , sched =’ c f s ’ , period_us
=10000 ,
43 # D ' fcpu =.025 k )
→in
e e networ :
44 net = Mininet ( topo=topo , l i n k=TCLink , c o n t r o l l e
r=Floodload ( ’
45 # S' → r tc0 ’ , i p = ’ 1 2 7 . 0 . 0 . 1 ’ , port =6653 ) , host=host )
ta network :
46 net . s t a r t ()
47 # Sta r t te r m i n a l s :
48 #net . start Terms ( )
49
50 # Sta r t i p e r f s e r v e r s on h3 & h4 ( s e r v e r s )
51 h3 = net . g e t ( ’ h3 ’ )
52 #h3 . cmd ( ’ i p e r f −s & ’)
53 #h3 . cmd ( ’ http −s e r v e r −p 80 −s & ’)
55 5 h4 = net . g e t ( ’ h4 ’ )
56 #h4 . cmd ( ’ i p e r f −s & ’)
57 #h4 . cmd ( ’ http −s e r v e r −p 80 −s & ’)
8
60 # For i n s ta n c e l i k e so :
61 h1 = net . g e t ( ’ h1 ’ )
8
62 # h1 . cmd ( ’ h t t p e r f 1 0 . 0 . 0 . 1 0 > l o g f i l e −h t t p e r f . txt ’ )
63 # h1 . cmd ( ’ ab 1 0 . 0 . 0 . 1 0 > l o g f i l e −ab . txt ’ )
# Can be expanded i n to a more automated s c r i p t l o o k i n g f o r
6 '→ s a t u r a t i o n .
65 # S ta r ts the CLI , remove to q u i t the network a f t e r t h i s l i n e .
66
'→ ( f o r example i f automated t e s t i s done ) :
67 CLI( net )
68 # K i l l s the network net . stop ( )
69
70
71
72 CLI( net ) net . stop ( )
73
74 if name== ’ main ’ :
75 s e t Lo g Le v e l ( ’ i n f o ’ ) s t a r t s t u f f ( )
76
77
8
Listing A.3: Load Component POX
1 #! / u sr / bin / python
2 ’’’
3 Parameter f o r arp_responder i s to bind a V i r tu a l IP to a HW addr
.
4 Sta r t with . / pox . py load arp_responder − − 10 . 0 . 0 . 10 = 00 : 00 :
00 : 00 : 10 : f e
8
57 msg . match . nw_src = " 1 0 . 0 . 0 . 3 "
58 msg . p r i o r i t y = 65535
59 msg . match . dl_type = 0 x800
60 msg . match . dl_ src = EthAddr ( " 0 0 : 0 0 : 0 0 : 0 0 : 0 0 : 0
3")
8
61
62 msg . match . nw_proto = 6 msg . match . tp_src = 80
63
64 msg . match . in_port = 3
65 msg . a c t i o n s . append ( o f . ofp_action_dl_addr . s e t_ s rc (
66
67
'→ EthAddr ( " 0 0 : 0 0 : 0 0 : 0 0 : 0 0 : 1 0 " ) ) )
68 msg . a c t i o n s . append ( o f . ofp_action_nw_addr . s e t_ s rc ( msg . a c t i o n s . append ( o f . ofp_action_output (
c l a s s ConnectionDown'→ ( Event
IPAddr) :( " 1 0 . 0 . 0 . 1 0 " ) ) )
69 d e f __init__( s e l f , connection , ofp ) : Event . __init__( s e l f )
70 s e l f . co n n e cti o n = co n n e cti o n s e l f . dpid = co n n e cti o n . dpid
71
72
73
74
75
76
77
78
79 c l a s s MyComponent( o b je c t ) :
80 d e f __init__( s e l f ) :
81 co r e . openflow . a d d L i s te n e r s ( s e l f )
82
83 d e f _handle_ConnectionUp ( s e l f , event ) : ConnectionUp ( event . connection , event . ofp )
84 l o g . i n f o ( " Switch �%s � has �come�up , � and� i n s t a l l e d � the �
85 '→ r u l e s " , dpid_to_str ( event . dpid ) )
d e f _handle_ConnectionDown ( s e l f , event ) : ConnectionDown ( event . connection , event . dpid )
86 l o g . i n f o ( " Switch �%s � has � shutdown . " , dpid_to_str ( event .
87 '→ dpid ) )
88 d e f launch ( ) :
89 co r e . re g i s te r N e w ( MyComponent)
90
91
92
9
9
Appendix B
Raw data
For some tests where the data was collected out of normal 3 test
average scenario, their result is presented here:
9
Table B.1: Proactive POX httperf test of 1 server-raw
Httperf: (60*R=Num- Request rate asked: Compleded Duration
1 conns)
2520 (req/s)
42 rate
41,1 61,3
2 2520 42 40,9 61,6
3 2520 42 41 61,4
4 2520 42 42,2 61,2
5 2520 42 40,8 61,7
6 2520 42 41,4 60,9
7 2520 42 41,1 61,3
8 2520 42 41,8 60,2
9 2520 42 41,1 61,3
Standard deviation 0,355555556 0,296296296
90% CI interval 40,98262- 60,93661-
(t.test)
Mean 41,5507
41,26667 61,48561
61,21111
9
Table B.2: Proactive POX httperf test of 2 servers-raw
Httperf: (60*R=Num- Request rate asked: Compleded rate Duration
1 conns)
2520 (req/s)
42x2 83,5 60,31
2 2520 42x2 83,6 60,38
3 2520 42x2 83,5 60,29
4 2520 42x2 82 60,24
5 2520 42x2 83,8 60,37
6 2520 42x2 83,6 60,22
7 2520 42x2 83,6 60,16
8 2520 42x2 83,4 60,13
1 60,1
2 60,2
3 60,34
4 60,35
5 60,24
6 60,26
7 60,45
8 60,36
Standard deviation 0,34375 0,080622222
90% CI interval 82,99482- 60,23185-
(t.test)
Mean 83,75518
83,375 60,31815
60,275