停止Pox控制器的开关

问题描述 投票:1回答:1

我正在尝试建立一个测试网络,我有一个交换机列表,其中只有一个可以一次处于活动状态。我已经在每个ConnectionUp事件上保持更新的连接列表,如下所示:

def _handle_ConnectionUp (event):    
  for switch in switchesList:
      ...
      if switch.dpid == str(event.dpid):
        switch.connection = event.connection
      ...
      if any other switch from switchesList is running
        stop that switch
      ...

据我所知,我可以使用connection.send向该交换机发送消息,但是我没有找到包含“stop”命令的Openflow消息。每当在mininet CLI中我手动运行:

开关s1开始

我希望POX达到类似于运行的效果:

开关s2停止

来自mininet CLI。

有没有办法发送这样的消息或者以其他方式访问交换机参考?

python tcp sdn mininet pox
1个回答
0
投票

在流表内设置流(例如,action = of.ofp_action_output(port = of.OFPP_DROP))以丢弃所述交换机的不同端口处的所有分组可以提供期望的效果。

© www.soinside.com 2019 - 2024. All rights reserved.