哪个字段告诉我 IPFIX 中的字节数?

网络工程 监控 网络流量 修复
2021-07-19 21:46:07

在 netflow 中有in_bytesin_pkts字段。IPFIX 中的等效值是多少?

我正在使用 softflowd 发送 IPFIX 数据,并且得到以下字段:

destinationIPv4Address
destinationTransportPort
egressInterface
flowEndMilliseconds
flowStartMilliseconds
icmpTypeCodeIPv4
ingressInterface
ipClassOfService
ipVersion
octetDeltaCount
packetDeltaCount
protocolIdentifier
sourceIPv4Address
sourceTransportPort
tcpControlBits
version
vlanId

octetDeltaCountpacketDeltaCount相当于in_bytesin_pkts

1个回答

IPFIX 在RFC 7011,用于流信息交换的 IP 流信息导出 (IPFIX) 协议规范中定义您在记录中所做或没有的大部分内容取决于具体的实施。您的应用程序是题外话,但如果您查看附录 A. IPFIX 编码示例,它将为您提供一些示例模板,以及这些模板的字段的含义。例如:

A2。模板集示例

A.2.1. 使用 IANA 信息元素的模板集

我们要报告以下信息元素:

  • IPv4源IP地址:sourceIPv4Address [IANA-IPFIX],长度为4个八位字节

  • IPv4目的IP地址:destinationIPv4Address [IANA-IPFIX],长度为4个八位字节

  • 下一跳IP地址(IPv4):ipNextHopIPv4Address [IANA-IPFIX],长度为4个八位字节

  • Flow的包数:packetDeltaCount [IANA-IPFIX],长度为4个八位字节

  • Flow的字节数:octetDeltaCount [IANA-IPFIX],长度为4个字节

因此,模板集将由以下内容组成:

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Set ID = 2            |      Length = 28 octets       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |       Template ID 256         |       Field Count = 5         |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |0|    sourceIPv4Address = 8    |       Field Length = 4        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |0| destinationIPv4Address = 12 |       Field Length = 4        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |0|  ipNextHopIPv4Address = 15  |       Field Length = 4        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |0|    packetDeltaCount = 2     |       Field Length = 4        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |0|    octetDeltaCount = 1      |       Field Length = 4        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+