Skip to content
C C++ M4 Shell Makefile Python Other
Branch: master
Clone or download
Latest commit e705035 Jan 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
debian Remove leak-checker. Feb 4, 2016
include Fix backtrace.c warnings. Feb 4, 2016
lib Fix compilation warnings for gcc -O0 flag. (#287) Oct 1, 2018
m4 First commit Jul 31, 2012
nbee_link Fix gcc 7.3 warning for -Wliteral-suffix Jul 25, 2018
oflib-exp First commit Jul 31, 2012
oflib Fix compilation warnings for gcc -O0 flag. (#287) Oct 1, 2018
secchan compiles with gcc 7.3.0 May 21, 2018
udatapath Merge branch 'master' of https://github.com/CPqD/ofsoftswitch13 Oct 10, 2018
utilities Fix wrong flow-mod parser for strings with only match or instructions. ( Oct 21, 2018
.gitignore Fix eth_type matching for frames with vlan Jan 10, 2013
Makefile.am No more compilation warnings. Feb 4, 2016
README.md Update README.md Jan 25, 2019
TODO.md Add token bucket control variables to the struct meter_band_stats Dec 6, 2012
acinclude.m4 First commit Jul 31, 2012
boot.sh
configure.ac
customnetpdl.xml Add support to match sctp Dec 10, 2014
install.sh Add check for directory of netbee Jul 10, 2017
soexpand.pl First commit Jul 31, 2012

README.md

Basic OpenFlow Software Switch (BOFUSS)

This is an OpenFlow 1.3 compatible user-space software switch implementation. The code is based on the Ericsson TrafficLab 1.1 softswitch implementation, with changes in the forwarding plane to support OpenFlow 1.3.

A paper that describes the basic architecture, selected use cases and a few benchmarks is available on Arxiv.

If you use the switch for academic purpuses, please consider refering to it.

Please read the FAQ before posting an issue

Check the Wiki for some resources that could possibly help you to modify the switch.

UPDATE: A new experimental branch with contributions from the BEBA EU Project is available with lots of performance improvements and OpenFlow extensions. If you want to try the code checkout to the BEBA-EU branch.

$ git checkout remotes/origin/BEBA-EU

The following components are available in this package:

  • ofdatapath: the switch implementation
  • ofprotocol: secure channel for connecting the switch to the controller
  • oflib: a library for converting to/from 1.3 wire format
  • dpctl: a tool for configuring the switch from the console

Getting Started

These instructions have been tested on Ubuntu 16.04. Other distributions or versions may need different steps.

Before building

The switch makes use of the NetBee library to parse packets, so we need to install it first.

  1. Install the following packages:

    $ sudo apt-get install cmake libpcap-dev libxerces-c3.1 libxerces-c-dev libpcre3 libpcre3-dev flex bison pkg-config autoconf libtool libboost-dev
    
  2. Clone and build netbee

    $ git clone https://github.com/netgroup-polito/netbee.git
    $ cd netbee/src
    $ cmake .
    $ make
    
  3. Add the shared libraries built in /nbeesrc/bin/ to your /usr/local/lib directory

    $ sudo cp ../bin/libn*.so /usr/local/lib
    
  4. Run ldconfig

    $ sudo ldconfig
    
  5. Put the contens of folder nbeesrc/include in the /usr/include

    $ sudo cp -R ../include/* /usr/include/
    

Building

Run the following commands in the ofsoftswitch13 directory to build and install everything:

$ ./boot.sh
$ ./configure
$ make
$ sudo make install

Running

  1. Start the datapath:

    $ sudo udatapath/ofdatapath --datapath-id=<dpid> --interfaces=<if-list> ptcp:<port>
    

    This will start the datapath, with the given datapath ID, using the interaces listed. It will open a passive TCP connection on the given port. For a complete list of options, use the --help argument.

  2. Start the secure channel, which will connect the datapath to the controller:

    $ secchan/ofprotocol tcp:<switch-host>:<switch-port> tcp:<ctrl-host>:<ctrl-port>
    

    This will open TCP connections to both the switch and the controller, relaying OpenFlow protocol messages between them. For a complete list of options, use the --help argument.

Configuring

You can send requests to the switch using the dpctl utility.

  • Check the flow statistics for table 0.

    $ utilities/dpctl tcp:<switch-host>:<switch-port> stats-flow table=0
    
  • Install a flow to match IPv6 packets with extension headers hop by hop and destination and coming from port 1.

    $ utilities/dpctl tcp:<switch-host>:<switch-port> flow-mod table=0,cmd=add in_port=1,eth_type=0x86dd,ext_hdr=hop+dest apply:output=2
    
  • Add a meter:

    $ utilities/dpctl tcp:<switch-host>:<switch-port> meter-mod cmd=add,meter=1 drop:rate=50
    
  • Send flow to meter table

    $ utilities/dpctl tcp:<switch-host>:<switch-port> flow-mod table=0,cmd=add in_port=1 meter:1
    

For a complete list of commands and arguments, use the --help argument. Also, check the wiki for Flow Mod examples

Contribute

Please submit your bug reports, fixes and suggestions as pull requests on GitHub, or by contacting us directly.

License

OpenFlow 1.3 Software Switch is released under the BSD license (BSD-like for code from the original Stanford switch).

Acknowledgments

This project was supported by Ericsson Innovation Center in Brazil. Formerly maintained by CPqD in technical collaboration with Ericsson Research.

List of Contributors

Contact

E-mail: Eder Leao Fernandes (ederleaofernandes at gmail . com)

You can’t perform that action at this time.