1.启动ONOS后,浏览器进入doc http://10.109.247.211:8181/onos/v1/docs/
2.找到Flow,并打开POST 3.可以直接在这个上面编辑flow stream里面模拟GET获得的流表格式写 { “priority”:1234, “timeout”:0, “isPermanent”:true, “deviceId”:”of:0000000000000001”, “treatment”:{ “instructions”:[ { “type”:”OUTPUT”, “port”:-2 } ], “deferred”:[] }, “selector”: { “criteria”: [ { “type”: “ETH_TYPE”, “ethType”: 2054 } ] } }
4.点击Try it out! 出现如下结果时,成功下发流表 【验证】 1.直接通过GET获取新的流表,发现有刚刚下发的流表 (先通过 GET /flows获取相应的flowId) 2.在与ONOS连接的mininet上,查看交换机of:0000000000000001的流表,也能看到下发的流表 通过REST API来删除流表同样能成功!!! 终于找到啦!!!