0
ONOS measurement based control describes how real-time streaming telemetry can be used to automatically trigger SDN controller actions. The article uses
DDoS mitigation as an example.
This article recreates the demonstration using the
Ryu SDN framework and emulating a network using
Mininet. Install both pieces of software on a Linux server or virtual machine in order to follow this example.
Start Ryu with the
simple_switch_13 and
ryu.app.ofctl_rest applications loaded:
ryu-manager $RYU_APP/simple_switch_13.py,$RYU_APP/ofctl_rest.py
Note: The
simple_switch_13.py and
ofctl_rest.py scripts are part of a standard Ryu installation. The $RYU_APP variable has been set to point to the Ryu app directory.
This demonstration uses the
sFlow-RT real-time analytics engine to process standard
sFlow streaming telemetry from the network switches.
Download
sFlow-RT:
wget https://inmon.com/products/sFlow-RT/sflow-rt.tar.gz
tar -xvzf sflow-rt.tar.gz
Install the
Mininet Dashboard application:
sflow-rt/get-app.sh sflow-rt mininet-dashboard
The following script,
ryu.js, implements the DDoS mitigation function described in the previous article:
var ryu = '127.0.0.1';
var controls = {};
setFlow('udp_reflection',
{keys:'ipdestination,udpsourceport',value:'frames'});
setThreshold('udp_reflection_attack',
{metric:'udp_reflection',value:100,byFlow:true,timeout:2});
setEventHandler(function(evt) {
// don't consider inter-switch links
var link = topologyInterfaceToLink(evt.agent,evt.dataSource);
if(link) return;
// get port information
var port = topologyInterfaceToPort(evt.agent,evt.dataSource);
if(! Continue reading