Configuring Data Export for Flexible NetFlow with Flow Exporters
Last Updated: November 29, 2012
This document contains information about and instructions for configuring flow exporters to export Flexible NetFlow data to remote systems such as a UNIX server running NetFlow collector.
NetFlow is a Cisco IOS technology that provides statistics on packets flowing through the router. NetFlow is the standard for acquiring IP operational data from IP networks. NetFlow provides data to support network and security monitoring, network planning, traffic analysis, and IP accounting.
Flexible NetFlow improves on original NetFlow by adding the capability to customize the traffic analysis parameters for your specific requirements. Flexible NetFlow facilitates the creation of more complex configurations for traffic analysis and data export through the use of reusable configuration components.
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see
Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to
www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for Data Export for Flexible NetFlow with Flow Exporters
You are familiar with the information in the "Cisco IOS Flexible NetFlow Overview" module.
The networking device must be running a Cisco IOS or Cisco IOS XE release that supports Flexible NetFlow.
IPv4 Traffic
The networking device must be configured for IPv4 routing.
One of the following must be enabled on your router and on any interfaces on which you want to enable Flexible NetFlow: Cisco Express Forwarding or distributed Cisco Express Forwarding.
IPv6 Traffic
The networking device must be configured for IPv6 routing.
One of the following must be enabled on your router and on any interfaces on which you want to enable Flexible NetFlow: Cisco Express Forwarding IPv6 or distributed Cisco Express Forwarding.
Restrictions for Data Export for Flexible NetFlow with Flow Exporters
The NetFlow Version 5 export protocol that was first shipped in Cisco IOS Release 12.4(22)T is supported for flow monitors that use only the following Flexible NetFlow predefined records: netflow-original, original input, and original output.
Information About Data Export for Flexible NetFlow with Flow Exporters
Flow exporters are created as separate components in a router's configuration. Exporters are assigned to flow monitors to export the data from the flow monitor cache to a remote system such as a NetFlow collector. Flow monitors can support more than one exporter. Each exporter can be customized to meet the requirements of the flow monitor or monitors in which it is used and the NetFlow collector systems to which it is exporting data.
Benefits of Flexible NetFlow Flow Exporters
Flexible NetFlow allows you to configure many different flow exporters, depending on your requirements. Some of the benefits of Flexible NetFlow flow exporters are as follows:
Using flow exporters, you can create an exporter for every type of traffic that you want to analyze so that you can send each type of traffic to a different NetFlow collector. Original NetFlow sends the data in a cache for all of the analyzed traffic to a maximum of two export destinations.
Flow exporters support up to ten exporters per flow monitor. Original NetFlow is limited to only two export destinations per cache.
Flow exporters can use both TCP and UDP for export.
Depending on your release, flow exporters can use class of service (CoS) in the packets that are sent to export destinations to help ensure that the packets are given the correct priority throughout the network. Original NetFlow exporters do not use CoS in the packets that are sent to export destinations.
Depending on your release, flow exporter traffic can be encrypted.
How to Configure Data Export for Flexible NetFlow with Flow Exporters
The tasks in this section explain how to export the data that is collected by Flexible NetFlow to a remote system for further analysis and storage.
Flow exporters are used to send the data that you collect with Flexible NetFlow to a remote system such as a NetFlow collector. Flow exporters use UDP as the transport protocol.
Each flow exporter supports only one destination. If you want to export the data to multiple destinations, you must configure multiple flow exporters and assign them to the flow monitor. Flow exporters are added to flow monitors to enable data export from the flow monitor cache.
Note
Only the keywords and arguments required for the Flexible NetFlow commands used in these tasks are explained in these tasks. For information about the other keywords and arguments available for these Flexible NetFlow commands, refer to the
Cisco IOS Flexible NetFlow Command Reference .
Configuring the Flow Exporter
Perform this required task to configure the flow exporter.
Note
Each flow exporter supports only one destination. If you want to export the data to multiple destinations, you must configure multiple flow exporters and assign them to the flow monitor.
You can export to a destination using either an IPv4 or IPv6 address.
(Optional) Configures options data parameters for the exporter.
You can configure all three options concurrently.
The range for the
seconds argument is 1 to 86,400. Default: 600.
Step 10
output-features
Example:
Device(config-flow-exporter)# output-features
(Optional) Enables sending export packets using quality of service (QoS) and encryption.
Step 11
templatedatatimeoutseconds
Example:
Device(config-flow-exporter)# template data timeout 120
(Optional) Configures resending of templates based on a timeout.
The range for the
seconds argument is 1 to 86400 (86400 seconds = 24 hours).
Step 12
transportudpudp-port
Example:
Device(config-flow-exporter)# transport udp 650
Specifies the UDP port on which the destination system is listening for exported datagrams.
The range for the
udp-port argument is from 1 to 65536.
Step 13
ttlseconds
Example:
Device(config-flow-exporter)# ttl 15
(Optional) Configures the time-to-live (TTL) value for datagrams sent by the exporter.
The range for the
seconds argument is from 1 to 255.
Step 14
end
Example:
Device(config-flow-exporter)# end
Exits flow exporter configuration mode and returns to privileged EXEC mode.
Step 15
showflowexporterexporter-name
Example:
Device# show flow exporter FLOW_EXPORTER-1
(Optional) Displays the current status of the specified flow exporter.
Step 16
showrunning-configflowexporterexporter-name
Example:
Device# show running-config flow exporter FLOW_EXPORTER-1
(Optional) Displays the configuration of the specified flow exporter.
Configuring and Enabling Flexible NetFlow with Data Export
You must create a flow monitor to configure the types of traffic for which you want to export the cache data. You must enable the flow monitor by applying it to at least one interface to start exporting data. To configure and enable Flexible NetFlow with data export, perform this required task.
Each flow monitor has a separate cache assigned to it. Each flow monitor requires a record to define the contents and layout of its cache entries. The record format can be one of the predefined record formats, or an advanced user may create his or her own record format using the
collect and
matchcommands in Flexible NetFlow flow record configuration mode.
Note
You must remove a flow monitor from all of the interfaces to which you have applied it before you can modify the
record format of the flow monitor.
When you specify the "NetFlow original," or the "NetFlow IPv4 original input," or the "NetFlow IPv6 original input" predefined record for the flow monitor to emulate original NetFlow, the flow monitor can be used only for analyzing input (ingress) traffic.
When you specify the "NetFlow IPv4 original output" or the "NetFlow IPv6 original output" predefined record for the flow monitor to emulate the Egress NetFlow Accounting feature, the flow monitor can be used only for analyzing output (egress) traffic.
The following example shows how to configure multiple export destinations for Flexible NetFlow for IPv4 and IPv6 traffic.
This sample starts in global configuration mode:
!
flow exporter EXPORTER-1
destination 172.16.10.2
transport udp 90
exit
!
flow exporter EXPORTER-2
destination 172.16.10.3
transport udp 90
exit
!
flow monitor FLOW-MONITOR-1
record netflow ipv4 original-input
exporter EXPORTER-2
exporter EXPORTER-1
!
!
flow monitor FLOW-MONITOR-2
record netflow ipv6 original-input
exporter EXPORTER-2
exporter EXPORTER-1
!
ip cef
!
interface Ethernet 0/0
ip address 172.16.6.2 255.255.255.0
ipv6 address 2001:DB8:2:ABCD::2/48
ip flow monitor FLOW-MONITOR-1 input
ipv6 flow monitor FLOW-MONITOR-2 input
!
The following display output shows that the flow monitor is exporting data to the two exporters:
Device# show flow monitor FLOW-MONITOR-1
Flow Monitor FLOW-MONITOR-1:
Description: User defined
Flow Record: netflow original-input
Flow Exporter: EXPORTER-1
EXPORTER-2
Cache:
Type: normal
Status: allocated
Size: 4096 entries / 311316 bytes
Inactive Timeout: 15 secs
Active Timeout: 1800 secs
Update Timeout: 1800 secs
Example: Configuring Sending Export Packets Using QoS
The following example shows how to enable QoS on Flexible Netflow export packets.
Note
The Flexible NetFlow export packets are transmitted using QoS on Ethernet interface 0/1 (the interface on which the destination is reachable) to the destination host (IP address 10.0.1.2).
The following display output shows that the flow monitor is exporting data using output feature support that enables the exported data to use QoS:
Device# show flow monitor FLOW-MONITOR-1
Flow Exporter FLOW-EXPORTER-1:
Description: User defined
Tranport Configuration:
Destination IP address: 10.0.1.2
Source IP address: 10.0.0.1
Transport Protocol: UDP
Destination Port: 9995
Source Port: 56750
DSCP: 0x12
TTL: 255
Output Features: Used
Example: Configuring Version 5 Export
The following example shows how to configure version 5 export for Flexible NetFlow.
This sample starts in global configuration mode:
!
flow exporter EXPORTER-1
destination 172.16.10.2
export-protocol netflow-v5
transport udp 90
exit
!
flow monitor FLOW-MONITOR-1
record netflow ipv4 original-input
exporter EXPORTER-1
!
ip cef
!
interface Ethernet 0/0
ip address 172.16.6.2 255.255.255.0
ip flow monitor FLOW-MONITOR-1 input
!
Where to Go Next
For information on advanced Flexible NetFlow configurations for specific purposes such as QoS and bandwidth monitoring, application and user flow monitoring and profiling, and security analysis, refer to the "Customizing
Cisco IOS Flexible NetFlow Flow Records and Flow Monitors" module.
If you want to configure flow sampling to reduce the CPU overhead of analyzing traffic, refer to the "Using
Cisco IOS Flexible NetFlow Flow Sampling to Reduce the CPU Overhead of Analyzing Traffic" module.
If you want to configure any of the predefined records for Flexible NetFlow, refer to the "Configuring
Cisco IOS Flexible NetFlow with Predefined Records" module.
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to
www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 1
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
Flexible NetFlow
12.2(33)SRC
12.2(50)SY
12.4(9)T
15.0(1)SY
15.0(1)SY1
Flexible NetFlow is introduced.
Support for this feature was added for Cisco 7200 series routers in Cisco IOS Release 12.2(33)SRC.
Support for this feature was added for Cisco 7200 series routers in Cisco IOS Release 12.2(33)SRC.
The following commands were introduced or modified:
collectrouting,
debugflowrecord,
collectipv4,
collectipv4destination,
collectipv4fragmentation,
collectipv4section,
collectipv4source,
ipflowmonitor,
matchipv4,
matchipv4destination,
matchipv4fragmentation,
matchipv4section,
matchipv4source,
matchrouting,
record,
showflowmonitor,showflowrecord.
Flexible NetFlow--NetFlow v9 Export Format
12.2(33)SRE
12.2(50)SY
12.4(9)T
15.0(1)SY
15.0(1)SY1
Enables sending export packets using the Version 9 export format.
Support for this feature was added for Cisco 7200 and 7300 Network Processing Engine (NPE) series routers in Cisco IOS Release 12.2(33)SRE.
No commands were introduced or modified by this feature.
Flexible NetFlow--IPv6 Unicast Flows
12.2(33)SRE
12.2(50)SY
12.4(20)T
15.0(1)SY
15.0(1)SY1
Enables Flexible NetFlow to monitor IPv6 traffic.
Support for this feature was added for Cisco 7200 and 7300 Network Processing Engine (NPE) series routers in Cisco IOS Release 12.2(33)SRE.
The following commands were introduced or modified:
collectrouting,
debugflowrecord,
matchrouting,
record,
showflowmonitor,showflowrecord,
collectipv6,
collectipv6destination,
collectipv6extensionmap,
collectipv6fragmentation,
collectipv6hop-limit,
collectipv6length,
collectipv6section,
collectipv6source,
collecttransporticmpipv6,
ipv6flowmonitor,
matchipv6,
matchipv6destination,
matchipv6extensionmap,
matchipv6fragmentation,
matchipv6hop-limit,
matchipv6length,
matchipv6section,
matchipv6source,
matchtransporticmpipv6.
Flexible NetFlow--Output Features on Data Export
12.4(20)T
Enables sending export packets using QoS and encryption.
The following command was introduced:
output-features.
Flexible NetFlow--NetFlow V5 Export Protocol
12.2(33)SRE
12.2(50)SY
12.4(22)T
15.0(1)SY
15.0(1)SY1
Enables sending export packets using the Version 5 export protocol.
Support for this feature was added for Cisco 7200 and 7300 Network Processing Engine (NPE) series routers in Cisco IOS Release 12.2(33)SRE.
The following command was introduced:
export-protocol.
Flexible NetFlow: Export to an IPv6 Address
15.2(2)T
This feature enables Flexible NetFlow to export data to a destination using an IPv6 address.
The following commands were introduced or modified:
destination
Flexible NetFlow: IPFIX Export Format
15.2(4)M
Enables sending export packets using the IPFIX export protocol. The export of extracted fields from NBAR is only supported over IPFIX.
Support for this feature was added for Cisco ASR 1000 Series Aggregation Services routers in Cisco IOS XE Release 3.7S.
The following command was introduced:
export-protocol.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL:
www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.