春风十里不如你 —— Taozi - 雄安
https://xiongan.host/index.php/tag/%E9%9B%84%E5%AE%89/
-
【OpenDaylight】及Postman实现流表下发
https://xiongan.host/index.php/archives/198/
2023-04-14T00:25:00+08:00
安装OVS主机名ip角色ovs192.168.123.10ovs首先连接SSH用finalshell连接,需要提前配置好ip和网卡上传ovs源文件,并解压进入目录,执行./configure,生成Makefile文件然后进入编译安装make
make install实验六-OpenDaylight及Postman实现流表下发使用Opendaylight虚拟机安装jdk1.8,并启动opendaylight安装组件:首先清理旧数据DELETE http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/然后CLI命令行里再次清理sudo mn -c生成拓扑并连接 OpenDaylightsudo mn --topo=single,3 --controller=remote,ip=本机ip,port=6633 --switch ovsk,protocols=OpenFlow13使用 Postman 填入 JSON 格式的 http 请求//以下内容是Body中需要填写的
{
"flow": [
{
"id": "1",
"match": {
"in-port": "1",
"ethernet-match": {
"ethernet-type": {
"type": "0x0800"
}
},
"ipv4-destination": "10.0.0.3/32"
},
"instructions": {
"instruction": [
{
"order": "0",
"apply-actions": {
"action": [
{
"order": "0",
"drop-action": {}
}
]
}
}
]
},
"flow-name": "flow1",
"priority": "65535",
"hard-timeout": "5", //此处需要修改间隔,意味着h1 ping h3 有5秒时间是中断的
"cookie": "2",
"table_id": "0"
}
]
}现在CLI中h1 ping h3,再去PUT数据链接测试成功,结果符合预期鸣谢:小桂哥,King