0% found this document useful (0 votes)
46 views

Articulo Simulacion Capa 2 Odl Mininet

odl es un controlador que es muy utilizado actualmente

Uploaded by

E RB
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Articulo Simulacion Capa 2 Odl Mininet

odl es un controlador que es muy utilizado actualmente

Uploaded by

E RB
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

SDN Layer 2 Switch Simulation Using

Mininet and OpenDayLight

Vipin Kumar Rathi and Karan Singh

Abstract Software-Defined Networking is a separation of control plane and data


plane where control plane controls several devices https://www.opennetworking.
org/sdn-resources/sdn-definition [1]. SDN provides a programmable network pro-
tocol that can virtualize whole network infrastructure. Networking reached to
threshold point in driving next-generation network architecture. In this paper,
simulation of Layer 2 Switch based on SDN using OpenDaylight and Mininet
Emulator is performed. SDN is implemented by OpenvSwitch (OVS) as a data
plane and OpenDaylight as a Control Plane both Mininet and OpenDaylight is
installed on different Instances of an IBM Server. Then analyzes the architecture of
the Layer 2 Switch with OVS and OpenDaylight that can successfully run Loop
Remover, Arp Handler on ODL Controller which prevents broadcast storms
(McKeown et al in ACM SIGCOMM Comput Commun Rev 38:69, 2008 [2];
Nunes in Commun Surv Tutorial-s 16(3):1617–1634, 2014 [3]; Open Networking
Foundation 2014 [4]).

Keywords Software-defined networking OpenFlow   OpenvSwitch



OpenDaylight Loop Remover Mininet 

1 Introduction

Everyday networks are becoming more complex, loads on these networks are also
increasing and availability is also important. Today, network design is not sufficient
to fulfill this kind of demand, due to this networks becoming more complex,
making [2–4] the administration of these networks more difficult. Therefore, we

V. K. Rathi (&)  K. Singh


School of Computer and Systems Sciences, Jawaharlal Nehru University,
New Delhi, India
e-mail: [email protected]
K. Singh
e-mail: [email protected]

© Springer Nature Singapore Pte Ltd. 2018 319


S. K. Muttoo (ed.), System and Architecture, Advances in Intelligent Systems
and Computing 732, https://doi.org/10.1007/978-981-10-8533-8_30
320 V. K. Rathi and K. Singh

need next generation of networking that can manage such high demand and utilize
the bandwidth at its maximum. Due to new trends in computing like a cloud, Big
Data, and Internet of Things, a new design for networking is needed that is fulfilled
by Software-Defined Networking (SDN). SDN helps to detach control plane from
data plane which helps the administrator to manage the network centrally and can
utilize bandwidth at its maximum, resulting in great flexibility [5].
The conventional network architecture where data plane and control plane
remain in the same device which cannot fulfill these high demands and solution to
this problem is Software-Defined Networking (SDN). The network paradigm sep-
arates data plane and control plane [6]. The network can be dynamically managed;
for example, whenever there is a change in topology due to loops or any other
causes, then the network can be managed dynamically. Mininet is a lightweight
container or virtualization-based emulator. Mininet provides a rapid development
for SDN, it is flexible and creates easily configurable topologies such as switches,
controllers, virtual hosts and configurations starts a network in few seconds and also
supports the OpenFlow protocol that can be used for network based SDN simu-
lation. Mininet includes a command–line interface (CLI) that is topology-aware and
OpenFlow-aware [7].
This paper uses Mininet Simulator for simulation of SDN. SDN network consists
of data plane as OVS and control plane in the form of OpenDaylight controller.
OpenDaylight controller functions as Loop Remover, Arp Handler, Packet Handler,
Host Tracker, and Address Tracker.

1.1 Problem Definition

In legacy Layer 2 Switch, there is no intelligence and capability to learn network


topology and forward packets from source to destination.

2 Theory

This section discusses OpenFlow, architecture, OpenDaylight with brief details of


the same as follows.

2.1 OpenFlow

The communication between the OpenFlow controller and switch takes place using
the OpenFlow protocol. By using OpenFlow protocol, a OpenFlow controller can
do CRUD (Create, Read, Update, Delete) operation on flow entries, e.g.,
SDN Layer 2 Switch Simulation Using Mininet … 321

Fig. 1 OpenFlow architecture

FLOW MOD (ADD) to create a flow entry, FLOW MOD (MODIFY) to modify a
flow entry, FLOW REMOVED to remove a flow entry [8]. Figure 1 illustrates the
architecture of OpenFlow, in which we have OpenFlow Switch, OpenFlow con-
troller, Hosts, and Servers. Communication between controller and switch takes
place securely by using Secure Socket Layer.
OpenFlow Switches are expected to process all 802.1D Spanning Tree Protocol
(STP) packets locally before performing lookup; e.g., in layer 2, OpenFlow
Switches forward broadcast traffic which may result in loops. Spanning tree helps to
provide loop-free topology but when link fails there is exchange of BPDU between
switches and then they take an alternative path which takes some time. However, in
SDN, controllers do topology discovery and link fault detection. In SDN, Spanning
Tree Protocol is comparatively easier. Whenever there is a change in topology, it
simply computes a STP from the topology using prims algorithm.
OpenFlow Switch maintains the flow table according to pattern, action, priority
and counter for e.g. pattern, action, and priority and counter values are Dst IP
address (10.5.2.1), Port 1, 15 and 105 respectively. The complete table and their
values are given below in Table 1.
322 V. K. Rathi and K. Singh

Table 1 OpenFlow flow Pattern Action Priority Counter


table
Dst IP Addr=10.5.2.0 Port 1 15 105
TCP/UDP Dst Port=25 Drop 25 310
Dst IPAddr=192.* Port 2 10 200
*
Controller 0 116

The failure of links in Software-Defined Networking based on OpenFlow will


result in the need to converge on a new topology which will be the same at layer 2
or 3 since OpenFlow seems to merge the control and data planes resulting in unified
logical topologies. Since OpenFlow utilizes flow tables, the concept of feasible
successors can be applied to flow tables by inserting alternate paths as less preferred
flow entries. The use of successor routes will result in no need to contact a con-
troller on link failures. In SDN based on OpenFlow when there is failure of links, it
will result in a new topology which will be same at layer 2 or 3.

2.2 OpenDaylight

The OpenDaylight can deliver the benefits of SDN to the Internet of Things or
control Ethernet switches using the OpenFlow protocol. OpenDaylight provides a
Model-Driven Service Abstraction Layer (MD-SAL) that allows users to write
apps that can work easily across a wide variety of hardware and south-bound
protocols [9].
OpenDaylight aims to accelerate the adoption of Software-Defined Networking
and creates a solid root for Network Function Virtualization. Newest version of
OpenDaylight is Lithium. OpenDaylight not only supports OpenFlow but also
supports other south-bound protocols like NETCONF, OVSDB, SNMP. For
north-bound Protocols, Representational State Transfer (REST) APIs are used.
OpenDaylight runs on Java Virtual Machine (JVM), and it is platform inde-
pendent that can be run on any Operating System. OpenDaylight makes use of the
following tools Maven, OSGi, Java Interfaces, and REST APIs. Figure 2 shows a
high-level network view of the OpenDaylight controller. In which SDN apps talk to
Northbound API according to request the corresponding API is activated now at
next layer we have two functions Service Functions and Base Network Functions
which contain different modules like Statistics Manager, Device Man- ager,
Topology Discovery, Inventory Manager then request reaches the Service
Abstraction Layer and then through Southbound API which can be it reaches to
Network Device.
SDN Layer 2 Switch Simulation Using Mininet … 323

Fig. 2 High-level network view of the OpenDaylight controller

2.3 Layer 2 Switch

The Layer 2 Switch gives Layer 2 functionality. There are various modules present
in Layer 2 Switch like Loop Remover which removes the loop in the network and
updates the corresponding STP Status of networks ports. In the operational
inventory data store, Host Tracker tracks the location of the host relatively to the
network. Switch Manager Component holding the inventory information for all the
known nodes in the controller, Topology Manager Component holding the whole
network graph, Statistics Manager Component in charge of using the Service
Abstraction Layer Read Service to collect several statistics from the Network, Arp
Handler which handles the decoded ARP packets, either by installing proactive
flood flows or by dispatching packets back to network, based on the configuration,
Layer 2 Switch Main installs flows on each switch, based on network traffic and
address learned by address tracker [10]. This allows the switch to learn the network
topology and be aware to changes. Thereby, when a packet is received it is directly
redirected to the destination instead of flooding to every other host. This results in
very high efficiency as compared to current switching methodology in layer 2.
324 V. K. Rathi and K. Singh

3 Simulation Design

This section briefly discusses network design and SDN controller as follows.

3.1 Network Design

Our study used IBM server which contains 32 GB RAM, 1 TB hard disk on which
we have place Kernel-based Virtual Machine (KVM) as a Hypervisor and upon it
we have placed two instances: One instance contains Mininet with 192.168.56.103
as ip address, and another instance putting OpenDaylight as controller with the
following ip address 192.168.56.101. The network simulation contains three
switches and three hosts; one host is connected with one switch in Mesh Topology.
The network topology of simulation is shown in Fig. 3.

3.2 SDN Controller

In this simulation, SDN controller is OpenDaylight which is installed on one of the


instances of IBM server that contains Ubuntu 14.03 LTS Controller which disables
some links with the help of Loop Remover internally.
Running Spanning Tree Protocol.

Fig. 3 Network topology


SDN Layer 2 Switch Simulation Using Mininet … 325

3.3 Procedure for Simulation

We are using Mininet, add a custom topology in Custom Directory, and create a
python file called as meshtopology.py, which contains the following algorithm
1. Initialize topology
Topo. init (self)
2. Add hosts and switches
leftHost = self.addHost( ’h2’ )
rightHost = self.addHost( ’h3’ )
leftSwitch = self.addSwitch( ’s2’ )
rightSwitch = self.addSwitch( ’s3’ )
aboveHost = self.addHost( ’h1’ )
aboveSwitch = self.addSwitch( ’s1’ )
3. Add links
self.addLink(leftHost, leftSwitch)
self.addLink(leftSwitch, rightSwitch)
self.addLink(rightSwitch, rightHost)
self.addLink(aboveHost, aboveSwitch)
self.addLink(aboveSwitch, leftSwitch)
self.addLink(aboveSwitch, rightSwitch)

4 Result

On Mininet, we have to run the following command sudo mn –controller=remote,


ip=192.168.56.101 –custom /mininet/custom/meshtopology.py –topo mytopo.
After running the following command, controller creates Mesh Topology as shown
in Fig. 4, as we can see in figure there are three switches connected in Mesh
Topology. Now on Mininet run h2 ping h3 and sudo WireShark & so that result can
be seen on Wireshark Window as shown in Fig. 5. On Wireshark we can filter arp
packets and path follow by packets are from host2 to Switch2, Switch1, Switch3
and finally it reach to host3. Because link between Switch2 and Switch3 is in
Blocking State to prevent packet to not go in to loop.
We can verify the above result by running the tcpdump command on Switch1
and listening on eth2 interface, and all nodes are able to ping each other as shown in
Fig. 6.
326 V. K. Rathi and K. Singh

Fig. 4 OpenDaylight dashboard

Fig. 5 Capture results form Wireshark

5 Conclusion

SDN Layer 2 Switch is introduced in a brief manner in this research paper. SDN has
risen as a way to enhance programmability within the network to fulfill the dynamic
nature of future network functions. SDN keeps on making progress within large
enterprise and cloud service provider for data center networking. SDN offers a wide
SDN Layer 2 Switch Simulation Using Mininet … 327

Fig. 6 ARP reply

determination of competing architectures, yet at its most simple. In this paper, we


have done the simulation of the SDN with OpenFlow Switch and OpenDaylight
controller successfully and test Loop Remover, Arp Handler. OpenDaylight con-
troller can perform STP. STP stops broadcast storm on network and prevents from
flooding. In future works, new topologies like leaf-spine and Trill (instead of STP)
may be tested.

References

1. What is SDN ? https://www.opennetworking.org/sdn-resources/sdn-definition


2. McKeown, N., Anderson, T., Balakrishnan, H., Parulkar, G., Peterson, L., Rexford, J.,
Shenker, S., Turner, J.: Open-flow: enabling innovation in campus networks.
ACM SIGCOMM Comput. Commun. Rev. 38(2), 69 (2008)
3. Nunes, B.A.A., Mendonca, M., Nguyen, X.-N., Obraczka, K., Turletti, T.: A survey of
software-defined networking: past, present, and future of programmable networks. Commun.
Surv. Tutorials 16(3), 1617–1634 (2014). https://doi.org/10.1109/surv.2014.012214.00180.
13 Feb 2014 (IEEE)
4. Open Networking Foundation: Software-Defined Networking (SDN) Definition, 2014,
available at https://www.opennetworking.org/sdnresources/sdn-definition. Accessed Jan 2015
5. Kim, H., Feamster, N.: Improving network management with software defined networking.
IEEE Commun. Mag. 51(2), 114119 (2013)
6. Open Networking Foundation: SDN Architecture 1.0, 2014, available at: https://www.
opennetworking.org/sdn-resources/technical-library. Accessed Jan 2015 (Django, Django: the
Web framework)
7. MININET. An instant virtual network on your laptop (or other pc).http:// mininet.org/
8. FOUNDATION, O. N. OpenFlow specification 1.3. https://www.opennetworking.org/
images/stories/downloads/sdn-resources/onfspecifications/openflow/openflow-specv1.3.0.pdf
9. OpenDayLight: Open source network controller. http://www.opendaylight.org/
10. L2 Switch: https://wiki.opendaylight.org/view/L2_Switch:Helium:Developer_Guide
11. ONF, Open networking foundation. https://www.opennetworking.org/. (2015)

You might also like