Deployment Guide
95
C.2 Step 1 - Set up a VLAN flow
The script below shows the JSON code that is used to create the first flow, in the VLAN table (table 10 in
the SOC).
{
"dpid" : <your switch datapath ID goes here>,
"cookie" : 1,
"cookie_mask" : 1,
"table_id" : 10,
"hard_timeout" : 30,
"priori ty" : 1,
"flags" : 1,
"_name" : "vlan10",
"cmd" : "add",
"mask" : "0",
"port" : "any",
"group" : "any",
"match" : {"in_port" : 2, "vlan_vid" : 10},
"instructions" : [{"goto": {"table_id":20}} ]
}
This script is fed into the REST API in the Ryu controller via the Postman application as shown below. First
the authorization parameters are set using the controller username and password, as with the Get
/stats/switches, and the API URL is set to http://<ryu controller IP>:8080/stats/flowentry/add.
Next the headers are verified set as shown below, with the content type set to JSON and the basic
authorization header in place, and the JSON transaction type set to POST: