This repo hosts the source code of μSDN, which we published in the NetSoft 2018 conference (paper, slides). μSDN is also in the process of being ported to Contiki-NG (which will supersede this version), you can check out the μSDN-NG repo progess here.
μSDN is has been developed to provide an open source platform to deliver SDN on 6LoWPAN IEEE 802.15.4-2012 networks. The version here is currently not compatible with TSCH, though we have previously tried it out with our own 6TiSCH implementation for contiki (check out the NFV-SDN 2017 paper here).
Alongside μSDN itself, we provide an embedded SDN controller, Atom, as well as a flow generator for testing purposes, Multiflow.
Please note, this is an academic exercise and a fairly large codebase, so there are many things in μSDN which may not have been done as cleanly or transparently as I may have liked (though I have tried to clean it up somewhat). I've tried to give a brief overview of all the features and modules here, and you can find the paper and slides within at the top level, but if you find yourself getting lost then I'm happy to answer any questions you may have.
IMPORTANT You'll also need to install the 20-bit mspgcc compiler.
For instructions on how to compile this please click here
For a pre-compiled version for Ubuntu-64 please click here
Some people have had issues trying to install this compiler, so if you're new to Contiki or Linux in general then I'd recommend doing the following:
export PATH=$PATH:<uri-to-your-mspgcc>
. Once you have done this your path should look something like this:echo $PATH
/home/mike/Compilers/mspgcc-.7.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
msp430-gcc --version
) it should be 4.7.3.msp430-gcc (GCC) 4.7.3 20130411 (mspgcc dev 20120911)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You are now ready move on to the next stage! If you haven't properly set it up to use the 20-bit mspgcc then it will not compile!!!
Because of the size of the stack, if you're testing in Cooja you'll need to compile for exp5438 motes (there is a Makefile.target which should handle this for you). Please note that you'll need to run make in both sdn/controller and sdn/node as I haven't set it up to do both in the higher level directory.
cd usdn/examples/sdn/controller/
make clean & make
cd ..
cd node/
make clean & make
To get you going you can find some Cooja examples in:
usdn/examples/sdn/..
There is a handy compile script in there that can be used to compile both the controller and node:
./compile.sh MULTIFLOW=1 NUM_APPS=1 FLOWIDS=1 TXNODES=8 RXNODES=10 DELAY=0 BRMIN=5 BRMAX=5 NSUFREQ=600 FTLIFETIME=300 FTREFRESH=1 FORCENSU=1 LOG_LEVEL_SDN=LOG_LEVEL_DBG LOG_LEVEL_ATOM=LOG_LEVEL_DBG
uSDN Make Args:
Multiflow Make Args:
Future μSDN development will merge with μSDN-NG, based on the newer (and maintained) Contiki-NG.
sdn.c
Main SDN process.
sdn-cd.c
Controller discovery and join services.
sdn-conf.c
SDN node configuration.
sdn-ft.c
SDN flowtable(s).
sdn-ext-header.c
Extension headers for source routing.
sdn-packetbuf.c
Buffer to allow storing of packets whilst nodes query the controller.
sdn-timer.h
Timer configuration and macros.
sdn-stats.c
SDN statistics. This also replaces the powertrace application from Contiki.
usdn-driver.c
The driver interfaces with the flowtable to provide a basic API to allow specific functions, such as fowarding packets based on source/destination, aggregating packets, dropping packets, etc.
usdn-engine.c
The engine handles incomming and outgoing SDN messages, using the API provided by the driver.
usdn-adapter.c
The adapter provides a connection interface to the controller for a specific protocol. Currently this is for the μSDN protocol.
atom.c
Main process for atom.
atom-buffer.c
Buffer for incomming and outgoing packets.
atom-net.c
Keeps tracks of and abstracts the network state for the contrller. My original idea for this was that the controller should be able to configure the network so that nodes update the view with the required metric, rather than all metrics, in order to keep the memory requirements down.
atom-sb-xx.c
Atom allows you to create multiple southbound connectors. Currently we have a μSDN and RPL connector implemented.
atom-app-net-xx.c
Network applications.
atom-app-route-xx.c
Routing applications.
atom-app-join-xx.c
Join/association applications.
./compile.sh ADD_MAKEFILE_ARGS_HERE*