From Sb
Jump to: navigation, search

OpenFlow Main Page

OpenFlow 1.1 Reference switch


General usage: After downloading run, than configure, and make, make install

Starting a switch instance: sudo ofdatapath punix:/var/run/dp0 -i eth0,eth1 (after pulling the interfaces down)

Using dpctl to manipulate flows:

sudo dpctl <switch eg. unix:/var/run/dp0> <command> <params>

adding a flow:
sudo dpctl <switch> flow-mod cmd=add,table=0 <match params eg. dl_dst=FF:FF:FF:FF:FF:FF> <action eg. apply:output=all>
(The applicable match params, and actions can be found in the header file dpctl.h, and other usage can be decoded from dpctl.c)

deleting a flow:
sudo dpctl <switch> flow-mod cmd=del,table=0 <match params eg. dl_dst=FF:FF:FF:FF:FF:FF>

flow statistics:
sudo dpctl <switch> stats-flow

other commands can be listed using dpctl --help

Greedy Implementation: The implementation of greedy routing can be done in this version of the switch as well.
(Note: For easier testing add a flow that redirects broadcast messages to all ports, this makes ARP work correctly)

Second implementation by Adam Stipkovits: Media:OF11GreedyV2.tar.gz (includes bugfixes)
First implementation by Adam Stipkovits: Media:Of11greedy.tar.gz

OpenWRT port of OpenFlow 1.1 Reference switch with Greedy routing

Patches of OpenFlow package should be removed.

.git information is necessary for OpenWRT build

trunk firmware with OF 1.1 Greedy routing for TP-Link TL-WR841ND v5:


config files:




greedy flow entry describing a neighbor:

dpctl unix:/var/run/dp0.sock flow-mod cmd=add,table=0 dl_dst=00:00:00:00:00:02 apply:output=2

greedy flow entry for own coordinates (drop rule):

dpctl unix:/var/run/dp0.sock flow-mod cmd=add,table=0 dl_dst=00:00:00:00:00:02 apply:

Netconfd extension for OpenFlow 1.1 Reference switch

Installation of OF side: Copy and overwrite files before running
Note: udatapath.c has been changed! Backup previous changes to udatapath.c before overwriting!

Installation of OF module in Yuma: Copy files, then make and make install in Yuma root and libopenflow directory.
Note: Yuma needs additional packages, such as libxml2-dev, libncurses5-dev, libssh2-1-dev (Debian). Also remember to edit /etc/ssh/sshd.config (Debian) and restart the ssh service.
Follow the installation manual of Yuma.
Get Yuma source here.

Brief usage:
Run netconfd as root, and with "--module=openflow --superuser='Insert-username'" parameters
After connecting from yangcli to netconfd, "get-locks" and create the database: "create /openflow-switch"
Fill the required data: version 1.1 ; path /usr/local/ ; interfaces (min 2 elements) ; ofConn the socket address between ofdatapath and ofprotocol ; controllerType tcp ; controller address ; controller port
"save" the database and "release-locks"
Start the switch with "openflow-startup" and get the datapath database with "sget /openflow-switch/datapath"

To learn more, read Yuma Quickstart Guide

Personal tools