我有一些IPFIX格式的双向stream。 根据规格表, IPFIX是双向的,因为它有“from_bytes”和“to_bytes”。
我使用这种包格式运行nfcapd :
./nfcapd -E -p <listening port> -l /home/output_directory/
我有-E标志有-E地看到输出:它输出一堆这样的logging:
Flow Record: Flags = 0x00 FLOW, Unsampled export sysid = 36 size = 56 first = 1503985032 [time stamp] last = 1503985033 [time stamp] msec_first = 682 msec_last = 736 src addr = 10.107.127.34 dst addr = 10.0.3.162 src port = 21015 dst port = 7800 fwd status = 0 tcp flags = 0x18 .AP... proto = 6 TCP (src)tos = 0 (in)packets = 6 (in)bytes = 484 input = 2 output = 1 src as = 0 dst as = 0
这显然是单向的,因为只有(in)bytes作为字段。
nfcapd是否将nfcapd隐式转换为单向?
我意识到nfdump中有双向stream的标志( -b标志)。 而nfdump通常将从nfcapd输出的nfcapd文件作为input。 所以我想知道什么nfdump期望作为input – 双向或单向,即使是双向的?
而且…后续的问题就是 – 如果nfcapd处理双向stream,那么它是如何知道数据是双向还是单向的? 数据包中是否有字节表示?
相关资料: http : //manpages.ubuntu.com/manpages/zesty/en/man1/nfcapd.1.html http://harvixdesign.com/Harvey/MyBlog/what-is-netflow/