This is a temporary repository that we create in order to receive some valuable feedback from our users. In the future we are planning to merge this repository into the current trema repository.
We have already developed source that implements the OpenFlow 1.3.0 specification and we also planning to include the newer OpenFlow version 1.3.1. The current implementation is C only. Trema for OpenFlow 1.3 does not support OpenFlow version 1.0.
Status of implementation:
trema command
: will not worklibtrema
: worksswitch_manager, switch daemon
: workstremashark
: not yet implementedsrc/examples/dumper
: works (C only)src/examples/learning_switch
: works (C only)trema apps
: not work
- Ruby 1.8.7 (1.9.x is NOT supported yet)
- Ubuntu 12.04 (amd64)
It may also run on other GNU/Linux distributions but is not tested.
% sudo apt-get install gcc make ruby1.8 rubygems1.8 ruby1.8-dev libpcap-dev libsqlite3-0
% sudo gem install bundler
% git clone git://github.com/trema/trema-edge.git
% cd trema-edge
% sudo bundle install
% ./build.rb
% ./learning_switch.sh start
Stop learning switch
% ./learning_switch.sh stop
% mkdir work
% cd work
% vi sample.c
..
% cat sample.c
#include <inttypes.h>
#include "trema.h"
static void
handle_switch_ready( uint64_t datapath_id, void *user_data ) {
info( "Hello %#" PRIx64 " from %s!", datapath_id, user_data );
stop_trema();
}
int
main( int argc, char *argv[] ) {
init_trema( &argc, &argv );
set_switch_ready_handler( handle_switch_ready, argv[ 0 ] );
start_trema();
return 0;
}
% cc `../trema-config -c` -o sample sample.c `../trema-config -l`
% cd ..
% ./trema-run.sh ./work/sample start
Stop controller
% ./trema-run.sh ./work/sample stop
- Multiple tables,groups support (Setting of multiple tables, groups).
- Extensible match support. (Extensible match support applicable to MPLS and IPv6 match setting).
- Extensible packet rewrite support. (Extensible packet rewrite support applicable to MPLS and IPv6).
- Support for added packet-in contents. (Support for additional cookie and match fields).
- The packet-in has been expanded to include the cookie and the match fields.
- The
flow_mod
that had only match+actions has been expanded to match+instructions+actions.
- The cookie mask is to be used in
flow_mod
modify/delete andflow_stats_request
andaggregate_stats_request
. As currently trema does the cookie translation it is a problem.
Flow_mod
is necessary after switch connection establishment since the default packet-in is not sent.- Since the cookie field is attached to packet-in the application can also attach it to
flow_mod
. - It is necessary to search for the
in_port
included in the match of the packet-in. - Since the features reply doesn't include port information it is necessary to use a different method to retrieve. (
OFPT_MULTIPART_REQUEST
)
- undefined structure
- p.44:
ofp_instruction_experimenter
- p.65,66:
ofp_table_feature_prop_header
andofp_table_feature_prop_experimenter
- p.66:
ofp_instruction
- p.44:
- undefined macro
- p.54:
OFPTC_*
- p.69:
OFPQ_ALL
- p.70:
OFPG_ANY
andOFPG_ALL
- p.54:
- typo
- p.43:
OFPXMT_OFP_MPLS_BOS
->OFPXMT_OFB_MPLS_BOS
- p.83:
OFPQCFC_EPERM
->OFPSCFC_EPERM
- p.38:
OFPQT_MIN
->OFPQT_MIN_RATE
andOFPQT_MAX
->OFPQT_MAX_RATE
- p.75:
NX_ROLE_
->OFPCR_ROLE_
- p.72:
/* All OFPMC_* that apply. */
->/* All OFPMF_* that apply. */
- p.43:
- added macro
OFP_DEFAULT_PRIORITY
OFP_DEFAULT_MISS_SEND_LEN
- data length of the OXM TLV
OXM_OF_IPV6_FLABEL
20bits is 4bytesOXM_OF_MPLS_LABEL
20bits is 4bytesOXM_OF_PBB_ISID
24bits is 4bytes
Trema is released under the GNU General Public License version 2.0: