SDN and Mininet

SDN

Where will it be used?

Definitely here

Datacenter

image source: backblaze.com

Very likely here

DSLAM

image source: computerbase.de

Maybe here

DE-CIX

image source: heise.de

Not here

FritzBox

image source: avm.de

So … should I care as an end user?

-

No

What are the differences to classical networking?

Classical networking: switches

Switch

image source: engeniustech.com

Classical networking: switches

Classical networking: routers

Router

image source: networkscreen.com

Classical networking: routers

Software defined networking: forwarding devices

Classical networking

Data forwarding and rule-making are part of the same device

Data/Control planes

image source: David Mahler via Youtube

Software defined networking

Data forwarding and rule-making are decoupled

Network OS

image source: David Mahler via Youtube

How are SDN controllers written?

OpenFlow

SDN controller frameworks simplify writing controllers

1 from ryu.base import app_manager
2 
3 class L2Switch(app_manager.RyuApp):
4     def __init__(self, *args, **kwargs):
5         super(L2Switch, self).__init__(*args, **kwargs)

source: http://ryu.readthedocs.io

How are SDN controllers tested?

Mininet

Mininet

Mininet is a python-based network simulation tool

Using mininet one can test …

and more

How it works

Containers vs. VMs

(fujitsu.com)

Mininet uses container based virtualization to emulate network hosts

Container virtualization

Containers are an alternative to classical full-OS virtualization

Applications in a Container are isolated from the other containers by the operating system kernel

Pros:

Cons

Installing Mininet

Mininet uses the Linux container virtualization features
⇒ Only runs on Linux

It can be installed using …

Mininet workflow

Start the VM

Mininet VM

Start the VM

The virtual machine image provided by the mininet community has all of the required tool for running mininet pre-installed and pre-configured.

It is based on the Ubuntu Linux distribution so installing additional software is relatively easy.

Write network topology

Topology definition

Write network topology

The network topology is configured as a python script that is read by mininet.

It sets up the hosts to simulate and the forwarding devices connecting these hosts.

Write an openflow controller

Controller

Write an openflow controller

The openflow controller is responsible for analyzing packets entering the forwarding devices and for installing forwarding rules into the device.

Run the openflow controller

Running controller

Run the openflow controller

Once the openflow controller is started is listens on a TCP port for connections from forwarding devices.

Run the network topology

Running topology

Run the network topology

On the previous slide mininet was instructed to run the network topology written earlier and to connect to the custom openflow controller.

The example simulates three hosts connected to a single central switch.

Run network analyzer

Running wireshark

Run network analyzer

In order to validate the behaviour of the openflow controller the packets flowing into and out of the simulated hosts is monitored.

This is done using the wireshark network analyzer.

Execute commands in mininet containers

Executing commands

Execute commands in mininet containers

The simulated hosts in the mininet topology are implemented using Linux container virtualization.

Any command available for execution on the mininet VM can also be used in the simulated hosts.

In the example at hand the ip addr command is used on the first host to find its IP address and the ping command is used to send packets from the second host to the first one.

… Hope for the best

Wireshark success

… Hope for the best

If the test was successful the wireshark instances should show packets flowing between the two hosts.

Complete mininet environment

Mininet environment

Complete mininet environment

The previous slide shows the setup I used while developing my openflow controllers.

The tools used are (in clockwise order): Text editor for editing the controllers, Wireshark network analyzer, documentation/source code of the framework I used, debug output of the controller, mininet shell.

Project status:

What I implemented so far: