floodlight java_将流量推送到Floodlight控制器

该博客介绍了如何通过curl命令和RyanWallner的解决方案在Floodlight控制器中设置QoS流。作者提供了详细的curl命令,用于在不同交换机上添加和删除流量规则,确保特定IP之间的流量控制。这些规则涉及了正向、反向以及ARP流量的处理,以实现网络的QoS功能。
摘要由CSDN通过智能技术生成

花了一段时间,但我找到了使用此链接的解决方案

向Ryan Wallner致敬,以实现QoS .

这是代码

和相关的视频

下载Code后,转到 Floodlight/app/qos/

pythons脚本的位置以在Controller中添加流 .

Note: 以上流程旨在帮助您了解流程推送的工作原理 . 如果你不想要,你可以直接使用下面的curl命令 .

我刚刚做了一些日志记录,并通过运行python代码获得以下格式来在每个Switch中添加流量 .

我假设有问题的拓扑结构

对于每个开关,我们需要推动4个流程 Forward, Reverse, ForwardARP, ReverseARP

curl -s -d '{"switch": "00:00:00:00:00:00:00:02", "name":"00:00:00:00:00:00:00:02.5Mbps02-04.f", "src-ip":"10.0.0.2", "dst-ip":"10.0.0.4", "ether-type":"0x800", "cookie":"0", "priority":"2", "ingress-port":"2","active":"true", "actions":"output=3"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:02", "name":"00:00:00:00:00:00:00:02.5Mbps02-04.farp", "ether-type":"0x806", "cookie":"0", "priority":"2", "ingress-port":"2","active":"true", "actions":"output=3"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:02", "name":"00:00:00:00:00:00:00:02.5Mbps02-04.r", "src-ip":"10.0.0.4", "dst-ip":"10.0.0.2", "ether-type":"0x800", "cookie":"0", "priority":"2", "ingress-port":"3","active":"true", "actions":"output=2"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:02", "name":"00:00:00:00:00:00:00:02.5Mbps02-04.rarp", "ether-type":"0x806", "cookie":"0", "priority":"2", "ingress-port":"3","active":"true", "actions":"output=2"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:01", "name":"00:00:00:00:00:00:00:01.5Mbps02-04.f", "src-ip":"10.0.0.2", "dst-ip":"10.0.0.4", "ether-type":"0x800", "cookie":"0", "priority":"2", "ingress-port":"1","active":"true", "actions":"output=2"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:01", "name":"00:00:00:00:00:00:00:01.5Mbps02-04.farp", "ether-type":"0x806", "cookie":"0", "priority":"2", "ingress-port":"1","active":"true", "actions":"output=2"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:01", "name":"00:00:00:00:00:00:00:01.5Mbps02-04.r", "src-ip":"10.0.0.4", "dst-ip":"10.0.0.2", "ether-type":"0x800", "cookie":"0", "priority":"2", "ingress-port":"2","active":"true", "actions":"output=1"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:01", "name":"00:00:00:00:00:00:00:01.5Mbps02-04.rarp", "ether-type":"0x806", "cookie":"0", "priority":"2", "ingress-port":"2","active":"true", "actions":"output=1"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:03", "name":"00:00:00:00:00:00:00:03.5Mbps02-04.f", "src-ip":"10.0.0.2", "dst-ip":"10.0.0.4", "ether-type":"0x800", "cookie":"0", "priority":"2", "ingress-port":"3","active":"true", "actions":"output=2"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:03", "name":"00:00:00:00:00:00:00:03.5Mbps02-04.farp", "ether-type":"0x806", "cookie":"0", "priority":"2", "ingress-port":"3","active":"true", "actions":"output=2"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:03", "name":"00:00:00:00:00:00:00:03.5Mbps02-04.r", "src-ip":"10.0.0.4", "dst-ip":"10.0.0.2", "ether-type":"0x800", "cookie":"0", "priority":"2", "ingress-port":"2","active":"true", "actions":"output=3"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -s -d '{"switch": "00:00:00:00:00:00:00:03", "name":"00:00:00:00:00:00:00:03.5Mbps02-04.rarp", "ether-type":"0x806", "cookie":"0", "priority":"2", "ingress-port":"2","active":"true", "actions":"output=3"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

添加流量后ping将开始工作 . 有关详细信息请参阅服务质量链接avove .

To delete flows :

curl -X DELETE -d '{"name":"00:00:00:00:00:00:00:01.5Mbps02-04.f"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -X DELETE -d '{"name":"00:00:00:00:00:00:00:01.5Mbps02-04.r"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -X DELETE -d '{"name":"00:00:00:00:00:00:00:01.5Mbps02-04.farp"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

curl -X DELETE -d '{"name":"00:00:00:00:00:00:00:01.5Mbps02-04.rarp"}' http://192.168.0.107:8080/wm/staticflowentrypusher/json

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值