Flexible Netflow Configuration Guide, Cisco IOS Release

Flexible Netflow Configuration Guide, Cisco IOS Release
Flexible Netflow Configuration Guide,
Cisco IOS Release 15SY
Americas Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS,
INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED
WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED
WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.
The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB’s public domain version
of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS” WITH ALL
FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE
PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING,
WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR
ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
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.
© 2012 Cisco Systems, Inc. All rights reserved.
CONTENTS
Cisco IOS Flexible NetFlow Overview 1
Finding Feature Information 1
Information About Flexible NetFlow 1
Typical Uses for NetFlow 2
Use of Flows in Original NetFlow and Flexible NetFlow 2
Original NetFlow and Flexible NetFlow 3
Flexible NetFlow Components 4
Records 5
NetFlow Predefined Records 5
User-Defined Records 5
Flow Monitors 6
Flow Exporters 9
Flow Samplers 11
Security Monitoring with Flexible NetFlow 11
Feature Comparison of Original NetFlow and Flexible NetFlow 11
Limitations 14
Where to Go Next 14
Additional References 14
Getting Started with Configuring Cisco IOS Flexible NetFlow 17
Finding Feature Information 17
Prerequisites for Getting Started with Configuring Flexible NetFlow 18
Restrictions for Getting Started with Configuring Flexible NetFlow 18
Information About Getting Started with Configuring Flexible NetFlow 18
Benefit of Emulating Original NetFlow with Flexible NetFlow 18
NetFlow Original and NetFlow IPv4 Original Input Predefined Records 19
NetFlow IPv4 Original Output Predefined Record 20
NetFlow IPv6 Original Input Predefined Record 21
NetFlow IPv6 Original Output Predefined Record 23
Flexible NetFlow MPLS Egress NetFlow 24
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
iii
Contents
How to Get Started with Configuring Flexible NetFlow 25
Configuring a Flow Monitor for IPv4 or IPv6 Traffic Using the Predefined Record 26
Applying an IPv4 Flow Monitor to an Interface 27
Applying an IPv6 Flow Monitor to an Interface 29
Configuring a Flow Exporter for the Flow Monitor 31
Configuration Examples for Emulating Original NetFlow Features with Flexible NetFlow 33
Example: Configuring Flexible NetFlow Egress Accounting for IPv4 and IPv6 Traffic 33
Example: Configuring Flexible NetFlow Subinterface Support 34
Example: Configuring Flexible NetFlow Multiple Export Destinations 34
Where to Go Next 35
Additional References 35
Feature Information for Flexible NetFlow 36
Configuring Cisco IOS Flexible NetFlow with Predefined Records 41
Finding Feature Information 41
Prerequisites for Flexible NetFlow with Predefined Records 41
Restrictions for Flexible NetFlow with Predefined Records 42
Information About Configuring Flexible NetFlow with Predefined Records 42
Flexible NetFlow Predefined Records 43
Benefits of Flexible NetFlow Predefined Records 43
NetFlow Original and NetFlow IPv4 Original Input Predefined Records 43
NetFlow IPv4 Original Output Predefined Record 44
NetFlow IPv6 Original Input Predefined Record 45
NetFlow IPv6 Original Input Predefined Record 47
Autonomous System Predefined Record 48
Autonomous System ToS Predefined Record 49
BGP Next-Hop Predefined Record 50
BGP Next-Hop ToS Predefined Record 51
Destination Prefix Predefined Record 52
Destination Prefix ToS Predefined Record 53
Prefix Predefined Record 54
Prefix Port Predefined Record 55
Prefix ToS Predefined Record 57
Protocol Port Predefined Record 58
Protocol Port ToS Predefined Record 59
Source Prefix Predefined Record 60
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
iv
Contents
Source Prefix ToS Predefined Record 61
How to Configure a Predefined Record for the Flow Monitor 62
Configuring a Flow Monitor for IPv4 Traffic Using a Predefined Record 62
Configuring a Flow Monitor for IPv6 Traffic Using a Predefined Record 64
Applying an IPv4 Flow Monitor to an Interface 66
Applying an IPv6 Flow Monitor to an Interface 67
Configuration Examples for Flexible NetFlow with Predefined Records 69
Example: Configuring a Flexible NetFlow Predefined Record for IPv4 Traffic 69
Example: Configuring a Flexible NetFlow Predefined Record for IPv6 Traffic 69
Where to Go Next 70
Additional References 70
Feature Information for Flexible NetFlow 71
Configuring Data Export for Flexible NetFlow with Flow Exporters 75
Finding Feature Information 75
Prerequisites for Data Export for Flexible NetFlow with Flow Exporters 75
Restrictions for Data Export for Flexible NetFlow with Flow Exporters 76
Information About Data Export for Flexible NetFlow with Flow Exporters 76
Flow Exporters 76
Benefits of Flexible NetFlow Flow Exporters 76
How to Configure Data Export for Flexible NetFlow with Flow Exporters 77
Restrictions 77
Configuring the Flow Exporter 77
Configuring and Enabling Flexible NetFlow with Data Export 81
Configuration Examples for Flexible NetFlow Data Export with Flow Exporters 83
Example Configuring Multiple Export Destinations 83
Example Configuring Sending Export Packets Using QoS 84
Example Configuring Version 5 Export 85
Where to Go Next 85
Additional References 85
Feature Information for Flexible NetFlow 87
Configuring CPU Friendly NetFlow Export 93
Finding Feature Information 93
Prerequisites for CPU Friendly NetFlow Export 93
Information About CPU Friendly NetFlow Export 94
Overview of CPU Friendly NetFlow Export 94
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
v
Contents
How to Configure CPU Friendly NetFlow Export 94
Configuring the CPU Utilization Threshold 94
Configuration Examples for CPU Friendly NetFlow Export 95
Example: Configuring CPU Utilization Thresholds for NetFlow Export 95
Additional References 96
Feature Information for CPU Friendly NetFlow Export 96
Customizing Flexible NetFlow Flow Records and Flow Monitors 99
Finding Feature Information 99
Prerequisites for Customizing Flexible NetFlow Flow Records and Flow Monitors 100
Information About Customizing Flexible NetFlow Flow Records and Flow Monitors 100
Criteria for Identifying Traffic To Be Used in Analysis in Flexible NetFlow 100
How to Customize Flexible NetFlow Flow Records and Flow Monitors 101
Configuring a Customized Flow Record 102
Creating a Customized Flow Monitor 104
Applying a Flow Monitor to an Interface 106
Configuration Examples for Customizing Flow Records and Flow Monitors 108
Example: Configuring a Permanent Flow Record Cache with a Limited Number of Flows 109
Example: Configuring a Customized Flow Record Cache for Monitoring IPv6 Traffic 109
Example Configuring Flexible NetFlow for Monitoring MAC and VLAN Statistics 110
Example Configuring Flexible NetFlow for Ingress VRF Support 111
Example Configuring Flexible NetFlow for Network-Based Application Recognition 111
Example Configuring Flexible NetFlow for CTS Fields 111
Where to Go Next 112
Additional References 112
Feature Information for Flexible NetFlow 114
Using Flexible NetFlow Flow Sampling 119
Finding Feature Information 119
Prerequisites for Using Flow Sampling 119
Restrictions for Using Flow Sampling 120
Information About Flexible NetFlow Samplers 120
Flow Samplers 120
How to Configure Flexible NetFlow Flow Sampling 120
Configuring a Flow Monitor 121
Configuring and Enabling Flow Sampling 122
Configuration Examples for Using Flexible NetFlow Flow Sampling 124
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
vi
Contents
Example Configuring and Enabling a Deterministic Sampler for IPv4 Traffic 124
Example Configuring and Enabling a Deterministic Sampler for IPv6 Traffic 125
Example Adding a Sampler to a Flow Monitor When a Flow Monitor Is Already Enabled 126
Example Removing a Sampler from a Flow Monitor 126
Where to Go Next 126
Additional References 127
Feature Information for Flexible NetFlow 128
Configuring IPv4 Multicast Statistics Support for Flexible NetFlow 131
Finding Feature Information 131
Prerequisites for Configuring IPv4 Multicast Statistics Support 132
Restrictions for Configuring IPv4 Multicast Statistics Support 132
Information About IPv4 Multicast Statistics Support 132
Replicated Bytes and Packets Reporting 132
How to Configure IPv4 Multicast Statistics Support 133
Configuring IPv4 Multicast Statistics Support 133
Configuration Examples for IPv4 Multicast Statistics Support 136
Example Configuring IPv4 Multicast Statistics Support 136
Where to Go Next 137
Additional References 137
Feature Information for IPv4 Multicast Statistics Support 139
Using Flexible NetFlow Top N Talkers to Analyze Network Traffic 141
Finding Feature Information 141
Prerequisites for Flexible NetFlow Top N Talkers 142
Information About Flexible NetFlow Top N Talkers 142
Flexible NetFlow Data Flow Filtering 142
Flexible NetFlow Data Flow Aggregation 142
Flow Sorting and Top N Talkers 142
Documented Flexible NetFlow Top N Talkers Command Names and Actual Syntax 143
Combined Use of Flow Filtering and Flow Aggregation and Flow Sorting with Top N Talkers 143
Memory and Performance Impact of Top N Talkers 144
How to Analyze Network Traffic Using Flexible NetFlow Top N Talkers 144
Filtering Flow Data from the Flexible NetFlow Cache 144
Aggregating Flow Data from the Flexible NetFlow Cache 145
Sorting Flow Data from the Flexible NetFlow Cache 146
Displaying the Top N Talkers with Sorted Flow Data 148
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
vii
Contents
Configuration Examples for Flexible NetFlow Top N Talkers 149
Example Displaying the Top Talkers with Filtered and Aggregated and Sorted Flow Data 150
Example Filtering Using Multiple Filtering Criteria 151
Example Aggregation Using Multiple Aggregation Criteria 152
Additional References 152
Feature Information for Flexible NetFlow Top N Talkers 153
Support for ISSU and SSO 155
Finding Feature Information 155
Prerequisites for Flexible Netflow High Availability 155
Information About Flexible Netflow High Availability 156
ISSU 156
SSO 156
How to Configure Flexible Netflow High Availability 156
How to Verify Flexible Netflow High Availability 156
Configuration Examples for Flexible Netflow High Availability 158
Example Displaying Detailed Status for the Sampler Broker 158
Example Displaying a Status Summary for the Flow Record Broker 158
Example Verifying Whether SSO is Configured 159
Example Displaying which SSO Protocols and Applications are Registered 159
Additional References 160
Feature Information for Flexible Netflow High Availability Features 162
Glossary 163
Configuring Accounting for IPv6 Layer 2 Bridged Traffic 165
Finding Feature Information 165
Prerequisites for Monitoring IPv6 Bridged Flows 165
Information About Monitoring IPv6 Layer 2 Bridged Traffic 166
How to Configure the Monitoring of IPv6 Layer 2 Bridged Traffic 166
Configuring a Flow Record, Flow Monitor, and Exporter to Monitor IPv6 Layer 2 Bridged
Traffic 166
Applying a Flow Monitor to a Switched Virtual Interface to Monitor IPv6 Layer 2 Bridged
Traffic 173
Applying a Flow Monitor to a VLAN to Monitor IPv6 Layer 2 Bridged Traffic 174
Configuration Examples for Monitoring IPv6 Layer 2 Bridged Traffic 175
Example Configuration for SVI-based Monitoring IPv6 Layer 2 Bridged Traffic 176
Example Configuration for VLAN-Based Monitoring of IPv6 Layer3 Bridged Traffic 176
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
viii
Contents
Example Configuration for SVI-based Monitoring IPv6 Layer 2 Bridged Traffic Using a Flow
Sampler 177
Example Configuration for VLAN-Based Monitoring of IPv6 Layer3 Bridged Traffic Using a
Flow Sampler 177
Where to Go Next 178
Additional References 178
Feature Information for Configuring Accounting for IPv6 Layer 2 Bridged Traffic 179
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
ix
Contents
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
x
Cisco IOS Flexible NetFlow Overview
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 enable
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.
This module provides an overview of Flexible NetFlow and the advanced Flexible NetFlow features and
services.
•
•
•
•
Finding Feature Information, page 1
Information About Flexible NetFlow, page 1
Where to Go Next, page 14
Additional References, page 14
Finding Feature Information
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.
Information About Flexible NetFlow
•
•
•
•
•
•
•
Typical Uses for NetFlow, page 2
Use of Flows in Original NetFlow and Flexible NetFlow, page 2
Original NetFlow and Flexible NetFlow, page 3
Flexible NetFlow Components, page 4
Security Monitoring with Flexible NetFlow, page 11
Feature Comparison of Original NetFlow and Flexible NetFlow, page 11
Limitations, page 14
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
1
Typical Uses for NetFlow
Information About Flexible NetFlow
Typical Uses for NetFlow
NetFlow is typically used for several key customer applications, including the following:
•
•
•
•
•
•
•
Network monitoring. NetFlow data enables extensive near-real-time network monitoring capabilities.
Flow-based analysis techniques are used by network operators to visualize traffic patterns associated
with individual routers and switches and network-wide traffic patterns (providing aggregate traffic or
application-based views) to provide proactive problem detection, efficient troubleshooting, and rapid
problem resolution.
Application monitoring and profiling. NetFlow data enables network managers to gain a detailed timebased view of application usage over the network. This information is used to plan, understand new
services, and allocate network and application resources (for example, web server sizing and VoIP
deployment) to meet customer demands responsively.
User monitoring and profiling. NetFlow data enables network engineers to gain detailed understanding
of customer and user use of network and application resources. This information may then be used to
efficiently plan and allocate access, backbone, and application resources and to detect and resolve
potential security and policy violations.
Network planning. NetFlow can be used to capture data over a long period of time, affording the
opportunity to track and anticipate network growth and plan upgrades to increase the number of
routing devices, ports, and higher-bandwidth interfaces. NetFlow services data optimizes network
planning for peering, backbone upgrades, and routing policy. NetFlow helps to minimize the total cost
of network operations while maximizing network performance, capacity, and reliability. NetFlow
detects unwanted WAN traffic, validates bandwidth and quality of service (QoS), and allows the
analysis of new network applications. NetFlow will give you valuable information to reduce the cost
of operating your network.
Security analysis. NetFlow identifies and classifies distributed denial of service (dDoS) attacks,
viruses, and worms in real time. Changes in network behavior indicate anomalies that are clearly
demonstrated in Flexible NetFlow data. The data is also a valuable forensic tool to understand and
replay the history of security incidents.
Billing and accounting. NetFlow data provides fine-grained metering (for instance, flow data includes
details such as IP addresses, packet and byte counts, time stamps, type of service (ToS), and
application ports) for highly flexible and detailed resource utilization accounting. Service providers
may use the information for billing based on time of day, bandwidth usage, application usage, quality
of service, and so on. Enterprise customers may use the information for departmental charge back or
cost allocation for resource utilization.
NetFlow data warehousing and data mining. NetFlow data (or derived information) can be warehoused
for later retrieval and analysis in support of proactive marketing and customer service programs (for
example, discovering which applications and services are being used by internal and external users and
targeting them for improved service, advertising, and so on). In addition, Flexible NetFlow data gives
market researchers access to the "who," "what," "where," and "how long" information relevant to
enterprises and service providers.
Use of Flows in Original NetFlow and Flexible NetFlow
Original NetFlow and Flexible NetFlow both use the concept of flows. A flow is defined as a stream of
packets between a given source and a given destination.
Original NetFlow and Flexible NetFlow both use the values in key fields in IP datagrams, such as the IP
source or destination address and the source or destination transport protocol port, as the criteria for
determining when a new flow must be created in the cache while network traffic is being monitored. When
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
2
Original NetFlow and Flexible NetFlow
Information About Flexible NetFlow
the value of the data in the key field of a datagram is unique with respect to the flows that already exist, a
new flow is created.
Original NetFlow and Flexible NetFlow both use nonkey fields as the criteria for identifying fields from
which data is captured from the flows. The flows are populated with data that is captured from the values in
the nonkey fields.
The figure below is an example of the process for inspecting packets and creating flow records in the cache.
In this example, two unique flows are created in the cache because different values are in the source and
destination IP address key fields.
Figure 1
Packet Inspection
Original NetFlow and Flexible NetFlow
Original NetFlow uses a fixed seven tuples of IP information to identify a flow. Flexible NetFlow allows
the flow to be user defined. The benefits of Flexible NetFlow include:
•
•
•
•
•
High-capacity flow recognition, including scalability and aggregation of flow information.
Enhanced flow infrastructure for security monitoring and dDoS detection and identification.
New information from packets to adapt flow information to a particular service or operation in the
network. The flow information available will be customizable by Flexible NetFlow users.
Extensive use of Cisco’s flexible and extensible NetFlow Version 9 export format.
A comprehensive IP accounting feature that can be used to replace many accounting features, such as
IP accounting, Border Gateway Protocol (BGP) Policy Accounting, and persistent caches.
Original NetFlow allows you to understand the activities in the network and thus to optimize network
design and reduce operational costs. Flexible NetFlow allows you to understand network behavior with
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
3
Flexible NetFlow Components
Information About Flexible NetFlow
more efficiency, with specific flow information tailored for various services used in the network. The
following are some example applications for a Flexible NetFlow feature:
•
•
•
Flexible NetFlow enhances Cisco NetFlow as a security monitoring tool. For instance, new flow keys
can be defined for packet length or MAC address, allowing users to search for a specific type of attack
in the network.
Flexible NetFlow allows you to quickly identify how much application traffic is being sent between
hosts by specifically tracking TCP or UDP applications by the class of service (CoS) in the packets.
The accounting of traffic entering a Multiprotocol Label Switching (MPLS) or IP core network and its
destination for each next hop per class of service. This capability allows the building of an edge-toedge traffic matrix.
The figure below is an example of how Flexible NetFlow might be deployed in a network.
Figure 2
Typical Deployment for Flexible NetFlow
Flexible NetFlow Components
Flexible NetFlow consists of components that can be used together in several variations to perform traffic
analysis and data export. The user-defined flow records and the component structure of Flexible NetFlow
facilitates the creation of various configurations for traffic analysis and data export on a networking device
with a minimum number of configuration commands. Each flow monitor can have a unique combination of
flow record, flow exporter, and cache type. If you change a parameter such as the destination IP address for
a flow exporter, it is automatically changed for all the flow monitors that use the flow exporter. The same
flow monitor can be used in conjunction with different flow samplers to sample the same type of network
traffic at different rates on different interfaces. The following sections provide more information on
Flexible NetFlow components:
•
•
•
•
Records, page 5
Flow Monitors, page 6
Flow Exporters, page 9
Flow Samplers, page 11
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
4
Cisco IOS Flexible NetFlow Overview
Records
Records
In Flexible NetFlow a combination of key and nonkey fields is called a record . Flexible NetFlow records
are assigned to Flexible NetFlow flow monitors to define the cache that is used for storing flow data.
Flexible NetFlow includes several predefined records that can help you get started using Flexible NetFlow.
To use Flexible NetFlow to its fullest potential, you need to create your own customized records, as
described in the following sections:
•
•
NetFlow Predefined Records, page 5
User-Defined Records, page 5
NetFlow Predefined Records
Flexible NetFlow includes several predefined records that you can use to start monitoring traffic in your
network. The predefined records are available to help you quickly deploy Flexible NetFlow and are easier
to use than user-defined flow records. You can choose from a list of already defined records that may meet
the needs for network monitoring. As Flexible NetFlow evolves, popular user-defined flow records will be
made available as predefined records to make them easier to implement.
The predefined records ensure backward compatibility with your existing NetFlow collector configurations
for the data that is exported. Each of the predefined records has a unique combination of key and nonkey
fields that offer you the built-in ability to monitor various types of traffic in your network without
customizing Flexible NetFlow on your router.
Two of the predefined records (NetFlow original and NetFlow IPv4/IPv6 original output), which are
functionally equivalent, emulate original (ingress) NetFlow and the Egress NetFlow Accounting feature in
original NetFlow, respectively. Some of the other Flexible NetFlow predefined records are based on the
aggregation cache schemes available in original NetFlow. The Flexible NetFlow predefined records that are
based on the aggregation cache schemes available in original NetFlow do not perform aggregation. Instead
each flow is tracked separately by the predefined records.
User-Defined Records
Flexible NetFlow enables you to define your own records for a Flexible NetFlow flow monitor cache by
specifying the key and nonkey fields to customize the data collection to your specific requirements. When
you define your own records for a Flexible NetFlow flow monitor cache, they are referred to as userdefined records . The values in nonkey fields are added to flows to provide additional information about the
traffic in the flows. A change in the value of a nonkey field does not create a new flow. In most cases the
values for nonkey fields are taken from only the first packet in the flow. Flexible NetFlow enables you to
capture counter values such as the number of bytes and packets in a flow as nonkey fields.
You can create user-defined records for applications such as QoS and bandwidth monitoring, application
and end user traffic profiling, and security monitoring for dDoS attacks. Flexible NetFlow also includes
several predefined records that emulate original NetFlow.
Flexible NetFlow user-defined records provide the capability to monitor a contiguous section of a packet of
a user-configurable size, and use it in a flow record as a key or a nonkey field along with other fields and
attributes of the packet. The section may include any Layer 3 data from the packet.
The packet section fields allow the user to monitor any packet fields that are not covered by the Flexible
NetFlow predefined keys. The ability to analyze packet fields that are not collected with the predefined
keys enables more detailed traffic monitoring, facilitates the investigation of dDoS attacks, and enables
implementation of other security applications such as URL monitoring.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
5
Cisco IOS Flexible NetFlow Overview
Flow Monitors
Flexible NetFlow provides predefined types of packet sections of a user-configurable size. The following
Flexible NetFlow commands (used in Flexible NetFlow flow record configuration mode) can be used to
configure the predefined types of packet sections:
•
•
•
•
collect ipv4 section header size bytes --Starts capturing the number of bytes specified by the
bytesargument from the beginning of the IPv4 header of each packet.
collect ipv4 section payload size bytes --Starts capturing bytes immediately after the IPv4 header
from each packet. The number of bytes captured is specified by the bytes argument.
collect ipv6 section header size bytes --Starts capturing the number of bytes specified by the
bytesargument from the beginning of the IPv6 header of each packet.
collect ipv6 section payload size bytes --Starts capturing bytes immediately after the IPv6 header
from each packet. The number of bytes captured is specified by the bytes argument.
The bytes values are the sizes in bytes of these fields in the flow record. If the corresponding fragment of
the packet is smaller than the requested section size, Flexible NetFlow will fill the rest of the section field
in the flow record with zeros. If the packet type does not match the requested section type, Flexible
NetFlow will fill the entire section field in the flow record with zeros.
Flexible NetFlow adds a new Version 9 export format field type for the header and packet section types.
Flexible NetFlow will communicate to the NetFlow collector the configured section sizes in the
corresponding Version 9 export template fields. The payload sections will have a corresponding length
field that can be used to collect the actual size of the collected section.
Note
In Cisco IOS Release 12.2(50)SY, packet sections and payloads are not supported.
Flow Monitors
Flow monitors are the Flexible NetFlow component that is applied to interfaces to perform network traffic
monitoring. Flow monitors consist of a user-defined or predefined record, an optional flow exporter, and a
cache that is automatically created at the time the flow monitor is applied to the first interface. Flow data is
collected from the network traffic and added to the flow monitor cache during the monitoring process based
on the key and nonkey fields in the flow record.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
6
Cisco IOS Flexible NetFlow Overview
Flow Monitors
Flexible NetFlow can be used to perform different types of analysis on the same traffic. In the figure below,
packet 1 is analyzed using a record designed for standard traffic analysis on the input interface and a record
designed for security analysis on the output interface.
Figure 3
Example of Using Two Flow Monitors to Analyze the Same Traffic
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
7
Cisco IOS Flexible NetFlow Overview
Flow Monitors
The figure below shows a more complex example of how you can apply different types of flow monitors
with custom records.
Figure 4
Complex Example of Using Multiple Types of Flow Monitors with Custom Records
There are three types of flow monitor caches. You change the type of cache used by the flow monitor after
you create the flow monitor. The three types of flow monitor caches are described in the following
sections:
Normal
The default cache type is "normal." In this mode, the entries in the cache are aged out according to the
timeout active and timeout inactive settings. When a cache entry is aged out, it is removed from the cache
and exported via any exporters configured.
Immediate
A cache of type "immediate" ages out every record as soon as it is created. As a result, every flow contains
just one packet. The commands that display the cache contents will provide a history of the packets seen.
This mode is desirable when you expect only very small flows and you want a minimum amount of latency
between seeing a packet and exporting a report.
Caution
This mode may result in a large amount of export data that can overload low-speed links and overwhelm
any systems that you are exporting to. We recommended that you configure sampling to reduce the number
of packets that are processed.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
8
Cisco IOS Flexible NetFlow Overview
Flow Exporters
Note
The cache timeout settings have no effect in this mode.
Permanent
A cache of type "permanent" never ages out any flows. A permanent cache is useful when the number of
flows you expect to see is low and there is a need to keep long-term statistics on the router. For example, if
the only key field in the flow record is the 8-bit IP ToS field, only 256 flows can be monitored. To monitor
the long-term usage of the IP ToS field in the network traffic, you can use a permanent cache. Permanent
caches are useful for billing applications and for an edge-to-edge traffic matrix for a fixed set of flows that
are being tracked. Update messages will be sent periodically to any flow exporters configured according to
the "timeout update" setting.
Note
When a cache becomes full in permanent mode, new flows will not be monitored. If this occurs, a "Flows
not added" message will appear in the cache statistics.
Note
A permanent cache uses update counters rather than delta counters. This means that when a flow is
exported, the counters represent the totals seen for the full lifetime of the flow and not the additional
packets and bytes seen since the last export was sent.
Flow Exporters
Flow exporters export the data in the flow monitor cache to a remote system, such as a server running
NetFlow collector, for analysis and storage. Flow exporters are created as separate entities in the
configuration. Flow exporters are assigned to flow monitors to provide data export capability for the flow
monitors. You can create several flow exporters and assign them to one or more flow monitors to provide
several export destinations. You can create one flow exporter and apply it to several flow monitors.
NetFlow Data Export Format Version 9
The basic output of NetFlow is a flow record. Several different formats for flow records have evolved as
NetFlow has matured. The most recent evolution of the NetFlow export format is known as Version 9. The
distinguishing feature of the NetFlow Version 9 export format is that it is template-based. Templates
provide an extensible design to the record format, a feature that should allow future enhancements to
NetFlow services without requiring concurrent changes to the basic flow-record format. Using templates
provides several key benefits:
•
•
•
Third-party business partners who produce applications that provide collector or display services for
NetFlow do not have to recompile their applications each time a new NetFlow feature is added.
Instead, they should be able to use an external data file that documents the known template formats.
New features can be added to NetFlow quickly without breaking current implementations.
NetFlow is "future-proofed" against new or developing protocols because the Version 9 format can be
adapted to provide support for them.
The Version 9 export format consists of a packet header followed by one or more template flow or data
flow sets. A template flow set provides a description of the fields that will be present in future data flow
sets. These data flow sets may occur later within the same export packet or in subsequent export packets.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
9
Cisco IOS Flexible NetFlow Overview
Flow Exporters
Template flow and data flow sets can be intermingled within a single export packet, as illustrated in the
figure below.
Figure 5
Version 9 Export Packet
NetFlow Version 9 will periodically export the template data so the NetFlow collector will understand what
data is to be sent and also export the data flow set for the template. The key advantage to Flexible NetFlow
is that the user configures a flow record, which is effectively converted to a Version 9 template and then
forwarded to the collector. The figure below is a detailed example of the NetFlow Version 9 export format,
including the header, template flow, and data flow sets.
Note
The NetFlow Version 5 export format is a fixed export format that would provide limited information for
Flexible NetFlow data. This is why Flexible NetFlow uses the Version 9 export format.
Figure 6
Detailed Example of the NetFlow Version 9 Export Format
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
10
Security Monitoring with Flexible NetFlow
Flow Samplers
For more information on the Version 9 export format, refer to the white paper titled Cisco IOS NetFlow
Version 9 Flow-Record Format, available at this URL: http://www.cisco.com/en/US/tech/tk648/tk362/
technologies_white_paper09186a00800a3db9.shtml .
Flow Samplers
Flow samplers are created as separate components in a router’s configuration. Flow samplers are used to
reduce the load on the device that is running Flexible NetFlow by limiting the number of packets that are
selected for analysis. Samplers use either random or deterministic sampling techniques (modes):
•
•
Deterministic--The same sampling position is used each time a sample is taken.
Random--A randomly selected sampling position is used each time a sample is taken.
Flow sampling exchanges monitoring accuracy for router performance. When you apply a sampler to a
flow monitor, the overhead load on the router of running the flow monitor is reduced because the number
of packets that the flow monitor must analyze is reduced. The reduction in the number of packets that are
analyzed by the flow monitor causes a corresponding reduction in the accuracy of the information stored in
the flow monitor’s cache.
Samplers are combined with flow monitors when they are applied to an interface with the ip flow monitor
command.
Security Monitoring with Flexible NetFlow
Flexible NetFlow can be used as a network attack detection tool with capabilities to track all parts of the IP
header and even packet sections and characterize this information into flows. Security monitoring systems
can analyze Flexible NetFlow data, and upon finding an issue in the network, create a virtual bucket or
virtual cache that will be configured to track specific information and identify details about the attack
pattern or worm propagation. The capability to create caches dynamically with specific information
combined with input filtering (for example, filtering all flows to a specific destination) makes Flexible
NetFlow a powerful security monitoring tool.
One common type of attack occurs when TCP flags are used to flood open TCP requests to a destination
server (for example, a SYN flood attack). The attacking device sends a stream of TCP SYNs to a given
destination address but never sends the ACK in response to the servers SYN-ACK as part of the TCP threeway handshake. The flow information needed for a security detection server requires the tracking of three
key fields: destination address or subnet, TCP flags, and packet count. The security detection server may be
monitoring general Flexible NetFlow information, and this data may trigger a detailed view of this
particular attack by the Flexible NetFlow dynamically creating a new flow monitor in the router’s
configuration. The new flow monitor might include input filtering to limit what traffic is visible in the
Flexible NetFlow cache along with the tracking of the specific information to diagnose the TCP-based
attack. In this case the user may want to filter all flow information to the server destination address or
subnet to limit the amount of information the security detection server needs to evaluate. If the security
detection server decided it understood this attack, it might then program another flow monitor to collect and
export payload information or sections of packets to take a deeper look at a signature within the packet.
This example is just one of many possible ways that Flexible NetFlow can be used to detect security
incidents.
Feature Comparison of Original NetFlow and Flexible NetFlow
The table below provides a feature-by-feature comparison of original NetFlow and Flexible NetFlow.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
11
Cisco IOS Flexible NetFlow Overview
Flow Samplers
Table 1
Feature-by-Feature Comparison of Original NetFlow and Flexible NetFlow
Feature
Original NetFlow
Flexible NetFlow
Comments
NetFlow Data Capture
Supported
Supported
Data capture is available
with the predefined and
user-defined records in
Flexible NetFlow.
Flexible NetFlow has
several predefined keys
that emulate the traffic
analysis capabilities of
original NetFlow.
NetFlow Data Export
Supported
Supported
Flow exporters export
data from the Flexible
NetFlow flow monitor
caches to remote
systems.
NetFlow for IPv6
Supported
Supported
IPv6 support was
removed from original
NetFlow in Cisco IOS
Release 12.4(20)T.
The Flexible NetFlow-IPv6 Unicast Flows
feature implemented
IPv6 support for Flexible
NetFlow in Cisco IOS
Release 12.4(20)T.
MPLS-Aware NetFlow
Supported
Not supported
--
MPLS Egress NetFlow
Supported
Supported
The Flexible NetFlow-MPLS Egress NetFlow
feature implemented
MPLS NetFlow egress
support for Flexible
NetFlow in Cisco IOS
Release 12.4(22)T.
NetFlow BGP Next Hop Supported
Support
Supported
Available in the
predefined and userdefined keys in Flexible
NetFlow records.
Random Packet Sampled Supported
NetFlow
Supported
Available with Flexible
NetFlow sampling.
NetFlow v9 Export
Format
Supported
Available with Flexible
NetFlow exporters.
Supported
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
12
Cisco IOS Flexible NetFlow Overview
Flow Samplers
Feature
Original NetFlow
Flexible NetFlow
Comments
NetFlow Subinterface
Support
Supported
Supported
Flexible NetFlow
monitors can be assigned
to subinterfaces.
NetFlow Multiple
Export Destinations
Supported
Supported
Available with Flexible
NetFlow exporters.
NetFlow ToS-Based
Router Aggregation
Supported
Supported
Available in the
predefined and userdefined records in
Flexible NetFlow
records.
NetFlow Minimum
Prefix Mask for RouterBased Aggregation
Supported
Supported
Available in the
predefined and userdefined records.
NetFlow Input Filters
Supported
Not supported
--
NetFlow MIB
Supported
Not supported
--
NetFlow MIB and Top
Talkers
Supported
Not supported
--
NetFlow Multicast
Support
Supported
Supported
In Cisco IOS Release
12.4(9)T through
12.4(20)T Flexible
NetFlow collects
statistics for multicast
flows. However, specific
additional fields such as
replication counts for
bytes and packets are not
supported.
The Flexible NetFlow-IPv4 Multicast Statistics
Support feature
implemented support for
capturing multicast
replication counts for
bytes and packets in
Cisco IOS Release
12.4(22)T.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
13
Limitations
Where to Go Next
Feature
Original NetFlow
Flexible NetFlow
Comments
NetFlow Layer 2 and
Security Monitoring
Exports
Supported
Partially supported
The Flexible NetFlow-Layer 2 Fields feature
implemented support for
capturing MAC
addresses and virtual
LAN (VLAN) IDs in
Cisco IOS Release
12.4(22)T.
Egress NetFlow
Accounting
Supported
Supported
Flexible NetFlow
monitors can be used to
monitor egress traffic on
interfaces and
subinterfaces.
NetFlow Reliable Export Supported
with SCTP
Not supported
--
NetFlow Dynamic Top
Talkers CLI
Supported
The Flexible NetFlow-Top N Talkers Support
feature implemented in
Cisco IOS Release
12.4(22)T provides the
same functionailty.
Supported
Limitations
When using Flexible NetFlow to monitor outbound traffic on a router at the edge of an MPLS cloud, for IP
traffic that leaves over a VRF, the following fields are not collected and have a value of 0:
•
•
•
•
•
•
destination mask
destination prefix
destination AS numbers
destination BGP traffic index
nexthop
BGP nexthop
Where to Go Next
To implement a basic Flexible NetFlow configuration that emulates original NetFlow traffic analysis and
data export, refer to the "Getting Started with Configuring Cisco IOS Flexible NetFlow" module. To
implement other Flexible NetFlow configurations, refer to the Where to Go Next, page 14.
Additional References
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
14
Cisco IOS Flexible NetFlow Overview
Related Documents
Related Topic
Document Title
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Emulating original NetFlow with Flexible NetFlow
"Getting Started with Configuring Cisco IOS
Flexible NetFlow"
Configuring flow exporters to export Flexible
NetFlow data
"Configuring Data Export for Cisco IOS Flexible
NetFlow with Flow Exporters"
Customizing Flexible NetFlow for your network
"Customizing Cisco IOS Flexible NetFlow Flow
Records and Flow Monitors"
Configuring flow sampling to reduce the overhead
of monitoring traffic with Flexible NetFlow
"Using Cisco IOS Flexible NetFlow Flow Sampling
to Reduce the CPU Overhead of Analyzing Traffic"
Configuring Flexible NetFlow using predefined
records
"Configuring Cisco IOS Flexible NetFlow with
Predefined Records"
Using Flexible NetFlow Top N Talkers to analyze
network traffic
"Using Cisco IOS Flexible NetFlow Top N Talkers
to Analyze Network Traffic"
Configuring IPv4 multicast statistics support for
Flexible NetFlow
"Configuring IPv4 Multicast Statistics Support for
Cisco IOS Flexible NetFlow"
Configuration commands for Flexible NetFlow
Cisco IOS Flexible NetFlow Command Reference
RFCs
RFC
Title
RFC 3954
Cisco Systems NetFlow Services Export Version 9
Technical Assistance
Description
Link
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.
http://www.cisco.com/cisco/web/support/
index.html
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
15
Cisco IOS Flexible NetFlow Overview
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
16
Getting Started with Configuring Cisco IOS
Flexible NetFlow
This document contains information about and instructions for configuring Flexible NetFlow to emulate
the data capture, data analysis, and data export features of original NetFlow. The Flexible NetFlow
equivalents of some of the other features that have been added to original NetFlow, such as NetFlow
Subinterface Support and Multiple Export Destinations, are described in this document. The purpose of
this document is to help you start using Flexible NetFlow as quickly as possible, and explains how to
configure certain Flexible NetFlow features but does not explain them in detail. The documents listed in
the Getting Started with Configuring Cisco IOS Flexible NetFlow, page 17 contain more detailed
information on Flexible NetFlow features.
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.
•
•
•
•
•
•
•
•
•
Finding Feature Information, page 17
Prerequisites for Getting Started with Configuring Flexible NetFlow, page 18
Restrictions for Getting Started with Configuring Flexible NetFlow, page 18
Information About Getting Started with Configuring Flexible NetFlow, page 18
How to Get Started with Configuring Flexible NetFlow, page 25
Configuration Examples for Emulating Original NetFlow Features with Flexible NetFlow, page 33
Where to Go Next, page 35
Additional References, page 35
Feature Information for Flexible NetFlow, page 36
Finding Feature Information
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
17
Benefit of Emulating Original NetFlow with Flexible NetFlow
Prerequisites for Getting Started with Configuring Flexible NetFlow
Prerequisites for Getting Started with Configuring Flexible
NetFlow
•
•
You are familiar with the information in the " Cisco IOS Flexible NetFlow Overview " module.
The networking device must be running a Cisco IOS release that supports Cisco IOS 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
IPv6.
Restrictions for Getting Started with Configuring Flexible
NetFlow
•
•
Locally generated traffic (traffic that is generated by the router on which the Flexible NetFlow Output
Accounting feature is configured) is not counted as flow traffic for the Output Flexible NetFlow
Accounting feature.
The Flexible NetFlow Output Accounting feature counts CEF-switched packets only. Processswitched transit packets are not counted.
Information About Getting Started with Configuring Flexible
NetFlow
•
•
•
•
•
•
Benefit of Emulating Original NetFlow with Flexible NetFlow, page 18
NetFlow Original and NetFlow IPv4 Original Input Predefined Records, page 19
NetFlow IPv4 Original Output Predefined Record, page 20
NetFlow IPv6 Original Input Predefined Record, page 21
NetFlow IPv6 Original Output Predefined Record, page 23
Flexible NetFlow MPLS Egress NetFlow, page 24
Benefit of Emulating Original NetFlow with Flexible NetFlow
Emulating original NetFlow with Flexible NetFlow enables to you to deploy Flexible NetFlow quickly
because you can use a predefined record instead of designing and configuring a custom user-defined
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
18
NetFlow Original and NetFlow IPv4 Original Input Predefined Records
Information About Getting Started with Configuring Flexible NetFlow
record. You need only configure a flow monitor and apply it to an interface for Flexible NetFlow to start
working like original NetFlow. You can add an optional exporter if you want to analyze the data that you
collect with an application such as NetFlow collector.
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.
Flow exporters are used to send the data that you collect with Flexible NetFlow to a remote system such as
a NetFlow Collection Engine. Exporters use UDP as the transport protocol and use the Version 9 export
format.
If you are familiar with original NetFlow, you already understand the format and content of the data that
you collect and export with Flexible NetFlow when you emulate original NetFlow. You will be able to use
the same techniques for analyzing the data.
NetFlow Original and NetFlow IPv4 Original Input Predefined Records
The Flexible NetFlow "NetFlow original" and "NetFlow IPv4 original input" predefined records can be
used interchangeably because they have the same key and nonkey fields. The key and nonkey fields and the
counters for the Flexible NetFlow "NetFlow original" and "NetFlow IPv4 original input" predefined
records are shown in the table below.
Table 2
Key and Nonkey Fields Used by the Flexible NetFlow NetFlow Original and NetFlow IPv4 Original
Input Predefined Records
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the type of service (ToS)
field.
IP Protocol
Key
Value in the IP protocol field.
IP Source Address
Key
IP source address.
IP Destination Address
Key
IP destination address.
Transport Source Port
Key
Value of the transport layer
source port field.
Transport Destination Port
Key
Value of the transport layer
destination port field.
Interface Input
Key
Interface on which the traffic is
received.
Flow Sampler ID
Key
ID number of the flow sampler (if
flow sampling is enabled).
IP Source AS
Nonkey
Source autonomous system
number.
IP Destination AS
Nonkey
Destination autonomous system
number.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
19
NetFlow IPv4 Original Output Predefined Record
Information About Getting Started with Configuring Flexible NetFlow
Field
Key or Nonkey Field
Definition
IP Next Hop Address
Nonkey
IP address of the next hop.
IP Source Mask
Nonkey
Mask for the IP source address.
IP Destination Mask
Nonkey
Mask for the IP destination
address.
TCP Flags
Nonkey
Value in the TCP flag field.
Interface Output
Nonkey
Interface on which the traffic is
transmitted.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
The configuration in the How to Get Started with Configuring Flexible NetFlow, page 25 uses the
predefined Flexible NetFlow "NetFlow original" record.
NetFlow IPv4 Original Output Predefined Record
The Flexible NetFlow "NetFlow IPv4 original output" predefined record is used to emulate the original
NetFlow Egress NetFlow Accounting feature that was released in Cisco IOS Release 12.3(11)T. The key
and nonkey fields and the counters for the Flexible NetFlow "NetFlow IPv4 original output" predefined
record are shown in the table below.
Table 3
Key and Nonkey Fields Used by the Flexible NetFlow NetFlow IPv4 Original Output Predefined
Record
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the ToS field.
IP Protocol
Key
Value in the IP protocol field.
IP Source Address
Key
IP source address.
IP Destination Address
Key
IP destination address.
Transport Source Port
Key
Value of the transport layer
source port field.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
20
NetFlow IPv6 Original Input Predefined Record
Information About Getting Started with Configuring Flexible NetFlow
Field
Key or Nonkey Field
Definition
Transport Destination Port
Key
Value of the transport layer
destination port field.
Interface Output
Key
Interface on which the traffic is
transmitted.
Flow Sampler ID
Key
ID number of the flow sampler (if
flow sampling is enabled).
IP Source AS
Nonkey
Source autonomous system
number.
IP Destination AS
Nonkey
Destination autonomous system
number.
IP Next Hop Address
Nonkey
IP address of the next hop.
IP Source Mask
Nonkey
Mask for the IP source address.
IP Destination Mask
Nonkey
Mask for the IP destination
address.
TCP Flags
Nonkey
Value in the TCP flag field.
Interface Input
Nonkey
Interface on which the traffic is
received.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
The configuration in the Example: Configuring Flexible NetFlow Egress Accounting for IPv4 and IPv6
Traffic, page 33 uses the predefined Flexible NetFlow "NetFlow original output" record.
NetFlow IPv6 Original Input Predefined Record
The key and nonkey fields and the counters for the Flexible NetFlow "NetFlow IPv6 original input"
predefined record are shown in the table below.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
21
Getting Started with Configuring Cisco IOS Flexible NetFlow
Information About Getting Started with Configuring Flexible NetFlow
Table 4
Key and Nonkey Fields Used by the Flexible NetFlow NetFlow IPv6 Original Input Predefined Record
Field
Key or NonKey Field
Definition
Traffic Class
Key
Value in the traffic class field.
Flow Label
Key
Flow label.
Protocol
Key
Value in the protocol field.
Extension Map
Key
Value in the extension map
bitmap.
IP Source Address
Key
IP source address.
IP Destination Address
Key
IP destination address.
Transport Source Port
Key
Value of the transport layer
source port field.
Transport Destination Port
Key
Value of the transport layer
destination port field.
Interface Input
Key
Interface on which the traffic is
received.
Flow Direction
Key
The direction of the flow.
Flow Sampler
Key
ID number of the flow sampler (if
flow sampling is enabled).
Routing Source AS
Nonkey
Source autonomous system
number.
Routing Destination AS
Nonkey
Destination autonomous system
number.
Routing Next-hop Address
Nonkey
IP address of the next hop.
IP Source Mask
Nonkey
Mask for the IP source address.
IP Destination Mask
Nonkey
Mask for the IP destination
address.
Transport TCP Flags
Nonkey
Value in the TCP flag field.
Interface Output
Nonkey
Interface over which the traffic is
transmitted.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
22
NetFlow IPv6 Original Output Predefined Record
Information About Getting Started with Configuring Flexible NetFlow
Field
Key or NonKey Field
Definition
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
NetFlow IPv6 Original Output Predefined Record
The key and nonkey fields and the counters for the Flexible NetFlow "NetFlow IPv6 original output"
predefined record are shown in the table below.
Table 5
Key and Nonkey Fields Used by the Flexible NetFlow NetFlow IPv6 Original Output Predefined
Record
Field
Key or Nonkey Field
Definition
Traffic Class
Key
Value in the traffic class field.
Flow Label
Key
The flow label.
Protocol
Key
Value in the protocol field.
Extension Map
Key
Value in the extension map
bitmap.
IP Source Address
Key
IP source address.
IP Destination Address
Key
IP destination address.
Transport Source Port
Key
Value of the transport layer
source port field.
Transport Destination Port
Key
Value of the transport layer
destination port field.
Interface Output
Key
Interface over which the traffic is
transmitted.
Flow Direction
Key
The direction of the flow.
Flow Sampler
Key
ID number of the flow sampler (if
flow sampling is enabled).
Routing Source AS
Nonkey
Source autonomous system
number.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
23
Flexible NetFlow MPLS Egress NetFlow
Information About Getting Started with Configuring Flexible NetFlow
Field
Key or Nonkey Field
Definition
Routing Destination AS
Nonkey
Destination autonomous system
number.
Routing Next-hop Address
Nonkey
IP address of the next hop.
IP Source Mask
Nonkey
Mask for the IP source address.
IP Destination Mask
Nonkey
Mask for the IP destination
address.
Transport TCP Flags
Nonkey
Value in the TCP flag field.
Interface Input
Nonkey
Interface on which the traffic is
received.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
Flexible NetFlow MPLS Egress NetFlow
The Flexible NetFlow--MPLS Egress NetFlow feature allows you to capture IP flow information for
packets that arrive on a router as Multiprotocol Label Switching (MPLS) packets and are transmitted as IP
packets. This feature allows you to capture the MPLS VPN IP flows that are traveling through the service
provider backbone from one site of a VPN to another site of the same VPN. The Flexible NetFlow--MPLS
Egress NetFlow feature is enabled by applying a flow monitor in output (egress) mode on the provider edge
(PE) to customer edge (CE) interface of the provider’s network.
The figure below shows a sample MPLS VPN network topology that includes four VPN 1 sites and two
VPN 2 sites. If the Flexible NetFlow--MPLS Egress NetFlow is enabled on an outgoing PE interface by
applying a flow monitor in output mode, IP flow information for packets that arrive at the PE as MPLS
packets (from an MPLS VPN) and that are transmitted as IP packets to the PE router is captured. For
example:
•
•
To capture the flow of traffic going to site 2 of VPN 1 from any remote VPN 1 sites, you enable a flow
monitor in output mode on link PE2-CE5 of provider edge router PE2.
To capture the flow of traffic going to site 1 of VPN 2 from any remote VPN 2 site, you enable a flow
monitor in output mode on link PE3-CE4 of the provider edge router PE3.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
24
Getting Started with Configuring Cisco IOS Flexible NetFlow
How to Get Started with Configuring Flexible NetFlow
The flow data is stored in the Flexible NetFlow cache. You can use the show flow monitor monitor-name
cachecommand to display the flow data in the cache.
Figure 7
Sample MPLS VPN Network Topology with Flexible NetFlow--MPLS Egress NetFlow Feature
If you configure a Flexible NetFlow exporter for the flow monitors you use for the Flexible NetFlow-MPLS Egress NetFlow feature, the PE routers will export the captured flows to the configured collector
devices in the provider network. Applications such as the Network Data Analyzer or the VPN Solution
Center (VPN-SC) can gather information from the captured flows and compute and display site-to-site
VPN traffic statistics.
How to Get Started with Configuring Flexible NetFlow
The tasks in this section explain how to configure and verify the emulation of original (ingress) NetFlow
data capture with Flexible NetFlow for traffic that is received by the router and how to configure and verify
the emulation of original NetFlow data export with Flexible NetFlow.
Note
Flexible NetFlow emulation of original NetFlow requires the configuration of a flow monitor and the
application of the flow monitor to at least one interface that is receiving the traffic that you want to analyze.
Note
Only the keywords and arguments required for the Flexible NetFlow commands used in these tasks are
explained in these tasks. For information on the other keywords and arguments available for these Flexible
NetFlow commands, refer to the Cisco IOS Flexible NetFlow Command Reference .
•
•
•
•
Configuring a Flow Monitor for IPv4 or IPv6 Traffic Using the Predefined Record, page 26
Applying an IPv4 Flow Monitor to an Interface, page 27
Applying an IPv6 Flow Monitor to an Interface, page 29
Configuring a Flow Exporter for the Flow Monitor, page 31
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
25
Configuring a Flow Monitor for IPv4 or IPv6 Traffic Using the Predefined Record
How to Get Started with Configuring Flexible NetFlow
Configuring a Flow Monitor for IPv4 or IPv6 Traffic Using the Predefined
Record
To configure a flow monitor for IPv4/IPv6 traffic using the Flexible NetFlow "NetFlow IPv4/IPv6 original
input" predefined record for the flow monitor, perform the following 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.
SUMMARY STEPS
1. enable
2. configure terminal
3. flow monitor monitor-name
4. description description
5. record netflow {ipv4 | ipv6} original-input
6. end
7. show flow monitor [[name] monitor-name [cache [format {csv | record | table}]][statistics]]
8. show running-config flow monitor monitor-name
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Device> enable
Step 2 configure terminal
Example:
Device# configure terminal
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
26
Enters global configuration mode.
Applying an IPv4 Flow Monitor to an Interface
How to Get Started with Configuring Flexible NetFlow
Command or Action
Step 3 flow monitor monitor-name
Purpose
Creates a flow monitor and enters Flexible NetFlow
flow monitor configuration mode.
•
Example:
This command also allows you to modify an
existing flow monitor.
Device(config)# flow monitor FLOW-MONITOR-1
Step 4 description description
(Optional) Creates a description for the flow monitor.
Example:
Device(config-flow-monitor)# description Used for
monitoring IPv4 traffic
Step 5 record netflow {ipv4 | ipv6} original-input
Specifies the record for the flow monitor.
Example:
Device(config-flow-monitor)# record netflow ipv4
original-input
Step 6 end
Exits Flexible NetFlow flow monitor configuration
mode and returns to privileged EXEC mode.
Example:
Device(config-flow-monitor)# end
Step 7 show flow monitor [[name] monitor-name [cache [format {csv | (Optional) Displays the status and statistics for a
Flexible NetFlow flow monitor.
record | table}]][statistics]]
Example:
Device# show flow monitor FLOW-MONITOR-2 cache
Step 8 show running-config flow monitor monitor-name
(Optional) Displays the configuration of the specified
flow monitor.
Example:
Device# show flow monitor FLOW_MONITOR-1
Applying an IPv4 Flow Monitor to an Interface
Before it can be activated an IPv4 flow monitor must be applied to at least one interface. To activate an
IPv4 flow monitor, perform the following required task.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
27
Getting Started with Configuring Cisco IOS Flexible NetFlow
How to Get Started with Configuring Flexible NetFlow
Note
When you specify the "NetFlow original" or the "NetFlow IPv4 original input" predefined record for the
flow monitor to emulate original NetFlow, the flow monitor can be used for analyzing only input (ingress)
traffic.
When you specify the "NetFlow IPv4 original output" predefined record for the flow monitor to emulate
the Egress NetFlow Accounting feature, the flow monitor can be used for analyzing only output (egress)
traffic.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip flow monitor monitor-name input
5. end
6. show flow interface type number
7. show flow monitor name monitor-name cache format record
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Router> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Router# configure terminal
Step 3 interface type number
Specifies an interface and enters interface configuration
mode.
Example:
Router(config)# interface ethernet 0/0
Step 4 ip flow monitor monitor-name input
Example:
Router(config-if)# ip flow monitor FLOW-MONITOR-1
input
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
28
Activates the flow monitor that you created previously
by assigning it to the interface to analyze traffic.
Applying an IPv6 Flow Monitor to an Interface
How to Get Started with Configuring Flexible NetFlow
Command or Action
Purpose
Step 5 end
Exits interface configuration mode and returns to
privileged EXEC mode.
Example:
Router(config-if)# end
Step 6 show flow interface type number
Displays the status of Flexible NetFlow (enabled or
disabled) on the specified interface.
Example:
Router# show flow interface ethernet 0/0
Step 7 show flow monitor name monitor-name cache format record Displays the status, statistics, and flow data in the cache
for the specified flow monitor.
Example:
Router# show flow monitor name FLOW_MONITOR-1 cache
format record
Applying an IPv6 Flow Monitor to an Interface
Before it can be activated an IPv6 flow monitor must be applied to at least one interface. To activate an
IPv6 flow monitor, perform the following required task.
Note
When you specify the "NetFlow IPv6 original input" predefined record for the flow monitor to emulate
original NetFlow, the flow monitor can be used for analyzing only input (ingress) traffic.
When you specify the "NetFlow IPv6 original output" predefined record for the flow monitor to emulate
the Egress NetFlow Accounting feature, the flow monitor can be used for analyzing only output (egress)
traffic.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ipv6 flow monitor monitor-name input
5. end
6. show flow interface type number
7. show flow monitor name monitor-name cache format record
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
29
Getting Started with Configuring Cisco IOS Flexible NetFlow
How to Get Started with Configuring Flexible NetFlow
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Router> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Router# configure terminal
Step 3 interface type number
Specifies an interface and enters interface configuration
mode.
Example:
Router(config)# interface ethernet 0/0
Step 4 ipv6 flow monitor monitor-name input
Activates the flow monitor that you created previously
by assigning it to the interface to analyze traffic.
Example:
Router(config-if)# ipv6 flow monitor FLOW-MONITOR-2
input
Step 5 end
Exits interface configuration mode and returns to
privileged EXEC mode.
Example:
Router(config-if)# end
Step 6 show flow interface type number
Displays the status of Flexible NetFlow (enabled or
disabled) on the specified interface.
Example:
Router# show flow interface ethernet 0/0
Step 7 show flow monitor name monitor-name cache format record Displays the status, statistics, and flow data in the cache
for the specified flow monitor.
Example:
Router# show flow monitor name FLOW_MONITOR-1 cache
format record
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
30
Configuring a Flow Exporter for the Flow Monitor
How to Get Started with Configuring Flexible NetFlow
Configuring a Flow Exporter for the Flow Monitor
To configure a flow exporter for the flow monitor, in order to export the data that is collected by Flexible
NetFlow to a remote system for further analysis and storage, perform the following optional task.
Flow exporters are used to send the data that you collect with Flexible NetFlow to a remote system such as
a NetFlow Collection Engine. Exporters use UDP as the transport protocol and use the Version 9 export
format.
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.
SUMMARY STEPS
1. enable
2. configure terminal
3. flow exporter exporter-name
4. description description
5. destination {hostname | ip-address} [vrf vrf-name]
6. export-protocol {netflow-v5 | netflow-v9 | ipfix}
7. transport udp udp-port
8. exit
9. flow monitor flow-monitor-name
10. exporter exporter-name
11. end
12. show flow exporter exporter-name
13. show running-config flow exporter exporter-name
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Device> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Device# configure terminal
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
31
Getting Started with Configuring Cisco IOS Flexible NetFlow
How to Get Started with Configuring Flexible NetFlow
Command or Action
Step 3 flow exporter exporter-name
Example:
Purpose
Creates a flow exporter and enters Flexible NetFlow flow
exporter configuration mode.
•
This command also allows you to modify an existing
flow exporter.
Device(config)# flow exporter EXPORTER-1
Step 4 description description
(Optional) Creates a description for the flow exporter.
Example:
Device(config-flow-exporter)# description
Exports to datacenter
Step 5 destination {hostname | ip-address} [vrf vrf-name]
Example:
Specifies the hostname or IP address of the system to which
the exporter sends data.
Note You can export to a destination using either an IPv4 or
IPv6 address.
Device(config-flow-exporter)# destination
172.16.10.2
Step 6 export-protocol {netflow-v5 | netflow-v9 | ipfix}
Example:
Specifies the version of the NetFlow export protocol used by
the exporter.
•
Default: netflow-v9.
Device(config-flow-exporter)# export-protocol
netflow-v9
Step 7 transport udp udp-port
Configures UDP as the transport protocol and specifies the
UDP port on which the destination system is listening for
exported Flexible NetFlow traffic.
Example:
Device(config-flow-exporter)# transport udp 65
Step 8 exit
Exits Flexible NetFlow flow exporter configuration mode and
returns to global configuration mode.
Example:
Device(config-flow-exporter)# exit
Step 9 flow monitor flow-monitor-name
Example:
Device(config)# flow monitor FLOW-MONITOR-1
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
32
Enters Flexible NetFlow flow monitor configuration mode for
the flow monitor that you created previously.
Example: Configuring Flexible NetFlow Egress Accounting for IPv4 and IPv6 Traffic
Configuration Examples for Emulating Original NetFlow Features with Flexible NetFlow
Command or Action
Step 10 exporter exporter-name
Purpose
Specifies the name of an exporter that you created previously.
Example:
Device(config-flow-monitor)# exporter
EXPORTER-1
Step 11 end
Exits Flexible NetFlow flow monitor configuration mode and
returns to privileged EXEC mode.
Example:
Device(config-flow-monitor)# end
Step 12 show flow exporter exporter-name
(Optional) Displays the current status of the specified flow
exporter.
Example:
Device# show flow exporter FLOW_EXPORTER-1
Step 13 show running-config flow exporter exporter-name
(Optional) Displays the configuration of the specified flow
exporter.
Example:
Device<# show running-config flow exporter
FLOW_EXPORTER-1
Configuration Examples for Emulating Original NetFlow
Features with Flexible NetFlow
•
•
•
Example: Configuring Flexible NetFlow Egress Accounting for IPv4 and IPv6 Traffic, page 33
Example: Configuring Flexible NetFlow Subinterface Support, page 34
Example: Configuring Flexible NetFlow Multiple Export Destinations, page 34
Example: Configuring Flexible NetFlow Egress Accounting for IPv4 and IPv6
Traffic
The following example shows how to configure Flexible NetFlow egress accounting for IPv4 and IPv6
traffic.
This sample starts in global configuration mode:
!
flow monitor FLOW-MONITOR-1
record netflow ipv4 original-output
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
33
Example: Configuring Flexible NetFlow Subinterface Support
Configuration Examples for Emulating Original NetFlow Features with Flexible NetFlow
exit
!
!
flow monitor FLOW-MONITOR-2
record netflow ipv6 original-output
exit
!
ip cef
ipv6 cef
!
interface Ethernet0/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 output
ipv6 flow monitor FLOW-MONITOR-2 output
!
Example: Configuring Flexible NetFlow Subinterface Support
The following example shows how to configure Flexible NetFlow subinterface support for IPv4 traffic.
This sample starts in global configuration mode:
!
flow monitor FLOW-MONITOR-1
record netflow ipv4 original-input
exit
!
ip cef
!
interface Ethernet0/0.1
ip address 172.16.6.2 255.255.255.0
ip flow monitor FLOW-MONITOR-1 input
!
The following example shows how to configure Flexible NetFlow to emulate NetFlow subinterface support
for IPv6 traffic.
This sample starts in global configuration mode:
!
flow monitor FLOW-MONITOR-2
record netflow ipv6 original-input
exit
!
ip cef
ipv6 cef
!
interface Ethernet0/0.1
ipv6 address 2001:DB8:2:ABCD::2/48
ipv6 flow monitor FLOW-MONITOR-2 input
!
Example: Configuring Flexible NetFlow Multiple Export Destinations
The following example shows how to configure Flexible NetFlow multiple export destinations.
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
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
34
Getting Started with Configuring Cisco IOS Flexible NetFlow
Where to Go Next
transport udp 90
exit
!
flow monitor FLOW-MONITOR-1
record netflow-original
exporter EXPORTER-2
exporter EXPORTER-1
exit
!
ip cef
!
interface Ethernet0/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 quality of
service (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 additional options for data export for Flexible NetFlow, refer to the "Configuring
Data Export for Cisco IOS Flexible NetFlow with Flow Exporters" 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.
Additional References
Related Documents
Related Topic
Document Title
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Overview of Flexible NetFlow
"Cisco IOS Flexible NetFlow Overview"
Configuring flow exporters to export Flexible
NetFlow data
"Configuring Data Export for Cisco IOS Flexible
NetFlow with Flow Exporters"
Customizing Flexible NetFlow
"Customizing Cisco IOS Flexible NetFlow Flow
Records and Flow Monitors"
Configuring flow sampling to reduce the overhead
of monitoring traffic with Flexible NetFlow
"Using Cisco IOS Flexible NetFlow Flow Sampling
to Reduce the CPU Overhead of Analyzing Traffic"
Configuring Flexible NetFlow using predefined
records
"Configuring Cisco IOS Flexible NetFlow with
Predefined Records"
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
35
Getting Started with Configuring Cisco IOS Flexible NetFlow
Feature Information for Flexible NetFlow
Related Topic
Document Title
Using Flexible NetFlow Top N Talkers to analyze
network traffic
"Using Cisco IOS Flexible NetFlow Top N Talkers
to Analyze Network Traffic"
Configuring IPv4 multicast statistics support for
Flexible NetFlow
"Configuring IPv4 Multicast Statistics Support for
Cisco IOS Flexible NetFlow"
Configuration commands for Flexible NetFlow
Cisco IOS Flexible NetFlow Command Reference
Standards
Standard
Title
None
--
MIBs
MIB
MIBs Link
None
To locate and download MIBs for selected
platforms, Cisco software releases, and feature sets,
use Cisco MIB Locator found at the following
URL:
http://www.cisco.com/go/mibs
RFCs
RFC
Title
RFC 3954
Cisco Systems NetFlow Services Export Version 9
Technical Assistance
Description
Link
The Cisco Support and Documentation website
http://www.cisco.com/cisco/web/support/
provides online resources to download
index.html
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
Feature Information for Flexible NetFlow
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
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
36
Getting Started with Configuring Cisco IOS Flexible NetFlow
Feature Information for Flexible NetFlow
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
37
Getting Started with Configuring Cisco IOS Flexible NetFlow
Feature Information for Flexible NetFlow
Table 6
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
Flexible NetFlow
12.2(33)SRC
Flexible NetFlow is introduced.
12.2(50)SY
Support for this feature was
added for Cisco 7200 series
routers in Cisco IOS Release
12.2(33)SRC.
12.4(9)T
15.0(1)SY
15.0(1)SY1
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
38
The following commands were
introduced or modified: cache
(Flexible NetFlow), clear flow
exporter, clear flow monitor,
clear sampler, collect counter,
collect flow, collect interface,
collect ipv4, collect ipv4
destination, collect ipv4
fragmentation, collect ipv4
section, collect ipv4 source,
collect ipv4 total-length, collect
ipv4 ttl, collect routing, collect
timestamp sys-uptime, collect
transport, collect transport
icmp ipv4, collect transport tcp,
collect transport udp, debug
flow exporter, debug flow
monitor, debug flow record,
debug sampler, description
(Flexible NetFlow), destination,
dscp (Flexible NetFlow),
exporter, flow exporter, flow
monitor, flow platform, flow
record, ip flow monitor, match
flow, match interface (Flexible
NetFlow), match ipv4, match
ipv4 destination, match ipv4
fragmentation, match ipv4
section, match ipv4 source,
match ipv4 total-length, match
ipv4 ttl, match routing, match
transport, match transport
icmp ipv4, match transport tcp,
match transport udp, mode
(Flexible NetFlow), option
(Flexible NetFlow), record,
sampler, show flow exporter,
show flow interface, show flow
monitor, show flow record,
show sampler, source (Flexible
NetFlow), statistics packet,
Getting Started with Configuring Cisco IOS Flexible NetFlow
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
template data timeout,
transport (Flexible NetFlow).
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
NPE series routers in Cisco IOS
Release 12.2(33)SRE.
The following commands were
introduced or modified: collect
routing, debug flow record,
match routing, record, show
flow monitor, show flow record,
collect ipv6, collect ipv6
destination, collect ipv6
extension map, collect ipv6
fragmentation, collect ipv6 hoplimit, collect ipv6 length, collect
ipv6 section, collect ipv6 source,
collect transport icmp ipv6,
ipv6 flow monitor, match ipv6,
match ipv6 destination, match
ipv6 extension map, match ipv6
fragmentation, match ipv6 hoplimit, match ipv6 length, match
ipv6 section, match ipv6 source,
match transport icmp ipv6.
Flexible NetFlow--MPLS Egress
NetFlow
12.2(33)SRE
12.2(50)SY
12.4(22)T
15.0(1)SY
15.0(1)SY1
The Flexible NetFlow--MPLS
Egress NetFlow feature allows
you to capture IP flow
information for packets
undergoing MPLS label
disposition; that is, packets that
arrive on a router as MPLS
packets and are transmitted as IP
packets.
Support for this feature was
added for Cisco 7200 and 7300
NPE series routers in Cisco IOS
Release 12.2(33)SRE.
No commands were introduced or
modified by this feature.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
39
Getting Started with Configuring Cisco IOS Flexible NetFlow
Feature Name
Releases
Feature Information
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
40
Configuring Cisco IOS Flexible NetFlow with
Predefined Records
This module contains information about and instructions for configuring Flexible NetFlow using
predefined records. Many of the Flexible NetFlow predefined records use the same key and nonkey fields
as the aggregation caches available in original NetFlow. However, the predefined Flexible NetFlow
records do not perform aggregation.
NetFlow is a Cisco IOS technology that provides statistics on packets flowing through a 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.
•
•
•
•
•
•
•
•
•
Finding Feature Information, page 41
Prerequisites for Flexible NetFlow with Predefined Records, page 41
Restrictions for Flexible NetFlow with Predefined Records, page 42
Information About Configuring Flexible NetFlow with Predefined Records, page 42
How to Configure a Predefined Record for the Flow Monitor, page 62
Configuration Examples for Flexible NetFlow with Predefined Records, page 69
Where to Go Next, page 70
Additional References, page 70
Feature Information for Flexible NetFlow, page 71
Finding Feature Information
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 Flexible NetFlow with Predefined Records
•
You are familiar with the information in the " Cisco IOS Flexible NetFlow Overview " module.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
41
Configuring Cisco IOS Flexible NetFlow with Predefined Records
Restrictions for Flexible NetFlow with Predefined Records
•
The networking device must be running a Cisco IOS 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
IPv6.
Restrictions for Flexible NetFlow with Predefined Records
Cisco IOS Release 12.2(50)SY
•
Predefined records specifying mask and prefix are not supported.
Information About Configuring Flexible NetFlow with
Predefined Records
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Flexible NetFlow Predefined Records, page 43
Benefits of Flexible NetFlow Predefined Records, page 43
NetFlow Original and NetFlow IPv4 Original Input Predefined Records, page 43
NetFlow IPv4 Original Output Predefined Record, page 44
NetFlow IPv6 Original Input Predefined Record, page 45
NetFlow IPv6 Original Input Predefined Record, page 47
Autonomous System Predefined Record, page 48
Autonomous System ToS Predefined Record, page 49
BGP Next-Hop Predefined Record, page 50
BGP Next-Hop ToS Predefined Record, page 51
Destination Prefix Predefined Record, page 52
Destination Prefix ToS Predefined Record, page 53
Prefix Predefined Record, page 54
Prefix Port Predefined Record, page 55
Prefix ToS Predefined Record, page 57
Protocol Port Predefined Record, page 58
Protocol Port ToS Predefined Record, page 59
Source Prefix Predefined Record, page 60
Source Prefix ToS Predefined Record, page 61
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
42
Flexible NetFlow Predefined Records
Information About Configuring Flexible NetFlow with Predefined Records
Flexible NetFlow Predefined Records
Flexible NetFlow predefined records are based on the original NetFlow ingress and egress caches and the
aggregation caches. The difference between the original NetFlow aggregation caches and the corresponding
predefined Flexible NetFlow records is that the predefined records do not perform aggregation. Flexible
NetFlow predefined records are associated with a Flexible NetFlow flow monitor the same way that you
associate a user-defined (custom) record.
Benefits of Flexible NetFlow Predefined Records
If you have been using original NetFlow or original NetFlow with aggregation caches you can continue to
capture the same traffic data for analysis when you migrate to Flexible NetFlow by using the predefined
records available with Flexible NetFlow. Many users will find that the preexisting Flexible NetFlow
records are suitable for the majority of their traffic analysis requirements.
NetFlow Original and NetFlow IPv4 Original Input Predefined Records
The Flexible NetFlow "NetFlow original" and "NetFlow IPv4 original input" predefined records can be
used interchangeably because they have the same key and nonkey fields. The key and nonkey fields and the
counters for the Flexible NetFlow "NetFlow original" and "NetFlow IPv4 original input" predefined
records are shown in the table below.
Table 7
Key and Nonkey Fields Used by the Flexible NetFlow NetFlow Original and NetFlow IPv4 Original
Input Predefined Records
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the type of service (ToS)
field.
IP Protocol
Key
Value in the IP protocol field.
IP Source Address
Key
IP source address.
IP Destination Address
Key
IP destination address.
Transport Source Port
Key
Value of the transport layer
source port field.
Transport Destination Port
Key
Value of the transport layer
destination port field.
Interface Input
Key
Interface on which the traffic is
received.
Flow Sampler ID
Key
ID number of the flow sampler (if
flow sampling is enabled).
IP Source AS
Nonkey
Source autonomous system
number.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
43
NetFlow IPv4 Original Output Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
IP Destination AS
Nonkey
Destination autonomous system
number.
IP Next Hop Address
Nonkey
IP address of the next hop.
IP Source Mask
Nonkey
Mask for the IP source address.
IP Destination Mask
Nonkey
Mask for the IP destination
address.
TCP Flags
Nonkey
Value in the TCP flag field.
Interface Output
Nonkey
Interface on which the traffic is
transmitted.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
The configuration in the How to Get Started with Configuring Flexible NetFlow, page 25 uses the
predefined Flexible NetFlow "NetFlow original" record.
NetFlow IPv4 Original Output Predefined Record
The Flexible NetFlow "NetFlow IPv4 original output" predefined record is used to emulate the original
NetFlow Egress NetFlow Accounting feature that was released in Cisco IOS Release 12.3(11)T. The key
and nonkey fields and the counters for the Flexible NetFlow "NetFlow IPv4 original output" predefined
record are shown in the table below.
Table 8
Key and Nonkey Fields Used by the Flexible NetFlow NetFlow IPv4 Original Output Predefined
Record
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the ToS field.
IP Protocol
Key
Value in the IP protocol field.
IP Source Address
Key
IP source address.
IP Destination Address
Key
IP destination address.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
44
NetFlow IPv6 Original Input Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
Transport Source Port
Key
Value of the transport layer
source port field.
Transport Destination Port
Key
Value of the transport layer
destination port field.
Interface Output
Key
Interface on which the traffic is
transmitted.
Flow Sampler ID
Key
ID number of the flow sampler (if
flow sampling is enabled).
IP Source AS
Nonkey
Source autonomous system
number.
IP Destination AS
Nonkey
Destination autonomous system
number.
IP Next Hop Address
Nonkey
IP address of the next hop.
IP Source Mask
Nonkey
Mask for the IP source address.
IP Destination Mask
Nonkey
Mask for the IP destination
address.
TCP Flags
Nonkey
Value in the TCP flag field.
Interface Input
Nonkey
Interface on which the traffic is
received.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
The configuration in the Example: Configuring Flexible NetFlow Egress Accounting for IPv4 and IPv6
Traffic, page 33 uses the predefined Flexible NetFlow "NetFlow original output" record.
NetFlow IPv6 Original Input Predefined Record
The key and nonkey fields and the counters for the Flexible NetFlow "NetFlow IPv6 original input"
predefined record are shown in the table below.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
45
Configuring Cisco IOS Flexible NetFlow with Predefined Records
Information About Configuring Flexible NetFlow with Predefined Records
Table 9
Key and Nonkey Fields Used by the Flexible NetFlow NetFlow IPv6 Original Input Predefined Record
Field
Key or NonKey Field
Definition
Traffic Class
Key
Value in the traffic class field.
Flow Label
Key
Flow label.
Protocol
Key
Value in the protocol field.
Extension Map
Key
Value in the extension map
bitmap.
IP Source Address
Key
IP source address.
IP Destination Address
Key
IP destination address.
Transport Source Port
Key
Value of the transport layer
source port field.
Transport Destination Port
Key
Value of the transport layer
destination port field.
Interface Input
Key
Interface on which the traffic is
received.
Flow Direction
Key
The direction of the flow.
Flow Sampler
Key
ID number of the flow sampler (if
flow sampling is enabled).
Routing Source AS
Nonkey
Source autonomous system
number.
Routing Destination AS
Nonkey
Destination autonomous system
number.
Routing Next-hop Address
Nonkey
IP address of the next hop.
IP Source Mask
Nonkey
Mask for the IP source address.
IP Destination Mask
Nonkey
Mask for the IP destination
address.
Transport TCP Flags
Nonkey
Value in the TCP flag field.
Interface Output
Nonkey
Interface over which the traffic is
transmitted.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
46
NetFlow IPv6 Original Input Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or NonKey Field
Definition
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
NetFlow IPv6 Original Input Predefined Record
The key and nonkey fields and the counters for the Flexible NetFlow "NetFlow IPv6 original input"
predefined record are shown in the table below.
Table 10
Key and Nonkey Fields Used by the Flexible NetFlow NetFlow IPv6 Original Input Predefined Record
Field
Key or NonKey Field
Definition
Traffic Class
Key
Value in the traffic class field.
Flow Label
Key
Flow label.
Protocol
Key
Value in the protocol field.
Extension Map
Key
Value in the extension map
bitmap.
IP Source Address
Key
IP source address.
IP Destination Address
Key
IP destination address.
Transport Source Port
Key
Value of the transport layer
source port field.
Transport Destination Port
Key
Value of the transport layer
destination port field.
Interface Input
Key
Interface on which the traffic is
received.
Flow Direction
Key
The direction of the flow.
Flow Sampler
Key
ID number of the flow sampler (if
flow sampling is enabled).
Routing Source AS
Nonkey
Source autonomous system
number.
Routing Destination AS
Nonkey
Destination autonomous system
number.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
47
Autonomous System Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or NonKey Field
Definition
Routing Next-hop Address
Nonkey
IP address of the next hop.
IP Source Mask
Nonkey
Mask for the IP source address.
IP Destination Mask
Nonkey
Mask for the IP destination
address.
Transport TCP Flags
Nonkey
Value in the TCP flag field.
Interface Output
Nonkey
Interface over which the traffic is
transmitted.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
Autonomous System Predefined Record
The Flexible NetFlow "autonomous system" predefined record creates flows based on autonomous systemto-autonomous system traffic flow data. The Flexible NetFlow "autonomous system" predefined record
uses the same key and nonkey fields as the original NetFlow "autonomous system" aggregation cache.
Note
This predefined record can be used to analyze IPv4 and IPv6 traffic.
The table below lists the key and nonkey fields used in the Flexible NetFlow "autonomous system"
predefined record.
Table 11
Key and Nonkey Fields Used by the Flexible NetFlow Autonomous System Predefined Record
Field
Key or Nonkey Field
Definition
IP Source AS
Key
Autonomous system of the source
IP address (peer or origin).
IP Destination AS
Key
Autonomous system of the
destination IP address (peer or
origin).
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
48
Autonomous System ToS Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
Interface Input
Key
Interface on which the traffic is
received.
Interface Output
Key
Interface on which the traffic is
transmitted.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds since this device
was first booted) when the last
packet was switched.
Nonkey
Autonomous System ToS Predefined Record
The Flexible NetFlow "autonomous system ToS" predefined record creates flows based on autonomous
system-to-autonomous system and type of service (ToS) traffic flow data. The Flexible NetFlow
"autonomous system ToS" predefined record uses the same key and nonkey fields as the original NetFlow
"autonomous system ToS" aggregation cache.
Note
Tip
This predefined record can be used to analyze only IPv4 traffic.
This predefined record is particularly useful for generating autonomous system-to-autonomous system
traffic flow data.
The table below lists the key and nonkey fields used in the Flexible NetFlow "autonomous system ToS"
predefined record.
Table 12
Key and Nonkey Fields Used by the Flexible NetFlow Autonomous System ToS Predefined Record
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the ToS field.
IP Source autonomous system
Key
Autonomous system of the source
IP address (peer or origin).
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
49
BGP Next-Hop Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
IP Destination autonomous
system
Key
Autonomous system of the
destination IP address (peer or
origin).
Interface Input
Key
Interface on which the traffic is
received.
Interface Output
Key
Interface on which the traffic is
transmitted.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
BGP Next-Hop Predefined Record
The Flexible NetFlow "BGP next-hop" predefined record creates flows based on Border Gateway Protocol
(BGP) traffic flow data.
Note
This predefined record can be used to analyze only IPv6 traffic.
The table below lists the key and nonkey fields used in the Flexible NetFlow "BGP next-hop" predefined
record.
Table 13
Key and Nonkey Fields Used by the Flexible NetFlow BGP Next-Hop Predefined Record
Field
Key or Nonkey Field
Definition
Routing Source AS
Key
Autonomous system of the source
IP address.
Routing Destination AS
Key
Autonomous system of the
destination IP address.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
50
BGP Next-Hop ToS Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
Routing Next-hop Address IPv6
BGP
Key
IPv6 address of the BGP next
hop.
Interface Input
Key
Interface on which the traffic is
received.
Interface Output
Key
Interface on which the traffic is
transmitted.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Timestamp Sys-uptime First
Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Timestamp Sys-uptime Last
Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
BGP Next-Hop ToS Predefined Record
The Flexible NetFlow "BGP next-hop ToS" predefined record creates flows based on BGP and ToS traffic
flow data. The Flexible NetFlow "BGP next-hop ToS" predefined record uses the same key and nonkey
fields as the original NetFlow "BGP next-hop ToS" aggregation cache.
Note
This predefined record can be used to analyze only IPv4 traffic.
The table below lists the key and nonkey fields used in the "BGP next-hop ToS" predefined record.
Table 14
Key and Nonkey Fields Used by the Flexible NetFlow BGP Next-Hop ToS Predefined Record
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the ToS field.
IP Source autonomous system
Key
Autonomous system of the source
IP address (peer or origin).
IP Destination autonomous
system
Key
Autonomous system of the
destination IP address (peer or
origin).
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
51
Destination Prefix Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
IPv4 Next Hop Address BGP
Key
IPv4 address of the BGP next
hop.
Interface Input
Key
Interface on which the traffic is
received.
Interface Output
Key
Interface on which the traffic is
transmitted.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
Destination Prefix Predefined Record
The Flexible NetFlow "destination prefix" predefined record creates flows based on destination prefix
traffic flow data. The Flexible NetFlow "destination prefix" predefined record uses the same key and
nonkey fields as the original NetFlow "destination prefix" aggregation cache.
Note
This predefined record can be used to analyze IPv4 and IPv6 traffic.
The table below lists the key and nonkey fields used in the Flexible NetFlow "destination prefix"
predefined record.
Table 15
Key and Nonkey Fields Used by the Flexible NetFlow Destination Prefix Predefined Record
Field
Key or Nonkey Field
Definition
IP Destination autonomous
system
Key
Autonomous system of the
destination IP address (peer or
origin).
IPv4 or IPv6 Destination Prefix
Key
Destination IP address ANDed
with the destination prefix mask.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
52
Destination Prefix ToS Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
IPv4 or IPv6 Destination Mask
Key
Number of bits in the destination
prefix.
Interface Output
Key
Interface on which the traffic is
transmitted.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
Destination Prefix ToS Predefined Record
The Flexible NetFlow "destination prefix ToS" predefined record creates flows based on destination prefix
and ToS traffic flow data. The Flexible NetFlow "destination prefix ToS" predefined record uses the same
key and nonkey fields as the original NetFlow "destination prefix ToS" aggregation cache.
This predefined record is particularly useful for capturing data with which you can examine the destinations
of network traffic passing through a NetFlow-enabled device.
Note
This predefined record can be used to analyze only IPv4 traffic.
The table below lists the key and nonkey fields used in the Flexible NetFlow "destination prefix ToS"
predefined record.
Table 16
Key and Nonkey Fields Used by the Flexible NetFlow Destination Prefix ToS Predefined Record
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the ToS field.
IP Destination autonomous
system
Key
Autonomous system of the
destination IP address (peer or
origin).
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
53
Prefix Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
IPv4 Destination Prefix
Key
Destination IP address ANDed
with the destination prefix mask.
IPv4 Destination Mask
Key
Number of bits in the destination
prefix.
Interface Output
Key
Interface on which the traffic is
transmitted.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
Prefix Predefined Record
The Flexible NetFlow "prefix" predefined record creates flows based on the source and destination prefixes
in the traffic flow data. The Flexible NetFlow "prefix" predefined record uses the same key and nonkey
fields as the original NetFlow "prefix" aggregation cache.
Note
This predefined record can be used to analyze IPv4 and IPv6 traffic. For IPv6 traffic, a minimum prefix
mask length of 0 bits is assumed.
The table below lists the key and nonkey fields used in the Flexible NetFlow "prefix" predefined record.
Table 17
Key and Nonkey Fields Used by the Flexible NetFlow Prefix Predefined Record
Field
Key or Nonkey Field
Definition
IP Source autonomous system
Key
Autonomous system of the source
IP address (peer or origin).
IP Destination autonomous
system
Key
Autonomous system of the
destination IP address (peer or
origin).
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
54
Prefix Port Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
IPv4 or IPv6 Source Prefix
Key
Source IP address ANDed with
the source prefix mask, or the
prefix to which the source IP
address of the aggregated flows
belongs.
IPv4 or IPv6 Source Mask
Key
Number of bits in the source
prefix.
IPv4 or IPv6 Destination Prefix
Key
Destination IP address ANDed
with the destination prefix mask.
IPv4 or IPv6 Destination Mask
Key
Number of bits in the destination
prefix.
Interface Input
Key
Interface on which the traffic is
received.
Interface Output
Key
Interface on which the traffic is
transmitted.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
Prefix Port Predefined Record
The Flexible NetFlow "prefix port" predefined record creates flows based on source and destination
prefixes and ports in the traffic flow data. The Flexible NetFlow "prefix port" predefined record uses the
same key and nonkey fields as the original NetFlow "prefix port" aggregation cache.
This predefined record is particularly useful for capturing data with which you can examine the sources and
destinations of network traffic passing through a NetFlow-enabled device.
Note
This predefined record can be used to analyze only IPv4 traffic.
The table below lists the key and nonkey fields used in the destination Flexible NetFlow "prefix port"
predefined record.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
55
Configuring Cisco IOS Flexible NetFlow with Predefined Records
Information About Configuring Flexible NetFlow with Predefined Records
Table 18
Key and Nonkey Fields Used by the Flexible NetFlow Prefix Port Predefined Record
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the ToS field.
IP Protocol
Key
Value in the IP protocol field.
IPv4 Source Prefix
Key
Source IP address ANDed with
the source prefix mask, or the
prefix to which the source IP
address of the aggregated flows
belongs.
IPv4 Source Mask
Key
Number of bits in the source
prefix.
IPv4 Destination Prefix
Key
Destination IP address ANDed
with the destination prefix mask.
IPv4 Destination Mask
Key
Number of bits in the destination
prefix.
Transport Source Port
Key
Value in the transport layer
source port field.
Transport Destination Port
Key
Value in the transport layer
destination port field.
Interface Input
Key
Interface on which the traffic is
received.
Interface Output
Key
Interface on which the traffic is
transmitted.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
56
Prefix ToS Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Prefix ToS Predefined Record
The Flexible NetFlow "prefix ToS" predefined record creates flows based on source and destination
prefixes and ToS traffic flow data. The Flexible NetFlow "prefix ToS" predefined record uses the same key
and nonkey fields as the original NetFlow "destination prefix ToS" aggregation cache.
This predefined record is particularly useful for capturing data with which you can examine the sources and
destinations of network traffic passing through a NetFlow-enabled device.
Note
This predefined record can be used to analyze only IPv4 traffic.
The table below lists the key and nonkey fields used in the Flexible NetFlow "prefix ToS" predefined
record.
Table 19
Key and Nonkey Fields Used by the Flexible NetFlow Prefix ToS Predefined Record
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the ToS field.
IP Source autonomous system
Key
Autonomous system of the source
IP address (peer or origin).
IP Destination autonomous
system
Key
Autonomous system of the
destination IP address (peer or
origin).
IPv4 Source Prefix
Key
Source IP address ANDed with
the source prefix mask, or the
prefix to which the source IP
address of the aggregated flows
belongs.
IPv4 Source Mask
Key
Number of bits in the source
prefix.
IPv4 Destination Prefix
Key
Destination IP address ANDed
with the destination prefix mask.
IPv4 Destination Mask
Key
Number of bits in the destination
prefix.
Interface Input
Key
Interface on which the traffic is
received.
Interface Output
Key
Interface on which the traffic is
transmitted.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
57
Protocol Port Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
Protocol Port Predefined Record
The Flexible NetFlow "protocol port" predefined record creates flows based on protocols and ports in the
traffic flow data. The Flexible NetFlow "protocol port" predefined record uses the same key and nonkey
fields as the original NetFlow "protocol port" aggregation cache.
Note
This predefined record can be used to analyze IPv4 and IPv6 traffic.
The table below lists the key and nonkey fields used in the Flexible NetFlow "protocol port" predefined
record.
Table 20
Key and Nonkey Fields Used by the Flexible NetFlow Protocol Port Predefined Record
Field
Key or Nonkey Field
Definition
IP Protocol
Key
Value in the IP protocol field.
Transport Source Port
Key
Value in the transport layer
source port field.
Transport Destination Port
Key
Value in the transport layer
destination port field.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
58
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Protocol Port ToS Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
Time Stamp System Uptime Last
Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Protocol Port ToS Predefined Record
The Flexible NetFlow "protocol port ToS" predefined record creates flows based on the protocol, port, and
ToS value in the traffic data. The Flexible NetFlow "protocol port ToS" predefined record uses the same
key and nonkey fields as the original NetFlow "protocol port ToS" aggregation cache.
This predefined record is particularly useful for capturing data with which you can examine network usage
by type of traffic.
Note
This predefined record can be used to analyze only IPv4 traffic.
The table below lists the key and nonkey fields used in the Flexible NetFlow "protocol port ToS"
predefined record.
Table 21
Key and Nonkey Fields Used by the Flexible NetFlow Protocol Port ToS Predefined Record
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the ToS field.
IP Protocol
Key
Value in the IP protocol field.
Transport Source Port
Key
Value in the transport layer
source port field.
Transport Destination Port
Key
Value in the transport layer
destination port field.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
59
Source Prefix Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
Time Stamp System Uptime Last
Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Source Prefix Predefined Record
The Flexible NetFlow "source prefix" predefined record creates flows based on source prefixes in the
network traffic. The Flexible NetFlow "source prefix" predefined record uses the same key and nonkey
fields as the original NetFlow "source prefix" aggregation cache.
Note
This predefined record can be used to analyze IPv4 and IPv6 traffic.
The table below lists the key and nonkey fields used in the Flexible NetFlow "source prefix" predefined
record.
Table 22
Key and Nonkey Fields Used by the Flexible NetFlow Source Prefix Predefined Record
Field
Key or Nonkey Field
Definition
IP Source autonomous system
Key
Autonomous system of the source
IP address (peer or origin).
IPv4 or IPv6 Source Prefix
Key
Source IP address ANDed with
the source prefix mask, or the
prefix to which the source IP
address of the aggregated flows
belongs.
IPv4 or IPv6 Source Mask
Key
Number of bits in the source
prefix.
Interface Input
Key
Interface on which the traffic is
received.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Time Stamp System Uptime First Nonkey
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
60
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Source Prefix ToS Predefined Record
Information About Configuring Flexible NetFlow with Predefined Records
Field
Key or Nonkey Field
Definition
Time Stamp System Uptime Last
Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Source Prefix ToS Predefined Record
The Flexible NetFlow "source prefix ToS" predefined record creates flows based on source prefixes and
ToS values in the network traffic. The Flexible NetFlow "source prefix ToS" predefined record uses the
same key and nonkey fields as the original NetFlow "source prefix ToS" aggregation cache.
This predefined record is particularly useful for capturing data with which you can examine the sources of
network traffic passing through a NetFlow-enabled device.
Note
This predefined record can be used to analyze only IPv4 traffic.
The table below lists the key and nonkey fields used in the Flexible NetFlow "source prefix ToS"
predefined record.
Table 23
Key and Nonkey Fields Used by the Flexible NetFlow Source Prefix ToS Predefined Record
Field
Key or Nonkey Field
Definition
IP ToS
Key
Value in the ToS field.
IP Source autonomous system
Key
Autonomous system of the source
IP address (peer or origin).
IPv4 Source Prefix
Key
Source IP address ANDed with
the source prefix mask, or the
prefix to which the source IP
address of the aggregated flows
belongs.
IPv4 Source Mask
Key
Number of bits in the source
prefix.
Interface Input
Key
Interface on which the traffic is
received.
Flow Direction
Key
Direction in which the flow is
being monitored.
Counter Bytes
Nonkey
Number of bytes seen in the flow.
Counter Packets
Nonkey
Number of packets seen in the
flow.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
61
Configuring a Flow Monitor for IPv4 Traffic Using a Predefined Record
How to Configure a Predefined Record for the Flow Monitor
Field
Key or Nonkey Field
Definition
Time Stamp System Uptime First Nonkey
System uptime (time, in
milliseconds, since this device
was first booted) when the first
packet was switched.
Time Stamp System Uptime Last
System uptime (time, in
milliseconds, since this device
was first booted) when the last
packet was switched.
Nonkey
How to Configure a Predefined Record for the Flow Monitor
Note
Only the keywords and arguments required for the Flexible NetFlow commands used in these tasks are
explained in these tasks. For information on the other keywords and arguments available for these Flexible
NetFlow commands, refer to the Cisco IOS Flexible NetFlow Command Reference.
•
•
•
•
Configuring a Flow Monitor for IPv4 Traffic Using a Predefined Record, page 62
Configuring a Flow Monitor for IPv6 Traffic Using a Predefined Record, page 64
Applying an IPv4 Flow Monitor to an Interface, page 66
Applying an IPv6 Flow Monitor to an Interface, page 67
Configuring a Flow Monitor for IPv4 Traffic Using a Predefined Record
To configure a flow monitor for IPv4 traffic using a predefined record for the flow monitor, perform the
following 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 on which you have applied it before you can
modify the record format of the flow monitor.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
62
Configuring Cisco IOS Flexible NetFlow with Predefined Records
How to Configure a Predefined Record for the Flow Monitor
SUMMARY STEPS
1. enable
2. configure terminal
3. flow monitor monitor-name
4. description description
5. record {netflow-original | netflow ipv4 record [peer]}
6. end
7. show flow record record-name
8. show running-config flow record record-name
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Router> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Router# configure terminal
Step 3 flow monitor monitor-name
Example:
Creates a flow monitor and enters Flexible NetFlow
flow monitor configuration mode.
•
This command also allows you to modify an
existing flow monitor.
Router(config)# flow monitor FLOW-MONITOR-1
Step 4 description description
(Optional) Creates a description for the flow monitor.
Example:
Router(config-flow-monitor)# description Used for
monitoring IPv4 traffic
Step 5 record {netflow-original | netflow ipv4 record [peer]}
Specifies the record for the flow monitor.
Example:
Router(config-flow-monitor)# record netflow ipv4
original-input
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
63
Configuring a Flow Monitor for IPv6 Traffic Using a Predefined Record
How to Configure a Predefined Record for the Flow Monitor
Command or Action
Step 6 end
Purpose
Exits Flexible NetFlowflow monitor configuration
mode and returns to privileged EXEC mode.
Example:
Router(config-flow-monitor)# end
Step 7 show flow record record-name
(Optional) Displays the current status of the specified
flow record.
Example:
Router# show flow record FLOW_RECORD-1
Step 8 show running-config flow record record-name
(Optional) Displays the configuration of the specified
flow record.
Example:
Router# show running-config flow record FLOW_RECORD-1
Configuring a Flow Monitor for IPv6 Traffic Using a Predefined Record
To configure a flow monitor for IPv6 traffic using a predefined record for the flow monitor, perform the
following 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 on which you have applied it before you can
modify the record format of the flow monitor.
SUMMARY STEPS
1. enable
2. configure terminal
3. flow monitor monitor-name
4. description description
5. record netflow ipv6 record [peer]
6. end
7. show flow record record-name
8. show running-config flow record record-name
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
64
Configuring Cisco IOS Flexible NetFlow with Predefined Records
How to Configure a Predefined Record for the Flow Monitor
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Router> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Router# configure terminal
Step 3 flow monitor monitor-name
Example:
Creates a flow monitor and enters Flexible NetFlow
flow monitor configuration mode.
•
This command also allows you to modify an
existing flow monitor.
Router(config)# flow monitor FLOW-MONITOR-2
Step 4 description description
(Optional) Creates a description for the flow monitor.
Example:
Router(config-flow-monitor)# description Used for
monitoring IPv6 traffic
Step 5 record netflow ipv6 record [peer]
Specifies the record for the flow monitor.
Example:
Router(config-flow-monitor)# record netflow ipv6
original-input
Step 6 end
Exits Flexible NetFlow flow monitor configuration
mode and returns to privileged EXEC mode.
Example:
Router(config-flow-monitor)# end
Step 7 show flow record record-name
(Optional) Displays the current status of the specified
flow record.
Example:
Router# show flow record FLOW_RECORD-1
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
65
Applying an IPv4 Flow Monitor to an Interface
How to Configure a Predefined Record for the Flow Monitor
Command or Action
Purpose
Step 8 show running-config flow record record-name
(Optional) Displays the configuration of the specified
flow record.
Example:
Router# show running-config flow record FLOW_RECORD-1
Applying an IPv4 Flow Monitor to an Interface
Before it can be activated, an IPv4 flow monitor must be applied to at least one interface. To activate an
IPv4 flow monitor by applying the flow monitor to an interface, perform the following required task.
Note
When you specify the "NetFlow original" or the "NetFlow IPv4 original input" predefined record for the
flow monitor to emulate original NetFlow, the flow monitor can be used for analyzing only input (ingress)
traffic.
When you specify the "NetFlow IPv4 original output" predefined record for the flow monitor to emulate
the Egress NetFlow Accounting feature, the flow monitor can be used for analyzing only output (egress)
traffic.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip flow monitor monitor-name {input | output}
5. end
6. show flow monitor monitor-name
7. show flow monitor [[name] monitor-name [cache [format {csv | record | table}]][statistics]]
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Example:
Router> enable
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
66
Enter your password if prompted.
Applying an IPv6 Flow Monitor to an Interface
How to Configure a Predefined Record for the Flow Monitor
Command or Action
Step 2 configure terminal
Purpose
Enters global configuration mode.
Example:
Router# configure terminal
Step 3 interface type number
Specifies an interface and enters interface configuration mode.
Example:
Router(config)# interface ethernet 0/0
Step 4 ip flow monitor monitor-name {input | output}
Activates the flow monitor that you created previously by
assigning it to the interface to analyze traffic.
•
Example:
Router(config-if)# ip flow monitor FLOWMONITOR-1 input
Step 5 end
You can configure input and output traffic analysis
concurrently by configuring the ip flow monitor monitorname input and ip flow monitor monitor-name output
commands on the same interface. You can use different
flow monitors for input and output traffic analysis.
Exits interface configuration mode and returns to privileged
EXEC mode.
Example:
Router(config-if)# end
Step 6 show flow monitor monitor-name
(Optional) Displays the current status of the specified flow
monitor.
Example:
Router# show flow monitor FLOW_MONITOR-1
Step 7 show flow monitor [[name] monitor-name [cache
[format {csv | record | table}]][statistics]]
(Optional) Displays the status and statistics for a Flexible
NetFlow flow monitor.
Example:
Router# show flow monitor FLOW-MONITOR-1
Applying an IPv6 Flow Monitor to an Interface
Before it can be activated, an IPv6 flow monitor must be applied to at least one interface. To activate an
IPv4 flow monitor by applying the flow monitor to an interface, perform the following required task.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
67
Configuring Cisco IOS Flexible NetFlow with Predefined Records
How to Configure a Predefined Record for the Flow Monitor
Note
When you specify 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 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.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ipv6 flow monitor monitor-name {input | output}
5. end
6. show flow monitor monitor-name
7. show running-config flow monitor monitor-name
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Router> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Router# configure terminal
Step 3 interface type number
Specifies an interface and enters interface configuration mode.
Example:
Router(config)# interface ethernet 0/0
Step 4 ipv6 flow monitor monitor-name {input | output}
Example:
Router(config-if)# ipv6 flow monitor FLOWMONITOR-2 input
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
68
Activates the flow monitor that you created previously by
assigning it to the interface to analyze traffic.
•
You can configure input and output traffic analysis
concurrently by configuring the ipv6 flow monitor monitorname input and ipv6 flow monitor monitor-name output
commands on the same interface. You can use different flow
monitors for input and output traffic analysis.
Example: Configuring a Flexible NetFlow Predefined Record for IPv4 Traffic
Configuration Examples for Flexible NetFlow with Predefined Records
Command or Action
Step 5 end
Purpose
Exits interface configuration mode and returns to privileged
EXEC mode.
Example:
Router(config-if)# end
Step 6 show flow monitor monitor-name
(Optional) Displays the current status of the specified flow
monitor.
Example:
Router# show flow monitor FLOW_MONITOR-1
Step 7 show running-config flow monitor monitor-name
(Optional) Displays the configuration of the specified flow
monitor.
Example:
Router# show flow monitor FLOW_MONITOR-1
Configuration Examples for Flexible NetFlow with Predefined
Records
•
•
Example: Configuring a Flexible NetFlow Predefined Record for IPv4 Traffic, page 69
Example: Configuring a Flexible NetFlow Predefined Record for IPv6 Traffic, page 69
Example: Configuring a Flexible NetFlow Predefined Record for IPv4 Traffic
The following example shows how to configure a flow monitor using the Flexible NetFlow "BGP ToS
next-hop" predefined record to monitor IPv4 traffic.
This sample starts in global configuration mode:
!
flow monitor FLOW-MONITOR-1
record netflow ipv4 bgp-nexthop-tos
exit
!
ip cef
!
interface Ethernet 0/0
ip address 172.16.6.2 255.255.255.0
ip flow monitor FLOW-MONITOR-1 input
!
Example: Configuring a Flexible NetFlow Predefined Record for IPv6 Traffic
The following example shows how to configure a flow monitor using the Flexible NetFlow "source prefix"
predefined record to monitor IPv6 traffic.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
69
Configuring Cisco IOS Flexible NetFlow with Predefined Records
Where to Go Next
This sample starts in global configuration mode:
!
flow monitor FLOW-MONITOR-2
record netflow ipv6 source-prefix
exit
ip cef
ipv6 cef
!
interface Ethernet 0/0
ipv6 address 2001:DB8:2:ABCD::2/48
ipv6 flow monitor FLOW-MONITOR-2 input
!
Where to Go Next
For information on advanced Flexible NetFlow configurations for specific purposes such as quality of
service (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 data export for Flexible NetFlow, refer to the "Configuring Data Export for Cisco
IOS Flexible NetFlow with Flow Exporters" module.
Additional References
Related Documents
Related Topic
Document Title
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Overview of Flexible NetFlow
"Cisco IOS Flexible NetFlow Overview"
Emulating original NetFlow with Flexible NetFlow
"Getting Started with Configuring Cisco IOS
Flexible NetFlow"
Configuring flow exporters to export Flexible
NetFlow data
"Configuring Data Export for Cisco IOS Flexible
NetFlow with Flow Exporters"
Customizing Flexible NetFlow
"Customizing Cisco IOS Flexible NetFlow Flow
Records and Flow Monitors"
Configuring flow sampling to reduce the overhead
of monitoring traffic with Flexible NetFlow
"Using Cisco IOS Flexible NetFlow Flow Sampling
to Reduce the CPU Overhead of Analyzing Traffic"
Using Flexible NetFlow Top N Talkers to analyze
network traffic
"Using Cisco IOS Flexible NetFlow Top N Talkers
to Analyze Network Traffic"
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
70
Configuring Cisco IOS Flexible NetFlow with Predefined Records
Feature Information for Flexible NetFlow
Related Topic
Document Title
Configuring IPv4 multicast statistics support for
Flexible NetFlow
"Configuring IPv4 Multicast Statistics Support for
Cisco IOS Flexible NetFlow"
Configuration commands for Flexible NetFlow
Cisco IOS Flexible NetFlow Command Reference
Standards
Standard
Title
None
--
MIBs
MIB
MIBs Link
None
To locate and download MIBs for selected
platforms, Cisco software releases, and feature sets,
use Cisco MIB Locator found at the following
URL:
http://www.cisco.com/go/mibs
RFCs
RFC
Title
RFC 3954
Cisco Systems NetFlow Services Export Version 9
Technical Assistance
Description
Link
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.
http://www.cisco.com/cisco/web/support/
index.html
Feature Information for Flexible NetFlow
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
71
Configuring Cisco IOS Flexible NetFlow with Predefined Records
Feature Information for Flexible NetFlow
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
72
Configuring Cisco IOS Flexible NetFlow with Predefined Records
Feature Information for Flexible NetFlow
Table 24
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
Flexible NetFlow
12.2(33)SRC
Flexible NetFlow is introduced.
12.2(50)SY
Support for this feature was
added for Cisco 7200 series
routers in Cisco IOS Release
12.2(33)SRC.
12.4(9)T
15.0(1)SY
15.0(1)SY1
The following commands were
introduced or modified:
cache(Flexible NetFlow), clear
flow exporter, clear flow
monitor, clear sampler, collect
counter, collect flow, collect
interface, collect ipv4, collect
ipv4 destination, collect ipv4
fragmentation, collect ipv4
section, collect ipv4 source,
collect ipv4 total-length, collect
ipv4 ttl, collect routing, collect
timestamp sys-uptime, collect
transport, collect transport
icmp ipv4, collect transport tcp,
collect transport udp, debug
flow exporter, debug flow
monitor, debug flow record,
debug sampler, description
(Flexible NetFlow), destination,
dscp (Flexible NetFlow),
exporter, flow exporter, flow
monitor, flow platform, flow
record, ip flow monitor, match
flow, match interface (Flexible
NetFlow), match ipv4, match
ipv4 destination, match ipv4
fragmentation, match ipv4
section, match ipv4 source,
match ipv4 total-length, match
ipv4 ttl, match routing, match
transport, match transport
icmp ipv4, match transport tcp,
match transport udp, mode
(Flexible NetFlow), option
(Flexible NetFlow), record,
sampler, show flow exporter,
show flow interface, show flow
monitor, show flow record,
show sampler, source (Flexible
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
73
Configuring Cisco IOS Flexible NetFlow with Predefined Records
Feature Name
Releases
Feature Information
NetFlow), statistics packet,
template data timeout,
transport (Flexible NetFlow).
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: collect
routing, debug flow record,
match routing, record, show
flow monitor, show flow record,
collect ipv6, collect ipv6
destination, collect ipv6
extension map, collect ipv6
fragmentation, collect ipv6 hoplimit, collect ipv6 length, collect
ipv6 section, collect ipv6 source,
collect transport icmp ipv6,
ipv6 flow monitor, match ipv6,
match ipv6 destination, match
ipv6 extension map, match ipv6
fragmentation, match ipv6 hoplimit, match ipv6 length, match
ipv6 section, match ipv6 source,
match transport icmp ipv6.
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
74
Configuring Data Export for Flexible NetFlow
with Flow Exporters
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.
•
•
•
•
•
•
•
•
•
Finding Feature Information, page 75
Prerequisites for Data Export for Flexible NetFlow with Flow Exporters, page 75
Restrictions for Data Export for Flexible NetFlow with Flow Exporters, page 76
Information About Data Export for Flexible NetFlow with Flow Exporters, page 76
How to Configure Data Export for Flexible NetFlow with Flow Exporters, page 77
Configuration Examples for Flexible NetFlow Data Export with Flow Exporters, page 83
Where to Go Next, page 85
Additional References, page 85
Feature Information for Flexible NetFlow, page 87
Finding Feature Information
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
75
Flow Exporters
Restrictions for Data Export for Flexible NetFlow with Flow Exporters
•
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: netfloworiginal, original input, and original output.
Information About Data Export for Flexible NetFlow with Flow
Exporters
•
•
Flow Exporters, page 76
Benefits of Flexible NetFlow Flow Exporters, page 76
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
76
Restrictions
How to Configure Data Export for Flexible NetFlow with Flow Exporters
•
•
•
•
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.
In Cisco IOS Release 12.4(20)T and later releases, 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.
In Cisco IOS Release 12.4(20)T and later releases, 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.
•
•
•
Restrictions, page 77
Configuring the Flow Exporter, page 77
Configuring and Enabling Flexible NetFlow with Data Export, page 81
Restrictions
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 .
To configure data export for Flexible NetFlow, perform the tasks in this section:
Configuring the Flow Exporter
To configure the flow exporter, perform the following required task.
Note
You can export to a destination using either an IPv4 or IPv6 address.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
77
Configuring Data Export for Flexible NetFlow with Flow Exporters
How to Configure Data Export for Flexible NetFlow with Flow Exporters
SUMMARY STEPS
1. enable
2. configure terminal
3. flow exporter exporter-name
4. description description
5. destination {ip-address | hostname} [vrf vrf-name]
6. export-protocol {netflow-v5 | netflow-v9 | ipfix}
7. dscp dscp
8. source interface-type interface-number
9. option {exporter-stats | interface-table | sampler-table| vrf-table} [timeout seconds]
10. output-features
11. template data timeout seconds
12. transport udp udp-port
13. ttl seconds
14. end
15. show flow exporter exporter-name
16. show running-config flow exporter exporter-name
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Device> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Device# configure terminal
Step 3 flow exporter exporter-name
Creates the flow exporter and enters Flexible NetFlow flow
exporter configuration mode.
Example:
Device(config)# flow exporter EXPORTER-1
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
78
•
This command also allows you to modify an existing flow
exporter.
Configuring Data Export for Flexible NetFlow with Flow Exporters
How to Configure Data Export for Flexible NetFlow with Flow Exporters
Command or Action
Step 4 description description
Purpose
(Optional) Configures a description to the exporter that will appear
in the configuration and the display of the show flow exporter
command.
Example:
Device(config-flow-exporter)# description
Exports to the datacenter
Step 5 destination {ip-address | hostname} [vrf vrf-name] Specifies the IP address or hostname of the destination system for
the exporter.
Example:
Note You can export to a destination using either an IPv4 or IPv6
address.
Device(config-flow-exporter)# destination
172.16.10.2
Step 6 export-protocol {netflow-v5 | netflow-v9 | ipfix}
Example:
Specifies the version of the NetFlow export protocol used by the
exporter. The export of extracted fields from NBAR is supported
only over IPFIX.
•
Default: netflow-v9.
Device(config-flow-exporter)# exportprotocol netflow-v9
Step 7 dscp dscp
Example:
(Optional) Configures differentiated services code point (DSCP)
parameters for datagrams sent by the exporter.
•
The range for the dscp argument is from 0 to 63. Default: 0.
Device(config-flow-exporter)# dscp 63
Step 8 source interface-type interface-number
(Optional) Specifies the local interface from which the exporter
will use the IP address as the source IP address for exported
datagrams.
Example:
Device(config-flow-exporter)# source
ethernet 0/0
Step 9 option {exporter-stats | interface-table | sampler- (Optional) Configures options data parameters for the exporter.
table| vrf-table} [timeout seconds]
• You can configure all three options concurrently.
• The range for the seconds argument is 1 to 86,400. Default:
600.
Example:
Device(config-flow-exporter)# option
exporter-stats timeout 120
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
79
Configuring Data Export for Flexible NetFlow with Flow Exporters
How to Configure Data Export for Flexible NetFlow with Flow Exporters
Command or Action
Step 10 output-features
Purpose
(Optional) Enables sending export packets using quality of service
(QoS) and encryption.
Example:
Device(config-flow-exporter)# outputfeatures
Step 11 template data timeout seconds
(Optional) Configure resending of templates based on a timeout.
•
Example:
The range for the seconds argument is 1 to 86400 (86400
seconds = 24 hours).
Device(config-flow-exporter)# template
data timeout 120
Step 12 transport udp udp-port
Specifies the UDP port on which the destination system is listening
for exported datagrams.
•
Example:
The range for the udp-port argument is from 1 to 65536.
Device(config-flow-exporter)# transport
udp 650
Step 13 ttl seconds
(Optional) Configures the time-to-live (TTL) value for datagrams
sent by the exporter.
•
Example:
The range for the seconds argument is from 1 to 255.
Device(config-flow-exporter)# ttl 15
Step 14 end
Exits flow exporter configuration mode and returns to privileged
EXEC mode.
Example:
Device(config-flow-exporter)# end
Step 15 show flow exporter exporter-name
(Optional) Displays the current status of the specified flow
exporter.
Example:
Device# show flow exporter FLOW_EXPORTER-1
Step 16 show running-config flow exporter exportername
(Optional) Displays the configuration of the specified flow
exporter.
Example:
Device# show running-config flow exporter
FLOW_EXPORTER-1
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
80
Configuring and Enabling Flexible NetFlow with Data Export
How to Configure Data Export for Flexible NetFlow with Flow Exporters
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.
SUMMARY STEPS
1. enable
2. configure terminal
3. flow monitor monitor-name
4. record {record-name | netflow-original | netflow {ipv4 | ipv6 record [peer] }]
5. exporter exporter-name
6. exit
7. interface type number
8. {ip | ipv6} flow monitor monitor-name {input | output}
9. end
10. show flow monitor [[name] monitor-name [cache [format {csv | record | table}]][statistics]]
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Router> enable
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
81
Configuring Data Export for Flexible NetFlow with Flow Exporters
How to Configure Data Export for Flexible NetFlow with Flow Exporters
Command or Action
Step 2 configure terminal
Purpose
Enters global configuration mode.
Example:
Router# configure terminal
Step 3 flow monitor monitor-name
Example:
Creates a flow monitor and enters Flexible NetFlow flow
monitor configuration mode.
•
This command also allows you to modify an
existing flow monitor.
Router(config)# flow monitor FLOW-MONITOR-1
Step 4 record {record-name | netflow-original | netflow {ipv4 |
ipv6 record [peer] }]
Specifies the record for the flow monitor.
Example:
Router(config-flow-monitor)# record netflow ipv4
original-input
Step 5 exporter exporter-name
Specifies the name of an exporter that you created
previously.
Example:
Router(config-flow-monitor)# exporter EXPORTER-1
Step 6 exit
Exits Flexible NetFlow flow monitor configuration mode
and returns to global configuration mode.
Example:
Router(config-flow-monitor)# exit
Step 7 interface type number
Specifies an interface and enters interface configuration
mode.
Example:
Router(config)# interface ethernet 0/0
Step 8 {ip | ipv6} flow monitor monitor-name {input | output}
Example:
Router(config-if)# ip flow monitor FLOW-MONITOR-1
input
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
82
Activates the flow monitor that you created previously
by assigning it to the interface to analyze traffic.
Example Configuring Multiple Export Destinations
Configuration Examples for Flexible NetFlow Data Export with Flow Exporters
Command or Action
Purpose
Step 9 end
Exits interface configuration mode and returns to
privileged EXEC mode.
Example:
Router(config-if)# end
Step 10 show flow monitor [[name] monitor-name [cache [format
{csv | record | table}]][statistics]]
(Optional) Displays the status and statistics for a Flexible
NetFlow flow monitor. This will verify data export is
enabled for the flow monitor cache.
Example:
Router# show flow monitor FLOW-MONITOR-2 cache
Configuration Examples for Flexible NetFlow Data Export
with Flow Exporters
•
•
•
Example Configuring Multiple Export Destinations, page 83
Example Configuring Sending Export Packets Using QoS, page 84
Example Configuring Version 5 Export, page 85
Example Configuring Multiple Export Destinations
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
!
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
83
Example Configuring Sending Export Packets Using QoS
Configuration Examples for Flexible NetFlow Data Export with Flow Exporters
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:
Router# 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 quality of service (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).
This sample starts in global configuration mode:
!
flow record FLOW-RECORD-1
match ipv4 source address
collect counter packets
!
flow exporter FLOW-EXPORTER-1
destination 10.0.1.2
output-features
dscp 18
!
flow monitor FLOW-MONITOR-1
record FLOW-RECORD-1
exporter FLOW-EXPORTER-1
cache entries 1024
!
ip cef
!
class-map match-any COS3
!
policy-map PH_LABS_FRL_64k_16k_16k_8k_8k
class COS3
bandwidth percent 2
random-detect dscp-based
random-detect exponential-weighting-constant 1
random-detect dscp 18 200 300 10
!
interface Ethernet 0/0
ip address 10.0.0.1 255.255.255.0
ip flow monitor FLOW-MONITOR-1 input
!
interface Ethernet 0/1
ip address 10.0.1.1 255.255.255.0
service-policy output PH_LABS_FRL_64k_16k_16k_8k_8k
!
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
84
Example Configuring Version 5 Export
Where to Go Next
The following display output shows that the flow monitor is exporting data using output feature support
that enables the exported data to use QoS:
Router# 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.
Additional References
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
85
Configuring Data Export for Flexible NetFlow with Flow Exporters
Additional References
Related Documents
Related Topic
Document Title
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Overview of Flexible NetFlow
"Cisco IOS Flexible NetFlow Overview"
Emulating original NetFlow with Flexible NetFlow
"Getting Started with Configuring Cisco IOS
Flexible NetFlow"
Customizing Flexible NetFlow
"Customizing Cisco IOS Flexible NetFlow Flow
Records and Flow Monitors"
Configuring flow sampling to reduce the overhead
of monitoring traffic with Flexible NetFlow
"Using Cisco IOS Flexible NetFlow Flow Sampling
to Reduce the CPU Overhead of Analyzing Traffic"
Configuring Flexible NetFlow using predefined
records
"Configuring Cisco IOS Flexible NetFlow with
Predefined Records"
Using Flexible NetFlow Top N Talkers to analyze
network traffic
"Using Cisco IOS Flexible NetFlow Top N Talkers
to Analyze Network Traffic"
Configuring IPv4 multicast statistics support for
Flexible NetFlow
"Configuring IPv4 Multicast Statistics Support for
Cisco IOS Flexible NetFlow"
Configuration commands for Flexible NetFlow
Cisco IOS Flexible NetFlow Command Reference
Standards
Standard
Title
None
--
MIBs
MIB
MIBs Link
None
To locate and download MIBs for selected
platforms, Cisco software releases, and feature sets,
use Cisco MIB Locator found at the following
URL:
http://www.cisco.com/go/mibs
RFCs
RFC
Title
RFC 3954
Cisco Systems NetFlow Services Export Version 9
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
86
Configuring Data Export for Flexible NetFlow with Flow Exporters
Feature Information for Flexible NetFlow
Technical Assistance
Description
Link
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.
http://www.cisco.com/cisco/web/support/
index.html
Feature Information for Flexible NetFlow
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
87
Configuring Data Export for Flexible NetFlow with Flow Exporters
Feature Information for Flexible NetFlow
Table 25
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
Flexible NetFlow
12.2(33)SRC
Flexible NetFlow is introduced.
12.2(50)SY
Support for this feature was
added for Cisco 7200 series
routers in Cisco IOS Release
12.2(33)SRC.
12.4(9)T
15.0(1)SY
15.0(1)SY1
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
88
The following commands were
introduced or modified: cache
(Flexible NetFlow), clear flow
exporter, clear flow monitor,
clear sampler, collect counter,
collect flow, collect interface,
collect ipv4, collect ipv4
destination, collect ipv4
fragmentation, collect ipv4
section, collect ipv4 source,
collect ipv4 total-length, collect
ipv4 ttl, collect routing, collect
timestamp sys-uptime, collect
transport, collect transport
icmp ipv4, collect transport tcp,
collect transport udp, debug
flow exporter, debug flow
monitor, debug flow record,
debug sampler, description
(Flexible NetFlow), destination,
dscp (Flexible NetFlow),
exporter, flow exporter, flow
monitor, flow platform, flow
record, ip flow monitor, match
flow, match interface (Flexible
NetFlow), match ipv4, match
ipv4 destination, match ipv4
fragmentation, match ipv4
section, match ipv4 source,
match ipv4 total-length, match
ipv4 ttl, match routing, match
transport, match transport
icmp ipv4, match transport tcp,
match transport udp, mode
(Flexible NetFlow), option
(Flexible NetFlow), record,
sampler, show flow exporter,
show flow interface, show flow
monitor, show flow record,
show sampler, source (Flexible
NetFlow), statistics packet,
Configuring Data Export for Flexible NetFlow with Flow Exporters
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
template data timeout,
transport (Flexible NetFlow).
Flexible NetFlow--IPv4 Unicast
Flows
12.2(33)SRC
12.2(50)SY
12.4(9)T
15.0(1)SY
15.0(1)SY1
Enables Flexible NetFlow to
monitor IPv4 traffic.
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: collect
routing, debug flow record,
collect ipv4, collect ipv4
destination, collect ipv4
fragmentation, collect ipv4
section, collect ipv4 source, ip
flow monitor, match ipv4,
match ipv4 destination, match
ipv4 fragmentation, match ipv4
section, match ipv4 source,
match routing, record, show
flow monitor, show flow record.
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 Configuration Guide, Cisco IOS Release 15SY
89
Configuring Data Export for Flexible NetFlow with Flow Exporters
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
Flexible NetFlow--IPv6 Unicast
Flows
12.2(33)SRE
Enables Flexible NetFlow to
monitor IPv6 traffic.
12.2(50)SY
12.4(20)T
15.0(1)SY
15.0(1)SY1
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: collect
routing, debug flow record,
match routing, record, show
flow monitor, show flow record,
collect ipv6, collect ipv6
destination, collect ipv6
extension map, collect ipv6
fragmentation, collect ipv6 hoplimit, collect ipv6 length, collect
ipv6 section, collect ipv6 source,
collect transport icmp ipv6,
ipv6 flow monitor, match ipv6,
match ipv6 destination, match
ipv6 extension map, match ipv6
fragmentation, match ipv6 hoplimit, match ipv6 length, match
ipv6 section, match ipv6 source,
match transport icmp ipv6.
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 Configuration Guide, Cisco IOS Release 15SY
90
Configuring Data Export for Flexible NetFlow with Flow Exporters
Feature Name
Releases
Feature Information
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
91
Example Configuring Version 5 Export
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
92
Configuring CPU Friendly NetFlow Export
The CPU Friendly NetFlow Export feature for Cisco IOS Flexible NetFlow provides the capability for the
software NetFlow modules to adjust their Central Processing Unit (CPU) utilization based on userconfigured CPU utlization thresholds for the supervisor and line cards. NetFlow will lower its CPU
consumption when utilization exceeds the configured threshold, and vice versa.
•
•
•
•
•
•
•
Finding Feature Information, page 93
Prerequisites for CPU Friendly NetFlow Export, page 93
Information About CPU Friendly NetFlow Export, page 94
How to Configure CPU Friendly NetFlow Export, page 94
Configuration Examples for CPU Friendly NetFlow Export, page 95
Additional References, page 96
Feature Information for CPU Friendly NetFlow Export, page 96
Finding Feature Information
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 CPU Friendly NetFlow Export
•
The networking device must be running a Cisco 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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
93
Overview of CPU Friendly NetFlow Export
Information About CPU Friendly NetFlow Export
•
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
IPv6.
Information About CPU Friendly NetFlow Export
•
Overview of CPU Friendly NetFlow Export, page 94
Overview of CPU Friendly NetFlow Export
The number and complexity of flow records to be exported is the prime cause of CPU use in NetFlow. The
CPU Friendly NetFlow Export feature (also known as Yielding NetFlow Data Export, or Yielding NDE)
monitors CPU use for both the supervisor and line cards according to user-configured thresholds and
dynamically adjusts the rate of export as needed.
How to Configure CPU Friendly NetFlow Export
•
Configuring the CPU Utilization Threshold, page 94
Configuring the CPU Utilization Threshold
To configure the CPU utilization threshold, the threshold above which NetFlow decreases its CPU
consumption, perform the following required task.
SUMMARY STEPS
1. enable
2. configure terminal
3. flow hardware [egress | export threshold total-cpu-threshold-percentage [ linecard linecardthreshold-percentage ] | usage notify{input | output} [table-threshold-percentage seconds]]
4. end
5. show platform flow [aging | {export | usage | table-contention {aggregate | detailed | summary} }
[instance | module] | {ip | ipv6} [ count | destination | instance | module | multicast | protocol | source] |
{layer2 | mpls } [ count | instance | module ]]
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Example:
Device> enable
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
94
Enter your password if prompted.
Example: Configuring CPU Utilization Thresholds for NetFlow Export
Configuration Examples for CPU Friendly NetFlow Export
Command or Action
Purpose
Step 2 configure terminal
Enters global configuration mode.
Example:
Device# configure terminal
Step 3 flow hardware [egress | export threshold total-cpu-threshold-percentage [
Configures the CPU utilization
linecard linecard-threshold-percentage ] | usage notify{input | output} [table- threshold up to which NetFlow export
is permitted.
threshold-percentage seconds]]
Example:
Device(config)# flow hardware export threshold 25 linecard 25
Step 4 end
Ends the current configuration session
and returns to privileged EXEC mode.
Example:
Device(config)# end
Step 5 show platform flow [aging | {export | usage | table-contention {aggregate |
detailed | summary} }[instance | module] | {ip | ipv6} [ count | destination |
instance | module | multicast | protocol | source] | {layer2 | mpls } [ count |
instance | module ]]
Verifies the configuration of the CPU
utilization threshold.
Example:
Device# show platform flow export
Configuration Examples for CPU Friendly NetFlow Export
•
Example: Configuring CPU Utilization Thresholds for NetFlow Export, page 95
Example: Configuring CPU Utilization Thresholds for NetFlow Export
The following example shows how to configure CPU utilization thresholds for NetFlow export.
This sample starts in global configuration mode.
!
flow hardware export threshold 25
flow hardware export threshold 25 linecard 25
end
!
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
95
Configuring CPU Friendly NetFlow Export
Additional References
Additional References
Related Documents
Related Topic
Document Title
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Flexible NetFlow conceptual and configuration
information
Flexible NetFlow Configuration Guide
Configuration commands for Flexible NetFlow
Cisco IOS Flexible NetFlow Command Reference
Standards/RFCs
Standard
Title
No new or modified standards/RFCs are supported
by this feature.
--
MIBs
MIB
MIBs Link
None
To locate and download MIBs for selected
platforms, Cisco software releases, and feature sets,
use Cisco MIB Locator found at the following
URL:
http://www.cisco.com/go/mibs
Technical Assistance
Description
Link
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.
http://www.cisco.com/cisco/web/support/
index.html
Feature Information for CPU Friendly NetFlow Export
GUID-99360C0D-E056-42C8-B66C-4FA2E2463DCAF lists the release history for this feature.
Use Cisco Feature Navigator to find information about platform support and software image support. Cisco
Feature Navigator enables you to determine which software images support a specific software release,
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
96
Configuring CPU Friendly NetFlow Export
feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn . An
account on Cisco.com is not required.
Note
GUID-99360C0D-E056-42C8-B66C-4FA2E2463DCAF 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.
Table 26
Feature Information for CPU Friendly NetFlow Export
Feature Name
Releases
Feature Information
CPU Friendly NetFlow Export
12.2(50)SY
The CPU Friendly NetFlow
Export feature provides the
capability for the software
NetFlow modules to adjust their
Central Processing Unit (CPU)
utilization based on user
configured CPU thresholds for
the supervisor and line cards, so
that when the total CPU
utilization is above the configured
threshold, NetFlow decreases its
CPU consumption, and vice
versa.
15.0(1)SY
15.0(1)SY1
Information about the CPU
Friendly NetFlow Export feature
is included in the following
sections:
The following commands were
introduced or modified: flow
hardware, show platform flow.
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
97
Example: Configuring CPU Utilization Thresholds for NetFlow Export
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
98
Customizing Flexible NetFlow Flow Records
and Flow Monitors
This document contains information about and instructions for customizing Cisco IOS Flexible NetFlow
flow records and flow monitors. If the tasks and configuration examples in the "Getting Started with
Configuring Cisco IOS Flexible NetFlow" module and the "Configuring Cisco IOS Flexible NetFlow with
Predefined Records" module were not suitable for your traffic analysis requirements, you can use the
information and instructions in this document to customize Flexible NetFlow to meet your traffic analysis
requirements.
NetFlow is a Cisco IOS technology that provides statistics on packets flowing through a 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.
•
•
•
•
•
•
•
•
Finding Feature Information, page 99
Prerequisites for Customizing Flexible NetFlow Flow Records and Flow Monitors, page 100
Information About Customizing Flexible NetFlow Flow Records and Flow Monitors, page 100
How to Customize Flexible NetFlow Flow Records and Flow Monitors, page 101
Configuration Examples for Customizing Flow Records and Flow Monitors, page 108
Where to Go Next, page 112
Additional References, page 112
Feature Information for Flexible NetFlow, page 114
Finding Feature Information
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
99
Criteria for Identifying Traffic To Be Used in Analysis in Flexible NetFlow
Prerequisites for Customizing Flexible NetFlow Flow Records and Flow Monitors
Prerequisites for Customizing Flexible NetFlow Flow Records
and Flow Monitors
•
•
•
•
You are familiar with the information in the " Cisco IOS Flexible NetFlow Overview " module.
You are familiar with the Flexible NetFlow key fields as they are defined in the following commands
in the Cisco IOS Flexible NetFlow Command Reference :
◦ match flow
◦ match interface
◦ match {ipv4 | ipv6}
◦ match routing
◦ match transport
You are familiar with the Flexible NetFlow nonkey fields as they are defined in the following
commands in the Cisco IOS Flexible NetFlow Command Reference :
◦ collect counter
◦ collect flow
◦ collect interface
◦ collect{ipv4 | ipv6}
◦ collect routing
◦ collect timestamp sys-uptime
◦ collect transport
The networking device must be running a Cisco IOS 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.
Information About Customizing Flexible NetFlow Flow
Records and Flow Monitors
•
Criteria for Identifying Traffic To Be Used in Analysis in Flexible NetFlow, page 100
Criteria for Identifying Traffic To Be Used in Analysis in Flexible NetFlow
If the predefined Flexible NetFlow records are not suitable for your traffic requirements, you can create a
user-defined (custom) record using the Flexible NetFlow collect and match commands. Before you can
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
100
Customizing Flexible NetFlow Flow Records and Flow Monitors
How to Customize Flexible NetFlow Flow Records and Flow Monitors
create a customized record, you must decide the criteria that you are going to use for the key and nonkey
fields.
If you want to create a customized record for detecting network attacks, you must include the appropriate
key and nonkey fields in the record to ensure that the router creates the flows and captures the data that you
need to analyze the attack and respond to it. For example, SYN flood attacks are a common denial of
service (DoS) attack in which TCP flags are used to flood open TCP requests to a destination host. When a
normal TCP connection starts, a destination host receives a SYN (synchronize/start) packet from a source
host and sends back a SYN ACK (synchronize acknowledge). The destination host must then hear an ACK
(acknowledge) of the SYN ACK before the connection is established. This is referred to as the "TCP threeway handshake." While the destination host waits for the ACK to the SYN ACK, a connection queue of
finite size on the destination host keeps track of connections waiting to be completed. This queue typically
empties quickly because the ACK is expected to arrive a few milliseconds after the SYN ACK. The TCP
SYN attack exploits this design by having an attacking source host generate TCP SYN packets with
random source addresses toward a victim host. The victim destination host sends a SYN ACK back to the
random source address and adds an entry to the connection queue. Because the SYN ACK is destined for
an incorrect or nonexistent host, the last part of the TCP three-way handshake is never completed and the
entry remains in the connection queue until a timer expires, typically for about one minute. Rapid
generation by the source of TCP SYN packets from random IP addresses can fill the connection queue and
cause denial of TCP services (such as e-mail, file transfer, or WWW) to legitimate users.
The information needed for a security monitoring record for this type of DoS attack might include the
following key and nonkey fields:
•
Key fields:
•
◦ Destination IP address or destination IP subnet
◦ TCP flags
◦ Packet count
Nonkey fields
◦
◦
◦
Tip
Destination IP address
Source IP address
Interface input and output
Many users configure a general Flexible NetFlow monitor that triggers a more detailed Flexible NetFlow
view of a DoS attack using these key and nonkey fields.
How to Customize Flexible NetFlow Flow Records and Flow
Monitors
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 a Customized Flow Record, page 102
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
101
Configuring a Customized Flow Record
How to Customize Flexible NetFlow Flow Records and Flow Monitors
•
•
Creating a Customized Flow Monitor, page 104
Applying a Flow Monitor to an Interface, page 106
Configuring a Customized Flow Record
Customized flow records are used to analyze traffic data for a specific purpose. A customized flow record
must have at least one match criterion for use as the key field and typically has at least one collect criterion
for use as a nonkey field.
There are hundreds of possible permutations of customized flow records. This task explains the steps that
are used to create one of the possible permutations. Modify the steps in these tasks as appropriate to create
a customized flow record for your requirements.
To configure a customized flow record, perform the following task.
SUMMARY STEPS
1. enable
2. configure terminal
3. flow record record-name
4. description description
5. match {ipv4 | ipv6}{destination | source} {address | {mask | prefix} [minimum-mask mask]}
6. Repeat Step 5 as required to configure additional key fields for the record.
7. collect {ipv4 | ipv6} source {address | {mask | prefix} [minimum-mask mask]}
8. Repeat Step 7 as required to configure additional nonkey fields for the record.
9. end
10. show flow record record-name
11. show running-config flow record record-name
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Device> enable
Step 2 configure terminal
Example:
Device# configure terminal
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
102
Enters global configuration mode.
Customizing Flexible NetFlow Flow Records and Flow Monitors
How to Customize Flexible NetFlow Flow Records and Flow Monitors
Command or Action
Step 3 flow record record-name
Example:
Purpose
Creates a flow record and enters Flexible NetFlow flow
record configuration mode.
•
This command also allows you to modify an existing
flow record.
Device(config)# flow record FLOW-RECORD-1
Step 4 description description
(Optional) Creates a description for the flow record.
Example:
Device(config-flow-record)# description Used
for basic traffic analysis
Step 5 match {ipv4 | ipv6}{destination | source} {address |
{mask | prefix} [minimum-mask mask]}
Configures a key field for the flow record.
Note This example configures the IPv4 destination address
as a key field for the record. For information about the
other key fields available for the match ipv4
command, and the other match commands that are
available to configure key fields, refer to the Cisco
IOS Flexible NetFlow Command Reference .
Example:
Device(config-flow-record)# match ipv4
destination address
Step 6 Repeat Step 5 as required to configure additional key
fields for the record.
--
Step 7 collect {ipv4 | ipv6} source {address | {mask | prefix}
[minimum-mask mask]}
Configures one or more of the IPv4 source fields in the flow
as a nonkey field for the record.
Note This example configures the IPv4 source address as a
nonkey field for the record. For information on the
other collect commands that are available to configure
nonkey fields, refer to the Cisco IOS Flexible NetFlow
Command Reference .
Example:
Device(config-flow-record)# collect ipv4 source
address
Step 8 Repeat Step 7 as required to configure additional nonkey
fields for the record.
--
Step 9 end
Exits Flexible NetFlow flow record configuration mode and
returns to privileged EXEC mode.
Example:
Device(config-flow-record)# end
Step 10 show flow record record-name
(Optional) Displays the current status of the specified flow
record.
Example:
Device# show flow record FLOW_RECORD-1
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
103
Creating a Customized Flow Monitor
How to Customize Flexible NetFlow Flow Records and Flow Monitors
Command or Action
Step 11 show running-config flow record record-name
Purpose
(Optional) Displays the configuration of the specified flow
record.
Example:
Device# show running-config flow record
FLOW_RECORD-1
Creating a Customized Flow Monitor
To create a customized flow monitor, perform the following 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. These record formats can be one of the predefined formats, or an
advanced user can create a customized format using the flow record command.
If you want to use a customized record instead of using one of the Flexible NetFlow predefined records,
you must create the customized record before you can perform this task.
If you want to add a flow exporter to the flow monitor for data export, you must create the exporter before
you can complete this task.
Note
You must use the no ip flow monitorcommand to remove a flow monitor from all of the interfaces to
which you have applied it before you can modify the parameters for the record command on the flow
monitor. For information about the ip flow monitor command, refer to the Cisco IOS Flexible NetFlow
Command Reference .
SUMMARY STEPS
1. enable
2. configure terminal
3. flow monitor monitor-name
4. description description
5. record {record-name | netflow-original | netflow {ipv4 | ipv6} record [peer]}
6. cache {entries number | timeout {active |inactive|update} seconds | type {immediate | normal |
permanent}}
7. Repeat Step 6 as required to finish modifying the cache parameters for this flow monitor.
8. statistics packet protocol
9. statistics packet size
10. exporter exporter-name
11. end
12. show flow monitor [[name] monitor-name [cache [format {csv | record | table}]][statistics]]
13. show running-config flow monitor monitor-name
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
104
Customizing Flexible NetFlow Flow Records and Flow Monitors
How to Customize Flexible NetFlow Flow Records and Flow Monitors
DETAILED STEPS
Command or Action
Purpose
Step 1 enable
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Device> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Device# configure terminal
Step 3 flow monitor monitor-name
Creates a flow monitor and enters Flexible NetFlow flow
monitor configuration mode.
•
Example:
This command also allows you to modify an existing
flow monitor.
Device(config)# flow monitor FLOW-MONITOR-1
Step 4 description description
(Optional) Creates a description for the flow monitor.
Example:
Device(config-flow-monitor)# description Used
for basic ipv4 traffic analysis
Step 5 record {record-name | netflow-original | netflow {ipv4 |
ipv6} record [peer]}
Specifies the record for the flow monitor.
Example:
Device(config-flow-monitor)# record FLOW-RECORD-1
Step 6 cache {entries number | timeout {active |inactive|update} (Optional) Modifies the flow monitor cache parameters
such as timeout values, number of cache entries, and the
seconds | type {immediate | normal | permanent}}
cache type.
Example:
•
Device(config-flow-monitor)# cache entries 1000
Step 7 Repeat Step 6 as required to finish modifying the cache
parameters for this flow monitor.
The values for the keywords associated with the
timeout keyword have no effect when the cache type
is set to immediate.
--
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
105
Applying a Flow Monitor to an Interface
How to Customize Flexible NetFlow Flow Records and Flow Monitors
Command or Action
Step 8 statistics packet protocol
Purpose
(Optional) Enables the collection of protocol distribution
statistics for Flexible NetFlow monitors.
Example:
Device(config-flow-monitor)# statistics packet
protocol
Step 9 statistics packet size
(Optional) Enables the collection of size distribution
statistics for Flexible NetFlow monitors.
Example:
Device(config-flow-monitor)# statistics packet
size
Step 10 exporter exporter-name
(Optional) Specifies the name of an exporter that was
created previously.
•
Example:
Device(config-flow-monitor)# exporter EXPORTER-1
Step 11 end
Refer to the "Configuring Data Export for Cisco IOS
Flexible NetFlow with Flow Exporters" module for
information about and instructions for configuring
flow exporters.
Exits Flexible NetFlow flow monitor configuration mode
and returns to privileged EXEC mode.
Example:
Device(config-flow-monitor)# end
Step 12 show flow monitor [[name] monitor-name [cache [format (Optional) Displays the status and statistics for a Flexible
NetFlow flow monitor.
{csv | record | table}]][statistics]]
Example:
Device# show flow monitor FLOW-MONITOR-2 cache
Step 13 show running-config flow monitor monitor-name
(Optional) Displays the configuration of the specified flow
monitor.
Example:
Device# show flow monitor FLOW_MONITOR-1
Applying a Flow Monitor to an Interface
Before it can be activated, a flow monitor must be applied to at least one interface. To activate a flow
monitor, perform the following required task.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
106
Customizing Flexible NetFlow Flow Records and Flow Monitors
How to Customize Flexible NetFlow Flow Records and Flow Monitors
Note
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 Flexible NetFlow
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 Flexible NetFlow flow
monitor can be used only for analyzing output (egress) traffic.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. {ip | ipv6} flow monitor monitor-name {input | output}
5. Repeat Steps 3 and 4 to activate a flow monitor on any other interfaces in the device over which you
want to monitor traffic.
6. end
7. show flow interface type number
8. show flow monitor name monitor-name cache format record
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Device> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Device# configure terminal
Step 3 interface type number
Specifies an interface and enters interface
configuration mode.
Example:
Device(config)# interface ethernet 0/0
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
107
Customizing Flexible NetFlow Flow Records and Flow Monitors
Configuration Examples for Customizing Flow Records and Flow Monitors
Command or Action
Step 4 {ip | ipv6} flow monitor monitor-name {input | output}
Purpose
Activates a flow monitor that was created
previously by assigning it to the interface to
analyze traffic.
Example:
Device(config-if)# ip flow monitor FLOW-MONITOR-1 input
Step 5 Repeat Steps 3 and 4 to activate a flow monitor on any other
interfaces in the device over which you want to monitor traffic.
--
Step 6 end
Exits interface configuration mode and returns to
privileged EXEC mode.
Example:
Device(config-if)# end
Step 7 show flow interface type number
Displays the status of Flexible NetFlow (enabled or
disabled) on the specified interface.
Example:
Device# show flow interface ethernet 0/0
Step 8 show flow monitor name monitor-name cache format record
Displays the status, statistics, and flow data in the
cache for the specified flow monitor.
Example:
Device# show flow monitor name FLOW_MONITOR-1 cache
format record
Configuration Examples for Customizing Flow Records and
Flow Monitors
•
•
•
•
•
•
Example: Configuring a Permanent Flow Record Cache with a Limited Number of Flows, page 109
Example: Configuring a Customized Flow Record Cache for Monitoring IPv6 Traffic, page 109
Example Configuring Flexible NetFlow for Monitoring MAC and VLAN Statistics, page 110
Example Configuring Flexible NetFlow for Ingress VRF Support, page 111
Example Configuring Flexible NetFlow for Network-Based Application Recognition, page 111
Example Configuring Flexible NetFlow for CTS Fields, page 111
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
108
Example: Configuring a Permanent Flow Record Cache with a Limited Number of Flows
Configuration Examples for Customizing Flow Records and Flow Monitors
Example: Configuring a Permanent Flow Record Cache with a Limited
Number of Flows
The following example is designed to monitor the type of service (ToS) field usage on all interfaces in the
router. An exporter is not configured because this example is intended to be used to capture additional data
for analysis on the router using the show flow monitorcommand.
This sample starts in global configuration mode:
!
ip cef
!
flow record QOS_RECORD
description UD: Flow Record to monitor the use of TOS within this router/network
match interface input
match interface output
match ipv4 tos
collect counter packets
collect counter bytes
exit
!
flow monitor QOS_MONITOR
description UD: Flow Monitor which watches the limited combinations of interface and TOS
record QOS_RECORD
cache type permanent
cache entries 8192
! 2^5 (combos of interfaces) * 256 (values of TOS)
exit
!
interface ethernet0/0
ip flow monitor QOS_MONITOR input
exit
!
interface ethernet0/1
ip flow monitor QOS_MONITOR input
exit
!
interface ethernet0/2
ip flow monitor QOS_MONITOR input
exit
!
interface serial2/0
ip flow monitor QOS_MONITOR input
exit
!
interface serial2/1
ip flow monitor QOS_MONITOR input
!
The display from the show flow monitor command shows the current status of the cache.
Router# show flow monitor QOS_MONITOR cache
Cache type:
Permanent
Cache size:
8192
Current entries:
2
High Watermark:
2
Flows added:
2
Updates sent
( 1800 secs)
0
Example: Configuring a Customized Flow Record Cache for Monitoring IPv6
Traffic
The following example creates a customized flow record cache for monitoring IPv6 traffic.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
109
Example Configuring Flexible NetFlow for Monitoring MAC and VLAN Statistics
Configuration Examples for Customizing Flow Records and Flow Monitors
This sample starts in global configuration mode:
!
ip cef
ipv6 cef
!
flow record FLOW-RECORD-2
description Used for basic IPv6 traffic analysis
match ipv6 destination address
collect ipv6 protocol
collect ipv6 source address
collect transport source-port
collect transport destination-port
collect counter bytes
collect counter packets
collect timestamp sys-uptime first
collect timestamp sys-uptime last
!
flow monitor FLOW-MONITOR-2
description Used for basic IPv6 traffic analysis
record FLOW-RECORD-2
cache entries 1000
statistics packet protocol
statistics packet size
!
interface Ethernet0/0
ipv6 address 2001:DB8:2:ABCD::2/48
ipv6 flow monitor FLOW-MONITOR-2 input
!
interface Ethernet1/0
ipv6 address 2001:DB8:3:ABCD::1/48
ipv6 flow monitor FLOW-MONITOR-2 output
!
Example Configuring Flexible NetFlow for Monitoring MAC and VLAN
Statistics
The following example shows how to configure Flexible NetFlow for monitoring MAC and VLAN
statistics.
This sample starts in global configuration mode:
!
flow record LAYER-2-FIELDS-1
match ipv4 source address
match ipv4 destination address
collect datalink dot1q vlan output
collect datalink mac source address input
collect datalink mac source address output
collect datalink mac destination address input
collect flow direction
collect counter bytes
collect counter packets
!
exit
!
!
flow monitor FLOW-MONITOR-4
record LAYER-2-FIELDS-1
exit
!
ip cef
!
interface Ethernet0/0
ip address 172.16.6.2 255.255.255.0
ip flow monitor FLOW-MONITOR-1 input
!
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
110
Example Configuring Flexible NetFlow for Ingress VRF Support
Configuration Examples for Customizing Flow Records and Flow Monitors
Example Configuring Flexible NetFlow for Ingress VRF Support
The following example configures the collection of the virtual routing and forwarding (VRF) ID from
incoming packets on a router by applying an input flow monitor having a flow record that collects the VRF
ID as a key field.
This sample starts in global configuration mode:
!
flow record rm_1
match routing vrf input
match ipv4 source address
match ipv4 destination address
collect interface input
collect interface output
collect counter packets
!
flow monitor mm_1
record rm_1
!
interface Serial2/0
ip vrf forwarding green
ip address 172.16.2.2 255.255.255.252
ip flow monitor mm_1 output
!
end
Example Configuring Flexible NetFlow for Network-Based Application
Recognition
The following example uses Network-based Application recognition (NBAR) to create different flows for
each application seen between any two IP hosts by applying a flow monitor having a flow record that
collects the application name as a key field.
This sample starts in global configuration mode:
!
flow record rm_1
match application name
match ipv4 source address
match ipv4 destination address
collect interface input
collect interface output
collect counter packets
!
flow monitor mm_1
record rm_1
!
interface FastEthernet0/0
ip address 172.16.2.2 255.255.255.0
ip flow monitor mm_1 input
!
end
Example Configuring Flexible NetFlow for CTS Fields
This following example configures the collection of the Cisco TrustSec (CTS) fields, source Security
Group Tag (SGT) and destination Security Group Tag (DGT), in IPv4 traffic.
This sample starts in global configuration mode:
!
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
111
Customizing Flexible NetFlow Flow Records and Flow Monitors
Where to Go Next
flow exporter EXPORTER-1
destination 172.16.10.2
transport udp 90
exit
flow record rm_1
match ipv4 protocol
match ipv4 source address
match ipv4 destination address
match transport source-port
match transport destination-port
match flow direction
match flow cts source group-tag
match flow cts destination group-tag
collect routing source as
collect routing destination as
collect routing source as peer
collect routing destination as peer
collect routing next-hop address ipv4
collect routing next-hop address ipv4 bgp
collect ipv4 source prefix
collect ipv4 source mask
collect ipv4 destination prefix
collect ipv4 destination mask
collect interface input
collect interface output
collect counter bytes
collect counter packets
collect timestamp sys-uptime first
collect timestamp sys-uptime last
!
flow monitor mm_1
record rm_1
exporter EXPORTER-1
!
interface FastEthernet0/0
ip address 172.16.2.2 255.255.255.0
ip flow monitor mm_1 input
!
end
Where to Go Next
If you want to configure data export for Flexible NetFlow, refer to the "Configuring Data Export for Cisco
IOS Flexible NetFlow with Flow Exporters" 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.
Additional References
Related Documents
Related Topic
Document Title
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Overview of Flexible NetFlow
"Cisco IOS Flexible NetFlow Overview"
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
112
Customizing Flexible NetFlow Flow Records and Flow Monitors
Additional References
Related Topic
Document Title
Flexible NetFlow Feature Roadmap
"Cisco IOS Flexible NetFlow Features Roadmap"
Emulating original NetFlow with Flexible NetFlow
"Getting Started with Configuring Cisco IOS
Flexible NetFlow"
Configuring flow exporters to export Flexible
NetFlow data.
"Configuring Data Export for Cisco IOS Flexible
NetFlow with Flow Exporters"
Configuring flow sampling to reduce the overhead
of monitoring traffic with Flexible NetFlow
"Using Cisco IOS Flexible NetFlow Flow Sampling
to Reduce the CPU Overhead of Analyzing Traffic"
Configuring Flexible NetFlow using predefined
records
"Configuring Cisco IOS Flexible NetFlow with
Predefined Records"
Using Flexible NetFlow Top N Talkers to analyze
network traffic
"Using Cisco IOS Flexible NetFlow Top N Talkers
to Analyze Network Traffic"
Configuring IPv4 multicast statistics support for
Flexible NetFlow
"Configuring IPv4 Multicast Statistics Support for
Cisco IOS Flexible NetFlow"
Configuration commands for Flexible NetFlow
Cisco IOS Flexible NetFlow Command Reference
Standards
Standard
Title
None
--
MIBs
MIB
MIBs Link
None
To locate and download MIBs for selected
platforms, Cisco software releases, and feature sets,
use Cisco MIB Locator found at the following
URL:
http://www.cisco.com/go/mibs
RFCs
RFC
Title
RFC 3954
Cisco Systems NetFlow Services Export Version 9
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
113
Customizing Flexible NetFlow Flow Records and Flow Monitors
Feature Information for Flexible NetFlow
Technical Assistance
Description
Link
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.
http://www.cisco.com/cisco/web/support/
index.html
Feature Information for Flexible NetFlow
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
114
Customizing Flexible NetFlow Flow Records and Flow Monitors
Feature Information for Flexible NetFlow
Table 27
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
Flexible NetFlow
12.2(33)SRC
Flexible NetFlow is introduced.
12.2(50)SY
Support for this feature was
added for Cisco 7200 series
routers in Cisco IOS Release
12.2(33)SRC.
12.4(9)T
15.0(1)SY
15.0(1)SY1
The following commands were
introduced or modified: cache
(Flexible NetFlow), clear flow
exporter, clear flow monitor,
clear sampler, collect counter,
collect flow, collect interface,
collect ipv4, collect ipv4
destination, collect ipv4
fragmentation, collect ipv4
section, collect ipv4 source,
collect ipv4 total-length, collect
ipv4 ttl, collect routing, collect
timestamp sys-uptime, collect
transport, collect transport
icmp ipv4, collect transport tcp,
collect transport udp, debug
flow exporter, debug flow
monitor, debug flow record,
debug sampler, description
(Flexible NetFlow), destination,
dscp (Flexible NetFlow),
exporter, flow exporter, flow
monitor, flow platform, flow
record, ip flow monitor, match
flow, match interface (Flexible
NetFlow), match ipv4, match
ipv4 destination, match ipv4
fragmentation, match ipv4
section, match ipv4 source,
match ipv4 total-length, match
ipv4 ttl, match routing, match
transport, match transport
icmp ipv4, match transport tcp,
match transport udp, mode
(Flexible NetFlow), option
(Flexible NetFlow), record,
sampler, show flow exporter,
show flow interface, show flow
monitor, show flow record,
show sampler, source (Flexible
NetFlow), statistics packet,
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
115
Customizing Flexible NetFlow Flow Records and Flow Monitors
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
template data timeout,
transport (Flexible NetFlow).
Flexible NetFlow--IPv4 Unicast
Flows
12.2(33)SRC
12.2(50)SY
12.4(9)T
15.0(1)SY
15.0(1)SY1
Enables Flexible NetFlow to
monitor IPv4 traffic.
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: collect
routing, debug flow record,
collect ipv4, collect ipv4
destination, collect ipv4
fragmentation, collect ipv4
section, collect ipv4 source, ip
flow monitor, match ipv4,
match ipv4 destination, match
ipv4 fragmentation, match ipv4
section, match ipv4 source,
match routing, record, show
flow monitor, show flow record.
Flexible NetFlow--Layer 2 Fields 12.2(33)SRE
12.4(22)T
Enables collecting statistics for
Layer 2 fields such as MAC
addresses and virtual LAN
(VLAN) IDs from 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:
collect datalink dot1q vlan ,
collect datalink mac, match
datalink dot1q vlan, match
datalink mac.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
116
Customizing Flexible NetFlow Flow Records and Flow Monitors
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
Flexible NetFlow--IPv6 Unicast
Flows
12.2(33)SRE
Enables Flexible NetFlow to
monitor IPv6 traffic.
12.2(50)SY
12.4(20)T
15.0(1)SY
15.0(1)SY1
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: collect
routing, debug flow record,
match routing, record, show
flow monitor, show flow record,
collect ipv6, collect ipv6
destination, collect ipv6
extension map, collect ipv6
fragmentation, collect ipv6 hoplimit, collect ipv6 length, collect
ipv6 section, collect ipv6 source,
collect transport icmp ipv6,
ipv6 flow monitor, match ipv6,
match ipv6 destination, match
ipv6 extension map, match ipv6
fragmentation, match ipv6 hoplimit, match ipv6 length, match
ipv6 section, match ipv6 source,
match transport icmp ipv6.
Flexible NetFlow--Ingress VRF
Support
12.2(33)SRE
12.2(50)SY
15.0(1)M
15.0(1)SY
15.0(1)SY1
Enables collecting the virtual
routing and forwarding (VRF) ID
from incoming packets on a
router by applying an input flow
monitor having a flow record that
collects the VRF ID as a key or a
nonkey field.
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: collect
routing, match routing, option
(Flexible NetFlow), show flow
monitor.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
117
Customizing Flexible NetFlow Flow Records and Flow Monitors
Feature Name
Releases
Feature Information
Flexible NetFlow--NBAR
Application Recognition
15.0(1)M
Network-based Application
recognition (NBAR) enables
creation of different flows for
each application seen between
any two IP hosts by applying a
flow monitor having a flow
record that collects the
application name as a key or a
nonkey field.
The following commands were
introduced or modified:
collect application name, match
application name, option
(Flexible NetFlow), show flow
monitor.
TrustSec NetFlow IPv4 SGACL
Deny and Drop Export
12.2(50)SY
15.0(1)SY
15.0(1)SY1
TrustSec NetFlow IPv6 SGACL
Deny and Drop ExportS
12.2(50)SY
15.0(1)SY
15.0(1)SY1
Enables Flexible NetFlow to
collect Cisco Trusted Security
(CTS) information in IPv4 traffic.
The following commands were
introduced or modified: collect
flow, match flow, show flow
monitor.
Enables Flexible NetFlow to
collect Cisco Trusted Security
(CTS) information in IPv6 traffic.
The following commands were
introduced or modified: collect
flow, match flow, show flow
monitor.
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
118
Using Flexible NetFlow Flow Sampling
This document contains information about and instructions for configuring sampling to reduce the CPU
overhead of analyzing traffic with Flexible NetFlow.
NetFlow is a Cisco technology that provides statistics on packets flowing through a 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 faciltates the creation of more complex
configurations for traffic analysis and data export through the use of reusable configuration components.
•
•
•
•
•
•
•
•
•
Finding Feature Information, page 119
Prerequisites for Using Flow Sampling, page 119
Restrictions for Using Flow Sampling, page 120
Information About Flexible NetFlow Samplers, page 120
How to Configure Flexible NetFlow Flow Sampling, page 120
Configuration Examples for Using Flexible NetFlow Flow Sampling, page 124
Where to Go Next, page 126
Additional References, page 127
Feature Information for Flexible NetFlow, page 128
Finding Feature Information
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 Using Flow Sampling
•
•
You are familiar with the information in the " Cisco IOS Flexible NetFlow Overview " module.
The networking device must be running a Cisco IOS release that supports Flexible NetFlow.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
119
Flow Samplers
Restrictions for Using Flow Sampling
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
IPv6.
Restrictions for Using Flow Sampling
Cisco IOS Release 12.2(50)SY
•
Deterministic sampling is not supported.
Information About Flexible NetFlow Samplers
•
Flow Samplers, page 120
Flow Samplers
Flow samplers are created as separate components in a router’s configuration. Flow samplers are used to
reduce the load on the device that is running Flexible NetFlow by limiting the number of packets that are
selected for analysis. Samplers use either random or deterministic sampling techniques (modes):
•
•
Deterministic--The same sampling position is used each time a sample is taken.
Random--A randomly selected sampling position is used each time a sample is taken.
Flow sampling exchanges monitoring accuracy for router performance. When you apply a sampler to a
flow monitor, the overhead load on the router of running the flow monitor is reduced because the number
of packets that the flow monitor must analyze is reduced. The reduction in the number of packets that are
analyzed by the flow monitor causes a corresponding reduction in the accuracy of the information stored in
the flow monitor’s cache.
Samplers are combined with flow monitors when they are applied to an interface with the ip flow monitor
command.
How to Configure Flexible NetFlow Flow Sampling
Flow sampling reduces the CPU overhead of analyzing traffic with Flexible NetFlow by reducing the
number of packets that are analyzed.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
120
Configuring a Flow Monitor
How to Configure Flexible NetFlow Flow Sampling
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 a Flow Monitor, page 121
Configuring and Enabling Flow Sampling, page 122
Configuring a Flow Monitor
Samplers are applied to an interface in conjunction with a flow monitor. You must create a flow monitor to
configure the types of traffic that you want to analyze before you can enable sampling. To configure a flow
monitor, perform the following 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 use the no ip flow monitorcommand to remove a flow monitor from all of the interfaces to
which you have applied it before you can modify the parameters for the record command on the flow
monitor.
SUMMARY STEPS
1. enable
2. configure terminal
3. flow monitor monitor-name
4. description description
5. record {record-name | netflow-original | netflow {ipv4 | ipv6} record [peer]}
6. end
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Device> enable
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
121
Configuring and Enabling Flow Sampling
How to Configure Flexible NetFlow Flow Sampling
Command or Action
Step 2 configure terminal
Purpose
Enters global configuration mode.
Example:
Device# configure terminal
Step 3 flow monitor monitor-name
Creates a flow monitor and enters Flexible NetFlow
flow monitor configuration mode.
•
Example:
This command also allows you to modify an
existing flow monitor.
Device(config)# flow monitor FLOW-MONITOR-1
Step 4 description description
(Optional) Creates a description for the flow monitor.
Example:
Device(config-flow-monitor)# description Used for
basic traffic analysis
Step 5 record {record-name | netflow-original | netflow {ipv4 | ipv6} Specifies the record for the flow monitor.
record [peer]}
Example:
Device(config-flow-monitor)# record netflow ipv4
original-input
Step 6 end
Exits Flexible NetFlow flow monitor configuration
mode and returns to privileged EXEC mode.
Example:
Device(config-flow-monitor)# end
Configuring and Enabling Flow Sampling
To configure and enable a flow sampler, perform the following required task.
Note
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
122
Using Flexible NetFlow Flow Sampling
How to Configure Flexible NetFlow Flow Sampling
SUMMARY STEPS
1. enable
2. configure terminal
3. sampler sampler-name
4. description description
5. mode {deterministic | random} 1 out-of window-size
6. exit
7. interface type number
8. {ip | ipv6} flow monitor monitor-name [[sampler] sampler-name] {input | output}
9. end
10. show sampler sampler-name
DETAILED STEPS
Command or Action
Purpose
Step 1 enable
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Router> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Router# configure terminal
Step 3 sampler sampler-name
Creates a sampler and enters sampler configuration mode.
•
Example:
This command also allows you to modify an existing
sampler.
Router(config)# sampler SAMPLER-1
Step 4 description description
(Optional) Creates a description for the flow sampler.
Example:
Router(config-sampler)# description Sample at 50%
Step 5 mode {deterministic | random} 1 out-of window-size
Example:
Specifies the sampler mode and the flow sampler window
size.
•
The range for the window-size argument is from 2 to
32,768.
Router(config-sampler)# mode random 1 out-of 2
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
123
Example Configuring and Enabling a Deterministic Sampler for IPv4 Traffic
Configuration Examples for Using Flexible NetFlow Flow Sampling
Command or Action
Step 6 exit
Purpose
Exits sampler configuration mode and returns to global
configuration mode.
Example:
Router(config-sampler)# exit
Step 7 interface type number
Specifies an interface and enters interface configuration
mode.
Example:
Router(config)# interface ethernet 0/0
Step 8 {ip | ipv6} flow monitor monitor-name [[sampler]
sampler-name] {input | output}
Assigns the flow monitor and the flow sampler that you
created to the interface to enable sampling.
Example:
Router(config-if)# ip flow monitor FLOW-MONITOR-1
sampler SAMPLER-1 input
Step 9 end
Exits interface configuration mode and returns to
privileged EXEC mode.
Example:
Router(config-if)# end
Step 10 show sampler sampler-name
Displays the status and statistics of the flow sampler that
you configured and enabled,.
Example:
Router# dhoe sampler SAMPLER-1
Configuration Examples for Using Flexible NetFlow Flow
Sampling
•
•
•
•
Example Configuring and Enabling a Deterministic Sampler for IPv4 Traffic, page 124
Example Configuring and Enabling a Deterministic Sampler for IPv6 Traffic, page 125
Example Adding a Sampler to a Flow Monitor When a Flow Monitor Is Already Enabled, page 126
Example Removing a Sampler from a Flow Monitor, page 126
Example Configuring and Enabling a Deterministic Sampler for IPv4 Traffic
The following example shows how to configure and enable deterministic sampling for IPv4 output traffic.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
124
Example Configuring and Enabling a Deterministic Sampler for IPv6 Traffic
Configuration Examples for Using Flexible NetFlow Flow Sampling
This sample starts in global configuration mode:
!
flow monitor FLOW-MONITOR-1
record netflow ipv4 original-output
exit
!
sampler SAMPLER-1
mode deterministic 1 out-of 2
exit
!
ip cef
!
interface Ethernet 0/0
ip address 172.16.6.2 255.255.255.0
ip flow monitor FLOW-MONITOR-1 sampler SAMPLER-1 output
!
The following example shows how to configure and enable deterministic sampling for IPv4 input traffic.
This sample starts in global configuration mode:
!
flow monitor FLOW-MONITOR-1
record netflow ipv4 original-input
exit
!
sampler SAMPLER-1
mode deterministic 1 out-of 2
exit
!
ip cef
!
interface Ethernet 0/0
ip address 172.16.6.2 255.255.255.0
ip flow monitor FLOW-MONITOR-1 sampler SAMPLER-1 input
!
Example Configuring and Enabling a Deterministic Sampler for IPv6 Traffic
The following example shows how to configure and enable deterministic sampling for IPv6 output traffic.
This sample starts in global configuration mode:
!
flow monitor FLOW-MONITOR-2
record netflow ipv6 original-output
exit
!
sampler SAMPLER-1
mode deterministic 1 out-of 2
exit
!
ip cef
ipv6 cef
!
interface Ethernet 0/0
ipv6 address 2001:DB8:2:ABCD::2/48
ipv6 flow monitor FLOW-MONITOR-2 sampler SAMPLER-1 output
!
The following example shows how to configure and enable deterministic sampling for IPv6 input traffic.
This sample starts in global configuration mode:
!
flow monitor FLOW-MONITOR-2
record netflow ipv6 original-input
exit
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
125
Example Adding a Sampler to a Flow Monitor When a Flow Monitor Is Already Enabled
Where to Go Next
!
sampler SAMPLER-1
mode deterministic 1 out-of 2
exit
!
ip cef
ipv6 cef
!
interface Ethernet 0/0
ipv6 address 2001:DB8:2:ABCD::2/48
ipv6 flow monitor FLOW-MONITOR-1 sampler SAMPLER-1 input
!
Example Adding a Sampler to a Flow Monitor When a Flow Monitor Is
Already Enabled
The following example shows what happens when you try to add a sampler to a flow monitor that has
already been enabled on an interface without a sampler:
Router(config)# interface Ethernet
0/0
Router(config-if)# ip flow monitor FLOW-MONITOR-1 sampler SAMPLER-2 input
% Flow Monitor: Flow Monitor 'FLOW-MONITOR-1' is already on in full mode and cannot be
enabled with a sampler.
The following example shows how to remove the flow monitor from the interface so that it can be enabled
with the sampler:
Router(config)# interface Ethernet
0/0
Router(config-if)# no ip flow monitor FLOW-MONITOR-1 input
Router(config-if)# ip flow monitor FLOW-MONITOR-1 sampler SAMPLER-2 input
Example Removing a Sampler from a Flow Monitor
The following example shows what happens when you try to remove a sampler from a flow monitor on an
interface by entering the flow monitor command again without the sampler keyword and argument:
Router(config)# interface Ethernet
0/0
Router(config-if)# ip flow monitor FLOW-MONITOR-1 input
% Flow Monitor: Flow Monitor 'FLOW-MONITOR-1' is already on in sampled mode and cannot be
enabled in full mode.
The following example shows how to remove the flow monitor that was enabled with a sampler from the
interface so that it can be enabled without the sampler:
Router(config)# interface Ethernet
0/0
Router(config-if)# no ip flow monitor FLOW-MONITOR-1 sampler SAMPLER-2 input
Router(config-if)# ip flow monitor FLOW-MONITOR-1 input
Where to Go Next
For information on advanced Flexible NetFlow configurations for specific purposes such as quality of
service (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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
126
Using Flexible NetFlow Flow Sampling
Additional References
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.
If you want to configure data export for Flexible NetFlow, refer to the "Configuring Data Export for Cisco
IOS Flexible NetFlow with Flow Exporters" module.
Additional References
Related Documents
Related Topic
Document Title
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Overview of Flexible NetFlow
"Cisco IOS Flexible NetFlow Overview"
Emulating original NetFlow with Flexible NetFlow
"Getting Started with Configuring Cisco IOS
Flexible NetFlow"
Configuring flow exporters to export Flexible
NetFlow data
"Configuring Data Export for Cisco IOS Flexible
NetFlow with Flow Exporters"
Customizing Flexible NetFlow
"Customizing Cisco IOS Flexible NetFlow Flow
Records and Flow Monitors"
Configuring Flexible NetFlow using predefined
records
"Configuring Cisco IOS Flexible NetFlow with
Predefined Records"
Using Flexible NetFlow Top N Talkers to analyze
network traffic
"Using Cisco IOS Flexible NetFlow Top N Talkers
to Analyze Network Traffic"
Configuring IPv4 multicast statistics support for
Flexible NetFlow
"Configuring IPv4 Multicast Statistics Support for
Cisco IOS Flexible NetFlow"
Configuration commands for Flexible NetFlow
Cisco IOS Flexible NetFlow Command Reference
Standards
Standard
Title
None
--
MIBs
MIB
MIBs Link
None
To locate and download MIBs for selected
platforms, Cisco software releases, and feature sets,
use Cisco MIB Locator found at the following
URL:
http://www.cisco.com/go/mibs
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
127
Using Flexible NetFlow Flow Sampling
Feature Information for Flexible NetFlow
RFCs
RFC
Title
RFC 3954
Cisco Systems NetFlow Services Export Version 9
Technical Assistance
Description
Link
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.
http://www.cisco.com/cisco/web/support/
index.html
Feature Information for Flexible NetFlow
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
128
Using Flexible NetFlow Flow Sampling
Feature Information for Flexible NetFlow
Table 28
Feature Information for Flexible NetFlow
Feature Name
Releases
Feature Information
Flexible NetFlow
12.2(33)SRC
Flexible NetFlow is introduced.
12.2(50)SY
Support for this feature was
added for Cisco 7200 series
routers in Cisco IOS Release
12.2(33)SRC.
12.4(9)T
15.0(1)SY
15.0(1)SY1
The following commands were
introduced or modified: cache
(Flexible NetFlow), clear flow
exporter, clear flow monitor,
clear sampler, collect counter,
collect flow, collect interface,
collect ipv4, collect ipv4
destination, collect ipv4
fragmentation, collect ipv4
section, collect ipv4 source,
collect ipv4 total-length, collect
ipv4 ttl, collect routing, collect
timestamp sys-uptime, collect
transport, collect transport
icmp ipv4, collect transport tcp,
collect transport udp, debug
flow exporter, debug flow
monitor, debug flow record,
debug sampler, description
(Flexible NetFlow), destination,
dscp (Flexible NetFlow),
exporter, flow exporter, flow
monitor, flow record, ip flow
monitor, match flow, match
interface (Flexible NetFlow),
match ipv4, match ipv4
destination, match ipv4
fragmentation, match ipv4
section, match ipv4 source,
match ipv4 total-length, match
ipv4 ttl, match routing, match
transport, match transport
icmp ipv4, match transport tcp,
match transport udp, mode
(Flexible NetFlow), option
(Flexible NetFlow), record,
sampler, show flow exporter,
show flow interface, show flow
monitor, show flow record,
show sampler, source (Flexible
NetFlow), statistics packet,
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
129
Using Flexible NetFlow Flow Sampling
Feature Name
Releases
Feature Information
template data timeout,
transport (Flexible NetFlow).
Flexible NetFlow--Random
Sampling
12.2(50)SY
12.4(20)T
15.0(1)SY
15.0(1)SY1
Flow samplers are created as
separate components in a router’s
configuration. Flow samplers are
used to reduce the load on the
device that is running Flexible
NetFlow by limiting the number
of packets that are selected for
analysis. Samplers use either
random or deterministic sampling
techniques (modes).
The following commands were
introduced or modified: clear
sampler, debug sampler, mode,
record, sampler show sampler.
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
130
Configuring IPv4 Multicast Statistics Support
for Flexible NetFlow
This document contains information about and instructions for configuring the Cisco IOS Flexible
NetFlow--IPv4 Multicast Statistics Support feature. Prior to the introduction of the Flexible NetFlow-IPv4 Multicast Statistics Support feature, Flexible NetFlow could analyze IPv4 multicast traffic, but could
not report the number of replicated bytes or the number of replicated packets in multicast flows. The
Flexible NetFlow--IPv4 Multicast Statistics Support feature adds the capability of reporting the number of
replicated bytes and the number of replicated packets in multicast flows to Flexible NetFlow.
NetFlow is a Cisco IOS technology that provides statistics on packets flowing through a networking
device. NetFlow is the standard for acquiring IP operational data from IP networks. NetFlow provides
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.
•
•
•
•
•
•
•
•
•
Finding Feature Information, page 131
Prerequisites for Configuring IPv4 Multicast Statistics Support, page 132
Restrictions for Configuring IPv4 Multicast Statistics Support, page 132
Information About IPv4 Multicast Statistics Support, page 132
How to Configure IPv4 Multicast Statistics Support, page 133
Configuration Examples for IPv4 Multicast Statistics Support, page 136
Where to Go Next, page 137
Additional References, page 137
Feature Information for IPv4 Multicast Statistics Support, page 139
Finding Feature Information
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
131
Replicated Bytes and Packets Reporting
Prerequisites for Configuring IPv4 Multicast Statistics Support
Prerequisites for Configuring IPv4 Multicast Statistics
Support
•
•
•
•
•
You are familiar with the information in the " Cisco IOS Flexible NetFlow Overview " module.
You are familiar with the information in the " Customizing Cisco IOS Flexible NetFlow Flow Records
and Flow Monitors " module.
The networking device is running a Cisco IOS release that supports the Flexible NetFlow--IPv4
Multicast Statistics Support feature.
The networking device is configured for IPv4 unicast routing and IPv4 multicast routing.
One of the following is enabled on your networking device and on any interfaces on which you want
to enable Flexible NetFlow: Cisco Express Forwarding, distributed Cisco Express Forwarding.
Restrictions for Configuring IPv4 Multicast Statistics Support
IPv4 Traffic
•
When the replication-factor field is used in a flow record, it will only have a nonzero value in the
cache for ingress multicast traffic that is forwarded by the router. If the flow record is used with a flow
monitor in output (egress) mode and to monitor unicast traffic, the cache data for the replication factor
field is set to 0.
IPv6 Traffic
•
Traffic monitoring for multicast statistics is not supported.
Cisco IOS Release 12.2(50)SY
•
Multicast replication factor is not supported.
Information About IPv4 Multicast Statistics Support
•
Replicated Bytes and Packets Reporting, page 132
Replicated Bytes and Packets Reporting
The Flexible NetFlow--IPv4 Multicast Statistics Support feature adds the capability of reporting the
number of replicated bytes and the number of replicated packets in multicast flows to Flexible NetFlow.
You can capture the packet-replication factor for a specific flow and for each outgoing stream.
You can use the The Flexible NetFlow--IPv4 Multicast Statistics Support feature to identify and count
multicast packets on the ingress side or the egress side (or both sides) of a networking device. Multicast
ingress accounting provides information about the source and how many times the traffic was replicated.
Multicast egress accounting monitors the destination of the traffic flow.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
132
Configuring IPv4 Multicast Statistics Support
How to Configure IPv4 Multicast Statistics Support
How to Configure IPv4 Multicast Statistics Support
•
Configuring IPv4 Multicast Statistics Support, page 133
Configuring IPv4 Multicast Statistics Support
This task explains the steps that are used to configure multicast statistics support for IPv4 traffic.
SUMMARY STEPS
1. enable
2. configure terminal
3. flow record flow-record-name
4. description description
5. match routing is-multicast
6. Add key fields for the record as required using other match commands.
7. collect counter {bytes replicated [long] | packets replicated [long]}
8. collect routing multicast replication-factor
9. Add nonkey fields for the record as required using other collect commands.
10. exit
11. flow monitor monitor-name
12. description description
13. record record-name
14. exit
15. interface type number
16. ip flow monitor monitor-name [multicast | unicast] {input | output}
17. Repeat Steps 15 and 16 to activate a flow monitor on any other interfaces in the networking device over
which you want to monitor traffic.
18. end
19. show flow monitor [[name] monitor-name [cache [format {csv | record | table}]][statistics]]
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Router> enable
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
133
Configuring IPv4 Multicast Statistics Support for Flexible NetFlow
How to Configure IPv4 Multicast Statistics Support
Command or Action
Step 2 configure terminal
Purpose
Enters global configuration mode.
Example:
Router# configure terminal
Step 3 flow record flow-record-name
Example:
Creates a flow record and enters Flexible NetFlow flow
record configuration mode.
•
This command also allows you to modify an existing
flow record.
Router(config)# flow record FLOW-RECORD-2
Step 4 description description
(Optional) Creates a description for the flow record.
Example:
Router(config-flow-record)# description Used
for IPv4 multicast traffic analysis
Step 5 match routing is-multicast
Configures IPv4 multicast destination addresses (indicating
that the IPv4 traffic is multicast traffic) as a key field for the
flow record.
Example:
Router(config-flow-record)# match routing ismulticast
Step 6 Add key fields for the record as required using other
match commands.
For information about the other match commands that are
available to configure key fields, refer to the Cisco IOS
Flexible NetFlow Command Reference.
Step 7 collect counter {bytes replicated [long] | packets
replicated [long]}
Configures the number of bytes or packets multiplied by the
multicast replication factor (number of interfaces the
multicast traffic is forwarded over) as a nonkey field.
Example:
•
Default: Uses a 32-bit counter. The long keyword
configures a 64-bit counter.
Router(config-flow-record)# collect counter
packets replicated
Step 8 collect routing multicast replication-factor
Configures the multicast replication factor (number of
interfaces over which multicast traffic is forwarded) as a
nonkey field.
Example:
Router(config-flow-record)# collect routing
multicast replication-factor
Step 9 Add nonkey fields for the record as required using other
collect commands.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
134
For information about the other collect commands that are
available to configure nonkey fields, refer to the Cisco IOS
Flexible NetFlow Command Reference.
Configuring IPv4 Multicast Statistics Support for Flexible NetFlow
How to Configure IPv4 Multicast Statistics Support
Command or Action
Step 10 exit
Purpose
Exits Flexible NetFlow flow record configuration mode and
returns to global configuration mode.
Example:
Router(config-flow-record)# exit
Step 11 flow monitor monitor-name
Example:
Creates a flow monitor and enters Flexible NetFlow flow
monitor configuration mode.
•
This command also allows you to modify an existing
flow monitor.
Router(config)# flow monitor FLOW-MONITOR-2
Step 12 description description
(Optional) Creates a description for the flow monitor.
Example:
Router(config-flow-monitor)# description Used
for IPv4 multicast traffic analysis
Step 13 record record-name
Specifies the record for the flow monitor.
Example:
Router(config-flow-monitor)# record FLOWRECORD-2
Step 14 exit
Exits Flexible NetFlow flow monitor configuration mode and
returns to global configuration mode.
Example:
Router(config-flow-record)# exit
Step 15 interface type number
Specifies an interface and enters interface configuration
mode.
Example:
Router(config)# interface ethernet 0/0
Step 16 ip flow monitor monitor-name [multicast | unicast]
{input | output}
Activates the flow monitor that was created previously by
assigning it to the interface to analyze traffic.
•
Example:
Router(config-if)# ip flow monitor FLOWMONITOR-2 input
•
To monitor only multicast traffic, use the multicast
keyword.
Default: Unicast traffic and multicast traffic are
monitored.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
135
Example Configuring IPv4 Multicast Statistics Support
Configuration Examples for IPv4 Multicast Statistics Support
Command or Action
Purpose
Step 17 Repeat Steps 15 and 16 to activate a flow monitor on any -other interfaces in the networking device over which you
want to monitor traffic.
Step 18 end
Exits interface configuration mode and returns to privileged
EXEC mode.
Example:
Router(config-if)# end
Step 19 show flow monitor [[name] monitor-name [cache
[format {csv | record | table}]][statistics]]
(Optional) Displays the status and statistics for a Flexible
NetFlow flow monitor.
Example:
Router# show flow monitor FLOW-MONITOR-2 cache
Examples
The following output from the show flow monitor command shows four multicast flows and three unicast
flows:
Router# show flow monitor FLOW-MONITOR-2 cache
Cache type:
Normal
Cache size:
4096
Current entries:
8
High Watermark:
8
Flows added:
4074
Flows aged:
4066
- Active timeout
( 1800 secs)
46
- Inactive timeout (
15 secs)
4020
- Event aged
0
- Watermark aged
0
- Emergency aged
0
IP IS MULTICAST IPV4 DST ADDR
pkts rep
=============== =============== ==========
Yes
224.192.16.1
16642
Yes
224.192.65.1
16621
No
10.1.4.2
0
No
10.1.2.2
0
No
10.1.3.2
0
Yes
224.0.0.13
0
No
255.255.255.255
0
Yes
224.0.0.1
0
Configuration Examples for IPv4 Multicast Statistics Support
•
Example Configuring IPv4 Multicast Statistics Support, page 136
Example Configuring IPv4 Multicast Statistics Support
This example shows how to configure the following:
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
136
Configuring IPv4 Multicast Statistics Support for Flexible NetFlow
Where to Go Next
•
•
•
•
•
IPv4 multicast destination addresses (indicating that the IPv4 traffic is multicast traffic) as a key field.
The destination IPv4 address as a key field.
The replicated packet count as a nonkey field.
The replication factor as a nonkey field.
The flow monitor in order to monitor only multicast traffic.
This sample starts in global configuration mode:
!
flow record FLOW-RECORD-2
match routing is-multicast
match ipv4 destination address
collect counter packets replicated
collect routing multicast replication-factor
exit
!
flow monitor FLOW-MONITOR-2
record FLOW-RECORD-2
exit
!
interface Ethernet 0/0
no shut
ip address 10.1.1.2 255.255.255.0
ip flow monitor FLOW-MONITOR-2 multicast input
!
end
Where to Go Next
If you want to configure data export for Flexible NetFlow, refer to the "Configuring Data Export for Cisco
IOS Flexible NetFlow with Flow Exporters" 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.
Additional References
Related Documents
Related Topic
Document Title
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Overview of Flexible NetFlow
"Cisco IOS Flexible NetFlow Overview"
Emulating original NetFlow with Flexible NetFlow
"Getting Started with Configuring Cisco IOS
Flexible NetFlow"
Configuring flow exporters to export Flexible
NetFlow data
"Configuring Data Export for Cisco IOS Flexible
NetFlow with Flow Exporters"
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
137
Configuring IPv4 Multicast Statistics Support for Flexible NetFlow
Additional References
Related Topic
Document Title
Configuring flow sampling to reduce the overhead
of monitoring traffic with Flexible NetFlow
"Using Cisco IOS Flexible NetFlow Flow Sampling
to Reduce the CPU Overhead of Analyzing Traffic"
Configuring Flexible NetFlow using predefined
records
"Configuring Cisco IOS Flexible NetFlow with
Predefined Records"
Using Flexible NetFlow Top N Talkers to analyze
network traffic
"Using Cisco IOS Flexible NetFlow Top N Talkers
to Analyze Network Traffic"
Configuration commands for Flexible NetFlow
Cisco IOS Flexible NetFlow Command Reference
Standards
Standard
Title
None
--
MIBs
MIB
MIBs Link
None
To locate and download MIBs for selected
platforms, Cisco software releases, and feature sets,
use Cisco MIB Locator found at the following
URL:
http://www.cisco.com/go/mibs
RFCs
RFC
Title
RFC 3954
Cisco Systems NetFlow Services Export Version 9
Technical Assistance
Description
Link
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.
http://www.cisco.com/cisco/web/support/
index.html
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
138
Configuring IPv4 Multicast Statistics Support for Flexible NetFlow
Feature Information for IPv4 Multicast Statistics Support
Feature Information for IPv4 Multicast Statistics Support
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 29
Feature Name
Feature Information for Flexible NetFlow --IPv4 Multicast Statistics Support
Releases
Flexible NetFlow--IPv4 Multicast 12.2(33)SRE
Statistics Support
12.2(50)SY
12.4(22)T
15.0(1)SY
15.0(1)SY1
Feature Information
The Flexible NetFlow--IPv4
Multicast Statistics Support
feature adds the capability of
reporting the number of
replicated bytes and the number
of replicated packets in multicast
flows to Flexible NetFlow.
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: collect
counter, collect routing ismulticast, collect routing
multicast replication-factor,
match routing is-multicast,
match routing multicast
replication-factor, ip flow
monitor, ipv6 flow monitor.
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
139
Example Configuring IPv4 Multicast Statistics Support
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
140
Using Flexible NetFlow Top N Talkers to
Analyze Network Traffic
This document contains information about and instructions for using the Flexible NetFlow--Top N Talkers
Support feature. The Flexible NetFlow--Top N Talkers Support feature helps you analyze the large
amount of data that Flexible NetFlow captures from the traffic in your network by providing the ability to
filter, aggregate, and sort the data in the Flexible NetFlow cache as you display it. When you are sorting
and displaying the data in the cache, you can limit the display output to a specific number of entries with
the highest values (Top N Talkers) for traffic volume, packet counters, and so on. The Flexible NetFlow-Top N Talkers Support feature facilitates real-time traffic analysis by requiring only the use of show
commands, which can be entered in many different variations using the available keywords and arguments
to meet your traffic data analysis requirements.
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.
•
•
•
•
•
•
•
Finding Feature Information, page 141
Prerequisites for Flexible NetFlow Top N Talkers, page 142
Information About Flexible NetFlow Top N Talkers, page 142
How to Analyze Network Traffic Using Flexible NetFlow Top N Talkers, page 144
Configuration Examples for Flexible NetFlow Top N Talkers, page 149
Additional References, page 152
Feature Information for Flexible NetFlow Top N Talkers, page 153
Finding Feature Information
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
141
Flexible NetFlow Data Flow Filtering
Prerequisites for Flexible NetFlow Top N Talkers
Prerequisites for Flexible NetFlow Top N Talkers
•
•
You are familiar with the information in the " Cisco IOS Flexible NetFlow Overview " module.
The networking device is running a Cisco IOS release that supports the Flexible NetFlow--Top N
Talkers Support feature. See the Feature Information for Flexible NetFlow Top N Talkers, page 153
for a list of Cisco IOS software releases that support Flexible NetFlow.
No configuration tasks are associated with the Flexible NetFlow--Top N Talkers Support feature.
Therefore, in order for you to use the Flexible NetFlow--Top N Talkers Support feature, traffic analysis
with Flexible NetFlow must already be configured about the networking device.
Information About Flexible NetFlow Top N Talkers
•
•
•
•
•
•
Flexible NetFlow Data Flow Filtering, page 142
Flexible NetFlow Data Flow Aggregation, page 142
Flow Sorting and Top N Talkers, page 142
Documented Flexible NetFlow Top N Talkers Command Names and Actual Syntax, page 143
Combined Use of Flow Filtering and Flow Aggregation and Flow Sorting with Top N Talkers,
page 143
Memory and Performance Impact of Top N Talkers, page 144
Flexible NetFlow Data Flow Filtering
The flow filtering function of the Flexible NetFlow--Top N Talkers Support feature filters the flow data in
a flow monitor cache based on the criteria that you specify, and displays the data.
The flow filtering function of the Flexible NetFlow--Top N Talkers Support feature is provided by the
show flow monitor cache filter command. For more information on the show flow monitor cache filter
command, refer to the Cisco IOS Flexible NetFlow Command Reference.
Flexible NetFlow Data Flow Aggregation
Flow aggregation using the show flow monitor cache aggregate command allows you to dynamically
view the flow information in a cache using a different flow record than the cache was originally created
from. Only the fields in the cache will be available for the aggregated flows.
The flow aggregation function of the Flexible NetFlow--Top N Talkers Support feature is provided by the
show flow monitor cache aggregate command. For more information on the show flow monitor cache
aggregate command, refer to the Cisco IOS Flexible NetFlow Command Reference.
Flow Sorting and Top N Talkers
The flow sorting function of the Flexible NetFlow--Top N Talkers Support feature sorts flow data from the
Flexible NetFlow cache based on the criteria that you specify and displays the data. You can also use the
flow sorting function of the Flexible NetFlow--Top N Talkers Support feature to limit the display output to
a specific number of entries (top n talkers, where n is the number or talkers to display) by using the top
keyword.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
142
Documented Flexible NetFlow Top N Talkers Command Names and Actual Syntax
Information About Flexible NetFlow Top N Talkers
The flow sorting and Top N Talkers function of the Flexible NetFlow--Top N Talkers Support feature is
provided by the show flow monitor cache sort command. For more information on the show flow
monitor cache sort command, refer to the Cisco IOS Flexible NetFlow Command Reference.
Documented Flexible NetFlow Top N Talkers Command Names and Actual
Syntax
The three commands that make up the Flexible NetFlow--Top N Talkers Support feature are documented
using the Cisco documentation convention of using the initial words in the CLI syntax, omitting a
subsequent words in the CLI syntax, and using a word in the CLI syntax that follows the omitted words.
Therefore the syntax that you use for entering the commands is different from the actual documented
command name. The table below shows the documented commands names and the actual command CLI
syntax. The monitor-name argument is the name of a flow monitor that was previously configured.
Note
The arguments and keywords that you can use after filter, aggregation, and sort are not included in the
table below. For more information on the arguments and keywords that you can use after filter,
aggregation, and sort, refer to the Cisco IOS Flexible NetFlow Command Reference.
Table 30
Documented Command Names and Actual Command Syntax
Documented Command Name
Actual CLI Syntax for Using the Command
show flow monitor cache filter
show flow monitor monitor-name cache filter
show flow monitor cache aggregation
show flow monitor monitor-name cache
aggregation
show flow monitor cache sort
show flow monitor monitor-name cache sort
Combined Use of Flow Filtering and Flow Aggregation and Flow Sorting
with Top N Talkers
Although each of the show commands that make up the Flexible NetFlow--Top N Talkers Support feature
can be used individually for traffic analysis, they provide much greater analytical capabilities when they are
used together. When you use any combination of the three show commands, you enter only the common
prefix of show flow monitor monitor-name cachefollowed by filter, aggregation, sort, and the arguments
and keywords available for filter, aggregation, sort, as required. For example,
show flow monitor
monitor-name
cache filter
options
aggregation
options
sort
options
where options is any permissible combination of arguments and keywords. See the Configuration Examples
for Flexible NetFlow Top N Talkers, page 149 for more information.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
143
Memory and Performance Impact of Top N Talkers
How to Analyze Network Traffic Using Flexible NetFlow Top N Talkers
Memory and Performance Impact of Top N Talkers
The Flexible NetFlow--Top N Talkers Support feature can use a large number of CPU cycles and possibly
also system memory for a short time. However, because the Flexible NetFlow--Top N Talkers Support
feature uses only show commands, the CPU usage should be run at a low priority because no real-time data
processing is involved. The memory usage can be mitigated by using a larger granularity of aggregation, or
no aggregation at all.
How to Analyze Network Traffic Using Flexible NetFlow Top
N Talkers
•
•
•
•
Filtering Flow Data from the Flexible NetFlow Cache, page 144
Aggregating Flow Data from the Flexible NetFlow Cache, page 145
Sorting Flow Data from the Flexible NetFlow Cache, page 146
Displaying the Top N Talkers with Sorted Flow Data, page 148
Filtering Flow Data from the Flexible NetFlow Cache
This task shows you how to use the show flow monitor cache filter command with a regular expression to
filter the flow monitor cache data, and display the results. For more information on regular expressions and
the show flow monitor cache filter command, refer to the Cisco IOS Flexible NetFlow Command
Reference.
To filter the flow monitor cache data using a regular expression and display the results, perform the
following task.
SUMMARY STEPS
1. enable
2. show flow monitor [name] monitor-name cache filter options [regexp regexp] [...options [regexp
regexp]] [format {csv | record | table}]
DETAILED STEPS
Step 1
enable
Enters privileged EXEC mode.
Example:
Router> enable
Step 2
show flow monitor [name] monitor-name cache filter options [regexp regexp] [...options [regexp regexp]] [format
{csv | record | table}]
Filters the flow monitor cache data on the IPv4 type of service (ToS) value.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
144
Aggregating Flow Data from the Flexible NetFlow Cache
How to Analyze Network Traffic Using Flexible NetFlow Top N Talkers
Example:
Router# show flow monitor FLOW-MONITOR-3 cache filter ipv4 tos regexp 0x(C0|50)
Cache type:
Normal
Cache size:
4096
Current entries:
19
High Watermark:
38
Flows added:
3516
Flows aged:
3497
- Active timeout
( 1800 secs)
52
- Inactive timeout (
15 secs)
3445
- Event aged
0
- Watermark aged
0
- Emergency aged
0
IPV4 SOURCE ADDRESS:
10.1.1.1
IPV4 DESTINATION ADDRESS: 255.255.255.255
TRNS SOURCE PORT:
520
TRNS DESTINATION PORT:
520
INTERFACE INPUT:
Et0/0
FLOW SAMPLER ID:
0
IP TOS:
0xC0
IP PROTOCOL:
17
ip source as:
0
ip destination as:
0
ipv4 next hop address:
0.0.0.0
ipv4 source mask:
/24
ipv4 destination mask:
/0
tcp flags:
0x00
interface output:
Null
counter bytes:
52
counter packets:
1
timestamp first:
18:59:46.199
timestamp last:
18:59:46.199
Matched 1 flow
Aggregating Flow Data from the Flexible NetFlow Cache
This task shows you how to use the show flow monitor cache aggregate command to aggregate the flow
monitor cache data with a different record than the cache was created with, and display the results. For
more information on the show flow monitor cache aggregate command, refer to the Cisco IOS Flexible
NetFlow Command Reference.
To aggregate the flow monitor cache data and display the results, perform the following task.
SUMMARY STEPS
1. enable
2. show flow monitor [name] monitor-name cache aggregate {options [...options] [collect options
[...options]] | record record-name} [format {csv | record | table}]
DETAILED STEPS
Step 1
enable
Enters privileged EXEC mode.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
145
Sorting Flow Data from the Flexible NetFlow Cache
How to Analyze Network Traffic Using Flexible NetFlow Top N Talkers
Example:
Router> enable
Step 2
show flow monitor [name] monitor-name cache aggregate {options [...options] [collect options [...options]] | record
record-name} [format {csv | record | table}]
Aggregates the flow monitor cache data on the IPv4 destination address and displays the cache data for the IPv4
protocol type and input interface nonkey fields:
Example:
Router# show flow monitor
FLOW-MONITOR-3 cache aggregate ipv4 destination address collect ipv4 protocol interface input
Processed 17 flows
Aggregated to 7 flows
IPV4 DST ADDR
intf input
flows
bytes
pkts ip prot
=============== ==================== ========== ========== ========== =======
224.192.16.4
Et0/0
3
42200
2110
1
224.192.16.1
Et0/0
3
17160
858
1
224.192.18.1
Et0/0
4
18180
909
1
224.192.45.12
Et0/0
4
14440
722
1
255.255.255.255 Et0/0
1
52
1
17
224.0.0.13
Et0/0
1
54
1
103
224.0.0.1
Et0/0
1
28
1
2
Sorting Flow Data from the Flexible NetFlow Cache
This task shows you how to use the show flow monitor cache sort command to sort the flow monitor
cache data, and display the results. For more information on the show flow monitor cache sort command,
refer to the Cisco IOS Flexible NetFlow Command Reference.
To sort the flow monitor cache data and display the results, perform the following task.
SUMMARY STEPS
1. enable
2. show flow monitor [name] monitor-name cache sort options [top [number]][format {csv | record |
table}]
DETAILED STEPS
Step 1
enable
Enters privileged EXEC mode.
Example:
Router> enable
Step 2
show flow monitor [name] monitor-name cache sort options [top [number]][format {csv | record | table}]
Displays the cache data sorted on the number of packets from highest to lowest.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
146
Using Flexible NetFlow Top N Talkers to Analyze Network Traffic
How to Analyze Network Traffic Using Flexible NetFlow Top N Talkers
Note When the top keyword is not used, the default number of sorted flows shown is 20.
Example:
Router# show flow monitor FLOW-MONITOR-1 cache sort highest counter packets
Processed 26 flows
Aggregated to 26 flows
Showing the top 20 flows
IPV4 SOURCE ADDRESS:
10.1.1.3
IPV4 DESTINATION ADDRESS: 172.16.10.11
TRNS SOURCE PORT:
443
TRNS DESTINATION PORT:
443
INTERFACE INPUT:
Et0/0.1
FLOW SAMPLER ID:
0
IP TOS:
0x00
IP PROTOCOL:
6
ip source as:
0
ip destination as:
0
ipv4 next hop address:
172.16.7.2
ipv4 source mask:
/0
ipv4 destination mask:
/24
tcp flags:
0x00
interface output:
Et1/0.1
counter bytes:
22760
counter packets:
1569
timestamp first:
19:42:32.924
timestamp last:
19:57:28.656
IPV4 SOURCE ADDRESS:
10.10.11.2
IPV4 DESTINATION ADDRESS: 172.16.10.6
TRNS SOURCE PORT:
65
TRNS DESTINATION PORT:
65
INTERFACE INPUT:
Et0/0.1
FLOW SAMPLER ID:
0
IP TOS:
0x00
IP PROTOCOL:
6
ip source as:
0
ip destination as:
0
ipv4 next hop address:
172.16.7.2
ipv4 source mask:
/0
ipv4 destination mask:
/24
tcp flags:
0x00
interface output:
Et1/0.1
counter bytes:
22720
counter packets:
568
timestamp first:
19:42:34.264
timestamp last:
19:57:28.428
.
.
.
IPV4 SOURCE ADDRESS:
192.168.67.6
IPV4 DESTINATION ADDRESS: 172.16.10.200
TRNS SOURCE PORT:
0
TRNS DESTINATION PORT:
3073
INTERFACE INPUT:
Et0/0.1
FLOW SAMPLER ID:
0
IP TOS:
0x00
IP PROTOCOL:
1
ip source as:
0
ip destination as:
0
ipv4 next hop address:
172.16.7.2
ipv4 source mask:
/0
ipv4 destination mask:
/24
tcp flags:
0x00
interface output:
Et1/0.1
counter bytes:
15848
counter packets:
344
timestamp first:
19:42:36.852
timestamp last:
19:57:27.836
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
147
Displaying the Top N Talkers with Sorted Flow Data
How to Analyze Network Traffic Using Flexible NetFlow Top N Talkers
IPV4 SOURCE ADDRESS:
IPV4 DESTINATION ADDRESS:
TRNS SOURCE PORT:
TRNS DESTINATION PORT:
INTERFACE INPUT:
FLOW SAMPLER ID:
IP TOS:
IP PROTOCOL:
ip source as:
ip destination as:
ipv4 next hop address:
ipv4 source mask:
ipv4 destination mask:
tcp flags:
interface output:
counter bytes:
counter packets:
timestamp first:
timestamp last:
10.234.53.1
172.16.10.2
0
2048
Et0/0.1
0
0x00
1
0
0
172.16.7.2
/0
/24
0x00
Et1/0.1
15848
213
19:42:36.904
19:57:27.888
Displaying the Top N Talkers with Sorted Flow Data
This task shows you how to use the show flow monitor cache sort command to sort the flow monitor
cache data, and to limit the display results to a specific number of high volume flows. For more information
on the show flow monitor cache sort command, refer to the Cisco IOS Flexible NetFlow Command
Reference.
To sort the flow monitor cache data and limit the display output using to a specific number of high volume
flows, perform the following task.
SUMMARY STEPS
1. enable
2. show flow monitor [name] monitor-name cache sort options [top [number]][format {csv | record |
table}]
DETAILED STEPS
Step 1
enable
Enters privileged EXEC mode.
Example:
Router> enable
Step 2
show flow monitor [name] monitor-name cache sort options [top [number]][format {csv | record | table}]
Displays the cache data sorted on the number of packets from highest to lowest and limits the output to the three
highest volume flows:
Example:
Router# show flow monitor FLOW-MONITOR-1 cache sort highest counter packets top 3
Processed 25 flows
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
148
Using Flexible NetFlow Top N Talkers to Analyze Network Traffic
Configuration Examples for Flexible NetFlow Top N Talkers
Aggregated to 25 flows
Showing the top 3 flows
IPV4 SOURCE ADDRESS:
IPV4 DESTINATION ADDRESS:
TRNS SOURCE PORT:
TRNS DESTINATION PORT:
INTERFACE INPUT:
FLOW SAMPLER ID:
IP TOS:
IP PROTOCOL:
ip source as:
ip destination as:
ipv4 next hop address:
ipv4 source mask:
ipv4 destination mask:
tcp flags:
interface output:
counter bytes:
counter packets:
timestamp first:
timestamp last:
IPV4 SOURCE ADDRESS:
IPV4 DESTINATION ADDRESS:
TRNS SOURCE PORT:
TRNS DESTINATION PORT:
INTERFACE INPUT:
FLOW SAMPLER ID:
IP TOS:
IP PROTOCOL:
ip source as:
ip destination as:
ipv4 next hop address:
ipv4 source mask:
ipv4 destination mask:
tcp flags:
interface output:
counter bytes:
counter packets:
timestamp first:
timestamp last:
IPV4 SOURCE ADDRESS:
IPV4 DESTINATION ADDRESS:
TRNS SOURCE PORT:
TRNS DESTINATION PORT:
INTERFACE INPUT:
FLOW SAMPLER ID:
IP TOS:
IP PROTOCOL:
ip source as:
ip destination as:
ipv4 next hop address:
ipv4 source mask:
ipv4 destination mask:
tcp flags:
interface output:
counter bytes:
counter packets:
timestamp first:
timestamp last:
10.1.1.3
172.16.10.11
443
443
Et0/0.1
0
0x00
6
0
0
172.16.7.2
/0
/24
0x00
Et1/0.1
32360
1897
19:42:32.924
20:03:47.100
10.10.11.2
172.16.10.6
65
65
Et0/0.1
0
0x00
6
0
0
172.16.7.2
/0
/24
0x00
Et1/0.1
32360
809
19:42:34.264
20:03:48.460
172.16.1.84
172.16.10.19
80
80
Et0/0.1
0
0x00
6
0
0
172.16.7.2
/24
/24
0x00
Et1/0.1
32320
345
19:42:34.512
20:03:47.140
Configuration Examples for Flexible NetFlow Top N Talkers
•
Example Displaying the Top Talkers with Filtered and Aggregated and Sorted Flow Data, page 150
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
149
Example Displaying the Top Talkers with Filtered and Aggregated and Sorted Flow Data
Configuration Examples for Flexible NetFlow Top N Talkers
•
•
Example Filtering Using Multiple Filtering Criteria, page 151
Example Aggregation Using Multiple Aggregation Criteria, page 152
Example Displaying the Top Talkers with Filtered and Aggregated and
Sorted Flow Data
The following example combines filtering, aggregation, collecting additional field data, sorting the flow
monitor cache data, and limiting the display output to a specific number of high volume flows (top talkers).
Router# show flow monitor FLOW-MONITOR-1 cache filter ipv4 protocol regexp (1|6)
aggregate ipv4 destination address collect ipv4 protocol sort counter bytes top 4
Processed 26 flows
Matched 26 flows
Aggregated to 13 flows
Showing the top 4 flows
IPV4 DST ADDR
flows
bytes
pkts
=============== ========== ========== ==========
172.16.10.2
12
1358370
6708
172.16.10.19
2
44640
1116
172.16.10.20
2
44640
1116
172.16.10.4
1
22360
559
The following example combines filtering using a regular expression, aggregation using a predefined
record, sorting the flow monitor cache data, limiting the display output to a specific number of high volume
flows (top talkers), and displaying the output in record format.
Router# show flow monitor FLOW-MONITOR-1 cache filter ipv4 source address regexp 10.*
aggregate record netflow ipv4 protocol-port sort transport destination-port top 5 format
record
Processed 26 flows
Matched 15 flows
Aggregated to 10 flows
Showing the top 5 flows
TRNS SOURCE PORT:
0
TRNS DESTINATION PORT: 0
FLOW DIRECTION:
Input
IP PROTOCOL:
1
counter flows:
1
counter bytes:
387800
counter packets:
700
timestamp first:
17:12:30.712
timestamp last:
17:30:52.936
TRNS SOURCE PORT:
20
TRNS DESTINATION PORT: 20
FLOW DIRECTION:
Input
IP PROTOCOL:
6
counter flows:
2
counter bytes:
56000
counter packets:
1400
timestamp first:
17:12:29.532
timestamp last:
17:30:53.148
TRNS SOURCE PORT:
21
TRNS DESTINATION PORT: 21
FLOW DIRECTION:
Input
IP PROTOCOL:
6
counter flows:
2
counter bytes:
56000
counter packets:
1400
timestamp first:
17:12:29.572
timestamp last:
17:30:53.196
TRNS SOURCE PORT:
22
TRNS DESTINATION PORT: 22
FLOW DIRECTION:
Input
IP PROTOCOL:
6
counter flows:
1
counter bytes:
28000
counter packets:
700
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
150
Example Filtering Using Multiple Filtering Criteria
Configuration Examples for Flexible NetFlow Top N Talkers
timestamp first:
timestamp last:
TRNS SOURCE PORT:
TRNS DESTINATION PORT:
FLOW DIRECTION:
IP PROTOCOL:
counter flows:
counter bytes:
counter packets:
timestamp first:
timestamp last:
17:12:29.912
17:30:52.168
25
25
Input
6
2
56000
1400
17:12:29.692
17:30:51.968
Example Filtering Using Multiple Filtering Criteria
The following example filters the cache data on the IPv4 destination address and the destination port:
Router# show flow monitor FLOW-MONITOR-1 cache filter ipv4 destination address regexp
172.16.10* transport destination-port 21
Cache type:
Normal
Cache size:
4096
Current entries:
26
High Watermark:
26
Flows added:
241
Flows aged:
215
- Active timeout
( 1800 secs)
50
- Inactive timeout (
15 secs)
165
- Event aged
0
- Watermark aged
0
- Emergency aged
0
IPV4 SOURCE ADDRESS:
10.10.10.2
IPV4 DESTINATION ADDRESS: 172.16.10.2
TRNS SOURCE PORT:
21
TRNS DESTINATION PORT:
21
INTERFACE INPUT:
Et0/0.1
FLOW SAMPLER ID:
0
IP TOS:
0x00
IP PROTOCOL:
6
ip source as:
0
ip destination as:
0
ipv4 next hop address:
172.16.7.2
ipv4 source mask:
/0
ipv4 destination mask:
/24
tcp flags:
0x00
interface output:
Et1/0.1
counter bytes:
17200
counter packets:
430
timestamp first:
17:03:58.071
timestamp last:
17:15:14.615
IPV4 SOURCE ADDRESS:
172.30.231.193
IPV4 DESTINATION ADDRESS: 172.16.10.2
TRNS SOURCE PORT:
21
TRNS DESTINATION PORT:
21
INTERFACE INPUT:
Et0/0.1
FLOW SAMPLER ID:
0
IP TOS:
0x00
IP PROTOCOL:
6
ip source as:
0
ip destination as:
0
ipv4 next hop address:
172.16.7.2
ipv4 source mask:
/0
ipv4 destination mask:
/24
tcp flags:
0x00
interface output:
Et1/0.1
counter bytes:
17160
counter packets:
429
timestamp first:
17:03:59.963
timestamp last:
17:15:14.887
Matched 2 flows
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
151
Example Aggregation Using Multiple Aggregation Criteria
Additional References
Example Aggregation Using Multiple Aggregation Criteria
The following example aggregates the flow monitor cache data on the destination and source IPv4
addresses:
Router# show flow monitor FLOW-MONITOR-1 cache aggregate ipv4 destination address ipv4
source address
Processed 26 flows
Aggregated to 17 flows
IPV4 SRC ADDR
IPV4 DST ADDR
=============== ===============
10.251.10.1
172.16.10.2
192.168.67.6
172.16.10.200
10.234.53.1
172.16.10.2
172.30.231.193
172.16.10.2
10.10.10.2
172.16.10.2
192.168.87.200
172.16.10.2
10.10.10.4
172.16.10.4
10.10.11.1
172.16.10.5
10.10.11.2
172.16.10.6
10.10.11.3
172.16.10.7
10.10.11.4
172.16.10.8
10.1.1.1
172.16.10.9
10.1.1.2
172.16.10.10
10.1.1.3
172.16.10.11
172.16.1.84
172.16.10.19
172.16.1.85
172.16.10.20
172.16.6.1
224.0.0.9
flows
==========
2
1
3
3
2
2
1
1
1
1
1
1
1
1
2
2
1
bytes
==========
1400828
19096
73656
73616
54560
54560
27280
27280
27280
27280
27280
27280
27280
27280
54520
54520
52
pkts
==========
1364
682
2046
2045
1364
1364
682
682
682
682
682
682
682
682
1363
1363
1
Additional References
Related Documents
Related Topic
Document Title
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Flexible NetFlow conceptual and configuration
information
Flexible NetFlow Configuration Guide
Configuration commands for Flexible NetFlow
Cisco IOS Flexible NetFlow Command Reference
Standards/RFCs
Standard
Title
No new or modified standards/RFCs are supported
by this feature.
--
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
152
Using Flexible NetFlow Top N Talkers to Analyze Network Traffic
Feature Information for Flexible NetFlow Top N Talkers
MIBs
MIB
MIBs Link
None
To locate and download MIBs for selected
platforms, Cisco software releases, and feature sets,
use Cisco MIB Locator found at the following
URL:
http://www.cisco.com/go/mibs
Technical Assistance
Description
Link
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.
http://www.cisco.com/cisco/web/support/
index.html
Feature Information for Flexible NetFlow Top N Talkers
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
153
Using Flexible NetFlow Top N Talkers to Analyze Network Traffic
Table 31
Feature Name
Feature Information for Flexible NetFlow
Releases
Flexible NetFlow--Top N Talkers 12.2(33)SRE
Support
12.2(50)SY
12.4(22)T
15.0(1)SY
15.0(1)SY1
Feature Information
Helps you analyze the large
amount of data Flexible NetFlow
captures from the traffic in your
network by providing the ability
to filter, aggregate, and sort the
data in the Flexible NetFlow
cache as you display it.
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: show
flow monitor cache aggregate,
show flow monitor cache filter,
show flow monitor cache sort.
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
154
Support for ISSU and SSO
Cisco IOS XE Release 3.3 introduces High Availability (HA) support for Flexible Netflow by providing
support for both ISSU and SSO.
These features are enabled by default when the redundancy mode of operation is set to Stateful
Switchover (SSO).
•
•
•
•
•
•
•
•
•
Finding Feature Information, page 155
Prerequisites for Flexible Netflow High Availability, page 155
Information About Flexible Netflow High Availability, page 156
How to Configure Flexible Netflow High Availability, page 156
How to Verify Flexible Netflow High Availability, page 156
Configuration Examples for Flexible Netflow High Availability, page 158
Additional References, page 160
Feature Information for Flexible Netflow High Availability Features, page 162
Glossary, page 163
Finding Feature Information
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 Flexible Netflow High Availability
•
•
•
The Cisco IOS XE In-Service Software Upgrade (ISSU) process must be configured and working
properly. See the "Cisco IOS XE In-Service Software Upgrade Process" feature module for more
information.
Stateful Switchover (SSO) must be configured and working properly. See the "Stateful Switchover"
feature module for more information.
Nonstop Forwarding (NSF) must be configured and working properly. See the "Cisco Nonstop
Forwarding" feature module for more information.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
155
ISSU
Information About Flexible Netflow High Availability
Information About Flexible Netflow High Availability
•
•
ISSU, page 156
SSO, page 156
ISSU
The ISSU process allows Cisco IOS XE software to be updated or otherwise modified while packet
forwarding continues. In most networks, planned software upgrades are a significant cause of downtime.
ISSU allows Cisco IOS XE software to be modified while packet forwarding continues, which increases
network availability and reduces downtime caused by planned software upgrades.
SSO
SSO refers to the implementation of Cisco IOS XE software that allows applications and features to
maintain a defined state between an active and standby Route Processor (RP).
In specific Cisco networking devices that support dual RPs, SSO takes advantage of RP redundancy to
increase network availability. The SSO feature takes advantage of RP redundancy by establishing one of
the RPs as the active RP while the other RP is designated as the standby RP, and then synchronizing critical
state information between them. Following an initial synchronization between the two processors, SSO
dynamically maintains RP state information between them.
A switchover from the active to the standby processor occurs when the active RP fails, is removed from the
networking device, or is manually taken down for maintenance.
How to Configure Flexible Netflow High Availability
There are no configuration tasks specific to Flexible Netflow. All generalized configuration tasks for ISSU
and SSO are described in the chapters referenced in the Prerequisites for Flexible Netflow High
Availability, page 155.
The Flexible Netflow high availability features are enabled by default when the redundancy mode of
operation is set to SSO.
How to Verify Flexible Netflow High Availability
SUMMARY STEPS
1. enable
2. show redundancy [clients | counters | history | switchover history | states
3. show redundancy states
4. show sampler broker [detail] | [picture]
5. show flow exporter broker [detail] | [picture]
6. show flow record broker [detail] | [picture]
7. show flow monitor broker [detail] | [picture]
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
156
Support for ISSU and SSO
How to Verify Flexible Netflow High Availability
DETAILED STEPS
Command or Action
Purpose
Step 1 enable
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Router> enable
Step 2 show redundancy [clients | counters | history | switchover
history | states
Displays SSO configuration information.
Example:
Router# show redundancy
Step 3 show redundancy states
Verifies that the device is running in SSO mode.
Example:
Router# show redundancy states
Step 4 show sampler broker [detail] | [picture]
Displays information about the state of the exporter
broker for the Flexible Netflow sampler.
Example:
Router# show sampler broker detail
Step 5 show flow exporter broker [detail] | [picture]
Displays information about the state of the broker for the
Flexible Netflow flow exporter.
Example:
Router# show flow exporter broker detail
Step 6 show flow record broker [detail] | [picture]
Displays information about the state of the broker for the
Flexible Netflow flow record.
Example:
Router# show flow record broker detail
Step 7 show flow monitor broker [detail] | [picture]
Displays information about the state of the broker for the
Flexible Netflow flow monitor.
Example:
Router# show flow monitor broker detail
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
157
Example Displaying Detailed Status for the Sampler Broker
Configuration Examples for Flexible Netflow High Availability
Configuration Examples for Flexible Netflow High
Availability
There are no configuration examples for Flexible Netflow high availability features.
All examples are for displaying the status of Flexible Netflow high availability.
•
•
•
•
Example Displaying Detailed Status for the Sampler Broker, page 158
Example Displaying a Status Summary for the Flow Record Broker, page 158
Example Verifying Whether SSO is Configured, page 159
Example Displaying which SSO Protocols and Applications are Registered, page 159
Example Displaying Detailed Status for the Sampler Broker
The following example shows the status output for the Flexible Netflow flow record broker. This output is
very similar to the output for the other Flexible Netflow brokers: the sampler broker, the flow exporter
broker, and the flow monitor broker.
Router# show flow record broker detail
Brokering for Linecard 7 (0x80)
Multicast groups :0x7F801C95D000
Linecard 7 (0x80) enabled for download
Consume report for Linecard 7 (0x80) (pos 1)
24/0 completed/pending updates (all VRFs)
Update list ranges from pos 1 to pos 0 :1
- 24 updates
0
- 0 updates
Broker records :*
- Start of list
1
- Flush
1
- Mod - Create netflow-v5
1
- Mod - Create options interface-table
1
- Mod - Create options exporter-statistics
1
- Mod - Create options vrf-id-name-table
1
- Mod - Create options sampler-table
1
- Mod - Create options applications-name
1
- Mod - Create netflow-original
1
- Mod - Create netflow ipv4 original-input
Example Displaying a Status Summary for the Flow Record Broker
The following example shows a status summary output for the Flexible Netflow flow record broker. This
output is very similar to the output for the other Flexible Netflow brokers: the sampler broker, the flow
exporter broker, and the flow monitor broker.
Router# show flow record broker picture
Key:
‘[‘=start record, ‘]’=end record, ‘F’=flush record, ‘D’=display record
‘+<n>’=sequenve of <n> Modify update records
‘-<n>’=sequenve of <n> Delete update records
‘C<<lc>:<vrf>>’=consume record for linecard(s) <lc> and VRF(s) <vrf> <*=all>
Borokers:
[FC<7 <0x80>:*>]
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
158
Example Verifying Whether SSO is Configured
Configuration Examples for Flexible Netflow High Availability
Example Verifying Whether SSO is Configured
The following sample output shows that SSO is configured on the Cisco ASR 1000 Series Router:
Router# show redundancy states
my state = 13 -ACTIVE
peer state = 8 -STANDBY HOT
Mode = Duplex
Unit ID = 49
Redundancy Mode (Operational) = sso
Redundancy Mode (Configured) = sso
Redundancy State
= sso
Maintenance Mode = Disabled
Manual Swact = enabled
Communications = Up
client count = 67
client_notification_TMR = 30000 milliseconds
RF debug mask = 0x0
Example Displaying which SSO Protocols and Applications are Registered
The following sample output shows a list of applications and protocols that have registered as SSO
protocols or applications on the Cisco ASR 1000 Series Router:
Router# show redundancy clients
clientID = 0
clientSeq =
clientID = 29
clientSeq =
clientID = 139
clientSeq =
clientID = 25
clientSeq =
clientID = 1340
clientSeq =
clientID = 1501
clientSeq =
clientID = 78
clientSeq =
clientID = 305
clientSeq =
clientID = 304
clientSeq =
clientID = 22
clientSeq =
clientID = 88
clientSeq =
clientID = 114
clientSeq =
clientID = 1341
clientSeq =
clientID = 1505
clientSeq =
clientID = 1344
clientSeq =
clientID = 227
clientSeq =
clientID = 71
clientSeq =
clientID = 24
clientSeq =
clientID = 146
clientSeq =
clientID = 306
clientSeq =
clientID = 1504
clientSeq =
clientID = 75
clientSeq =
clientID = 401
clientSeq =
clientID = 402
clientSeq =
clientID = 5
clientSeq =
clientID = 68
clientSeq =
clientID = 23
clientSeq =
clientID = 49
clientSeq =
clientID = 72
clientSeq =
clientID = 113
clientSeq =
clientID = 20
clientSeq =
clientID = 100
clientSeq =
clientID = 101
clientSeq =
clientID = 74
clientSeq =
clientID = 34
clientSeq =
clientID = 52
clientSeq =
clientID = 69
clientSeq =
clientID = 118
clientSeq =
clientID = 82
clientSeq =
clientID = 35
clientSeq =
clientID = 90
clientSeq =
clientID = 70
clientSeq =
0
60
62
69
90
91
95
96
97
98
99
100
102
103
110
111
112
113
114
120
128
130
131
132
135
149
152
153
154
155
171
173
174
183
185
186
189
190
191
192
204
215
RF_INTERNAL_MSG
Redundancy Mode RF
IfIndex
CHKPT RF
ASR1000-RP Platform
Cat6k CWAN HA
TSPTUN HA
Multicast ISSU Conso
IP multicast RF Clie
Network RF Client
HSRP
GLBP
ASR1000 DPIDX
Cat6k SPA TSM
ASR1000-RP SBC RF
SBC RF
XDR RRP RF Client
CEF RRP RF Client
BFD RF Client
MFIB RRP RF Client
Cat6k CWAN Interface
Tableid HA
NAT HA
TPM RF client
Config Sync RF clien
Virtual Template RF
Frame Relay
HDLC
LSD HA Proc
MFI STATIC HA Proc
IPROUTING NSF RF cli
DHCPC
DHCPD
MPLS VPN HA Client
SNMP RF Client
ATM
AAA
L2TP
CCM RF
History RF Client
RSVP HA Services
FH COMMON RF CLIENT
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
159
Support for ISSU and SSO
Additional References
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
clientID
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
54
73
76
57
50
1342
1343
83
84
85
102
94
135
136
130
148
4000
4005
93
205
141
4006
225
65000
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
clientSeq
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
220
221
222
223
230
240
241
255
257
258
273
280
289
290
291
296
303
305
309
311
319
322
326
336
SNMP HA RF Client
LDP HA
IPRM
ARP
FH_RF_Event_Detector
ASR1000 SpaFlow
ASR1000 IF Flow
AC RF Client
AToM manager
SSM
MQC QoS
Config Verify RF cli
IKE RF Client
IPSEC RF Client
CRYPTO RSA
DHCPv6 Relay
RF_TS_CLIENT
ISSU Test Client
Network RF 2 Client
FEC Client
DATA DESCRIPTOR RF C
Network Clock
VRRP
RF_LAST_CLIENT
Additional References
Related Documents
Related Topic
Document Title
In-Service Software Upgrade process conceptual
and configuration information
Cisco IOS XE In Service Software Upgrade
Process module
Nonstop Forwarding conceptual and configuration
information
Cisco Nonstop Forwarding module
Stateful switchover conceptual and configuration
information
Stateful Switchover module
White paper on preforming In-Service Software
Upgrades.
High-Availability Overview, Cisco IOS Software:
Guide to Performing In-Service Software Upgrades
Answer to questions about the In-Service Software
Upgrade product and process.
Cisco IOS In-Service Software Upgrade, Questions
and Answers
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Cisco IOS High Availability commands
Cisco IOS High Availability Command Reference
Cisco IOS debug commands
Cisco IOS Debug Command Reference
SSO - BFD
" Bidirectional Forwarding Detection " chapter in
the Cisco IOS XE IP Routing Protocols
SSO HSRP
"Configuring HSRP" chapter in the Cisco IOS XE
IP Application Services Configuration Guide
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
160
Support for ISSU and SSO
Additional References
Related Topic
Document Title
SSO - MPLS VPN 6VPE and 6PE SSO support
NSF/SSO and ISSU - MPLS VPN 6VPE and 6PE
SSO and RPR on the Cisco ASR 1000 Series
Routers
Cisco ASR 1000 Series Aggregation Services
Routers Software Configuration Guide
SSO VRRP
"Configuring VRRP" chapter in the Cisco IOS IP
XE Application Services Configuration Guide
SNMP configuration tasks
"Configuring SNMP Support" module of Cisco IOS
XE Network Management Configuration Guide
SNMP commands
Cisco IOS Network Management Command
Reference
Standards
Standard
Title
No new or modified standards are supported by this -feature.
MIBs
MIB
MIBs Link
None
To locate and download MIBs for selected
platforms, Cisco IOS releases, and feature sets, use
Cisco MIB Locator found at the following URL:
http://www.cisco.com/go/mibs
RFCs
RFC
Title
No new or modified RFCs are supported by this
feature.
--
RFC 1907
Management Information Base for Version 2 of the
Simple Network Management Protocol
RFC 2571
An Architecture for Describing SNMP
Management Frameworks
RFC 2573
SNMP Applications
RFC 2574
User-Based Security Model (USM) for Version 3 of
the Simple Network Management Protocol
(SNMPv3)
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
161
Support for ISSU and SSO
Feature Information for Flexible Netflow High Availability Features
RFC
Title
RFC 2575
View-based Access Control Model (VACM) for the
Simple Network Management Protocol (SNMP)
RFC 2863
The Interfaces Group MIB
RFC 4133
Entity MIB (Version 3)
Technical Assistance
Description
Link
The Cisco Support website provides extensive
http://www.cisco.com/techsupport
online resources, including documentation and tools
for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about
your products, you can subscribe to various
services, such as the Product Alert Tool (accessed
from Field Notices), the Cisco Technical Services
Newsletter, and Really Simple Syndication (RSS)
Feeds.
Access to most tools on the Cisco Support website
requires a Cisco.com user ID and password.
Feature Information for Flexible Netflow High Availability
Features
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 32
Feature Information for Flexible Netflow High Availability Features
Feature Name
Releases
Feature Information
Flexible NetFlow: ISSU / SSO
Support
Cisco IOS XE Release 3.3S
Flexible Netflow has been
enhanced to support ISSU and
SSO.
15.0(1)SY
15.0(1)SY1
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
162
Support for ISSU and SSO
Glossary
Glossary
CPE --customer premises equipment. Terminating equipment, such as terminals, telephones, and modems,
supplied by the service provider, installed at customer sites, and connected to the network.
ISSU --In Service Software Upgrade. ISSU is a process that allows Cisco IOS software to be updated or
otherwise modified while packet forwarding continues.
RP --Route Processor. A generic term for the centralized control unit in a chassis.
SSO --Stateful Switchover. SSO refers to the implementation of Cisco IOS software that allows
applications and features to maintain a defined state between an active and standby RP. When a switching
occurs, forwarding and sessions are maintained. SSO makes an RP failure undetectable to the network.
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
163
Example Displaying which SSO Protocols and Applications are Registered
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
164
Configuring Accounting for IPv6 Layer 2
Bridged Traffic
This document contains information about and instructions for configuring sampling to reduce the CPU
overhead of analyzing traffic with Flexible NetFlow.
NetFlow is a Cisco technology that provides statistics on packets flowing through a 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 faciltates the creation of more complex
configurations for traffic analysis and data export through the use of reusable configuration components.
•
•
•
•
•
•
•
•
Finding Feature Information, page 165
Prerequisites for Monitoring IPv6 Bridged Flows, page 165
Information About Monitoring IPv6 Layer 2 Bridged Traffic, page 166
How to Configure the Monitoring of IPv6 Layer 2 Bridged Traffic, page 166
Configuration Examples for Monitoring IPv6 Layer 2 Bridged Traffic, page 175
Where to Go Next, page 178
Additional References, page 178
Feature Information for Configuring Accounting for IPv6 Layer 2 Bridged Traffic, page 179
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest feature
information and caveats, see the release notes for your platform and software release.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support.
To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn . An account on Cisco.com is not
required.
Prerequisites for Monitoring IPv6 Bridged Flows
•
•
•
You are familiar with the information in the " Cisco IOS Flexible NetFlow Overview " module.
The networking device must be running a Cisco IOS release that supports Flexible NetFlow.
The networking device must be configured for IPv6 routing.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
165
Configuring a Flow Record, Flow Monitor, and Exporter to Monitor IPv6 Layer 2 Bridged Traffic
Information About Monitoring IPv6 Layer 2 Bridged Traffic
•
•
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
IPv6.
You have configured a flow record, flow monitor, flow exporter, and flow sampler as described in the
"Getting Started with Configuring Flexible NetFlow," "Configuring Flexible NetFlow with Predefined
Records," " Customizing Flexible NetFlow Flow Records and Flow Monitors," "Configuring Data
Export for Flexible NetFlow with Flow Exporters," and "Using Flexible NetFlow Flow Sampling"
modules.
Information About Monitoring IPv6 Layer 2 Bridged Traffic
This feature expands the ipv6 flow monitor command to include a layer2-bridged keyword that enables
you to configure Flexible Netflow to monitor IPv6 Layer 2 bridged traffic on both Switched Virtual
Interfaces (SVIs) and VLANs, with or without flow samplers.
How to Configure the Monitoring of IPv6 Layer 2 Bridged
Traffic
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 a Flow Record, Flow Monitor, and Exporter to Monitor IPv6 Layer 2 Bridged Traffic,
page 166
Applying a Flow Monitor to a Switched Virtual Interface to Monitor IPv6 Layer 2 Bridged Traffic,
page 173
Applying a Flow Monitor to a VLAN to Monitor IPv6 Layer 2 Bridged Traffic, page 174
Configuring a Flow Record, Flow Monitor, and Exporter to Monitor IPv6
Layer 2 Bridged Traffic
To configure a flow record, flow monitor, and exporter to monitor IPv6 Layer 2 bridged traffic, perform
this task.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
166
Configuring Accounting for IPv6 Layer 2 Bridged Traffic
How to Configure the Monitoring of IPv6 Layer 2 Bridged Traffic
SUMMARY STEPS
1. enable
2. configure terminal
3. flow record name
4. match datalink source-vlan-id
5. match flow cts destination group
6. match flow cts source group
7. match flow direction
8. match interface input
9. match interface input physical
10. match interface output
11. match ipv4 destination address
12. match ipv4 dscp
13. match ipv4 precedence
14. match ipv4 protocol
15. match ipv4 source address
16. match ipv4 tos
17. match transport destination-port
18. match transport source-port
19. collect counter bytes
20. collect counter packets
21. collect interface output
22. collect interface input
23. collect ipv4 destination mask
24. collect ipv4 destination prefix
25. collect ipv4 source mask
26. collect ipv4 source prefix
27. collect timestamp sys-uptime first
28. collect timestamp sys-uptime last
29. collect transport tcp flags
30. exit
31. flow exporter exporter-name
32. export-protocol netflow-v9
33. destination ip-address
34. exit
35. flow monitor name
36. record record-name
37. exporter exporter-name
38. end
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
167
Configuring Accounting for IPv6 Layer 2 Bridged Traffic
How to Configure the Monitoring of IPv6 Layer 2 Bridged Traffic
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Device> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Device# configure terminal
Step 3 flow record name
Configures a flow record to monitor IPv6 bridged
Layer 2 traffic and enters Flexible NetFlow flow
record configuration mode.
Example:
Device(config)# flow record ipv6-bridged-traffic
Step 4 match datalink source-vlan-id
Configures the source VLAN ID as a key field.
Example:
Device(config-flow-record)# match datalink source-vlan-id
Step 5 match flow cts destination group
Configures the flow CTS destination group as a
key field.
Example:
Device(config-flow-record)# match flow cts destination
group
Step 6 match flow cts source group
Configures the flow CTS source group as a key
field.
Example:
Device(config-flow-record)# match flow cts source group
Step 7 match flow direction
Example:
Device(config-flow-record)# match flow direction
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
168
Configures the flow direction as a key field.
Configuring Accounting for IPv6 Layer 2 Bridged Traffic
How to Configure the Monitoring of IPv6 Layer 2 Bridged Traffic
Command or Action
Purpose
Step 8 match interface input
Configures the input interface as a key field.
Example:
Device(config-flow-record)# match interface input
Step 9 match interface input physical
Configures the physical input interface as a key
field.
Example:
Device(config-flow-record)# match interface input
physical
Step 10 match interface output
Configures the output interface as a key field.
Example:
Device(config-flow-record)# match interface input
Step 11 match ipv4 destination address
Configures the IPv4 destination address as a key
field.
Example:
Device(config-flow-record)# match ipv4 destination
address
Step 12 match ipv4 dscp
Configures the IPv4 DSCP as a key field.
Example:
Device(config-flow-record)# match ipv4 dscp
Step 13 match ipv4 precedence
Configures the IPv4 precedence as a key field.
Example:
Device(config-flow-record)# match ipv4 precedence
Step 14 match ipv4 protocol
Configures the IPv4 protocol as a key field.
Example:
Device(config-flow-record)# match ipv4 protocol
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
169
Configuring Accounting for IPv6 Layer 2 Bridged Traffic
How to Configure the Monitoring of IPv6 Layer 2 Bridged Traffic
Command or Action
Step 15 match ipv4 source address
Purpose
Configures the IPv4 source address as a key field.
Example:
Device(config-flow-record)# match ipv4 source address
Step 16 match ipv4 tos
Configures the IPv4 TOS as a key field.
Example:
Device(config-flow-record)# match ipv4 tos
Step 17 match transport destination-port
Configures the transport destination port as a key
field.
Example:
Device(config-flow-record)# match transport destinationport
Step 18 match transport source-port
Configures the transport source port as a key field.
Example:
Device(config-flow-record)# match transport source-port
Step 19 collect counter bytes
Collects the total number of bytes.
Example:
Device(config-flow-record)# collect counter bytes
Step 20 collect counter packets
Collects the total number of packets.
Example:
Device(config-flow-record)# collect counter packets
Step 21 collect interface output
Example:
Device(config-flow-record)# collect interface output
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
170
Collects the output interface.
Configuring Accounting for IPv6 Layer 2 Bridged Traffic
How to Configure the Monitoring of IPv6 Layer 2 Bridged Traffic
Command or Action
Purpose
Step 22 collect interface input
Collects the input interface.
Example:
Device(config-flow-record)# collect interface input
Step 23 collect ipv4 destination mask
Collects the Ipv4 destination mask.
Example:
Device(config-flow-record)# collect ipv4 destination mask
Step 24 collect ipv4 destination prefix
Collects the Ipv4 destination prefix.
Example:
Device(config-flow-record)# collect ipv4 destination
prefix
Step 25 collect ipv4 source mask
Collects the Ipv4 source mask.
Example:
Device(config-flow-record)# collect ipv4 source mask
Step 26 collect ipv4 source prefix
Collects the Ipv4 source prefix.
Example:
Device(config-flow-record)# collect ipv4 source prefix
Step 27 collect timestamp sys-uptime first
Collects the first timestamp of the system uptime.
Example:
Device(config-flow-record)# collect timestamp sys-uptime
first
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
171
Configuring Accounting for IPv6 Layer 2 Bridged Traffic
How to Configure the Monitoring of IPv6 Layer 2 Bridged Traffic
Command or Action
Step 28 collect timestamp sys-uptime last
Purpose
Collects the last timestamp of the system uptime.
Example:
Device(config-flow-record)# collect timestamp sys-uptime
last
Step 29 collect transport tcp flags
Collects the TCP transport flags.
Example:
Device(config-flow-record)# collect transport tcp flags
Step 30 exit
Exits Flexible NetFlow flow record configuration
mode.
Example:
Device(config-flow-record)# exit
Step 31 flow exporter exporter-name
Creates an FNF flow exporter and enters Flexible
NetFlow flow exporter configuration mode.
Example:
Device(config)# flow exporter my-flow-exporter
Step 32 export-protocol netflow-v9
Configures NetFlow Version 9 export as the export
protocol.
Example:
Device(config-flow-exporter)# export-protocol netflow-v9
Step 33 destination ip-address
Configures the IP address of the workstation to
which you want to send the NetFlow information.
Example:
Device(config-flow-exporter)# destination 209.165.201.1
Step 34 exit
Example:
Device(config-flow-exporter)# exit
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
172
Exits Flexible NetFlow flow exporter configuration
mode.
Applying a Flow Monitor to a Switched Virtual Interface to Monitor IPv6 Layer 2 Bridged Traffic
How to Configure the Monitoring of IPv6 Layer 2 Bridged Traffic
Command or Action
Purpose
Step 35 flow monitor name
Configures a flow monitor for IPv6 bridged traffic
and enters Flexible NetFlow flow monitor
configuration mode.
Example:
Device(config)# flow monitor ipv6-bridged-traffic
Step 36 record record-name
Specifies the name of a user-defined flow record
that was previously configured.
Example:
Device(config-flow-monitor)# record ipv6-bridged-traffic
Step 37 exporter exporter-name
Specifies the name of a flow exporter that was
previously configured.
Example:
Device(config-flow-monitor)# exporter my-flow-exporter
Step 38 end
Exits Flexible NetFlow flow monitor configuration
mode and returns to privileged EXEC mode.
Example:
Device(config-flow-monitor)# end
Applying a Flow Monitor to a Switched Virtual Interface to Monitor IPv6
Layer 2 Bridged Traffic
To configure Flexible Netlflow to monitor IPv6 Layer 2 Bridged Traffic on a SVI, perform this task:
SUMMARY STEPS
1. enable
2. configure terminal
3. interface vlan number
4. ipv6 flow monitor monitor-name [sampler monitor-name ] layer2-bridged input
5. end
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
173
Applying a Flow Monitor to a VLAN to Monitor IPv6 Layer 2 Bridged Traffic
How to Configure the Monitoring of IPv6 Layer 2 Bridged Traffic
DETAILED STEPS
Command or Action
Step 1 enable
Purpose
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Device> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Device# configure terminal
Step 3 interface vlan number
Configures an interface type and enters interface
configuration mode.
Example:
Device(config)# interface vlan 100
Step 4 ipv6 flow monitor monitor-name [sampler monitor-name ] layer2bridged input
Applies the monitor to the interface.
Example:
Device(config-if)# ipv6 flow monitor ipv6-bridged-traffic
sampler S1 layer2-bridged input
Step 5 end
Exits interface configuration mode and returns to
privileged EXEC mode.
Example:
Device(config-if)# end
Applying a Flow Monitor to a VLAN to Monitor IPv6 Layer 2 Bridged Traffic
To configure Flexible Netlflow to monitor IPv6 Layer 2 Bridged Traffic on a VLAN, perform this task:
SUMMARY STEPS
1. enable
2. configure terminal
3. interface vlan number
4. ipv6 flow monitor monitor-name [sampler monitor-name ] layer2-bridged input
5. end
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
174
Configuring Accounting for IPv6 Layer 2 Bridged Traffic
Configuration Examples for Monitoring IPv6 Layer 2 Bridged Traffic
DETAILED STEPS
Command or Action
Purpose
Step 1 enable
Enables privileged EXEC mode.
•
Enter your password if prompted.
Example:
Device> enable
Step 2 configure terminal
Enters global configuration mode.
Example:
Device# configure terminal
Step 3 interface vlan number
Configures a VLAN and enters VLAN
configuration mode.
Example:
Device(config)# vlan configuration 100
Step 4 ipv6 flow monitor monitor-name [sampler monitor-name ] layer2bridged input
Applies the monitor to the VLAN.
Example:
Device(config-vlan)# ipv6 flow monitor ipv6-bridgedtraffic sampler S1 layer2-bridged input
Step 5 end
Exits VLAN configuration mode and returns to
privileged EXEC mode.
Example:
Device(config-vlan)# end
Configuration Examples for Monitoring IPv6 Layer 2 Bridged
Traffic
You can configure Flexible Netflow to monitor IPv6 Layer 2 bridged traffic on both Switched Virtual
Interfaces (SVIs) and VALNs, with or without flow samplers.
•
•
•
•
Example Configuration for SVI-based Monitoring IPv6 Layer 2 Bridged Traffic, page 176
Example Configuration for VLAN-Based Monitoring of IPv6 Layer3 Bridged Traffic, page 176
Example Configuration for SVI-based Monitoring IPv6 Layer 2 Bridged Traffic Using a Flow
Sampler, page 177
Example Configuration for VLAN-Based Monitoring of IPv6 Layer3 Bridged Traffic Using a Flow
Sampler, page 177
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
175
Example Configuration for SVI-based Monitoring IPv6 Layer 2 Bridged Traffic
Configuration Examples for Monitoring IPv6 Layer 2 Bridged Traffic
Example Configuration for SVI-based Monitoring IPv6 Layer 2 Bridged
Traffic
The following example is designed to monitor IPv6 Layer 2 bridged traffic on an SVI. An exporter is not
configured because this example is intended to be used to capture additional data for analysis on the router
using the show flow monitorcommand.
This sample starts in global configuration mode:
!
!
flow record bridged-flow-record
description bridged flow record
match ipv6 destination address
match ipv6 source address
match interface input
collect counter bytes long
collect counter packets long
exit
!
flow monitor bridged-flow-monitor
description bridged flow monitor
record bridged-flow-record
exit
!
interface vlan 100
ipv6 flow monitor bridged-flow-monitor layer2-bridged input
exit
!
Example Configuration for VLAN-Based Monitoring of IPv6 Layer3 Bridged
Traffic
The following example is designed to monitor IPv6 Layer 2 bridged traffic on a VLAN. An exporter is not
configured because this example is intended to be used to capture additional data for analysis on the router
using the show flow monitorcommand.
This sample starts in global configuration mode:
!
!
flow record bridged-flow-record
description bridged flow record
match ipv6 destination address
match ipv6 source address
match interface input
collect counter bytes long
collect counter packets long
exit
!
flow monitor bridged-flow-monitor
description bridged flow monitor
record bridged-flow-record
exit
!
vlan configuration 100
ipv6 flow monitor bridged-flow-monitor layer2-bridged input
exit
!
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
176
Example Configuration for SVI-based Monitoring IPv6 Layer 2 Bridged Traffic Using a Flow Sampler
Configuration Examples for Monitoring IPv6 Layer 2 Bridged Traffic
Example Configuration for SVI-based Monitoring IPv6 Layer 2 Bridged
Traffic Using a Flow Sampler
The following example is designed to monitor IPv6 Layer 2 bridged traffic on an SVI using a sampler. An
exporter is not configured because this example is intended to be used to capture additional data for
analysis on the router using the show flow monitorcommand.
This sample starts in global configuration mode:
!
!
flow record bridged-flow-record
description bridged flow record
match ipv6 destination address
match ipv6 source address
match interface input
collect counter bytes long
collect counter packets long
exit
!
flow monitor bridged-flow-monitor
description bridged flow monitor
record bridged-flow-record
exit
!
sampler S1
mode deterministic 1 out-of 2
exit
!
interface vlan 100
ipv6 flow monitor bridged-flow-monitor sampler S1 layer2-bridged input
exit
!
Example Configuration for VLAN-Based Monitoring of IPv6 Layer3 Bridged
Traffic Using a Flow Sampler
The following example is designed to monitor IPv6 Layer 2 bridged traffic on a VLAN using a flow
sampler. An exporter is not configured because this example is intended to be used to capture additional
data for analysis on the router using the show flow monitorcommand.
This sample starts in global configuration mode:
!
!
flow record bridged-flow-record
description bridged flow record
match ipv6 destination address
match ipv6 source address
match interface input
collect counter bytes long
collect counter packets long
exit
!
flow monitor bridged-flow-monitor
description bridged flow monitor
record bridged-flow-record
exit
!
sampler S1
mode deterministic 1 out-of 2
exit
!
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
177
Configuring Accounting for IPv6 Layer 2 Bridged Traffic
Where to Go Next
vlan configuration 100
ipv6 flow monitor bridged-flow-monitor sampler S1 layer2-bridged input
exit
!
Where to Go Next
For information on advanced Flexible NetFlow configurations for specific purposes such as quality of
service (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 data export for Flexible NetFlow, refer to the "Configuring Data Export for Cisco
IOS Flexible NetFlow with Flow Exporters" module.
Additional References
Related Documents
Related Topic
Document Title
Cisco IOS commands
Cisco IOS Master Commands List, All Releases
Overview of Flexible NetFlow
"Cisco IOS Flexible NetFlow Overview"
Flexible NetFlow Feature Roadmap
"Cisco IOS Flexible NetFlow Features Roadmap"
Emulating original NetFlow with Flexible NetFlow
"Getting Started with Configuring Cisco IOS
Flexible NetFlow"
Configuring flow exporters to export Flexible
NetFlow data.
"Configuring Data Export for Cisco IOS Flexible
NetFlow with Flow Exporters"
Configuring flow sampling to reduce the overhead
of monitoring traffic with Flexible NetFlow
"Using Cisco IOS Flexible NetFlow Flow Sampling
to Reduce the CPU Overhead of Analyzing Traffic"
Configuring Flexible NetFlow using predefined
records
"Configuring Cisco IOS Flexible NetFlow with
Predefined Records"
Using Flexible NetFlow Top N Talkers to analyze
network traffic
"Using Cisco IOS Flexible NetFlow Top N Talkers
to Analyze Network Traffic"
Configuring IPv4 multicast statistics support for
Flexible NetFlow
"Configuring IPv4 Multicast Statistics Support for
Cisco IOS Flexible NetFlow"
Configuration commands for Flexible NetFlow
Cisco IOS Flexible NetFlow Command Reference
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
178
Configuring Accounting for IPv6 Layer 2 Bridged Traffic
Feature Information for Configuring Accounting for IPv6 Layer 2 Bridged Traffic
Standards
Standard
Title
None
--
MIBs
MIB
MIBs Link
None
To locate and download MIBs for selected
platforms, Cisco software releases, and feature sets,
use Cisco MIB Locator found at the following
URL:
http://www.cisco.com/go/mibs
RFCs
RFC
Title
RFC 3954
Cisco Systems NetFlow Services Export Version 9
Technical Assistance
Description
Link
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.
http://www.cisco.com/cisco/web/support/
index.html
Feature Information for Configuring Accounting for IPv6 Layer
2 Bridged Traffic
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
179
Configuring Accounting for IPv6 Layer 2 Bridged Traffic
Table 33
Feature Information for Flexible Netflow IPv6 Bridged Flows Feature
Feature Name
Releases
Feature Information
Flexible Netflow - IPv6 bridged
flows
15.1(1)SY
Flexible Netflow has been
enhanced to enable the
accounting of Layer 2 switched or
bridged IPv6 traffic, for both
SVIs and pure VLANs.
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.
Flexible Netflow Configuration Guide, Cisco IOS Release 15SY
180
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement