|
Table Of Contents
Restrictions for NetFlow Version 9 Data Export Format
Information About NetFlow Version 9 Data Export Format
Template-Based Flow Record Format
Parts of a NetFlow Export Packet
How to Configure NetFlow Version 9 Data Export Format
Configuring the v9 Data Export Format for the Main Cache
Configuring the v9 Data Export Format for Aggregation Caches
Configuration Examples for NetFlow Version 9 Data Export
Configuring Version 9 Data Export for the Main Cache: Example
Configuring Version 9 Data Export for Aggregation Caches: Example
NetFlow v9 Export Format
With this release, NetFlow can export data in NetFlow v9 (Version 9) export format. This format is flexible and extensible, which provides the versatility needed to support new fields and record types. This format accommodates new NetFlow-supported technologies such as Multicast, MPLS, NAT, and BGP next hop.
Third-party business partners who produce applications that provide NetFlow Collection Engine (formerly called NetFlow FlowCollector) or display services for NetFlow do not need to recompile their applications each time a new NetFlow technology is added. Instead, with the NetFlow v9 Export Format feature, they can use an external data file that documents the known template formats and field types.
NetFlow v9 data export supports CEF switching, dCEF switching, and fast switching.
History for the NetFlow Version 9 Data Export Feature
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
• Restrictions for NetFlow Version 9 Data Export Format
• Information About NetFlow Version 9 Data Export Format
• How to Configure NetFlow Version 9 Data Export Format
• Configuration Examples for NetFlow Version 9 Data Export
• Glossary
Restrictions for NetFlow Version 9 Data Export Format
Backward Compatibility
Version 9 is not backward-compatible with Version 5 or Version 8. If you need Version 5 or Version 8, then you must configure Version 5 or Version 8.
Export Bandwidth
Export bandwidth increases for Version 9 (because of template flowsets) versus Version 5.
Overhead
The increase in overhead versus Version 5 varies with the frequency with which template flowsets are sent. With one template flowset sent per 10 export packets, the overhead is 1percent versus Version 5 export (considering only one technology being exported). With one template flowset sent for every export packet, the overhead is about 8 percent. Interleaving of various technologies also increases overhead.
Memory Impact
The memory used depends on the data structures used to maintain template flowsets. Because this implementation does not access the NetFlow cache entry size directly, the memory used is not significant.
Performance Impact
Version 9 slightly decreases overall performance, because generating and maintaining valid template flowsets requires additional processing.
Information About NetFlow Version 9 Data Export Format
To configure NetFlow Version 9 Data Export Format feature, you must understand the following concepts:
• Template-Based Flow Record Format
• Parts of a NetFlow Export Packet
NetFlow Version 9
NetFlow Version 9 is a flexible and extensible means to carry NetFlow records from a network node to a collector. NetFlow Version 9 has definable record types and is self-describing for easier NetFlow Collection Engine configuration. In NetFlow Version 9:
•Record formats are defined using templates.
•Template descriptions are communicated from the router to the NetFlow Collection Engine.
•Flow records are sent from the router to the NetFlow Collection Engine with minimal template information so that the NetFlow Collection Engine can relate the records to the appropriate template.
•Version 9 is independent of the underlying transport (UDP, TCP, SCTP, and so on).
Uses of NetFlow Data
Cisco IOS NetFlow services provide network administrators with access to information about IP flows within their data networks. Exported NetFlow data can be used for a variety of purposes, including network management and planning, enterprise accounting and departmental chargebacks, ISP billing, data warehousing, and marketing.
Template-Based Flow Record Format
The main feature of NetFlow Version 9 export format is that it is template-based. A template describes a NetFlow record format and attributes of the fields (such as type and length) within the record. The router assigns each template an ID, which is communicated to the NetFlow Collection Engine along with the template description. The template ID is used for all further communication from the router to the NetFlow Collection Engine.
Flow Records
The basic output of NetFlow is a flow record. In NetFlow Version 9, a flow record follows the same sequence of fields as specified by the template definition. The template to which NetFlow flow records belong is determined by prefixing the template ID to the group of NetFlow flow records that belong to a template. A complete discussion of existing NetFlow flow-record formats is at http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/netflsol/nfwhite.htm
Parts of a NetFlow Export Packet
In NetFlow Version 9, an export packet consists of the packet header and flowsets. The packet header identifies the new version and provides other information. Flowsets are of two types: a template flowset and a data flowset. The template flowset describes the fields that will be in the data flowsets (or flow records). Each data flowset contains the values or statistics of one or more flows (similar to flow records in Version 5 or Version 8, but with a flowset-specific header) that have the same template ID number. When the NetFlow Collection Engine receives a template flowset, it stores the flowset and export source address so that subsequent data flowsets that match the flowset ID and source combination are parsed according to the field definitions in the template flowset. Version 9 supports the NetFlow Collection Engine Version 4.0.
For a complete description of the Version 9 packet headers, template flowsets, and data flowsets, see the Cisco IOS NetFlow Version 9 Flow-Record Format white paper at http://www.cisco.com/warp/public/cc/pd/iosw/prodlit/tflow_wp.htm
Format Flexibility
In Version 9, new formats are defined on the router and are sent to the NetFlow Collection Engine at an interval that you set. You can enable the features that you want, and the fields corresponding to those features are sent to the NetFlow Collection Engine. Determine the Appropriate Export Version for Your Requirements
NetFlow aggregation caches export data in UDP datagrams using either the Version 9 or Version 8 export format. Table 1 describes how to determine the most appropriate export format for your requirements.
NetFlow Version 9 Data Export Format Overview
The NetFlow Version 9 Export Format feature was introduced in Cisco IOS Release 12.0(24)S and was integrated into Cisco IOS Release 12.3(1) and Cisco IOS Release 12.2(18)S.
NetFlow Version 9 is a flexible and extensible means for transferring NetFlow records from a network node to a collector. NetFlow Version 9 has definable record types and is self-describing for easier NetFlow Collection Engine configuration.
Third-party business partners who produce applications that provide NetFlow Collection Engine or display services for NetFlow do not need to recompile their applications each time a new NetFlow technology is added. Instead, with the NetFlow v9 Export Format feature, they can use an external data file that documents the known template formats and field types.
NetFlow Version 8 Data Export Format Overview
The Version 8 data export format is the NetFlow export format used when the router-based NetFlow aggregation feature is enabled on Cisco IOS router platforms. The Version 8 format allows for export datagrams to contain a subset of the Version 5 export data that is based on the configured aggregation cache scheme. For example, a certain subset of the Version 5 export data is exported for the destination prefix aggregation scheme, and a different subset is exported for the source-prefix aggregation scheme.
The Version 8 export format was introduced in Cisco IOS 12.0(3)T for the Cisco IOS NetFlow Aggregation feature. An additional six aggregation schemes that also use Version 8 format were defined for the NetFlow ToS-Based Router Aggregation feature introduced in Cisco IOS 12.0(15)S and integrated into Cisco IOS Releases 12.2(4)T and 12.2(14)S.
The Version 8 datagram consists of a header with the version number (which is 8) and time stamp information, followed by one or more records corresponding to individual entries in the NetFlow cache.
Table 2 lists the NetFlow Version 8 export packet header field names and descriptions.
For Version 8 data exports, the maximum number of aggregated flow records and the maximum size in bytes of each UDP datagram are shown in Table 3.
How to Configure NetFlow Version 9 Data Export Format
Version 9 allows for interleaving of various technologies. This means that you should configure Version 9 if you need data to be exported from various technologies (such as Multicast, DoS, IPv6, BGP next hop, and so on).
See the following sections for configuration tasks for the NetFlow v9 Data Export feature. Each task in the list is identified as either required or optional.
• Configuring the v9 Data Export Format for the Main Cache (required)
• Configuring the v9 Data Export Format for Aggregation Caches (required)
• Verifying the Configuration (optional)
• Troubleshooting Tips (optional)
Configuring the v9 Data Export Format for the Main Cache
This section shows how to configure v9 Data Export Format feature for the main cache. Templates (and option templates) need not be exported along with every export packet. You can export templates (and option templates) after a specific number of export packets or after a specific number of minutes (or both).
SUMMARY STEPS
1. enable
2. configure terminal
3. ip flow-export Version 9
4. ip flow-export template refresh-rate packets
5. ip flow-export template timeout-rate minutes
6. ip flow-export template options export-stats
7. ip flow-export template options refresh-rate packets
8. ip flow-export template options timeout-rate minutes
9. end
DETAILED STEPS
Configuring the v9 Data Export Format for Aggregation Caches
You can specify the frequency of template generation for aggregation caches. This section shows how to configure v9 data export format for aggregation caches.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip flow-aggregation cache {as | as-tos | bgp-nexthop-tos | destination-prefix | destination-prefix-tos | prefix | prefix-port | prefix-tos | protocol-port | protocol-port-tos | source-prefix | source-prefix-tos}
4. export Version 9
5. export template refresh-rate packets
6. export template timeout-rate minutes
7. enabled
8. end
DETAILED STEPS
Verifying the Configuration
This section shows how to verify successful configuration of NetFlow v9 data export format.
SUMMARY STEPS
1. show ip cache verbose flow
2. show ip flow export
3. show ip flow export template
DETAILED STEPS
Troubleshooting Tips
Use the debug ip flow export command to display debugging output for NetFlow v9 Data Export Format.
Configuration Examples for NetFlow Version 9 Data Export
This section provides the following configuration examples:
• Configuring Version 9 Data Export for the Main Cache: Example
• Configuring Version 9 Data Export for Aggregation Caches: Example
Configuring Version 9 Data Export for the Main Cache: Example
The following example shows how to configure v9 data export for the main cache:
Router> enable
Password:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# ip flow-export Version 9
Router(config)# ip flow-export template refresh-rate 15
Router(config)# ip flow-export template timeout-rate 90
Router(config)# ip flow-export template options export-stats
Router(config)# ip flow-export template options refresh-rate 25
Router(config)# ip flow-export template options timeout-rate 120
Router(config)# end
Router(config)#
3w5d:%SYS-5-CONFIG_I: Configured from console by console
Configuring Version 9 Data Export for Aggregation Caches: Example
The following example shows how to configure Version 9 data export for an autonomous system (AS) aggregation cache scheme:
Router> enable
Password:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# ip flow-aggregation cache as
Router(config-flow-cache)# export Version 9
Router(config-flow-cache)# export template refresh-rate 10
Router(config-flow-cache)# export template timeout-rate 60
Router(config-flow-cache)# enabled
Router(config-flow-cache)# end
Router#
3w5d:%SYS-5-CONFIG_I: Configured from console by console
Additional References
The following sections provide references related to NetFlow v9 export format.
Related Documents
Standards
MIBs
MIB MIBs Link•
•
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:
RFCs
Technical Assistance
Command Reference
This section documents new and modified commands only.
New Commands
Modified Commands
• export
debug ip flow export
To enable debugging output for NetFlow data export, use the debug ip flow export command in user EXEC or privileged EXEC mode. To disable debugging output for NetFlow data export, use the no form of this command.
debug ip flow export
no debug ip flow export
Syntax Description
This command has no keywords or arguments.
Command Default
Debugging output for NetFlow data export is disabled.
Command Modes
User EXEC
Privileged EXEC
Command History
Examples
The following is sample output from the debug ip flow export command:
Router# debug ip flow export
IP Flow export mechanism debugging is on
*Mar 6 22:56:21.627:IPFLOW:Sending export pak to 2001::FFFE/64 port 9999
*Mar 6 22:56:21.627:IPFLOW:Error sending export packet:Adjacency failure
Related Commands
export
To enable the exporting of NetFlow accounting information from NetFlow aggregation caches, use the export command in NetFlow aggregation cache configuration mode. To disable the export of NetFlow accounting information from NetFlow aggregation caches, use the no form of this command.
export {destination ip-address | hostname} udp-port |version [8 | 9] | template [refresh-rate packets | timeout-rate minutes]}
no export {destination ip-address | hostname} udp-port |version [8 | 9] | template [refresh-rate packets | timeout-rate minutes]}
Syntax Description
Command Default
A NetFlow aggregation cache export destination is not set.
The default version format is Version 8.
The default for refresh-rate is 20 packets.
The default for timeout-rate is 30 minutes.Command Modes
NetFlow aggregation cache configuration
Command History
Usage Guidelines
You must have NetFlow accounting configured on your router before you can use this command.
export destination
You can configure a maximum of two concurrent destinations per-cache using the destination keyword with the export command.
Examples
The following example shows how to configure two export destinations for a NetFlow accounting protocol-port aggregation cache scheme:
Router(config)#
ip flow-aggregation cache protocol-portRouter(config-flow-cache)# export destination 10.41.41.1 9992
Router(config-flow-cache)# export destination 172.16.89.1 9992
Router(config-flow-cache)# enabled
'The following example shows how to configure the Version 9 template refresh-rate and timeout-rate parameters for a NetFlow accounting protocol-port aggregation cache scheme:
Router(config)#
ip flow-aggregation cache protocol-portRouter(config-flow-cache)# version 9
Router(config-flow-cache)# export template refresh-rate 100
Router(config-flow-cache)# export template timeout-rate 120
Router(config-flow-cache)# enabled
Related Commands
ip flow-export
To enable the export of information in NetFlow cache entries, use the ip flow-export command in global configuration mode. To disable the export of information, use the no form of this command.
ip flow-export {destination ip-address udp-port | source {ip-address | interface-name} | version {1 | [{5 | 9} [origin-as | peer-as] [bgp-nexthop]]} | template {refresh-rate packets | timeout-rate minutes} [options {export-stats | refresh-rate packets | sampler | timeout-rate minutes}]}
no ip flow-export {destination ip-address udp-port | source {ip-address | interface-name} | version {1 | [{5 | 9} [origin-as | peer-as] [bgp-nexthop]]} | template {refresh-rate packets | timeout-rate minutes} [options {export-stats | refresh-rate packets | sampler | timeout-rate minutes}]}
Syntax Description
Command Default
Export of information in NetFlow cache entries is disabled. You can specify origin AS accounting or peer AS export accounting, but not both.
Command Modes
Global configuration
Command History
Usage Guidelines
A NetFlow cache entry contains a lot of information. When NetFlow data collection is enabled with the ip route-cache flow command, you can use the ip flow-export command to configure the router to export the flow cache entries to a destination (such as a system running the NetFlow Collection Engine) when flows expire. This configuration can be useful for traffic analysis, monitoring, attack mitigation, and billing.
Version 5 and Version 9 formats include the source and destination AS addresses and source and destination prefix masks. Also, Version 9 might include BGP next hop information.
For more information on the Version 5 data format, refer to the Cisco IOS Switching Services Configuration Guide. For more information on version 9 data format, refer to the Cisco IOS NetFlow Version 9 Flow-Record Format white paper.
Examples
The following example shows how to configure the router to export the NetFlow cache entry to UDP port 2048 on the workstation at 172.16.23.7 when the flow expires using version 5 format and includes the peer AS information:
Router(config)# ip flow-export destination 172.16.23.7 2048 version 5 peer-as
Related Commands
show ip flow export
To display the statistics for the NetFlow data export, including statistics for the main cache and all other enabled caches, use the show ip flow export command in user EXEC or privileged EXEC mode.
show ip flow export [template]
Syntax Description
template
(Optional) Shows the data export statistics (such as template timeout and refresh rate) for the template-specific configurations.
Command Modes
User EXEC
Privileged EXEC
Command History
Examples
The following is sample output from the show ip flow export command:
Router# show ip flow export
Flow export is enabled
Exporting flows to 10.42.42.1 (9991) 10.0.101.254 (9991)
Exporting using source IP address 10.0.101.203
Version 5 flow records
Export Stats for 10.42.42.1 (9991)
3 flows exported in 3 udp datagrams
0 flows failed due to lack of export packet
3 export packets were sent up to process level
0 export packets were dropped due to no fib
0 export packets were dropped due to adjacency issues
0 export packets were dropped enqueuing for the RP
0 export packets were dropped due to IPC rate limiting
Export Stats for 10.0.101.254 (9991)
7 flows exported in 7 udp datagrams
0 flows failed due to lack of export packet
6 export packets were sent up to process level
0 export packets were dropped due to no fib
0 export packets were dropped due to adjacency issues
0 export packets were dropped enqueuing for the RP
0 export packets were dropped due to IPC rate limiting
The following is sample output from the show ip flow export template command:
Router# show ip flow export template
Template Options Flag = 0
Total number of Templates added = 0
Total active Templates = 0
Flow Templates active = 0
Flow Templates added = 0
Option Templates active = 0
Option Templates added = 0
Template ager polls = 0
Option Template ager polls = 0
Main cache version 9 export is enabled
Template export information
Template timeout = 30
Template refresh rate = 20
Option export information
Option timeout = 30
Option refresh rate = 20
Router#
Related Commands
Glossary
CEF—Cisco Express Forwarding. Layer 3 IP switching technology that optimizes network performance and scalability for networks with large and dynamic traffic patterns.
BGP—Border Gateway Protocol. Interdomain routing protocol that replaces Exterior Border Gateway protocol (EBGP). BGP exchanges reachability information with other BGP systems. It is defined by RFC 1163.
BGP next hop—IP address of the next hop to be used to reach a certain destination.
data flowset—Set of one or more data records that are grouped together in an export packet.
data record—Provides information about an IP flow that exists on the device that produced an export packet. Each group of data records (meaning each data flowset) references a previously transmitted template ID, which can be used to parse the data within the records.
dCEF—Distributed Cisco Express Forwarding. Type of CEF switching in which line cards (such as VIP line cards) maintain an identical copy of the forwarding information base (FIB) and adjacency tables. The line cards perform the express forwarding between port adapters; this relieves the route/switch processor of involvement in the switching operation.
export packet—Type of packet built by a device (for example, a router) with NetFlow services enabled that is addressed to another device (for example, the NetFlow Collection Engine). The packet contains NetFlow statistics. The other device processes the packet (parses, aggregates, and stores information on IP flows).
fast switching—Cisco feature in which a route cache is used to expedite packet switching through a router.
flow—Unidirectional stream of packets between a given source and destination—both defined by a network-layer IP address and transport-layer source and destination port numbers.
flowset—Collection of flow records that follow the packet header in an export packet. A flowset contains information that must be parsed and interpreted by the NetFlow Collection Engine device. There are two different types of flowsets: template flowsets and data flowsets. An export packet contains one or more flowsets, and both template and data flowsets can be mixed in the same export packet.
NetFlow—Cisco IOS acceleration and accounting feature that maintains per-flow information.
NetFlow Aggregation—A NetFlow feature that lets you summarize NetFlow export data on an IOS router before the data is exported to a NetFlow data collection system such as the NetFlow FlowCollector. This feature lowers bandwidth requirements for NetFlow export data and reduces platform requirements for NetFlow data collection devices.
NetFlow Collection Engine (formerly NetFlow FlowCollector)—Cisco application that is used with NetFlow on Cisco routers and Catalyst 5000 series switches. The NetFlow Collection Engine collects packets from the router that is running NetFlow and decodes, aggregates, and stores them. You can generate reports on various aggregations that can be set up on the NetFlow Collection Engine.
NetFlow v9—NetFlow export format Version 9. A flexible and extensible means to carry NetFlow records from a network node to a collector. NetFlow Version 9 has definable record types and is self-describing for easier NetFlow Collection Engine configuration.
options data record—Special type of data record (which is based on an options template) with a reserved template ID that provides information about the NetFlow process itself.
options template—Type of template record used to communicate the format of data related to the NetFlow process.
packet header—First part of an export packet. It provides basic information about the packet (such as the NetFlow version, number of records contained in the packet, and sequence numbering) so that lost packets can be detected.
template flowset—Set of one or more template records that are grouped in an export packet.
template ID—Unique number that distinguishes a template record from other template records produced by the same export device. A NetFlow Collection Engine application that receives export packets from several devices should be aware that uniqueness is not guaranteed across export devices. Thus, the NetFlow Collection Engine should also cache the address of the export device that produced the template ID in order to enforce uniqueness.
template record—Defines the format of subsequent data records that might be received in current or future export packets. A template record within an export packet does not necessarily indicate the format of data records within that same packet. A NetFlow Collection Engine application must cache any template records received and then parse any data records it encounters by locating the appropriate template record in the cache.
ToS—type of service byte. Second byte in the IP header that indicates the desired quality of service for a particular datagram.
Note Refer to the Dictionary of Internetworking Terms and Acronyms for terms not included in this glossary.
© 2003-2005 Cisco Systems, Inc. All rights reserved
Posted: Wed Sep 28 23:12:43 PDT 2005
All contents are Copyright © 1992--2005 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.