Shaheer Pervaiz Masters of Networking and Telecommunication Engineering
Shaheer Pervaiz Masters of Networking and Telecommunication Engineering
Shaheer Pervaiz Masters of Networking and Telecommunication Engineering
Shaheer Pervaiz
Masters of Networking and Telecommunication Engineering
I am greatly indebted to our project supervisor Robert Abbas. Without his personal
supervision, advice and valuable guidance, completion of this project would have
been doubtful. We are deeply indebted to them for their encouragement and continual
help during this work.
And we are also thankful to our parents and family who have been a constant source
of encouragement for us and brought us the values of honesty & hard work.
Statement of candidate
I, Shaheer Pervaiz, declare that this report, submitted as part of the requirement for
the award of Bachelor of Engineering in the School of Engineering,
Macquarie University is entirely my own work unless otherwise referenced or
acknowledged. This document has not been submitted for qualification or assessment
an any academic institution
Student’s name:
Shaheer Pervaiz
Student’s Signature:
ACKNOWLEDGMENTS 1
Contents 3
Chapter 1 Introduction 5
2.1 SDN 7
Chapter 4 Result 28
Chapter 5 Conclusion 32
References 33
5
Chapter 1 Introduction
The main purpose of load balancing is to prevent any single server from getting
overloaded and possibly breaking down. In other words, load balancing improves
service availability and helps prevent downtimes. A load balancer is typically used to
distribute network or application traffic to multiple servers. The purpose of using a
load balancer is to enhance the performance of a network significantly by increasing
the throughput, minimizing the response time and delay and efficient utilization of
available resources.
This article is divided into five chapters, the chapters are organized as follows:
Chapter 1 briefly describes the research background and significance of the research,
the main research content, the research purpose and the structure of the article;
Chapter 2 the second chapter is the background and literature review. Firstly, the
origin, research background and research significance of Software defined networking
and its uses in load balancing are put forward. Then it introduces the research
progress of the current load balancing methods and summarizes the advantages and
disadvantages of each method.
Chapter 3 is the system design and architecture section. That design section starts
from the concept design that introduces our load balancing algorithm and
programming software.
Chapter 4 is the result section that is corresponding to chapter 3. Based on the
experimental data, the feasibility and effectiveness of the framework and algorithm of
the system are proved.
Finally, we have summarized the work of this project.
7
Review
The idea of programmability is the basis for the most precise definition of what SDN
is: technology that separates the control plane management of network devices from
the underlying data plane that forwards network traffic.
The driving ideas behind the development of SDN are myriad. For example, it
promises to reduce the complexity of statically defined networks; make automating
network functions much easier; and allow for simpler provisioning and management
of networked resources, everywhere from the data center to the campus or wide area
network. Separating the control and data planes is the most common way to think of
what SDN is, but it is much more than that, said Mike Capuano, chief marketing
officer for Pluribus. “At its heart SDN has a centralized or distributed intelligent
entity that has an entire view of the network, that can make routing and switching
decisions based on that view,” Capuano said. “Typically, network routers and switches
only know about their neighboring network gear. But with a properly configured SDN
environment, that central entity can control everything, from easily changing policies
to simplifying configuration and automation across the enterprise.”
2.1 SDN
Traditionally, both the SDN control plane and data plane elements of a networking
architecture were packaged in proprietary, integrated code distributed by one or more
proprietary vendors. The OpenFlow open-source standard, created in 2008, was
8
recognized as the first SDN architecture that defined how the control and data plane
elements would be separated and communicate with each other using the OpenFlow
protocol. The Open Network Foundation (ONF) is the body in charge of managing
OpenFlow standards. There are other standards and open-source organizations with
SDN resources, so OpenFlow is not the only protocol that makes up SDN.
help in virtualizing the networks that will be created on top. These virtual networks
are mapped to existing physical networks. Network Virtualization was very much
needed since server virtualization brought revolution in the IT industry to virtualize
storage and computing entities, something which played a key role in efficiently
utilizing resources. Similarly, network elements in traditional networks are highly
expensive with endless features, but those features were not getting completely
utilized, and that’s the problem SDN aims to solve.SDN at its core and as a one-liner,
is nothing but separation of control plane from data plane (or forwarding plane) in
traditional network elements (switches, routers). For the uninitiated, a control plane is
the intelligent logic in network equipment that controls how the data traffic (that’s
hitting the equipment) is managed and handled. On the other hand, a data plane is the
forwarding plane which manages forwarding/manipulating/dropping of the network
data traffic. You can also understand about control planes and data planes here.With
this separation, core intelligence of network elements (i.e. control plane) can be
moved to a central place which usually carries any of the following monikers: ‘control
system’, ‘controller,’ or ‘network operating system’.
10
SDN Controller is the Center of the SDN Architecture and the most important one of
SDN Architecture Components. In other words, the SDN Controller is the brain of the
system. The control of all the data plane devices are done via SDN Controller. It also
controls the Applications at Application Layer. SDN Controllers communicate and
control these upper and lower layers with APIs through Interfaces.
11
Data Plane consists of various Network devices both physical and Virtual. The main
duty of a data plane is Forwarding. In the previous traditional networks, both control
and data plane were in the same device. But with SDN, network devices only have
data planes. So, the main role of these network devices is only Forwarding the data.
This provides a very efficient Forwarding mechanism.
branch office or service provider central office, said Michael Bushong, vice president
of enterprise and cloud marketing at Juniper Networks. “Naturally these places
require remote and centralized delivery of connectivity, visibility and security. SDN
solutions that centralize and abstract control and automate workflows across many
places in the network, and their devices, improve operational reliability, speed and
experience,” Bushong said.
you do all of this on top of white boxes, deployments can be 30 – 60 percent cheaper
than traditional gear.” The ability to look at a set of workloads and see if they match a
given security policy is a key benefit of SDN, especially as data is distributed, said
Thomas Scheibe, vice president of product management for Cisco’s Nexus and ACI
product lines. "The ability to deploy a whitelist security model like we do with ACI
[Application Centric Infrastructure] that lets only specific entities access explicit
resources across your network fabric is another key security element SDN enables,".
A growing number of SDN platforms now support microsegmentation, according to
Casemore. “In fact, micro-segmentation has developed as a notable use case for SDN.
As SDN platforms are extended to support multicloud environments, they will be
used to mitigate the inherent complexity of establishing and maintaining consistent
network and security policies across hybrid IT landscapes,” Casemore said.
Match fields will define criteria to match packets based on their header fields – L2
(source destination ethernet addresses, VLAN ID, VLAN priority, etc.), L3
(IPv4/IPv6 source destination address, protocol type, DSCP, etc.), L4 fields
(TCP/UDP/SCTP source destination port), ARP fields, ICMP fields, MPLS fields,
etc.
2.7.2 Actions
Actions will define what to do with a packet if it matches the criteria. Actions would
be like drop, forward on some port of switch, modify packet (push/pop VLAN ID,
push/pop MPLS label, increment/decrement IP TTL), forward to specific queue of
port, etc.
2.7.3 Counters
Counters are to keep track how many packets matched the flow .Openflow channel or
connection is a setup between switch and controller so that controller can
communicate with switch to configure, manage, and monitor it. As per Openflow
spec, Openflow runs on TCP or TLS connection and controller listens for connection
on 6653 port. Switch is expected to initiate the connection and should send connection
requests to the controller. Optionally, connection can be initiated from the controller
side as well, and for this case, switch will be in passive mode to listen for connection.
Be it from any side, it would be normal TCP or TLS connection setup, once it is
established, Openflow messages are exchanged over TCP or TLS connection. For
example, below is command of open source Openflow virtual switch (OpenVswitch)
to initiate TCP connection with controller
Basically, the controller would need to implement some plugin code of Openflow by
which it can send, receive and understand Openflow messages to and from Openflow
switches in the underlying network. To configure Openflow switches, controllers need
to push flow rules into Openflow tables of switches based on which the latter can
handle network traffic hitting them. Openflow message for flow entries has large set
of tuple fields for matching criteria (L2, L3, L4 fields, etc.) of packets coming from
network, which altogether would help in configuring ACL rules, security policy rules,
QoS rate limiting bandwidth rules, routing rules, port mirroring rules, and packet
modification rules. To monitor Openflow switches, Openflow provides various
request and response messages to fetch switch and network statistics information and
16
The switch flow table is limited and cannot accommodate all required forwarding
entries. Several proposals were made to improve the efficiency of the limited flow
table as illustrated in Figure below. Some works proceed to manage flow table rules
by setting an adaptive timeout mechanism. Other solutions consider reducing the size
of the table based on the concept of aggregation. Some work focuses on splitting rules
and distributes over the network in a way that satisfies policies according to the
device capacity. Rule caching is another method to limit the number of concurrent
forwarding rules in switch and reduce overhead switch to the controller. Machine
learning techniques are quite effective to predict the traffic flow pattern and select the
right flow to be installed in the switch flow table. These proposals are detailed in the
following sections.
Below Figure presents the SDN performance challenges. This was derived from
several combinations of search key terms for SDN, OpenFlow, flowtable, update, and
security threats from various scientific academic research libraries, which include
ACM Digital Library, IEEE Xplore, ScienceDirect, MDPI, Springer. Different
17
flexible search key terms were used in these websites to retrieve papers related to
SDN performance challenges. The year of publication was filtered from 2015 to 2020,
papers were chosen within the specified period as summarized in Table 1. After
scanning, the selected papers totaling to 3905 are shown. It was further shortlisted and
categorized into controller overhead, security vulnerabilities, switch flow table update
operation, and flow entries management.
DevoFlow and DIFANE are the state-of-the-art works to reduce the overhead of the
controller by reducing the high volume of messages exchanged between the switch to
the controller. DEVOFLOW aimed to reduce the communication overhead,
switch—controller using fine-grained wildcards to improve the network-wide
visibility of the controller. The mechanism leverages on rule cloning, thereby
delegating some of the control function to switches to act locally in a way that the
controller preserves the central network intelligence. DEVOFLOW modified the
action field with CLONE flag, flag clear value signifies normal forwarding otherwise
locally clone wildcard rule. The cloning helps to process short live flows such as mice
flow without the need to consult controllers, hence, reducing the controller overhead.
DIFANE presents a new architectural scalability solution built on the OpenFlow
switch. The scheme maintains all traffic in the data plane by selectively distributing
packets through intermediary switches called authority switches. These intermediary
switches handle entry table-misses at edge switches, hence, reduce the need to invoke
messages to controllers. However, DIFANE and DEVOFLOW may require more
complex software and hardware than conventional OpenFlow switches, which
increases the cost of the device. Moreover, the fundamental principle of OpenFlow is
to delegate all intelligence functions and control to the OpenFlow controller,
therefore, such schemes violate this principle. Conversely, Favaro et al. introduced a
blackhole mechanism to reduce switch to controller overhead while maintaining the
benefit of the visibility for every new flow. Packet processing architecture is modified
where only the first packet is forwarded to the controller while subsequent table-miss
will be handled locally. In this way, the number of events sent to the controller is
reduced. Although the use of blackhole has reduced controller consultation, it inherits
weakness by its architectural design to drop notified packets, which may significantly
result in a large number of packet losses.
18
TCAM is designed for high-speed packet lookup matching instead of fast flow entry
updating time in the switch flow table. Rule updates are often required to adapt to the
dynamic nature of network traffic patterns, especially in large-scale networks. During
the update process, the controller instructs switches to add, modify, or delete some of
the flow rules used to forward packets. For example, in Figure below, the arrival of
new flow in the switch flow table will require the firmware to examine whether it is
the first entry in the flow table or not. The first entry will be installed straight away
without further processing and priority order is maintained. For the case of subsequent
entries, the switch firmware will get an appropriate position in the flow table,
afterward, it will compare the priority with the existing entries, if the priority is
higher, entry will be installed or entries will be moved down and comparison
continued. In this way, the higher usage of TCAM, the greater the number of entry
movements. This method is referred to as priority base solution, which is the naïve
solution to handle update operation and is widely used to implement OpenFlow
switches. The process should be carried out safely and efficiently without service
disruptions and network resources consumption (bandwidth and switch memory).
However, in dynamic and large-scale network traffic conditions, flow rule updates
become more complex because of the need to re-order the existing flow entries. These
operations take some time to complete depending on the current memory status and
are computationally difficult, regardless of the controller entries configuration mode
being in either reactive or proactive mode. An experiment shows the time to install a
single rule after the occurrence of table miss, update cost from 5 milliseconds (ms) to
100 ms. The time required to update TCAM is a non-linear function of the current
number of rules. Adding 500 rules takes about 6 s, however, the next 1500 rules take
almost 2 min to install.
19
The noble idea of placing the network control logic at the central controller provides
flexibility, optimizes network management, and flow monitoring, which is very
important in the practical usage of SDN. Considering the SDN flexibility, it is
expected that the potentialities of SDN could mitigate some security threats and
vulnerabilities that were inherited in the traditional network. Unfortunately, SDN
introduces another security threat and vulnerabilities due to its novel architecture. At
least five threat vectors were identified with SDN. This includes attacks on
vulnerabilities on SDN protocol, the central controller, underlying switches, forged
legitimate traffic flows, and trust mechanism. Trust mechanism is very important in
deploying applications, overlooking it may easily cause malicious applications to be
developed and deployed on the controller. It may further affect the detection of an
event such as link failure in order to ensure fast recovery. In general, the most
important threat vector is denial of service attack against the switch flow table and
central controller. For example, the central controller must have full control of the
network state at a regular time interval to verify the network functionality and state. In
this case, the controller is required to receive an update from the switch more
frequently. An attacker can leverage on the central entity to perform the DoS attack by
forcing the switches to continuously update the controller with a fake update, which in
turn consumes a lot of resources that the switch may use to process legitimate flows.
Similarly, because of the limited memory resources (TCAM), an attacker aggressively
creates a large number of new traffic flows that might overwhelm the precious flow
table of the switches. In such a situation, the switches will be forced to continually
add and delete flow entries, which may generate excessive packet-in message events
to the controller. Consequently, the packet-in event will be stuck in the controller
queue as there would be no more routing decisions taking place for every new
incoming flow. In this case, flow with no corresponding entries will be stuck in the
switches. Concerning the protocol vulnerability, the widely used OpenFlow suffers
from unexpected shortcomings during its design and evolution. Discarding the
transport layer security during the message exchange between controller and switches
at the feature’s verification stage was the greatest flaw. Man-in-the-middle attacks
may leverage on such an operation to compromise the network. Similarly, exchanges
of messages between switches lack the authentication/encryption mechanism in the
SDN data plane. Toward addressing the aforementioned security challenges, efforts
were made lately to address several SDN security attacks.
The technique chosen will depend on the type of service or application being served
and the status of the network and servers at the time of the request. This is possible by
the methods of decoupling or disassociation of the system that helps in making
decisions about where the traffic is being delivered from the systems which then
forwards this traffic to the required destination. Load balancing is the method in a
computer network that is used to divide the amount of work between a collaboration
of two or more computers in such a way that work can be completed in the same time
limit. Hardware, software, or a combination of both can be used to implement load
balancing.
Software-Defined Networking (SDN) plays an important role in paving the way for
effectively virtualizing and managing the network resources in an on demand manner.
Still, many research challenges remain. To utilize resources effectively, this project
focuses on the server-side load-balancing issue and increases the performance for a
cluster of servers with different processing capabilities. Software-defined networking
(SDN) load balancing includes the following benefits:
● Lower cost
● Greater scalability
● Higher reliability
● Flexibility in configuration
● Reduced time to deploy
● Automation
● Ability to build a network without any vendor-specific software/hardware.
21
● With OpenFlow switch, the SDN controller could route non critical/bulk
traffic on longer routes that are not fully utilized.
● The SDN controller can easily implement load-balancing at high data
rates by just directing different flows to different hosts, only doing the
set-up of the initial flow’s.
● Traffic can be isolated without the need for vlan’s, the SDN controller of
OpenFlow switch can just refuse certain connections.
● Setup a network TAP/Sniffer easily for any port or even specific traffic by
programming the network to send a duplicate stream to a network
monitoring device.
● OpenFlow switch allows for the development of new services and ideas
all in software on the SDN controller, as well to accelerate new features
and services.
3.1.4 Mininet
Mininet provides an extension for Python developers. Mininet enables SDN
development on almost any machine. Mininet networks run real code including
standard Unix/Linux network applications as well as the real Linux kernel and
network stack. Mininet provides an extensible Python API for network creation and
experimentations. Many developers these days opt for mininet due to its various
advantages over other utilities. It supports system-level regression tests, which are
repeatable and easily packaged and is based on plug n play method without the need
of programming, and hence making it a great tool for network creation and
experimentation. Compared to other simulators, it easily connects to real networks.
1. Incremental methodology will be used for the project because of the following
reasons:
2. Working software is obtained quickly and early during the software lifecycle.
3. Risk management becomes easier because erroneous parts of the software are
identified at each iteration.
4. Smaller iterations enable easy testing and debugging.
5. Flexibility of the model provides low cost if scope and requirements are to be
changed.
network is created, the controller is connected. Also, hosts, switches, links are added.
During this time, all of the servers are up and running and listening to incoming
requests.
The first 4 hosts h1 to h4 act as clients for a service offered by the hosts and
h5 to h8, which act as servers. The switch acts as a load balancer, and balances the
flows from the clients towards the servers.The clients are addressing the Virtual IP of
the service, and the switch acts as a transparent proxy between the clients and the
actual server.
Mininet will be used to simulate the test environment. Mininet hosts run
standard Linux network software, and its switches support OpenFlow for highly
flexible custom routing and Software-Defined Networking. It provides a testbed for
network applications. We used the mininet as a CLI tool for our testing, and the code
was executed within. This mininet will be run within a virtual machine (VMware).
The load balancer keeps track of requests from servers and the ports. It
handles two types of requests i.e. ARP type and IP type. Based on these requests, it
further categorizes them into Request type and Reply type. In order to efficiently
distribute the load among servers, random technique is used. Whenever a request is
processed, the count is also updated in the load balancing mapper so that when the
next request comes in, a decision can be made on the basis of server load. For the
calculation of random allocation of servers, python package numpy has been used. If
any live servers are up, return the live server as the next server on random server
technique. It will also calculate the mappings from load balancer to make a decision.
Apart from this Python’s built in package random and matplotlib is used as well.
Plotting function was also added to summarize the results of the program.
All the samping is carried out using this simple formula. Divide the servers into
27
non-overlapping groups (i.e., strata) N1, N2, N3, …, Ni, such that N1 + N2 + N3 + …
+ Ni = N. Then do a simple random sample of f = n/N in each strata.
In the diagram below, it can be seen that the openflow switch is connected to the
servers and clients whereas the POX controller acts as a load balancer. The openflow
switch is the medium between load balancing and clients/servers. The following IPs
will be assigned to the hosts and servers in this order:
h1 10.0.1.2
h2 10.0.1.3
h3 10.0.1.4
where h1, h2 and h3 are servers.
h4 10.0.1.5
h5 10.0.1.6
h6 10.0.1.7
h7 10.0.1.8
h8 10.0.1.9
h9 10.0.1.10
and h4, h5, h6, h7, h8, h9 are clients. The requests are generated from HTTP clients,
and then the algorithm that is fed to POX controllers comes into action. For random
server technique, any random server is chosen to execute the request and then respond
to the client accordingly. This is to avoid traffic congestion and choking of network
traffic and to ensure high availability of servers.
28
Chapter 4 Result
A basic load balancer was simulated in MININET to test the basic functionality. It
consisted of three HTTP servers, six HTTP clients (hosts), OpenFlow switch and a
POX controller as explained in details in previous chapters. VMware had been used to
run the virtual environment in this project, along with a mininet emulator which was
used to simulate the network environment.
The screenshots given below demonstrate the running network simulation. We have
used random techniques to manage the traffic on the servers, and for testing purposes,
we have sent 1000 packets to the load balancers and it manage the traffic among four
servers.
29
30
31
32
Chapter 5 Conclusion
After obtaining the output parameters, the most efficient method of server selection
that yields the highest performance of the load balancer can be determined. The
suitability of the Ryu controller can be assessed. Based on the results of the
simulation, the most suited controller that yields the best performance of the load
balancer from POX and Ryu controller can be determined. An overall idea of the
complexity of the controllers can also be obtained.
References
[1] Steve Mann. Humanistic Computing: “WearComp” as a New Framework and Application
for Intelligent Signal. Proceeding of the IEEE, 1998[C]. USA.IEEE, 86(11): 2123-2151
[2] Len Bass, Chris Kasabach, Richard Martin, Dan Siewiorek, Asim Smailagic, John
Stivoric. The Design of a Wearable Computer. Proceedings of the 1997 Conference on
Human Factors in Computing Systems, 1997[C].Atlanta,GA,USA. ACM: 140-146