As explored in previous posts, I’ll be using Ryu Openflow controller in order to bring SDN control over a RaspberryPi-based network.
As this post is intended to be a guide for anyone wishing to replicate my results, I will also leave links to sources I found useful.
- Learn a little bit about Python decorators.
- Download and install Ryu.
- Go through at least the first example in the Ryubook (actually, go through it all). Additional aid:
- Consult the Ryu API reference very often.
- Maybe understand that Python dictionaries have a setdefault option.
- For the first implementation of a simple Switch, I built my own network using real devices (see Figure below). One of the recurrent issues with this is that you must set your end-devices IP addressing and routing correctly. Otherwise, you will be seeing a lot of L2-broadcast frames at the controller log (for instance: ARP request for a missing gateway, or messages to the IPv6 neighbor discovery protocol). This might not be a problem for research purposes, but you would definitely want to fix it.
- Get a notion about eventlets and green threads.
Fig. 1: First experiment. The OVS switch is connected to a Ryu controller on a separate network.
At the time of writing of this post I’ve successfully completed the exercises contained in Chapters 1-3 of the Ryubook. You will get a grasp of the coding style and handling of events in Ryu.
I will keep updating this post with the results from my own experiments.