netFlow(输出数据格式)ExportDatagramFormat_第1页
netFlow(输出数据格式)ExportDatagramFormat_第2页
netFlow(输出数据格式)ExportDatagramFormat_第3页
netFlow(输出数据格式)ExportDatagramFormat_第4页
netFlow(输出数据格式)ExportDatagramFormat_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、A P P E N D I X BNetFlow Export Datagram FormatNetFlow exports flow information in UDP datagrams in one of four formats:Version 1Version 5Version 7Version 8The Version1 (V1 format is the original format supported in the initial NetFlow releases. TheVersion 5 (V5 format is an enhancement that adds Bo

2、rder Gateway Protocol (BGP autonomoussystem information and flow sequence numbers. The Version 7 (V7 format is an enhancement that exclusively supports NetFlow with Cisco Catalyst5000 series switches equipped with a NetFlowfeature card (NFFC. V7 is not compatible with Cisco routers. The Version 8 (V

3、8 format is an enhancement that adds router-based aggregation schemes. Versions 2, 3, 4, and 6 either were notreleased or are not supported by FlowCollector.In Versions 1, 5, and 7, the datagram consists of a header and one or more flow records. The firstfield of the header contains the version numb

4、er of the export datagram. Typically, a receivingapplication that accepts any of the format versions allocates a buffer large enough for the largestpossible datagram from any of the format versions and then uses the header to determine how tointerpret the datagram. The second field in the header con

5、tains the number of records in the datagramand should be used to search through the records.All fields described in the format version tables are in network byte order. Table B-1 and Table B-2 describe the V1 header and flow record format, respectively. Table B-3 and Table B-4 describe theV5 header

6、and flow record format, respectively. Table B-5 and Table B-6 describe the V7 header andflow record format, respectively. Table B-7 describes the V8 header format. Table B-8 describes theV8 RouterAS flow record format. Table B-9 describes the V8 RouterProtoPort flow record.Table B-10 describes the V

7、8 RouterDstPrefix flow record. Table B-11 describes the RouterSrcPrefixflow record, and Table B-12 describes the RouterPrefix flow record.Note V8 data consists of header information that follows the same format as the other versions. However, the V8 flow record formats are separated based on the agg

8、regation schemes that supportrouter-based aggregation. Instead of one flow record table, you see five tables that describe the V8flow record format for each individual aggregation scheme.We recommend that receiving applications perform a “sanity check” on datagrams to ensure that the datagrams are f

9、rom a valid NetFlow source. You should first check the size of the datagram to verify that it is at least long enough to contain the version and count fields. You should next verify that the version is valid (1, 5, 7, or 8 and that the number of received bytes is enough for the header and count flow

10、 records (using the appropriate version.Because NetFlow export uses UDP to send export datagrams, it is possible for datagrams to be lost. To determine whether flow export information has been lost, Version 5, Version 7, andVersion 8 headers contain a flow sequence number. The sequence number is equ

11、al to the sequence number of the previous datagram plus the number of flows in the previous datagram. After receiving a new datagram, the receiving application can subtract the expected sequence number from the sequence number in the header to derive the number of missed flows.Datagram format Versio

12、n 8 offers five router-based aggregation schemes allowing you to summarize FlowCollector export data on the router before the data is exported to the FlowCollector. The result is lower bandwidth requirements and reduced platform requirements for NetFlow data collection devices.Router-based aggregati

13、on enables on-router aggregation by maintaining one or more extra NetFlow caches with different combinations of fields that determine which traditional flows are grouped together. These extra caches are called aggregation caches. As flows expire from the main flow cache, they are added to each enabl

14、ed aggregation cache. The normal flow ager process runs on each active aggregation cache the same way it runs on the main cache. On-demand aging is also supported.Table B-1Version 1 Header FormatBytes Contents Description01version NetFlow export format version number23count Number of flows exported

15、in this packet (12447SysUptime Current time in milliseconds since the export device booted811unix_secs Current count of seconds since 0000 UTC 19701216unix_nsecs Residual nanoseconds since 0000 UTC 1970Table B-2Version 1 Flow Record FormatBytes Contents Description03srcaddr Source IP address47dstadd

16、r Destination IP address811nexthop IP address of next hop router1213input SNMP index of input interface1415output SNMP index of output interface1619dPkts Packets in the flow2023dOctets Total number of Layer 3 bytes in the packets of the flow2427First SysUptime at start of flow2831Last SysUptime at t

17、he time the last packet of the flow was received 3233srcport TCP/UDP source port number or equivalent3435dstport TCP/UDP destination port number or equivalent3637pad1Unused (zero bytes38prot IP protocol type (for example, TCP = 6; UDP = 1739tos IP type of service (ToS40flags Cumulative OR of TCP fla

18、gs4143pad1, pad2, pad3Unused (zero bytes4448reserved Unused (zero bytesTable B-3Version 5 Header FormatBytes Contents Description01version NetFlow export format version number23count Number of flows exported in this packet (13047SysUptime Current time in milliseconds since the export device booted81

19、1unix_secs Current count of seconds since 0000 UTC 19701215unix_nsecs Residual nanoseconds since 0000 UTC 19701619flow_sequence Sequence counter of total flows seen20engine_type Type of flow-switching engine21engine_id Slot number of the flow-switching engine2223reserved Unused (zero bytesTable B-4V

20、ersion 5 Flow Record FormatBytes Contents Description03srcaddr Source IP address47dstaddr Destination IP address811nexthop IP address of next hop router1213input SNMP index of input interface1415output SNMP index of output interface1619dPkts Packets in the flow2023dOctets Total number of Layer 3 byt

21、es in the packets of the flow2427First SysUptime at start of flow2831Last SysUptime at the time the last packet of the flow was received3233srcport TCP/UDP source port number or equivalent3435dstport TCP/UDP destination port number or equivalent36pad1Unused (zero bytes37tcp_flags Cumulative OR of TC

22、P flags38prot IP protocol type (for example, TCP = 6; UDP = 1739tos IP type of service (ToS4041src_as Autonomous system number of the source, either origin or peer4243dst_as Autonomous system number of the destination, either origin or peer 44src_mask Source address prefix mask bits45dst_mask Destin

23、ation address prefix mask bits4647pad2Unused (zero bytesTable B-5Version 7 (Catalyst 5000 Header FormatBytes Contents Description01version NetFlow export format version number23count Number of flows exported in this flow frame (protocol data unit, or PDU47SysUptime Current time in milliseconds since

24、 the export device booted811unix_secs Current seconds since 0000 UTC 19701215unix_nsecs Residual nanoseconds since 0000 UTC 19701619flow_sequence Sequence counter of total flows seen2023reserved Unused (zero bytesTable B-6Version 7 (Catalyst 5000 Flow Record FormatBytes Contents Description03srcaddr

25、 Source IP address; in case of destination-only flows, set to zero.47dstaddr Destination IP address.811nexthop Next hop router; always set to zero.1213input SNMP index of input interface; always set to zero.1415output SNMP index of output interface.1619dPkts Packets in the flow.2023dOctets Total num

26、ber of Layer 3 bytes in the packets of the flow.2427First SysUptime, in seconds, at start of flow.2831Last SysUptime, in seconds, at the time the last packet of the flow was received. 3233srcport TCP/UDP source port number; set to zero if flow mask is destination-only orsource-destination.3435dstpor

27、t TCP/UDP destination port number; set to zero if flow mask isdestination-only or source-destination.36flags Flags indicating, among other things, what flow fields are invalid.37tcp_flags TCP flags; always set to zero.38prot IP protocol type (for example, TCP = 6; UDP = 17; set to zero if flow mask

28、isdestination-only or source-destination.39tos IP type of service; switch sets it to the ToS of the first packet of the flow.4041src_as Source autonomous system number, either origin or peer; always set to zero. 4243dst_as Destination autonomous system number, either origin or peer; always set tozer

29、o.44src_mask Source address prefix mask; always set to zero.45dst_mask Destination address prefix mask; always set to zero.4647flags Flags indicating, among other things, what flows are invalid.4851router_sc IP address of the router that is bypassed by the Catalyst5000 series switch.This is the same

30、 address the router uses when it sends NetFlow exportpackets. This IP address is propagated to all switches bypassing the routerthrough the FCP protocol.Note Version 7 AS information is not supported in current implementations of the Catalyst 5000 series switch. Table B-7 Bytes 01 23 47 811 1215 161

31、9 20 21 22 23 2427 Version 8 Header Format Description NetFlow export format version number Number of flows exported in this flow frame (protocol data unit, or PDU Current time in milliseconds since the export device booted Current seconds since 0000 UTC 1970 Residual nanoseconds since 0000 UTC 1970

32、 Sequence counter of total flows seen Type of flow switching engine ID number of the flow switching engine Aggregation method being used Version of the aggregation export Unused (zero bytes Version 8 RouterAS Flow Record Format Description Number of flows Packets in the flow Total number of Layer 3

33、bytes in the packets of the flow SysUptime, in seconds, at start of flow SysUptime, in seconds, at the time the last packet of the flow was received Source autonomous system number, either origin or peer; always set to zero Destination autonomous system number, either origin or peer; always set to z

34、ero SNMP index of input interface; always set to zero SNMP index of output interface Version 8 RouterProtoPort Flow Record Format Description Number of flows Packets in the flow Total number of Layer 3 bytes in the packets of the flow SysUptime, in seconds, at start of flow SysUptime, in seconds, at

35、 the time the last packet of the flow was received IP protocol type (for example, TCP = 6; UDP = 17; set to zero if flow mask is destination-only or source-destination Unused (zero bytes Contents version count SysUptime unix_secs unix_nsecs flow_sequence engine_type engine_id aggregation agg_version

36、 reserved Table B-8 Bytes 03 47 811 1215 1619 2021 2223 2425 2627 Contents flows dPkts dOctets First Last src_as dst_as input output Table B-9 Bytes 03 47 811 1215 1619 20 21 B-6 Contents flows dPkts dOctets First Last prot pad NetFlow FlowCollector Installation and User Guide Table B-9 Bytes 2223 2

37、425 2627 Version 8 RouterProtoPort Flow Record Format (continued Description Unused (zero bytes TCP/UDP source port number; set to zero if flow mask is destination-only or source-destination TCP/UDP destination port number; set to zero if flow mask is destination-only or source-destination Version 8

38、 RouterDstPrefix Flow Record Format Description Number of flows Packets in the flow Total number of Layer 3 bytes in the packets of the flow SysUptime, in seconds, at start of flow SysUptime, in seconds, at the time the last packet of the flow was received Destination IP address prefix Destination a

39、ddress prefix mask; always set to zero Unused (zero bytes Destination autonomous system number, either origin or peer; always set to zero SNMP index of output interface Unused (zero bytes Version 8 RouterSrcPrefix Flow Record Format Description Number of flows Packets in the flow Total number of Lay

40、er 3 bytes in the packets of the flow SysUptime, in seconds, at start of flow SysUptime, in seconds, at the time the last packet of the flow was received Source IP address prefix Source address prefix mask; always set to zero Unused (zero bytes Source autonomous system number, either origin or peer; always set to zero SNMP index of input interface; always set to zero Unused (zero bytes Version 8 RouterPrefix Flow Recor

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论