2019 SDN上机第6次作业
一、使用Python脚本完成拓扑搭建,并连接ryu控制器。 二。使用Ryu的REST API下发流表实现和第2次实验同样的VLAN curl -X POST -d '{ "dpid": 1, "priority":1, "match":{ "in_port":2 }, "actions":[ { "type": "PUSH_VLAN", "ethertype": 33024 }, { "type": "SET_FIELD", "field": "vlan_vid", "value": 4096 }, { "type": "OUTPUT", "port": 1 } ] }' http://127.0.0.1:8080/stats/flowentry/add curl -X POST -d '{ "dpid": 1, "priority":1, "match":{ "in_port":3 }, "actions":[ { "type": "PUSH_VLAN", "ethertype": 33024 }, { "type": "SET_FIELD", "field": "vlan_vid", "value": 4097 }, { "type": "OUTPUT", "port": 1 } ] }' http://127.0.0.1:8080/stats/flowentry/add