一个网络流量是如何唯一标识的?

How is a network traffic flow uniquely identified?

哪些 features/statistics 网络流量可以唯一标识特定流?

我最初的想法是唯一标识符,例如从 eth_src 到 eth_dst 以及进出相同端口的所有数据包。

我一直在使用 Ryu Traffic Monitor 来尝试了解流量,它似乎使用了 in_port 和 eth_dst:

    for stat in sorted([flow for flow in body if flow.priority == 1],
                       key=lambda flow: (flow.match['in_port'],
                                         flow.match['eth_dst'])):
        self.logger.info('%016x %8x %17s %8x %8d %8d',
                         ev.msg.datapath.id,
                         stat.match['in_port'], stat.match['eth_dst'],
                         stat.instructions[0].actions[0].port,
                         stat.packet_count, stat.byte_count)

进一步的调查帮助我对此有了更多的了解:

网络流量是从源到目的地的流量。

我的具体问题(与传输协议有关)的答案是网络流被定义为由源 IP address/port 号码、目标 IP address/port 组成的 5 元组号码和使用的协议。也可以在此处添加以太网地址。

https://www.techopedia.com/definition/28190/5-tuple

编辑:感谢 Ron 提到这仅对使用端口的传输协议有效