Conventional networks use specialized hardware to make the controlling and monitoring of dataflows, routing path management and determining priorities to different applications in the network. More complex algorithms usually increase device (routers and switches) prices to control the network and the hardware implementation increases the difficult to reprogram these devices to attend different packet devices under distinct contexts of operation. An implementa- tion focusing on software modules instead of specialized hardware is the alternative proposed by SDN, which enables a greater controlling of the network traffic, hence, a bigger potential to improve the network performance [37]. Using SDN, the network has the ability to control the dataflow and the switch devices from a central location named SDN controller.
SDN provides a centralized network which split control and data plane in router and switches. The data plane corresponds to the applications data traffic generated by end-users connected to the network. The control plane corresponds to the data traffic containing control information of the network components as routers and switches. Examples of control informa- tion are the number of packets being transmitted in each port of a specific switch and the link latency among switches. Control information also contains controllers’ commands to apply changes in the switch functions, such as change the flow and route tables to update the packet’s path.
The most popular protocol implementing SDN for real applications is called OpenFlow [38]
which enables the implementation of SDN at both software and hardware. OpenFlow allows the SDN controller to communicate and control SDN switches with support to OpenFlow pro- tocol. Each OpenFlow switch can have multiple flow tables, group tables and an Openflow channel [37]. Flow tables contain flow entries which define the forward rules for each packet
13 received by the switch. Group tables process decisions on multiple links applying operations for a group of packets, enabling multicasting and load balance functions. The flow channel makes communication between the OpenFlow switch and controller.
Fig. 2.4 shows SDN structure of communication between a SDN controller and an Open- Flow switch. Each port of the switch is connected with other ports of other switches, creating the network connections. The flow tables define which port and destiny a specific packet should be forwarded to reach its target switch. Each flow table has its own rules. Group tables can apply a set of actions for flooding as well as more complex forwarding semantics. Finally, the OpenFlow channel is responsible for communicating with the SDN controller and exchange control information to inform the switch status and apply command requested by the controller into OpenFlow switch. Each switch can have more than one OpenFlow channel to communicate with other SDN controllers.
Port Port
Port Port Flow
Table
Flow Table
Flow Table OpenFlow
Channel
Group Table
Group Table SDN
Controller
OpenFlow Protocol
Flow pipeline Control Channel
OpenFlow Switch
Figure 2.4:SDN structure considering a controller communicating with a OpenFlow switch.
OpenFlow switches can be implemented using open-source software such as Open vSwitch [39]
that enables the execution of OpenFlow switch functions in unspecialized hardware, e.g. Open vSwitch can be implemented into a VM to perform switch operations of a network. For SDN
14 controllers the most popular alternatives are OpenDaylight [40], ONOS [41] and RYU [42].
The controllers can also be virtualized to process network functions.
2.3.1 Mininet
Mininet is open-source software that emulates an SDN network based on virtualized hosts, routers and switches using OpenFlow [43]. It enables to emulate real scenarios using SDN con- trollers and Mininet VMs into a single computer to perform tests related to SDN networks. The topology to be emulated using Mininet is defined using scripts or a visual tool called MiniEdit.
This topology description defines the number of Open vSwitches, routers and host machines to be emulated in VMs and how they are connected to establish the network communication. The communication links can also be described as defining the maximum throughput supported, latency, packet loss rate and other link parameters. After the topology deployment, all virtu- alized hosts can be accessed individually and can communicate with other hosts according to the conditions defined into topology description. Besides that, an SDN controller with support to OpenFlow can be connected to the Mininet emulated topology to manage the network and control the Open vSwitches, enabling all operations of an SDN network. Mininet emulates all this topology into a single machine due to the host, router and switches virtualization.
Fig. 2.5 shows an example of emulated Mininet topology composed by ten hosts, five routers, three switches and an SDN controller created using a Mininet topology script. All hosts can communicate with each other through the network paths defined in the topology description.
When there is more than one possibility of a path to reach the destiny, a default path can be defined in the topology. For example, if the host 1 needs to communicate with host 6, it can use both the path router 1-switch 1-switch 2-router 3 as well as the router 1-switch 1-switch 3-switch 2-router 3. In this example, the shorter path seems better, but depending on the congestion in the link between switch 1 and 2, a path using switch 3 may be a good option. The SDN controller can change the forwarding rules to reach destiny through OpenFlow protocol communication with Open vSwitches on demand. Each link can have its configuration, in Fig. 2.5 there are three types of link configuration, which have maximum throughput with 0.5, 1 and 10 Gbps and latencies of 10 and 20 ms.
15
SDN Controller
Switch 1
Switch 2
Switch 3
Max. Throughput: 10 Gbps Latency: 20 ms Max. Throughput: 1 Gbps Latency: 10 ms Max. Throughput: 0.5 Gbps Latency: 10 ms Router 1
Router 2
Router 3
Router 5 Router 4 Host 1
Host 2
Host 3
Host 4
Host 5 Host 6
Host 7
Host 8
Host 9
Host 10
Figure 2.5:Example of an emulated Mininet topology with 10 hosts, 5 routers, 3 Open vSwitches and a SDN controller.