Sie sind auf Seite 1von 6

2015 6th International Conference on Intelligent Systems, Modelling and Simulation

Emulation of Software Defined Networks Using Mininet in Different Simulation


Environments
Faris Keti Shavan Askar
Electrical and Computer Engineering Department Electrical and Computer Engineering Department
Faculty of Engineering Faculty of Engineering
Duhok-Kurdistan Region,Iraq Duhok - Kurdistan Region, Iraq
faris.alyas@uod.ac Shavan.askar@uod.ac

Abstract- In this paper an evaluation of an SDN emulation Section 2 of this paper discusses the SDN paradigm
tool called Mininet is conducted. Tests were conducted to describing its motivation, network elements that are part of
study Mininnet limitations related to the simulation
environment, resource capabilities. To evaluate the later, the this new structure, in addition, the operation of these
scalability of Mininet in term of creating many topologies is components. Section 3 describes the utilized simulation
tested with varying number of nodes and two different tool which is called Mininet, in addition, it presents
environment scenarios. Results show that the simulation
MININET characteristics. In section 4, the role of
environment has a remarkable effect on the required time
for building a topology, for instance, the powerful resources controller in SDN networks was proposed utilizing SDN
scenario needed only 0.19 sec, whereas, 5.611 sec were tools and also one of MININET performance related to the
needed when the resources were less. However, the required simulation's environment was tested.Section 5conclude the
time were increased in both scenarios when the number of
nodes was increased into 242.842 and 3718.117 sec for the paper and give suggestions for future work.
powerful and less capabilities resources respectively.
II. SOFTWARE-DEFINED NETWORKS
Keywords-Software Defined Networking, Emulation,
OpenFlow, Pox controller, Minint. Experienced IT personnel are inevitable when it comes
to configuring and installing network’s elements. Accurate
I. INTRODUCTION and complicated simulators are needed when the
simulating networks in which interactions among its
Because of the astronomic number of users each with elements are needed such as switches, routers, etc.
different applications or services which also increase Supporting this is highly difficult to achieve. Therefore; a
continuously, the Internet has already become a kind of new network model is required to support these agility
global communication infrastructure. requirements.
But, the Internet with its current capabilities is still There are four factors that SDN focuses on which are
suffering from variety of great challenges in network namely;
control, configuration, and management issues. Research A. Control plane and data plane Separation
on Internet application, service, network control and B. A centralized controller and view of the network
management is one of thehot and interesting topics in C. Open interfaces between the devices in the
recent years. Many of research projects have been initiated control plane and the data plane
in this subject’s area [1]. D. Use of external application to support the
The research community of computer networks has been programmability feature of the network
searching for solutions that enable the use of networks
with more programming resources and less need for A. Control plane and data plane separation:
replacement of hardware elements, so that new
technologies designed to solve new problems can be One of the tenets expressed early in the introduction of
inserted gradually into the network and without significant SDN is the potential advantage of the separation of a
costs [2, 3]. Software-Defined Networking (SDN) is a new network deviceÿs control and data planes. This separation
network paradigm that virtualizes network infrastructure affords a network operator certain advantages in terms of
by decoupling the control and data plane logic of centralized or semi-centralized programmatic control. It
traditional network devices, creating a dynamic, flexible, also has a potential economic advantage based on the
automated and manageable architecture. ability to consolidate in one or a few places what is often a
SDN is implemented through a protocol known as considerably complex piece of software to configure and
OpenFlow that lets administrators select the path through
which data will flow through a network [4].

2166-0670/15 $31.00 © 2015 IEEE 205


DOI 10.1109/ISMS.2015.46
control onto less expensive, so-called commodity industrial perspective. In addition, implementing network
hardware [5,6,7,8]. with large number of network devices is very difficult and
costly. Therefore, to overcome these problems, virtual
B. A centralized controller and view of the network mode strategy has been conducted for the purpose of
prototyping and emulating there kind of network
The most important characteristic of SDN is the use of a technologies and the most important one is MININET [1].
centralized control plane, which transfer the decision- Mininet has the capability to emulate different kinds of
making logic from the network devices into external network elements such as; host, layer-2 switches, layer-3
controllers [4]. Because of this, an awareness of network routers, and links. It works on a single Linux kernel and it
elements and characteristics will be attained. utilizes virtualization for the purpose of emulating a
complete network utilizing only a single system. However,
C. Open interfaces between the devices in the control the created host, switched, routers, and links are real-world
plane and the data plane (OpenFlow): elements although they are created by means of software
[11].
In the OpenFlow architecture, an OpenFlow switch
consists of many flow tables in addition to an abstraction A. Some characteristics guided the creation of Mininet
layer which communicates with a controller in a secure are:
manner via OpenFlow protocol. Flow tables contain
forwarding flow entries, each one match packets to its x Flexibility, that is, new topologies and new features
correspondent flow, then processed and forwarded. can be set in software, using programming languages
Forwarding flow entries consists of the following and common operating systems.
parameters; match fields which are used for the purpose of x Applicability, correctly implementations conducted in
matching the incoming packets; match fields use prototypes should also be usable in real networks
information of packet header, ingress port, and metadata; based on hardware without any changes in source
counters, which are used to build up statistic data for each codes.
flow such as the number of received packets, bytes and x Interactivity, management and running the simulated
duration of a particular flow; and a set of instructions, network must occur in real time as if it happens in real
which applies when there is a match; they dictate how to networks.
handle matched packets[9]. x Scalability, the prototyping environment must be
scaling to large networks with the hundreds or
D. Use of external application to support the thousands of switches on only a computer.
programmability feature of the network: x Realistic, the prototype behavior should represent real
time behavior with a high degree of confidence, so
In SDN environment, it is possible to control and applications and protocols stacks should be usable
program network devices, there is a capability of utilizing without any code modification.
software applications that are developed from hardware for
x Share-able, the created prototypes should be easily
the purpose of controlling the policies of packet
shared with other collaborators, which can then run
forwarding [7]. With SDN, it is possible to deploy network
and modify the experiments [12].
applications that haveprecise traffic monitoring and
processing capabilities. This will consequently support; a
B. MININET Workflow
dynamic QoS provisioning, load balancing, and access
control.
SDN has many advantages [10]; it supports a faster Mininet has the capabilities that enable researchers or
response to changing traffic conditions. In addition, it network programmers to create software defined network
allows for more options for dynamic provisioning, better prototype in a simple manner. With the capability to
load balancing, more preferred traffic engineering, interact, customize and share it, and provides a smooth
improved network resource utilization, and enhanced path to running it on hardware.
opportunities to implement many new types of services.

. Creating a Network
III. MININET
A network can be created in MININET with a single
command;
There are many reasons that trigger the use of a new
$ sudo mn --topolinear,3
emulator called Mininet; first, there are only few network
devices available for the purpose of implementing SDN
standard as it is yet not widespread technology from the

206
Create a virtual network of three switches connected In all the tests or experiments a computer DELL Inc.
linearly and three virtual hosts, eachhost configured to the Inspiron1525 PC with the following specifications was
corresponding switch. used; processor Intel ® Core ™ 2 Duo CPU 2.00
GHZ,3072 MB of RAM running the operating system
. Interacting with a Network
Windows 7 32bits and VirtualBox Oracle VM version
In Mininet’s the entire virtual network can be 4.3.18.
controlled, and managed from a single console. For The guest operating system: MININET Emulator
example, the CLI command version 2.1 on Linux operating system Ubuntu14.0432bits
Mininet >h1 ping –c3h2 with 1 GB of RAM and POX 0.2.0(carp) Controller are
Is used to pingh2 from h1 installed on this computer, under the management of
Mininet > nodes VirtualBox.
To see the list of nodes available
Mininet > help B. First Experiment.
To see a list of available commands
Dpctl: control and edit flow tables. In this test, the role of the controller in setting
Iperf: TCP speed test. forwarding rules in the flow tables is explained. It also
shows how it can control the behavior of forwarding
hardware in the way of dealing with packets and also what
. Customizing a Network
happens in the absence of controller and what should we
Custom networks with a few lines of Python can be do alternatively. So, from MININET console:
created by Mininet’s API. For example, $ cd pox
~/mininet/custom/topo-2sw-2host.py Now the controller will be programmed as a hub:
This few lines of python create a virtual network of two $./pox.py log.level –DEBUG misc.of_tutorial
hosts connected via virtual links to two switches. This tells POX to enable verbose logging and to start the
of_tutorial component (which runs as a hub).
. Sharing a Network
In a new SSH terminal, a topology with four hosts, one
Mininetsupports the capability of sharing the created switch, one remote controller was created. The
VM image to other researchers for the purpose of running, connections between nodes were wired links as shown in
evaluating, or modifying it. Figure 1 below.
. Running on Hardware
The created prototype could be implemented into
hardware for testing and validation [13].

IV. SDN SIMULATION USING MININET AND POX


CONTROLLER

POX is a software platform developed in Python


[14][15].POX began early as a controller for an OpenFlow
protocol. However, it can, nowadays, act as an OpenFlow
switch, and can be used for developing networking
software.
POX work with Python 2.7 (it can also work fine with
Python 2.6), and can run under Linux OS, Mac OS, and
Windows. The core and main modules are developed in
Figure 1. Simulation topology
python.
In this section many tests are presented which explain The proposed topology created with the following
some features and capabilities of MININET emulator command line:
along with POX controller software in order to test the $ sudo mn –topo single,4 – controller remote
MININET tool in different networks topologies and Now to verify the behavior of a hub, that all hosts see
environment. the exact same traffic when hosts ping each other, xterms
for each host was created, the traffic in each host was
A. MININET environment specifications. viewable. In the Mininet console:
Mininet> xterm h1 h2 h3 h4

207
In the xterms for h2, h3, and h4, we run tcpdump , a utility
that print the packets seen by a host: To further have an insight into the role of controller in
# tcpdump –xx –n –I h2-eth0 inserting fields into the forwarding rules, the controller
# tcpdump –xx –n –I h3-eth0 was disconnected and another ping command was
And respectively executed. Because switches are only forwarding hardware
# tcpdump –xx –n –I h4-eth0 and there are no flow entries in its flow tables, all the ping
In the xterm for h1, we sent a ping: packets were lost because of the absence of the controller,
# ping -c1 10.0.0.2 therefore; forwarding rules were entered manually as
The ping packets are now going up to the controller, follow:
which floods them out into all interfaces except the $ dpctl add-flow
sending one. There should be identical ARP and ICMP tcp:127.0.0.1:6634in_port=1,idle_timeout=120,actions=ou
packets corresponding to the ping in all the xterms running tput:2
tcpdump. This is the behavior of a hub; it sends all packets $ dpctl add-flow
to every port on the network, Figure 2. tcp:127.0.0.1:6634in_port=2,idle_timeout=120,actions=ou
tput:1
This will forward packets coming at port 1 to port 2 and
vice-verca.
To display the flow table installed, this command line is
used:
$ dpctl dump-flows tcp:127.0.0.1:6634
The content of manually entered flow table is shown in
Figure 4.

Figure 2. The controller hub behavior.

Now the previous scenario will be repeated but this time


with programming the controller as a learning switch by Figure 4. the content of manually installed flow table
using the following component:
$ cd pox After installing a flow table with few last steps, a ping
$ python ./pox.py forwarding.l2_learning command could be executed and the destination host
Again in the xterm for host1a ping request is executed expected to receive the ARP and ICMP packets
# ping –c1 10.0.0.2 corresponding to the ping request. It is important to
Then as shown in Figure 3 only the destination host will remember that the above task, the manual case, was
receive the ARP and ICMP packets corresponding to the performed by the controller automatically in SDN
ping. Hosts that are not the destination for a ping should paradigm.
display no tcpdump traffic after the initial broadcast ARP
request.
C. Second Experiment.

Although MININET is considered as a great and


convenient tool, it still has some limitations. In this
experiment the effect of one of its limitations on its
scalability was studied. Because MININET runs on a
single system, it imposes resource limitation. Those
resources need to be normalized and shared among virtual
hosts and switches.
A comparison between two sets of scalability tests were
conducted, where, two different environments were tested.
Each test environment differs from the other by the
resource characteristics. The first set of scalability test was
conducted by using the following environment: a
Figure 3. The behavior of controller as a learning switch. microcomputer HP Compaq8200 Elite SFF PC with the

208
following specifications: Processor Intel ® Core ™ i5- increase of virtual nodes number in both scenarios,
2400 3.10GHz, 4GB of RAM running the Operating however, there is a remarkable difference in the required
System Windows 7 64bits and VirtualBox Oracle VM time between the first and second scenario which means
version 4.2.12. that the resource limitation has a huge impact on the
In this microcomputer, under the management of results as depicted in Figure 7.
VirtualBox, the following guest operating systems were
installed: Mininet Emulator version 2.0 on Linux operating
system Ubuntu 10.12 64bits with 1Gb of RAM; Floodlight
Controller version 0.90 on Linux operating system Ubuntu
12.10 64bits with 256MB of RAM.
The obtained scalability results are shown in Table I.

TABLE I. FIRST SCALABILITY TEST RESULTS

Topology Node Host Switch Start/


Numbers Numbers numbers stop
Time Figure 7. Comparison between scalability tests results in different
(sec) environment.
Tree 3 2 1 0,190
Tree 7 4 3 0,525 V. CONCLUSIONS

Tree 15 8 7 1,175 In this paper the performance of Mininet tool for


emulating SDN networks was evaluated.
Tree 31 16 15 2,795
During this study many capabilities of Mininet emulator in
Tree 63 32 31 7,088 the SDN paradigm evaluation was covered, from the
creation of basic topologies with reference controller to the
Tree 127 64 63 20,210 ability of connection with remote controllers (in this case
POX controller). In addition, this paper took into
Tree 255 128 127 64,818
consideration the following scenarios; changing the
Tree 511 256 255 242,842 topologies, increasing the number of nodes, controlling the
behavior of forwarding hardware (switches).
The effect of simulation environment limited resources
From the second set of scalability test, which was was studied and a comparison between results for two
conducted with the characteristics specified in part (A) of different environments was described, as a result it is noted
this section, the scalability results displayed in Table 6 that for small number of nodes the time required for
were obtained. creation (start/stop) increases from 0.190 sec in the
environment of better resources to 5.611 sec in the
TABLE II. SECOND SCALABILITY TEST RESULTS environment of worse resources, the time required for
Topology Node Host Switch Start/
creation (start/stop) in both environment increases with the
numbers number numbers stop time increase in the nodes number but with different rates so
s (sec) that for the largest topology in our test which is 511 nodes
Tree 3 2 1 5,611 the time increases from 242.842 sec in first environment to
Tree 7 4 3 16,162 3718.117sec in second environment which is 15.31 times
the time required in the first environment.
Tree 15 8 7 35,480 It was concluded that the characteristics and
Tree 31 16 15 77,304 qualifications of simulation environment must be taken
into consideration before starting to use mininet, if the
Tree 63 32 31 172,535
above characteristics were carefully selected then Mininet
Tree 127 64 63 410,153 can be utilized as one of the powerful tools in emulating
the SDN and virtual networks.
Tree 255 128 127 1054,714

Tree 511 256 255 3718,117 REFERENCES

[1] WANG Wendong, Yannan HU, Xirong QUE, GONG Xiangyang,


Comparing results of the two different scenarios “Autonomicity Design in OpenFlow Based Software Defined
mentioned above gives an indication that the amount of Networking”, GC'12 Workshop: The 4th IEEE International
time required to create a virtual network increases with the

209
Workshop on Management of Emerging Networks and
Services©2012 IEEE.
[2] Guohui Wang, T. S. Eugene Ng, Anees Shaikh, “Programming
your network at run-time for big dataapplications”,HotSDN’12,
Helsinki, Finland, August 13, 2012.
[3] Rogério Leão Santos de Oliveira, Ailton Akira Shinoda,
Christiane Marie Schweitzer, Ligia Rodrigues Prete, “Using
Mininet for Emulation and Prototyping Software-Defined
Networks”, Brazil, ©2014 IEEE.
[4] Kannan Govindarajan, Kong Chee Meng, Hong Ong , Wong Ming
Tat,Sridhar Sivanand, Low Swee Leong, “Realizing the Quality of
Service (QoS) inSoftware-Defined Networking (SDN) Based
Cloud Infrastructure, Kualalumpur, Malaysia, 2014 second
international conference on information and communication
technology(ICoICT),©2014IEEE.
[5] Cristian Cleder Machado, Lisandro Zambenedetti Granville,
Alberto Schaeffer-Filho,Juliano Araujo Wickboldt, “Towards
SLA Policy Refinement for QoSManagement in Software-Defined
Networking”, 2014 IEEE 28th International Conference on
Advanced Information Networking and Applications.
[6] S. Sezer, S. Scott-Hayward, P. Chouhan, B. Fraser, D. Lake, J.
Finnegan,N. Viljoen, M. Miller, and N. Rao, “Are we ready for
sdn? Implementationchallenges for software-defined networks,”
CommunicationsMagazine, IEEE, vol. 51, no. 7, pp. 36–43, 2013.
[7] O. W. Paper, “Software-Defined Networking: The New Norm for
Networks,” Open Networking Foundation, Tech. Rep., April
2012.
[8] Thomas D. Nadeau, Ken Gray, “SDN: Software Defined
Networks”, Published by O’Reilly Media, Inc., 1005 Gravenstein
Highway North, Sebastopol, CA 95472, First Edition, August
2013.
[9] Bruno Astuto A. Nunes, Marc Mendonca, Xuan-Nam Nguyen,
Katia Obraczka, and Thierry Turletti, “A Survey of Software-
Defined Networking: Past,Present, and Future of Programmable
Networks”, hal-00825087,version 5- 19 Jan 2014.
[10] Joe Mambretti, Jim Chen, Fei Yeh, “Software-Defined Network
Exchanges (SDXs): Architecture, Services, Capabilities, and
Foundation Technologies”, Proceedings of the 2014 26th
International Teletraffic Congress (ITC), ©2014 ITC.
[11] Mininet. An Instant Virtual Network on your Laptop.2014,
Accessed: Sept. 2014[Online]Available: http://mininet.org.
[12] B. Lantz, B. Heller, and N. McKeown, “A network in a laptop:
rapidprototyping for software-defined networks,” in Proceedings
of the 9thACM SIGCOMM Workshop on Hot Topics in
Networks. ACM, 2010.
[13] The Openflow Switch, openflowswitch.org.
[14] POX, “Pox openflow controller,” 2014, Accessed: Sept.2014.
[Online].Available: http://www.noxrepo.org/pox/about-pox.
[15] Python Software Foundation, “Python language reference, version
2.7,” 2014, Accessed: Sept. 2014. [Online].Available:
http://www.python.org.

210

Das könnte Ihnen auch gefallen