The topic of the homework is to do network tomography with OpenFlow switches. This seems to be a good book about the topic.
To be able to simulate a computer network we use Linux's namespaces (i.e. process virtualization) and Open vSwitch.
To make this easy
the professor proposes to use
Mininet and Ryu.
But since a lot of stuff can be done directly from the Open vSwitch command line
interface (ovs-ofctl
),
I can probably get away with mush less.
Please note that mininet uses nameless/anonymous/unnamed namespaces, to see them,
once they are created it is sufficient to use the command ip netns list-id
.
Here a few sources from a mailing list
and the usual StackOverflow.
To list all the OpenVSwitch bridges/switches the commands ovs-vsctl show
and
ovs-vsctl list-br
, it seems that they must be run from the current user to see
the switches.
This video shows how to create
network namespaces by hand and how to connect them! It is perfect for what I
want to do. some usefull comand to look into are: ip(1)
and brctl(1)
, the
second one seems to be a way to connect network namespaces without Openflow
capabilities.
This is some useful documentation about using Openflow with Open vSwitch.
This describes how Mininet works at
a high level. The mininet(1)
command is written mostly in Python but it is
based on this tiny C
program which executes commands in separated network namespaces.
Wireshark or tcpdump can be used to sniff Openflow traffic because it runs on top of TCP, as shown in this video.
A cool reference of OpenVSwitch commands.
If you have networks with loops in mininet here is the solution.
A basic OpenFlow controller written in C.
ovs-vsctl set-controller s1 tcp:localhost:6633
must be used to make the
Installing the default controller