This is my bachelor thesis.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
frederik.maassen 26931cdd82 remove unnecessary import 2 years ago
implementation remove unnecessary import 2 years ago
test data tidying up repository 2 years ago
thesis tidying up repository 2 years ago
.gitignore new gitignore for runtime tex files 2 years ago
CITATION.cff some text changes 2 years ago
Notes.md added label for udp tests, removed udp from iperf server call strings 2 years ago
Readme.md „Readme.md“ ändern 2 years ago

Readme.md

Comparison Of Fast Recovery Methods In Networks

Bachelor Thesis about the effectiveness of ShortCut and similar Fast Recovery Mechanisms (FRM) in virtual network topologies.

Introduction

In this work we create virtual network topologies in Mininet, implement Fast Re-Routing (FRR) and Fast Recovery Mechanisms (FRM) and evaluate them in a test framework created in python, using the Mininet Python API.

In this repository you will find all implementations and test data used in the bachelor thesis.

Browsing the Repository

The repository is divided into three main folders:

  • thesis
  • implementation
  • test data

Under thesis you will find all .tex files and images for parsing a new version of the bachelor thesis. implementation contains all scripts that were written in context of the test framework and under test data you will find the output files for all measurements used in our thesis.

Installation

In the following sections we will explain how to set up a Virtual Machine (VM) with Mininet and install all dependencies to use our test framework.

Setup Mininet VM

The creators of Mininet offer a pre-configured VM that can be used with a virtualization software like VirtualBox. If you want to run Mininet on a native system, you will need to install Mininet according to the instructions on the mininet homepage.

The Mininet VM uses the Ubuntu distribution. The Mininet VM with Ubuntu 20.04 was used in our tests.

Install dependencies

After we got a running version of Mininet we are now required to install dependencies which will be used by our test framework.

GnuPlot

A library for creating plots using a Command Line Interface (CLI) with extensive configuration capabilities.

GnuPlot can be installed using apt-get on Ubuntu.

sudo apt-get update
sudo apt-get install gnuplot

iPerf3

Mininet comes pre-installed with iPerf2 but iPerf3 provides higher accuracy and configurability than its predecessor.

iPerf3 can be installed using apt-get on Ubuntu.

sudo apt-get update
sudo apt-get install iperf3

nftables

Nftables is used in the test framework to implement ShortCut. It is a packet filtering software mostly used for the implementation of firewall rules.

Nftables can be installed using apt-get on Ubuntu:

sudo apt-get update
sudo apt-get install nftables

sudo apt install python3-nftables

NetfilterQueue

The NetfilterQueue python library is a module that enables python to hook into events of the Netfilter Queue, a component storing packets that were redirected by software like nftables.

sudo apt-get update
sudo apt-get install build-essential python-dev libnetfilter-queue-dev

pip3 install NetfilterQueue

Checkout this repository

You can either use git to checkout this repository or download a .zip archive directly in your browser. After you have an extracted version of this repository on your Mininet instance, you can start using the framework.

Using the framework

The main entry point for any interaction with the framework is the mininet_controller.py. It can be executed using python3. In our instance of the Mininet VM we had to use sudo for all executions of python3. We assume the implementation directory as current working directory.

sudo python3 mininet_controller.py --help

Executing this command will result in the following output:

usage: mininet_controller.py [-h] [--tests] [--test TEST] [--topo TOPO]
                             [--topos] [--shortcut] [--limit_bw LIMIT_BW]
                             [--delay DELAY] [--produce_set] [--full_suite]

optional arguments:
  -h, --help           show this help message and exit
  --tests              list all available tests for a topology
  --test TEST          perform defined test on execution
  --topo TOPO          use defined topo
  --topos              list all available topologies
  --shortcut           use shortcut
  --limit_bw LIMIT_BW  limit bandwith of links in MBits
  --delay DELAY        add delay in ms to each link
  --produce_set        will execute the test with and without ShortCut
  --full_suite         will execute the test with and without ShortCut on all
                       defined topologies

Selecting a topology

Using sudo python3 mininet_controller.py --topos will list all available topologies. An examplary output would be:

{'Minimal': '2 hosts connected to a switch', '4R4H': 'A topology using 4 routers and 3 hosts', '6R4H': 'A topology using 6 routers and 3 hosts', '8R4H': 'A topology using 8 routers and 3 hosts'}

Using the identifier of a topology, in this case the key in the dictionary that was returned, we can tell our test framework to build said topology. A command building a topology using 4 routers and 3 hosts would be:

sudo python3 mininet_controller.py --topo 4R4H

The test framework will create the topology and start the Mininet CLI which can then be used for manual configuration and testing.

Executing tests

For each topology tests can be implemented. These are unique to each topology and are implemented inside the topology class. To list all available tests for a topology simply use sudo python3 mininet_controller.py --topo 4R4H --tests.

An examplary output would be:

Currently available tests are: ['tcp_bandwidth_intermediate', 'udp_bandwidth_intermediate', 'bandwidth_link_usage_intermediate', 'bandwidth_link_usage_concurrent', 'bandwidth_failure_concurrent', 'latency_failure_concurrent', 'latency_failure_intermediate', 'tcp_packet_flow_intermediate', 'udp_packet_flow_intermediate', 'udp_packet_flow_concurrent', 'tcp_packet_flow_concurrent']

Using the name of a test we can start the automatic execution of the test. Most tests log their results directly to the /tmp directory.

Warning: Some tests use the same file names for every executed test. This might cause multiple runs of a test to overwrite old results. Please make sure to save any results that are worth preserving in a separate directory.

sudo python3 mininet_controller.py --topo 4R4H --test latency_failure_intermediate

The test will execute all defined steps and then shut down the created topology.

Extending the framework

Creating tests

Tests can be added to any topology in the get_tests(self) function. Please use already implemented tests as a guideline for creating tests.

Adding topologies

Topologies in our framework need to inherit from the CustomTopo class. This class defines 3 abstract methods, namely get_policies(), get_tests() and get_routings(). These need to be implemented by any topology used by our framework. Please use already existing topologies as a guideline for configuration. In addition to this, each topology should implement the build() method containing the actual creation of the topology using the Mininet python API.

After the topology was created and configured, it can now be added to the set of known topologies. Because the framework is not yet able to scan for new topologies itself, new topologies should be added to the topos dictionary in mininet_controller.py, using an identifier as key and supplying the class name, the module name and a description.

The topology should now be listed when listing all topologies and can be used in the test framework.

Adding functions for tests

The mininet_controller.py contains a functions dictionary which references functions test configurations in topologies should be able to use. Each function is listed by name as a key and contains an attribute called callable, which contains a lambda call to the corresponding function. This is done to enable test configurations in topologies to reference said functions using these identifiers and sets of arguments, without actually knowing about existing functions.

Any function added to this dictionary can then be used to run tests.

Troubleshooting

ShortCut Implementation not working

Check file listener.log in execution directory and /tmp/shortcut.log.

Errors in data or empty graphs

Check /tmp/{test_name}.out (raw output), /tmp/{test_name}_pre_parsed.out (filtered output), /tmp/{test_name}_parsed.out (extended and filtered output) or separate test folders for data collected by tests.