如何使用Apache Spark捕获数据包并分析SDN网络

时间:2021-03-24 23:12:50

I am new in the world of network. I work in SDN field and I have a POX controller with a mininet. I need to capture the packets in the network using Apache Spark and then analysis them. By now I use Wireshark to capture packets and do analysis on them in Spark. However I think that Spark itself has capability of capturing the streaming packets. I search on this topic but unfortunately I could not find a good and clear code or method on it. Can any body help me more clearly?

我是网络世界的新人。我在SDN领域工作,我有一个带mininet的POX控制器。我需要使用Apache Spark捕获网络中的数据包,然后对其进行分析。到目前为止,我使用Wireshark捕获数据包并在Spark中对它们进行分析。但是我认为Spark本身具有捕获流数据包的能力。我搜索这个主题,但不幸的是我找不到一个好的和清晰的代码或方法。任何身体都可以帮助我更清楚吗?

1 个解决方案

#1


0  

If you are using POX, you can use events generated by pox to start process packets. For example, you can handle packetin event so you know every time a packet arrives the controller.

如果您使用的是POX,则可以使用pox生成的事件来启动进程数据包。例如,您可以处理packetin事件,以便每次数据包到达控制器时都知道。

you can also install some rules to count those packets based on some criteria.

您还可以安装一些规则来根据某些条件对这些数据包进行计数。

if you want to process all packets in the network then you need to connect your tool (I don't know spark) to the mininet network.

如果你想处理网络中的所有数据包,那么你需要将你的工具(我不知道火花)连接到mininet网络。

good luck

#1


0  

If you are using POX, you can use events generated by pox to start process packets. For example, you can handle packetin event so you know every time a packet arrives the controller.

如果您使用的是POX,则可以使用pox生成的事件来启动进程数据包。例如,您可以处理packetin事件,以便每次数据包到达控制器时都知道。

you can also install some rules to count those packets based on some criteria.

您还可以安装一些规则来根据某些条件对这些数据包进行计数。

if you want to process all packets in the network then you need to connect your tool (I don't know spark) to the mininet network.

如果你想处理网络中的所有数据包,那么你需要将你的工具(我不知道火花)连接到mininet网络。

good luck