This documentation has been moved
Customizing Cisco IOS XE Flexible NetFlow Flow Records and Flow Monitors
Downloads: This chapterpdf (PDF - 216.0KB) The complete bookPDF (PDF - 3.48MB) | Feedback

Customizing Cisco IOS XE Flexible NetFlow Flow Records and Flow Monitors

Table Of Contents

Customizing Cisco IOS XE Flexible NetFlow Flow Records and Flow Monitors

Finding Feature Information

Contents

Prerequisites for Customizing Flexible NetFlow Flow Records and Flow Monitors

Information About Customizing Flexible NetFlow Flow Records and Flow Monitors

Criteria for Identification of Traffic to Be Used in Analysis in Flexible NetFlow

How to Customize Flexible NetFlow Flow Records and Flow Monitors

Configuring a Customized Flow Record

Configuring a Customized Flow Record for IPv4 or IPv6 Traffic

Displaying the Current Status of a Flow Record

Verifying the Flow Record Configuration

Creating a Customized Flow Monitor

Flow Monitor

Prerequisites

Restrictions

Displaying the Current Status of a Flow Monitor

Verifying the Flow Monitor Configuration

Applying a Flow Monitor to an Interface

Verifying That Flexible NetFlow Is Enabled on an Interface

Displaying the Data in the Flow Monitor Cache

Prerequisites

Configuration Examples for Customizing Flexible NetFlow Flow Records and Flow Monitors

Example: Configuring a Normal Flow Record Cache with a Limited Number of Possible Flows

Example: Configuring a Customized Flow Record Cache for Monitoring IPv6 Traffic

Example: Configuring Flexible NetFlow for Network-Based Application Recognition

Where to Go Next

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Feature Information for Flexible NetFlow


Customizing Cisco IOS XE Flexible NetFlow Flow Records and Flow Monitors


First Published: June 19, 2006
Last Updated: September 28, 2010

This document contains information about and instructions for customizing Flexible NetFlow flow records and flow monitors. If the tasks and configuration examples in the "Getting Started with Configuring Cisco IOS XE Flexible NetFlow" module and the "Configuring Cisco IOS XE 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

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. 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 for Flexible NetFlow" section.

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.

Contents

Prerequisites for Customizing Flexible NetFlow Flow Records and Flow Monitors

Information About Customizing Flexible NetFlow Flow Records and Flow Monitors

How to Customize Flexible NetFlow Flow Records and Flow Monitors

Configuration Examples for Customizing Flexible NetFlow Flow Records and Flow Monitors

Where to Go Next

Additional References

Feature Information for Flexible NetFlow

Prerequisites for Customizing Flexible NetFlow Flow Records and Flow Monitors

The following prerequisites must be met before you can configure Flexible NetFlow:

You are familiar with the information in the "Cisco IOS XE 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 XE release that supports Flexible NetFlow. See the "Cisco IOS Flexible NetFlow Features Roadmap" module for a list of Cisco IOS software releases that support Flexible NetFlow.

IPv4 Traffic

The networking device must be configured for IPv4 routing.

IPv6 Traffic

The networking device must be configured for IPv6 routing.

Information About Customizing Flexible NetFlow Flow Records and Flow Monitors

Before you customize Flexible NetFlow flow records and flow monitors, you must understand the following concept:

Criteria for Identification of Traffic to Be Used in Analysis in Flexible NetFlow

Criteria for Identification of 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 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 three-way 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. When the source host rapidly generates TCP SYN packets from random IP addresses, the connection queue can be filled and TCP services (such as e-mail, file transfer, or WWW) can be denied 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

Destination IP address

Source IP address

Interface input and output


Tip 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

The tasks in this section explain how to do the following:

Customize a Flexible NetFlow flow record.

Customize a Flexible NetFlow flow monitor.

Enable Flexible NetFlow.


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 customize Flexible NetFlow flow records and flow monitors, and to enable Flexible NetFlow, perform the following tasks:

Configuring a Customized Flow Record (required)

Displaying the Current Status of a Flow Record (optional)

Verifying the Flow Record Configuration (optional)

Creating a Customized Flow Monitor (required)

Displaying the Current Status of a Flow Monitor (optional)

Verifying the Flow Monitor Configuration (optional)

Applying a Flow Monitor to an Interface (required)

Verifying That Flexible NetFlow Is Enabled on an Interface (optional)

Displaying the Data in the Flow Monitor Cache (optional)

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:

Configuring a Customized Flow Record for IPv4 or IPv6 Traffic

Configuring a Customized Flow Record for IPv4 or IPv6 Traffic

This task explains the steps that are used to create a customized flow record for IPv4 or IPv6 traffic. This is used to gather specific data from IPv4 or IPv6 traffic.

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

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

flow record record-name

Example:

Router(config)# flow record FLOW-RECORD-1

Creates a flow record and enters Flexible NetFlow flow record configuration mode.

This command also allows you to modify an existing flow record.

Step 4 

description description

Example:

Router(config-flow-record)# description Used for basic traffic analysis

(Optional) Creates a description for the flow record.

Step 5 

match {ipv4 | ipv6} {destination | source} {address | {mask | prefix} [minimum-mask mask]}

Example:

Router(config-flow-record)# match ipv4 destination address

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.

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]}

Example:

Router(config-flow-record)# collect ipv4 source address

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.

Step 8 

Repeat Step 7 as required to configure additional nonkey fields for the record.

Step 9 

end

Example:

Router(config-flow-record)# end

Exits Flexible NetFlow flow record configuration mode and returns to privileged EXEC mode.

Displaying the Current Status of a Flow Record

To display the current status of a flow record, perform the following optional task.

SUMMARY STEPS

1. enable

2. show flow record

DETAILED STEPS


Step 1 enable

The enable command enters privileged EXEC mode (enter the password if prompted).

Router> enable

Router#

Step 2 show flow record

The show flow record command shows the current status of the flow monitor that you specify.

Router# show flow record

flow record FLOW-RECORD-2:
  Description:        Used for basic IPv6 traffic analysis
  No. of users:       1
  Total field space:  53 bytes
  Fields:
    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 record FLOW-RECORD-1:
  Description:        Used for basic IPv4 traffic analysis
  No. of users:       1
  Total field space:  29 bytes
  Fields:
    match ipv4 destination address
    collect ipv4 protocol
    collect ipv4 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

Verifying the Flow Record Configuration

To verify the configuration commands that you entered, perform the following optional task.

SUMMARY STEPS

1. enable

2. show running-config flow record

DETAILED STEPS


Step 1 enable

The enable command enters privileged EXEC mode (enter the password if prompted).

Router> enable

Router#

Step 2 show running-config flow record

The show running-config flow record command shows the configuration commands of the flow monitor that you specify.

Router# show running-config flow record

Current configuration:
!
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 record FLOW-RECORD-1
 description Used for basic IPv4 traffic analysis
 match ipv4 destination address
 collect ipv4 protocol
 collect ipv4 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
!


Creating a Customized Flow Monitor

To create a customized flow monitor, perform the following required task.

Flow Monitor

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. This task uses the record that you created in the "Configuring a Customized Flow Record" section.

Prerequisites

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. Refer to the "Configuring a Customized Flow Record" section for information about and instructions for creating a customized flow record.

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. Refer to the "Configuring Data Export for Cisco IOS XE Flexible NetFlow with Flow Exporters" module for information about and instructions for creating a flow exporter.

Restrictions

You must use the no ip flow monitor command 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 string

5. record {record-name | netflow-original | netflow {ipv4 | ipv6} record [peer]}

6. cache {entries number | timeout {active | inactive | update}seconds | type normal}

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

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

flow monitor monitor-name

Example:

Router(config)# flow monitor FLOW-MONITOR-1

Creates a flow monitor and enters Flexible NetFlow flow monitor configuration mode.

This command also allows you to modify an existing flow monitor.

Step 4 

description string

Example:

Router(config-flow-monitor)# description Used for basic ipv4 traffic analysis

(Optional) Creates a description for the flow monitor.

Step 5 

record {record-name | netflow-original | netflow {ipv4 | ipv6} record [peer]}

Example:

Router(config-flow-monitor)# record FLOW-RECORD-1

Specifies the record for the flow monitor.

Step 6 

cache {entries number | timeout {active | inactive | update}seconds | type normal}

Example:

Router(config-flow-monitor)# cache entries 1000

(Optional) Modifies the flow monitor cache parameters such as timeout values, number of cache entries, and the cache type.

Step 7 

Repeat Step 6 as required to finish modifying the cache parameters for this flow monitor.

Step 8 

statistics packet protocol

Example:

Router(config-flow-monitor)# statistics packet protocol

(Optional) Enables the collection of protocol distribution statistics for Flexible NetFlow monitors.

Step 9 

statistics packet size

Example:

Router(config-flow-monitor)# statistics packet size

(Optional) Enables the collection of size distribution statistics for Flexible NetFlow monitors.

Step 10 

exporter exporter-name

Example:

Router(config-flow-monitor)# exporter EXPORTER-1

(Optional) Specifies the name of an exporter that was created previously.

Refer to the "Configuring Data Export for Cisco IOS XE Flexible NetFlow with Flow Exporters" module for information about and instructions for configuring flow exporters.

Step 11 

end

Example:

Router(config-flow-monitor)# end

Exits Flexible NetFlow flow monitor configuration mode and returns to privileged EXEC mode.

Displaying the Current Status of a Flow Monitor

To display the current status of a flow monitor, perform the following optional task.

SUMMARY STEPS

1. enable

2. show flow monitor monitor-name

DETAILED STEPS


Step 1 enable

The enable command enters privileged EXEC mode (enter the password if prompted).

Router> enable

Router#

Step 2 show flow monitor monitor-name

The show flow monitor command shows the current status of the flow monitor that you specify.

Router# show flow monitor FLOW-MONITOR-1

Flow Monitor FLOW-MONITOR-1:
  Description:       Used for basic ipv4 traffic analysis
  Flow Record:       FLOW-RECORD-1
  Flow Exporter:     EXPORTER-1
  Cache:
    Type:              normal
    Status:            allocated
    Size:              1000 entries / 50052 bytes
    Inactive Timeout:  15 secs
    Active Timeout:    1800 secs
    Update Timeout:    1800 secs
  Stats:
    protocol distribution 
    size distribution

Verifying the Flow Monitor Configuration

To verify the configuration commands that you entered, perform the following optional task.

SUMMARY STEPS

1. enable

2. show running-config flow monitor monitor-name

DETAILED STEPS


Step 1 enable

The enable command enters privileged EXEC mode (enter the password if prompted).

Router> enable

Router#

Step 2 show running-config flow monitor

The show running-config flow monitor command shows the configuration commands of the flow monitor that you specify.

Router# show running-config flow monitor FLOW-MONITOR-1

Current configuration:
!
flow monitor FLOW-MONITOR-1
 description Used for basic ipv4 traffic analysis
 record FLOW-RECORD-1
 exporter EXPORTER-1
 cache entries 1000
 statistics packet protocol
 statistics packet size
!


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.

SUMMARY STEPS

1. enable

2. configure terminal

3. interface type number

4. {ip | ipv6} flow monitor monitor-name {input | output | sampler}

5. Repeat Steps 3 and 4 to activate a flow monitor on any other interfaces in the router over which you want to monitor traffic.

6. end

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

interface type number

Example:

Router(config)# interface fastethernet 0/0/0

Specifies an interface and enters interface configuration mode.

Step 4 

{ip | ipv6} flow monitor monitor-name {input | output | sampler}

Example:

Router(config-if)# ip flow monitor FLOW-MONITOR-1 input

Activates a flow monitor that was created previously by assigning it to the interface to analyze traffic.

Step 5 

Repeat Steps 3 and 4 to activate a flow monitor on any other interfaces in the router over which you want to monitor traffic.

Step 6 

end

Example:

Router(config-if)# end

Exits interface configuration mode and returns to privileged EXEC mode.

Verifying That Flexible NetFlow Is Enabled on an Interface

To verify that Flexible NetFlow is enabled on an interface, perform the following optional task.

SUMMARY STEPS

1. enable

2. show flow interface type number

DETAILED STEPS


Step 1 enable

The enable command enters privileged EXEC mode (enter the password if prompted).

Router> enable

Router#

Step 2 show flow interface type number

The show flow interface command verifies that Flexible NetFlow is enabled on an interface.

Router# show flow interface fastethernet 0/0/0

Interface FastEthernet0/0/0
  FNF:  monitor:         FLOW-MONITOR-1
        direction:       Input
        traffic(ip):     on
  FNF:  monitor:         FLOW-MONITOR-2
        direction:       Input
        traffic(ipv6):   on

Router# show flow interface fastethernet 1/0/0

Interface FastEthernet1/0/0
  FNF:  monitor:         FLOW-MONITOR-1
        direction:       Output
        traffic(ip):     on
  FNF:  monitor:         FLOW-MONITOR-2
        direction:       Input
        traffic(ipv6):   on


Displaying the Data in the Flow Monitor Cache

To display the data in the flow monitor cache, perform the following optional task.

Prerequisites

The interface on which you applied the input flow monitor must be receiving traffic that meets the criteria defined by the NetFlow original record before you can display the flows in the flow monitor cache.

SUMMARY STEPS

1. enable

2. show flow monitor name monitor-name cache format record

DETAILED STEPS


Step 1 enable

The enable command enters privileged EXEC mode (enter the password if prompted).

Router> enable

Router#

Step 2 show flow monitor name monitor-name cache format record

The show flow monitor name monitor-name cache format record command string displays the status, statistics, and flow data in the cache for a flow monitor.

Router# show flow monitor name FLOW-MONITOR-1 cache format record

Cache type:                            Normal
  Cache size:                              1000
  Current entries:                            4
  High Watermark:                             4

  Flows added:                              101
  Flows aged:                                97
    - Active timeout   (  1800 secs)          3
    - Inactive timeout (    15 secs)         94
    - Event aged                              0
    - Watermark aged                          0
    - Emergency aged                          0

IPV4 DESTINATION ADDRESS:  172.16.10.5
ipv4 source address:       10.10.11.1
trns source port:          25
trns destination port:     25
counter bytes:             72840
counter packets:           1821
timestamp first:           21237828
timestamp last:            22086520
ip protocol:               6

IPV4 DESTINATION ADDRESS:  172.16.10.2
ipv4 source address:       10.10.10.2
trns source port:          20
trns destination port:     20
counter bytes:             3913860
counter packets:           7326
timestamp first:           21238788
timestamp last:            22088080
ip protocol:               6

IPV4 DESTINATION ADDRESS:  172.16.10.200
ipv4 source address:       192.168.67.6
trns source port:          0
trns destination port:     3073
counter bytes:             51072
counter packets:           1824
timestamp first:           21239228
timestamp last:            22087980
ip protocol:               1

Router# show flow monitor name FLOW-MONITOR-2 cache format record

Cache type:                            Normal
  Cache size:                              1000
  Current entries:                            2
  High Watermark:                             3

  Flows added:                               95
  Flows aged:                                93
    - Active timeout   (  1800 secs)          0
    - Inactive timeout (    15 secs)         93
    - Event aged                              0
    - Watermark aged                          0
    - Emergency aged                          0

IPV6 DESTINATION ADDRESS:  2001:DB8:4:ABCD::2
ipv6 source address:       2001:DB8:1:ABCD::1
trns source port:          33572
trns destination port:     23
counter bytes:             19140
counter packets:           349
timestamp first:           2172704
timestamp last:            2198272
ip protocol:               6

IPV6 DESTINATION ADDRESS:  FF02::9
ipv6 source address:       FE80::A8AA:BBFF:FEBB:CC03
trns source port:          521
trns destination port:     521
counter bytes:             92
counter packets:           1
timestamp first:           2195672
timestamp last:            2195672
ip protocol:               17



Configuration Examples for Customizing Flexible NetFlow Flow Records and Flow Monitors

This section provides the following configuration examples:

Example: Configuring a Normal Flow Record Cache with a Limited Number of Possible Flows

Example: Configuring a Customized Flow Record Cache for Monitoring IPv6 Traffic

Example: Configuring Flexible NetFlow for Network-Based Application Recognition

Example: Configuring a Normal Flow Record Cache with a Limited Number of Possible 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 monitor command.

This sample starts in global configuration mode:

!
!
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 normal
 cache entries 8192   ! 2^5 (combos of interfaces) * 256 (values of TOS)
 exit
!
interface fastethernet0/0/0
 ip flow monitor QOS_MONITOR input
 exit
!
interface fastethernet0/1/0
 ip flow monitor QOS_MONITOR input
 exit
!
interface fastethernet0/2/0
 ip flow monitor QOS_MONITOR input
 exit
!
interface serial2/0/0
 ip flow monitor QOS_MONITOR input
 exit
!
interface serial2/1/0
 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: 										 Normal
  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.

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 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/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 XE 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 XE 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 XE 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 XE 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 XE Flexible NetFlow"

Configuring flow exporters to export Flexible NetFlow data.

"Configuring Data Export for Cisco IOS XE Flexible NetFlow with Flow Exporters"

Configuring flow sampling to reduce the overhead of monitoring traffic with Flexible NetFlow

"Using Cisco IOS XE Flexible NetFlow Flow Sampling to Reduce the CPU Overhead of Analyzing Traffic"

Configuring Flexible NetFlow using predefined records

"Configuring Cisco IOS XE Flexible NetFlow with Predefined Records"

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 IOS 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 website provides extensive 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.

http://www.cisco.com/cisco/web/support/index.html


Feature Information for Flexible NetFlow

Table 1 lists the features in this module and provides links to specific configuration information.

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, 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 Table 1 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.


Table 1 Feature Information for Flexible NetFlow 

Feature Name
Releases
Feature Information

Flexible NetFlow

Cisco IOS XE Release 3.1S

Flexible NetFlow is introduced.

Information about the Flexible NetFlow feature is included in the following sections:

Prerequisites for Customizing Flexible NetFlow Flow Records and Flow Monitors

Information About Customizing Flexible NetFlow Flow Records and Flow Monitors

How to Customize Flexible NetFlow Flow Records and Flow Monitors

Configuration Examples for Customizing Flexible NetFlow Flow Records and Flow Monitors

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, template data timeout, transport (Flexible NetFlow).

Flexible NetFlow—IPv4 Unicast Flows

Cisco IOS XE Release 3.1S

Enables Flexible NetFlow to monitor IPv4 traffic.

Information about the Flexible NetFlow—IPv4 Unicast Flows feature is included in the following sections:

Configuring a Customized Flow Record for IPv4 or IPv6 Traffic

Applying a Flow Monitor to an Interface

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—IPv6 Unicast Flows

Cisco IOS XE Release 3.3S

Enables Flexible NetFlow to monitor IPv6 traffic.

Information about the Flexible NetFlow—IPv6 Unicast Flows feature is included in the following sections:

Displaying the Current Status of a Flow Record

Applying a Flow Monitor to an Interface

Configuring a Customized Flow Record Cache for Monitoring IPv6 Traffic: Example, page 17

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 hop-limit, 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 hop-limit, match ipv6 length, match ipv6 section, match ipv6 source, match transport icmp ipv6.

Flexible NetFlow—Ingress VRF Support

Cisco IOS XE Release 3.1S

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.

Information about the Flexible NetFlow—Ingress VRF Support feature is included in the following section:

Example: Configuring Flexible NetFlow for Network-Based Application Recognition

The following commands were introduced or modified: collect routing, match routing, option (Flexible NetFlow), show flow monitor.

Flexible NetFlow—NBAR Application Recognition

Cisco IOS XE Release 3.1S

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.

Information about the NBAR Application Recognition feature is included in the following sections:

Example: Configuring Flexible NetFlow for Network-Based Application Recognition

The following commands were introduced or modified: collect application name, match application name, option (Flexible NetFlow), show flow monitor.