Giter Site home page Giter Site logo

zoltanlajoskis / ofsoftswitch13 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cpqd/ofsoftswitch13

0.0 1.0 0.0 4.82 MB

OpenFlow 1.3 switch.

Home Page: http://cpqd.github.com/ofsoftswitch13

Makefile 0.54% M4 1.06% Shell 0.78% C 95.80% Roff 0.12% C++ 1.46% Perl 0.03% Python 0.22%

ofsoftswitch13's Introduction

OpenFlow 1.3 Software Switch

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.

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
```   

Important notice: Despite the fact the switch is still popular for adventurers trying to implement own changes to OpenFlow, support now is on a best-effort base. Currently, there are lots of complaints about performance degradation, broken features and installation problems. Although not confirmed, most of the problems seem to be due to most recent linux versions. As the main contributor of the switch, I would like to keep the project alive and fix all the recurrent issues. However, life moves and new projects come, resulting in no time to work on it. I am still happy to help anyone who comes asking for advice on how to make changes in the code, but I cannot guarantee quick and active replies.
-Eder

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 12.04. Other distributions or versions may need different steps.

For Ubuntu 14.04, please check @castroflavio solution: How to compile on Ubuntu 14.04

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-c2-dev libpcre3-dev flex bison pkg-config autoconf libtool libboost-dev
    
  2. Download the most recent Netbee version, and unpack the source code from:http://www.nbee.org/download/nbeesrc-jan-10-2013.php

  3. Create the build system

    $ cd nbeesrc/src
    $ cmake .
    
  4. Compile

    $ make
    
  5. Add the shared libraries built in /nbeesrc/bin/ to your /usr/local/lib directory

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

    $ sudo ldconfig
    
  7. 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.

The dpctl utility has some limitations at the moment:

  • No support for OXM masks
  • No support for multipart messages
  • Some set_field action fields are not present

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.

Contributions:

Zoltán Lajos Kis, ofsoftswitch 1.1 implementation and guidance for OpenFlow spec related subjects.

Jean Tourrilhes, lots of critical memory bug fixes on table features.

Khai Nguyen Dinh and Thanh Le Dinh, contributions on meter features.

Rich Lane, added the right compiler linker.

yu-iwata, fixed flow deletion without matchin out_port.

Yuval Adler, bug fixes related to matching on vlan and ethertype.

Hiroyasu OHYAMA, correct URL of NetBee Library.

...

"Your name here" -- please, let us know if we forgot to add your name to the list of contributors!

Contact

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

ofsoftswitch13's People

Contributors

ederlf avatar rrdenicol avatar alnvdl avatar yamt avatar janscheurich avatar cloudysunny14 avatar ljerezchaves avatar vitalivanov avatar mahdth avatar viktor-nordell avatar kapplerchris avatar janskalny avatar rlane avatar simhond avatar srijanmishra avatar

Watchers

Zoltán Lajos Kis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.