You may find this information in several blogs, specially the useful thread published by Steve Roberts on his blog.
In this short post I plan to update some of the procedures to 2016 standards. That is, current builds and packages. But still following Steve’s example.
Don’t use the default Erlang pre-compiled package
I have tried and it fails. Specifically, Erlang 18 and greater make use of a different type of dictionaries that return unexpected values to the script compiling LINC.
As I mentioned in a comment at Steve’s blog, you may use version 17.5:
- wget http://www.erlang.org/download/otp_src_17.5.tar.gz (see UPDATE 26/07/16 below)
- Follow installation at beginning of: http://elinux.org/Erlang
Use my sys.config instead
Once Erlang is installed, you Steve guides you towards downloading and installing LINC (what turns your RaspberryPi into an Openflow switch).
Before completing the compilation, LINC installer asks you to write a sys.config detailing your switch characteristics and functionalities. You can find a good explanation of what this file does, but the issue is that almost all of the examples I found are outdated, and make LINC’s console crash. A bummer.
After doing a little googling, I found out that even though queues are not specified as mandatory for LINC’s Openflow spec, you have to explicitly state it on you sys.config file. Here’s a copy of an example file (based on the information found here).
UPDATE (26/07/16): After continuing Steve’s walk-through, I got a problem in the communication between LINC and an external Ryu controller. Specifically, Ryu does not accept LINC’s connection because LINC seems to send Openflow hello messages without a sufficiently large data field (this is the consequence of this patch).
I then proceeded to test LINC <-> Ryu configuration following Ryu’s documentation page. I noticed that a particular way of building LINC is recommended, presumably due to a bug. It requires an even older version of Erlang and OTP, like otp_src_R16B03-1.tar.gz.
UPDATE (27/07/16): Failure. I could not find a way to make LINC of_packetIn messages to have a valid payload. This provokes a disconnection from Ryu controller.
I decided to leave LINC behind, and proceed with installing OpenvSwitch (OVS) in my Raspberry Pi (this will be detailed in another post).