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.

7.1 KiB

Mini Net Setup Notes


example mininet topology

  • use LinuxRouter class with IP forwarding to simulate routers
  • created minimalistic network ( with only 2 routers, 2 switches and 2 hosts
  • switches are unnecessary as we only connect 1 host per router, but might become relevant in the future when adding multiple hosts
  • added containing 3 hosts and 3 routers


IP Routing and FRR

General setup

  • created example from Short-Cut Paper
  • added static ip routing for hosts and routers
  • fast rerouting requires routing by inport, using ip policies and ip rules in linux kernel
  • ip policies allow requests from specific ethernet interfaces to use a specific routing table
  • routing tables would then include specific frr routes, e.g. if a packet going to R4 would be received on the port connected to R2 on R1

IP Route configuration

  • created python dictionaries that have entries for each router and for each routing table
  • routing tables consist of the default table for all requests from connected host and router itself and a table for each additional network interface, reacting on incoming packets for fast rerouting
  • "from" keyword in ip rules could be used to differentiate between returning packets and "normally" routed packets

Testing suite

  • implemented simple testing suite that is able to create tests by definition

test constrains

  • each subnet has a maximum of 1 host (connections between hosts in the same subnet are irrelevant)
  • failing paths need to have alternative routes
  • subnets between each router

failure scenarios

  • 2 types of failure scheduling: intermediate and concurrent
  • intermediate: a certain test operation is performed (like pings), a failure is induced, and the same test is performed again
  • concurrent: a timer is started and the test is run, timer should act while the test is running and performs the failure on runtime

failure types

  • interface shutdown: an interface is deactivated by calling "ifconfig {interface} down" to simulate a broken link

test topologies



  • try using ryu controller to configure packet flow according to ShortCut
  • frr as routing, ryu controller defining additional flow entries
  • controllers and p4 have shown to be to complex for this work
  • trying out "iptables"
  • example command for router 1 and packages to subnet 4 "iptables -I FORWARD -p all --in-interface r1-eth2 --destination -j LOG --log-prefix="SHORTCUT_TRIGGER""
  • example command with NFQUEUE "iptables -I FORWARD -p all --in-interface r1-eth2 --destination -j NFQUEUE --queue-num 1"
  • Target LOG seemingly cant be used, because syslog entries dont work in network namespaces (which mininet uses)
  • trying out NFQUEUE as target instead (
  • using scapy to parse packets in python
  • after deleting route from table, router 4 is unable to find route to (even though router 1 was affected)
  • it was also necessary to shut down the interface to router 2 on router 4 to enable routing again
  • first iperf test results fluctuate heavily, most likely because link throughput is unlimited (test this)


packet goes through loop > returns on router > iptables rule is hit and packet is added to queue > python listener evaluates packet and determines network > ip route is deleted

iptables to nftables

  • tables and chains need to be created
  • commands "add table ip filter" and "add chain ip filter FORWARD { type filter hook forward priority 0; }" should suffice
  • existing iptables commands can be translated with iptables-translate to nftables commands


  • "iptables -L -v" Show all iptables rules
  • "iptables -D FORWARD 4" delete rule 4 in FORWARD CHAIN (counting from 1)
  • "ip route list table incoming_eth2" list all route entries for routing table "incoming_eth2"
  • "ip rule show" show all ip rule policies

controller functionality (deprecated)

  • add flow entries for already existing routing, pingall at start of testing

  • react to new entries by checking already existing flow entries

    • if there is already an existing flow entry (identified by dest host)


    • if this flow entry references the input port of new packet as out port

steps to take

  • find out how to identify switches in ryu

  • "translate" routing entries in routing table to table flow entries



A tool for creating virtual networks. Is able to emulate hosts, switches, routers, hubs etc. It uses Openflow to realise many of these emulations.


A tool used to create virtual switches etc. Can be connected to a controller (e.g. created with POX) to write custom flow handling.


A python library to create a controller for handling flow of switches etc.


Controller that configures switches/routers based on python script file


  • reference of a protocol definition (RFCs)

Current state

  • implementing local FRR in test routers -> policy routing (performance?)
  • implementing short cut
  • using "ifconfig {if} down" for failing link simulation


  • shutting down link/interface and reinstating deletes rules ?




  • will shortcut have an influence on tcp connections?


  • implement python logging of listeners with the python logging queuehandler

Writing Notes

use subfigure und subcaptions, clever ref, write Figure/Section, einheitliches kursiv etc., number with \SI{30}{second}


  • how do i reference the git repository in my work?