This directory includes an OpenFlow controller that controls a single OpenFlow switch and emulates a layer 2 switch. Use memcached to forwarding database, otherwise same as learning_switch(Ruby version).
- Memcached http://memcached.org/
- Ruby memcache-client http://seattlerb.rubyforge.org/memcache-client/
if you are using Ubuntu linux. you can install them as follows:
Memcached
$ sudo apt-get install memcached
Ruby memcache-client
$ sudo gem install memcache-client
Get Trema and Apps
$ git clone git://github.com/trema/trema.git trema
$ git clone git://github.com/trema/apps.git apps
Build Trema
$ cd trema
$ ./build.rb
$ cd ..
Memcached
$ sudo /etc/init.d/memcached start
Learning switch
$ cd trema
$ sudo ./trema run -c ../apps/learning_switch_memcached/learning-switch.rb
Forwarding database dumper
$ ../apps/learning_switch_memcached/fdb-dumper
Copyright (C) 2008-2011 NEC Corporation
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Terms of Contributing to Trema program ("Program")
Please read the following terms before you submit to the Trema project ("Project") any original works of corrections, modifications, additions, patches and so forth to the Program ("Contribution"). By submitting the Contribution, you are agreeing to be bound by the following terms. If you do not or cannot agree to any of the terms, please do not submit the Contribution:
-
You hereby grant to any person or entity receiving or distributing the Program through the Project a worldwide, perpetual, non-exclusive, royalty free license to use, reproduce, modify, prepare derivative works of, display, perform, sublicense, and distribute the Contribution and such derivative works.
-
You warrant that you have all rights necessary to submit the Contribution and, to the best of your knowledge, the Contribution does not infringe copyright, patent, trademark, trade secret, or other intellectual property rights of any third parties.
-
In the event that the Contribution is combined with third parties' programs, you notify to Project maintainers including NEC Corporation ("Maintainers") the author, the license condition, and the name of such third parties' programs.
-
In the event that the Maintainers incorporates the Contribution into the Program, your name will not be indicated in the copyright notice of the Program, but will be indicated in the contributor list on the Project website.