Feedback
|
Table Of Contents
Restrictions for NetFlow Version 9 Data Export
Information About NetFlow Version 9 Data Export
Template-Based Flow Record Format
Parts of a NetFlow Export Packet
How to Configure NetFlow Version 9 Data Export
Configuring Version 9 Data Export for the Main Cache
Configuring Version 9 Data Export 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 version 9 data export supports CEF switching, dCEF switching, and fast switching.
Feature Specifications for NetFlow Version 9 Data Export
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
This document includes the following sections:
•
Restrictions for NetFlow Version 9 Data Export
•
Information About NetFlow Version 9 Data Export
•
How to Configure NetFlow Version 9 Data Export
•
Configuration Examples for NetFlow Version 9 Data Export
Restrictions for NetFlow Version 9 Data Export
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 one percent versus version 5 export (considering only one technology being exported). With one template flowset sent for every export packet, the overhead is about eight 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
To configure NetFlow version 9 data export, 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 data mining for marketing purposes.
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 defined 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 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 contain 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) with 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 on 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.
How to Configure NetFlow Version 9 Data Export
See the following sections for configuration tasks for the NetFlow Version 9 Data Export feature. Each task in the list is identified as either required or optional.
•
Configuring Version 9 Data Export for the Main Cache (required)
•
Configuring Version 9 Data Export for Aggregation Caches (required)
•
Verifying the Configuration (optional)
•
Troubleshooting Tips (optional)
Configuring Version 9 Data Export for the Main Cache
This section shows how to configure version 9 data export for the main cache. Templates (and options templates) need not be exported along with every export packet. You can export templates (and options 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 Version 9 Data Export for Aggregation Caches
You can specify the frequency of template generation for aggregation caches. This section shows how to configure version 9 data export 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 version 9 data export.
SUMMARY STEPS
•
show ip cache verbose flow
•
show ip flow export
•
show ip flow export template
DETAILED STEPS
Troubleshooting Tips
Use the debug ip flow export command to display debugging output for NetFlow version 9 data export.
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 version 9 data export for the main cache:
Router> enablePassword:Router# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)# ip flow-export version 9Router(config)# ip flow-export template refresh-rate 15Router(config)# ip flow-export template timeout-rate 90Router(config)# ip flow-export template options export-statsRouter(config)# ip flow-export template options refresh-rate 25Router(config)# ip flow-export template options timeout-rate 120Router(config)# endRouter(config)#3w5d:%SYS-5-CONFIG_I: Configured from console by consoleConfiguring 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> enablePassword:Router# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)# ip flow-aggregation cache asRouter(config-flow-cache)# export version 9Router(config-flow-cache)# export template refresh-rate 10Router(config-flow-cache)# export template timeout-rate 60Router(config-flow-cache)# enabledRouter(config-flow-cache)# endRouter#3w5d:%SYS-5-CONFIG_I: Configured from console by consoleAdditional References
For additional information related to NetFlow v9 Export Format, see the following references:
•
MIBs
•
RFCs
Related Documents
Standards
MIBs
RFCs
Technical Assistance
Command Reference
This section documents new and modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.3 command reference publications.
New Commands
Modified Commands
debug ip flow export
To enable debugging output for NetFlow data export, use the debug ip flow export command in 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.
Defaults
Debugging output for NetFlow data export is disabled.
Command Modes
Privileged EXEC
Command History
Release Modification12.0(1)
This command was introduced.
12.3(1)
Debugging output for NetFlow version 9 data export was added.
12.2(18)S
This command was integrated into Cisco IOS Release 12.2(18)S.
Usage Guidelines
Because debugging output is assigned high priority in the CPU process, you should use debug commands only to troubleshoot specific problems or during troubleshooting sessions with Cisco technical support staff. Moreover, you should use debug commands during periods of lower network traffic and fewer users. Debugging during these periods decreases the likelihood that increased debug command processing overhead will affect system use.
Examples
The following is sample output from the debug ip flow export command:
Router# debug ip flow exportIP Flow export mechanism debugging is on*Mar 6 22:56:21.627:IPFLOW:Sending export pak to 1.1.1.1 port 9999*Mar 6 22:56:21.627:IPFLOW:Error sending export packet:Adjacency failureRelated Commands
export
To enable the export of information from NetFlow aggregation caches, use the export command in aggregation cache configuration mode. To disable the export of information from NetFlow aggregation caches, use the no form of this command.
export {destination ip-address port | version [8 | 9] | template {refresh-rate packets | timeout-rate minutes}}
no export {destination ip-address port | version [8 | 9] | template {refresh-rate packets | timeout-rate minutes}}
Syntax Description
Defaults
An export destination is not set.
Command Modes
Aggregation cache configuration
Command History
Usage Guidelines
To configure NetFlow version 9 template options (by entering export template {refresh-rate packets | timeout-rate minutes}), you must first specify NetFlow version 9 export format (by entering export version 9).
For version 8 data exports, the maximum number of aggregated flow records and the maximum size in bytes of each UDP datagram are as follows:
Aggregation Scheme Maximum Number of Flow Records UDP Packet Size (Bytes)BGP Autonomous System
51
1456
Destination Prefix
44
1436
Prefix
35
1428
Protocol Port
51
1456
Source Prefix
44
1436
Examples
The following example shows how to configure an export destination for an aggregation cache:
Router(config-flow-cache)# export destination 10.41.41.1 9992Related 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 | 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 | timeout-rate minutes}]]
Syntax Description
Defaults
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 flow switching 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 entry to a workstation when a flow expires. This feature can be useful for statistics, billing, and security.
Version 5 and version 9 formats includes the source and destination AS addresses, source and destination prefix masks, and a sequence number. Because this change might appear on your router as a maintenance release, support for version 1 format is maintained with the version 1 keyword.
CautionEntering the ip flow-export or no ip flow-export command on the Cisco 12000 Series Internet Routers and specifying any version format other than version 1 (in other words, entering the ip flow-export or no ip flow-export command and specifying either the version 5 or version 9 keyword) causes packet forwarding to stop for a few seconds while NetFlow reloads the route processor and line card CEF tables. To avoid interruption of service to a live network, apply this command during a change window, or include it in the startup-config file to be executed during a router reboot.
For more information on version 1 and version 5 data format, see the "NetFlow Data Format" section in the "Configuring NetFlow Switching" chapter of the Cisco IOS Switching Services Configuration Guide. For more information on version 9 data format, see 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 125 on the workstation at 134.22.23.7 when the flow expires using version 1 format:
Router(config)# ip flow-export 134.22.23.7 125The following example shows how to configure the router to export the NetFlow cache entry to UDP port 2048 on the workstation at 134.22.23.7 when the flow expires using version 5 format and includes the peer AS information:
Router(config)# ip flow-export 134.22.23.7 2048 version 5 peer-asRelated 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 exportFlow export is enabledExporting flows to 10.42.42.1 (9991) 10.0.101.254 (9991)Exporting using source IP address 10.0.101.203Version 5 flow recordsExport Stats for 10.42.42.1 (9991)3 flows exported in 3 udp datagrams0 flows failed due to lack of export packet3 export packets were sent up to process level0 export packets were dropped due to no fib0 export packets were dropped due to adjacency issues0 export packets were dropped enqueuing for the RP0 export packets were dropped due to IPC rate limitingExport Stats for 10.0.101.254 (9991)7 flows exported in 7 udp datagrams0 flows failed due to lack of export packet6 export packets were sent up to process level0 export packets were dropped due to no fib0 export packets were dropped due to adjacency issues0 export packets were dropped enqueuing for the RP0 export packets were dropped due to IPC rate limitingThe following is sample output from the show ip flow export template command:
Router# show ip flow export templateTemplate Options Flag = 0Total number of Templates added = 0Total active Templates = 0Flow Templates active = 0Flow Templates added = 0Option Templates active = 0Option Templates added = 0Template ager polls = 0Option Template ager polls = 0Main cache version 9 export is enabledTemplate export informationTemplate timeout = 30Template refresh rate = 20Option export informationOption timeout = 30Option refresh rate = 20Router#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—Collection 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—Collection 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 Internetworking Terms and Acronyms for terms not included in this glossary.
Copyright © 2003 Cisco Systems, Inc. All rights reserved.
Feedback

