sflowtool icon indicating copy to clipboard operation
sflowtool copied to clipboard

sflowtool 接收到数据,是如何来计算源IP到目的IP地址的流量?How to calculate the traffic from the source IP to the destination IP address after receiving data?

Open 315xiaoyao opened this issue 1 year ago • 1 comments

场景:

  1. SW--->sflowtool--->kafka<----python去消费数据,现在的问题就是能提取出具体的五元组信息,但是不知道如何计算这个带宽是多少? 1

315xiaoyao avatar Dec 04 '23 10:12 315xiaoyao

Generating an estimate of the traffic total between IP addresses (or other potential keys) is outside the scope of sflowtool. There is an ecosystem of other tools that do this. However it's worth linking from here to documents that explain the principles.

Summary: The simplest way is to scale by the indicated sampling-rate, but this assumes the switch is actually sampling at that rate and that there is no packet loss. The more robust approach is to compute the effective sampling rate by observing the delta in the sample_pool field, and then scale by that. Statistically what you get is a best-estimate with a confidence-interval.

Here are the relevant documents: http://www.sflow.org/packetSamplingBasics/index.htm http://www.inmon.com/pdf/sFlowBilling.pdf

sflow avatar Dec 04 '23 21:12 sflow