简体   繁体   English

如何使用open vswitch和Pox控制器检查Mininet中哪些端口连接到主机?

[英]How to check which ports are connected to host in Mininet using open vswitch and a Pox controller?

I am trying to write a Pox controller using python. 我正在尝试使用python编写一个Pox控制器。 The environment is set up using Mininet and the switch type is ovsk (open vswitch). 使用Mininet设置环境,开关类型为ovsk(打开vswitch)。 For each individual switch, some of the ports are connected to hosts, some of them are connected with the other peer switches, some might connected to the controller, or routers. 对于每个单独的交换机,一些端口连接到主机,其中一些端口与其他对等交换机连接,一些端口可能连接到控制器或路由器。 I can use "sh ovs-ofctl show " in mininet to get the openflow port number mapping with interface name. 我可以在mininet中使用“sh ovs-ofctl show”来获取带有接口名称的openflow端口号映射。

My question is: in the Pox python code, how can I check which ports on a switch are connected to host and which ones are connected to peer switches, controllers or routers? 我的问题是:在Pox python代码中,如何检查交换机上哪些端口连接到主机,哪些端口连接到对等交换机,控制器或路由器?

I think this question is old. 我觉得这个问题很老了。 but you can do so using host tracker module. 但你可以使用主机跟踪器模块这样做。

Have alook at the host tracker module and gephi_topo module under misc to see the code to extract such information under PacketIn event. 已经在misc下的主机跟踪器模块和gephi_topo模块上查看了在PacketIn事件下提取此类信息的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM