cc/td/doc/product/software/ios120/120newft/120t
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

NetFlow Aggregation

Feature Overview

Supported Platforms

Supported Standards, MIBs, and RFCs

Prerequisites

Configuration Tasks

Monitoring and Maintaining NetFlow Aggregation Schemes

Configuration Examples

Command Reference

NetFlow Aggregation

This document describes the Cisco IOS NetFlow Aggregation feature, which allows Cisco NetFlow users to summarize NetFlow export data on an IOS router before the data is exported to a NetFlow data collection system, such as the Cisco NetFlow FlowCollector. See the following sections for additional information:

Feature Overview

By maintaining one or more extra flow caches, called aggregation caches, the NetFlow Aggregation feature allows limited aggregation of NetFlow data export streams to be done on a router.

Aggregation Cache Schemes

The aggregation cache schemes are described in the following sections:

The user may configure each aggregation cache with its individual cache size, cache ager timeout parameter, export destination IP address, and export destination UDP port. As data flows expire in the main NetFlow cache, the flows are added to each enabled aggregation cache. Each aggregation cache contains different field combinations that determine which data flows are grouped. The default aggregation cache size is 4096.


Note To collect NetFlow version 8 data export records, use NetFlow FlowCollector version 3.0. Version 2.0 and earlier versions do not support version 8 data export record formats.

Table 1 lists definitions for the data export record terms used in each aggregation scheme.


Table 1: Data Export Record Terms and Definitions
Term Definition

Bytes

Number of bytes in the aggregated flows.

Destination BGP Autonomous System

Peer or origin autonomous system of the destination prefix (IP address.)

Destination Interface

SNMP index of the output interface.

Destination Port

Destination UDP or TCP port number.

Destination Prefix

Destination IP address AND'd with the destination prefix mask.

First

System uptime when the first packet was switched.

Flows

Number of main cache flows that were aggregated.

Last

System uptime when the last packet was switched.

Packets

Number of packets in the aggregated flows.

PAD

Zero field.

Protocol

IP protocol byte.

Source BGP Autonomous System

Peer or origin autonomous system of the source prefix.

Source Interface

SNMP index of the input interface.

Source Port

Source UDP or TCP port number if applicable.

Source Prefix

Source IP address AND'd with the source prefix mask, or the prefix that the source IP address of the aggregated flows belong to.

Autonomous System Aggregation Scheme

The autonomous system aggregation scheme provides significant NetFlow export data volume reduction and generates autonomous system-to-autonomous system traffic flow data. The scheme groups data flows with the same source Border Gateway Protocol (BGP) autonomous system, destination BGP autonomous system, input interface, and output interface. See Figure 1.

The aggregated NetFlow data export records report the following:


Figure 1: Autonomous System Aggregation Data Export Format


Destination Prefix Aggregation Scheme

The Destination Prefix aggregation scheme generates data so that you can examine the destinations of network traffic passing through a NetFlow-enabled device. The scheme groups data flows with the same destination prefix, destination prefix mask, destination BGP autonomous system, and output interface. See Figure 2.

The aggregated NetFlow data export records report the following:


Figure 2: Destination Prefix Aggregation Data Export Record Format


Prefix Aggregation Scheme

The Prefix aggregation scheme generates data so that you can examine the sources and destinations of network traffic passing through a NetFlow-enabled device. The scheme groups data flows with the same source prefix, destination prefix, source prefix mask, destination prefix mask, source BGP autonomous system, destination BGP autonomous system, input interface, and output interface. See Figure 3.

The aggregated NetFlow data export records report the following:


Figure 3: Prefix Aggregation Data Export Record Format


Protocol Port Aggregation Scheme

The Protocol Port aggregation scheme generates data so that you can examine network usage by traffic type. The scheme groups data flows with the same IP protocol, source port number, and destination port number when applicable. See Figure 4.

The aggregated NetFlow data export records report the following:


Figure 4: Protocol Port Aggregation Data Export Record Format


Source Prefix Aggregation Scheme

The Source Prefix aggregation scheme generates data so that you can examine the sources of network traffic passing through a NetFlow-enabled device. The scheme groups data flows with the same source prefix, source prefix mask, source BGP autonomous system, and input interface. The aggregated NetFlow data export records report the following:


Figure 5: Source Prefix Aggregation Data Export Record Format


Aggregation Scheme Fields and Key Fields

To coordinate flow aggregation on your router, determine the fields from which you want to collect data.Table 2 shows which fields are valid for the different aggregation schemes and which fields are part of the keys. Key fields define a unique flow.


Table 2: Aggregation Scheme Data Fields

Data Fields

Aggregation Schemes

Autonomous System Destination Prefix Prefix Protocol Port Source Prefix

Source Prefix

 

 

 

 

 

Destination Prefix

 

 

 

 

 

Protocol

 

 

 

*

 

Type of Service Byte

 

 

 

 

Source Port

 

 

 

*

 

Destination Port

 

 

 

*

 

Source Interface

*

 

*

 

*

Destination Interface

*

*

*

 

 

OR'd TCP Flags

 

 

 

 

Source BGP Autonomous System

*

 

*

 

*

Destination BGP Autonomous System

*

*

*

 

 

Source Prefix Mask

 

 

*

 

*

Destination Prefix Mask

 

*

*

 

 

Next Hop IP Adress

 

 

 

 

 

Source Encap Bytes

 

 

 

 

 

Destination Encap Bytes

 

 

 

 

 

Source Prefix

 

 

*

 

*

Destination Prefix

 

*

*

 

 

First Timestamp

x

x

x

x

x

Last Timestamp

x

x

x

x

x

Flows

x

x

x

x

x

Packets

x

x

x

x

x

Bytes

x

x

x

x

x

* = exported key field

x = exported field

&&Center&&

&&Center&&

&&Center&&

&&Center&&

&&Center&&

New Version 8 NetFlow Data Export Support

NetFlow exports flow information in UDP datagrams in one of several formats. Version 8, a new data export version, has been added to support data exports from aggregation caches. Version 8 allows for export datagrams to contain a subset of the usual version 5 export data, which is valid for a particular aggregations scheme type.

Figure 6 shows the version 8 header with the version and timestamp information. Table 3 lists definitions for terms used in the version 8 header.


Figure 6: Version 8 Header Format



Table 3:
Terms and Definitions for Version 8 Headers

Term Definition

Version

The flow export format version number. In this case, the number is "8."

Count

The number of export records in the datagram.

System Uptime

The number of milliseconds since the router was last booted.

UNIX Seconds

The number of seconds since 0000 Universal Time Code (UTC) 1970.

UNIX Nanoseconds

The number of residual nanoseconds since 0000UTC 1970.

Sequence Number

Sequence counter of total flows sent for this export stream.

Engine Type

The type of switching engine. RP=0 and LC=1.

Engine ID

The slot number of the NetFlow switching engine.

Aggregation

The type of aggregation scheme being used.

Aggregation Version

The aggregation subformat version number. The current value is "2".

Benefits

Reduced Bandwidth Requirements

NetFlow aggregation caches reduce the bandwidth required between routers and NetFlow management workstations.

Reduced NetFlow Workstation Requirements

NetFlow aggregation caches reduce the number of NetFlow management workstations required.

Improved Router Scalability

NetFlow aggregation caches improve the scalability of high-flow-per-second routers, such as the 7500 series.

Restrictions

To collect NetFlow version 8 data export records, use NetFlow FlowCollector version 3.0. Version 2.0 and earlier versions do not support version 8 data export record formats.

Related Features and Technologies

Related Documents

Supported Platforms

This feature is supported on these platforms:

Supported Standards, MIBs, and RFCs

MIBs

For descriptions of supported MIBs and how to use MIBs, see the Cisco MIB web site on CCO at http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml.

RFCs

None

Standards

None

Prerequisites

You must take these prerequisties into consideration before configuring the NetFlow Aggregation feature:

Configuration Tasks

See the following sections for configuration tasks for the Cisco IOS NetFlow Aggregation feature:

Configuring an Aggregation Cache

To configure an aggregation cache, you must enter aggregation cache configuration mode, and you must decide which type of aggregation scheme you would like to configure: autonomous system, Destination Prefix, Prefix, Protocol Prefix, or Source Prefix aggregation cache. Once you define the aggregation scheme, define the operational parameters for that scheme.

Step Command Purpose

1 . 

Router(config)#ip flow-aggregation cache as

Enters aggregation cache configuration mode and enables an aggregation cache scheme (as, destination-prefix, prefix, protocol-port, or source-prefix)

2 . 

Router(config-flow-cache)#cache entries 2046

Specifies the number (in this example, 2046) of cache entries to allocate for the autonomous system aggregation cache.

3 . 

Router(config-flow-cache)#cache timeout inactive 199

Specifies the number of seconds (in this example, 199) that an inactive entry is allowed to remain in the aggregation cache before it is deleted.

4 . 

Router(config-flow-cache)#cache timeout active 45

Specifies the number of minutes (in this example, 45) that an active entry is active.

5 . 

Router(config-flow-cache)#export destination 
10.42.41.1 9991

Enables the data export.

6 . 

Router(config-flow-cache)#enabled

Enables aggregation cache creation.

Verifying Aggregation Cache Configuration and Data Export

To verify that the configuration is correct, use the show ip cache flow aggregation command.

To confirm data export, use the show ip flow export command.

Monitoring and Maintaining NetFlow Aggregation Schemes

To monitor and maintain aggregation schemes, use the show ip cache flow aggregation command.

To monitor and maintain aggregation schemes data export, use the show ip flow export command.

Configuration Examples

This section provides the following basic configuration examples:

Autonomous System Configuration

The following example shows how to configure an autonomous system aggregation cache with a cache size of 2046, an inactive timeout of 200 seconds, a cache active timeout of 45 minutes, an export destination IP address of 10.42.42.1, and a destination port of 9992.

Router(config)#ip flow-aggregation cache as
Router(config-flow-cache)#cache entries 2046
Router(config-flow-cache)#cache timeout inactive 200
Router(config-flow-cache)#cache timeout active 45
Router(config-flow-cache)#export destination 10.42.42.1 9992
Router(config-flow-cache)#enabled

Destination Prefix Configuration

The following example shows how to configure a Destination Prefix aggregation cache with a cache size of 2046, an inactive timeout of 200 seconds, a cache active timeout of 45 minutes, an export destination IP address of 10.42.42.1, and a destination port of 9992.

Router(config)#ip flow-aggregation cache destination-prefix
Router(config-flow-cache)#cache entries 2046
Router(config-flow-cache)#cache timeout inactive 200
Router(config-flow-cache)#cache timeout active 45
Router(config-flow-cache)#export destination 10.42.42.1 9992
Router(config-flow-cache)#enabled

Prefix Configuration

The following example shows how to configure a Prefix aggregation cache with a cache size of 2046, an inactive timeout of 200 seconds, a cache active timeout of 45 minutes, an export destination IP address of 10.42.42.1, and a destination port of 9992.

Router(config)#ip flow-aggregation cache prefix
Router(config-flow-cache)#cache entries 2046
Router(config-flow-cache)#cache timeout inactive 200
Router(config-flow-cache)#cache timeout active 45
Router(config-flow-cache)#export destination 10.42.42.1 9992
Router(config-flow-cache)#enabled

Protocol Port Configuration

The following example shows how to configure a Protocol Port aggregation cache with a cache size of 2046, an inactive timeout of 200 seconds, a cache active timeout of 45 minutes, an export destination IP address of 10.42.42.1, and a destination port of 9992.

Router(config)#ip flow-aggregation cache protocol-port
Router(config-flow-cache)#cache entries 2046
Router(config-flow-cache)#cache timeout inactive 200
Router(config-flow-cache)#cache timeout active 45
Router(config-flow-cache)#export destination 10.42.42.1 9992
Router(config-flow-cache)#enabled

Source Prefix Configuration

The following example shows how to configure a Source Prefix aggregation cache with a cache size of 2046, an inactive timeout of 200 seconds, a cache active timeout of 45 minutes, an export destination IP address of 10.42.42.1, and a destination port of 9992.

Router(config)#ip flow-aggregation cache source-prefix
Router(config-flow-cache)#cache entries 2046
Router(config-flow-cache)#cache timeout inactive 200
Router(config-flow-cache)#cache timeout active 45
Router(config-flow-cache)#export destination 10.42.42.1 9992
Router(config-flow-cache)#enabled

Command Reference

This section documents new commands you can use to configure the Cisco IOS NetFlow Aggregation feature. All other commands used with this feature are documented in the Cisco IOS Release 12.0 Switching Services command reference publication.

In Cisco IOS Release 12.0(1)T or later, you can search and filter the output for show and more commands. This functionality is useful when you need to sort through large amounts of output, or if you want to exclude output that you do not need to see.

To use this functionality, enter a show or more command followed by the "pipe" character (|), one of the keywords begin, include, or exclude, and an expression that you want to search or filter on:

command | {begin | include | exclude} regular-expression

Following is an example of the show atm vc command in which you want the command output to begin with the first line where the expression "PeakRate" appears:

show atm vc | begin PeakRate

For more information on the search and filter functionality, refer to the Cisco IOS Release 12.0(1)T feature module titled CLI String Search.

cache

To configure aggregation cache operational parameters, use the cache aggregation cache configuration command.

To disable the operational parameters, use the no form of this command.

cache {entries number | timeout [active minutes | inactive seconds]}
no cache {entries number | timeout [active minutes | inactive seconds]}

Syntax Description

entries number

(Optional) The number of cached entries allowed in the aggregation cache. The number of entries can be 1024 to 524288. The default is 4096.

active minutes

(Optional) The number of minutes that an active entry is active. The default is 30 minutes; the range is between 1 and 60 minutes.

inactive seconds

(Optional) The number of seconds that an inactive entry will stay in the aggregation cache before it times out. The default is 15 seconds; the range is between 10 and 600 seconds.

Defaults

The default for cache entries is 4096.

The default for active cache entries is 30 minutes.

The default for inactive cache entries is 15 seconds.

Command Modes

Aggregation cache configuration

Command History

Release Modification

12.0(3)T

This command was introduced.

Examples

The following example shows how to set the aggregation cache entry limits:

cache entries 2046
cache timeout inactive 199

Related Commands

Command Description

enabled

Enables an aggregation cache.

export destination

Enables aggregation cache export.

ip flow-aggregation cache

Enables aggregation cache configuration mode.

show ip cache flow aggregation

Displays aggregation cache contents.

show ip flow export

Displays data export statistics.

default

To enable a default aggregation cache, use the default interface configuration command.

default [cache | enabled | export]

Syntax Description

cache

Configure NetFlow cache parameters.

enabled

Enable the aggreation cache.

export

Specify host/port to send flow statistics.

Defaults

No default behavior or values.

Command Modes

Aggregation cache configuration

Command History

Release Modification

12.0(3)T

This command was introduced.

Examples

The following example shows how to use the default command:

ip flow-aggregation cache as 
default enabled

Related Commands

Command Description

cache

Configures aggregation cache operational parameters.

enabled

Enables an aggregation cache.

export destination

Enables aggregation cache export.

ip flow-aggregation cache

Enables aggregation cache configuration mode.

show ip flow export

Displays data export statistics

enabled

To enable an aggregation cache, use the enabled interface configuration command.

enabled

Syntax Description

This command has no keywords and arguments.

Defaults

No default behavior or values.

Command Modes

Aggregation cache configuration

Command History

Release Modification

12.0(3)T

This command was introduced.

Examples

The following example shows how to use the enabled command:

enabled

Related Commands

Command Description

cache

Configures aggregation cache operational parameters.

export destination

Enables aggregation cache export.

ip flow-aggregation cache

Enables aggregation cache configuration mode.

show ip flow export

Displays data export statistics

exit

To leave aggregation cache mode, use the exit aggregation cache configuration command.

exit

Syntax Description

This command has no keywords and arguments.

Defaults

No default behavior or values.

Command Modes

Aggregation cache configuration

Command History

Release Modification

12.0(3)T

This command was introduced.

Examples

The following example shows how to use the exit command:

exit

Related Commands

Command Description

cache

Configures aggregation cache operational parameters.

enabled

Enables an aggregation cache.

export destination

Enables aggregation cache export.

ip flow-aggregation cache

Enables aggregation cache configuration mode.

show ip flow export

Displays data export statistics

export destination

To enable the exporting of information from NetFlow aggregation caches, use the export destination aggregation cache configuration command.

To disable the exporting of NetFlow aggregation cache information, use the no form of this command.

export destination ip-address port
no export destination ip-address port

Syntax Description

ip-address

Destination IP address.

port

Destination UDP port.

Defaults

An export destination is not set.

Command Modes

Aggregation cache configuration

Command History

Release Modification

12.0(3)T

This command was introduced.

Usage Guidelines

For version 8 data exports, the maximum number of aggregated flow records and the maximum byte size of each UDP datagram are as follows:

Aggregation Scheme Max. Number of Flow Records UDP Packet Size

BGP Autonomous System

51

1456 bytes

Destination Prefix

44

1436 bytes

Prefix

35

1428 bytes

Protocol Port

51

1456 bytes

Source Prefix

44

1436 bytes

Examples

The following example shows how to configure an export destination for an aggregation cache:

export destination 10.41.41.1 9992

Related Commands

Command Description

cache

Configures aggregation cache operational parameters.

enabled

Enables an aggregation cache.

ip flow-aggregation cache

Enables aggregation cache configuration mode.

show ip cache flow aggregation

Displays aggregation cache contents.

show ip flow export

Displays data export statistics

ip flow-aggregation cache

To enable aggregation cache configuration mode, use the ip flow-aggregation cache global configuration command.

To disable aggregation cache configuration mode, use the no form of this command.

ip flow-aggregation cache {as | destination-prefix | prefix | protocol-port | source-prefix}
no ip flow-aggregation cache {as | destination-prefix | prefix | protocol-port | source-prefix}

Syntax Description

as

Configures the autonomous system aggregation cache scheme.

destination-prefix

Configures the Destination Prefix aggregation cache scheme.

prefix

Configures the Prefix aggregation cache scheme.

protocol-port

Configures the Protocol Port aggregation cache scheme.

source-prefix

Configures the Source Prefix aggregation cache scheme.

Defaults

This command is not enabled by default.

Command Modes

Global configuration

Command History

Release Modification

12.0(3)T

This command was introduced.

Examples

The following example shows how to enable an autonomous system aggregation scheme:

ip flow-aggregation cache as
enable

Related Commands

Command Description

cache

Configures aggregation cache operational parameters.

enabled

Enables an aggregation cache.

export destination

Enables aggregation cache export.

show ip cache flow aggregation

Displays aggregation cache contents.

show ip cache flow aggregation

To display the aggregation cache configuration, use the show ip cache flow aggregation EXEC command.

show ip cache flow aggregation type

Syntax Description

type

Displays a particular aggregation cache's configuration: autonomous system, destination prefix, prefix, protocol-port, or source prefix.

Defaults

No default behavior or values.

Command Modes

EXEC

Command History

Release Modification

12.0(3)T

This command was introduced.

Usage Guidelines

Examples

The following example shows how to use the show ip cache flow aggregation command:

show ip cache flow aggregation as
IP Flow Switching Cache, 278544 bytes
2 active, 4094 inactive, 13 added
178 ager polls, 0 flow alloc failures
 
Src If       Src AS  Dst If       Dst AS  Flows   Pkts  B/Pk  Active
Fa1/0         0      Null          0         1      2     49    10.2
Fa1/0         0      Se2/0         20        1      5    100     0.0
 

Related Commands

Command Description

cache

Configures aggregation cache operational parameters.

enabled

Enables an aggregation cache.

export destination

Enables aggregation cache export.

ip flow-aggregation cache

Enables aggregation cache configuration mode.

show ip flow export

Displays data export statistics.

show ip flow export

To display the statistics for the data export including the main cache and all other enabled caches, use the show ip flow export EXEC command.

show ip flow export

Syntax Description

This command has no keywords and arguments.

Defaults

No default behavior or values.

Command Modes

EXEC

Command History

Release Modification

11.1CC

This command was introduced.

Examples

The following example shows how to use the show ip flow export command:

show ip flow export
Flow export is enabled
Exporting flows to 203.20.40.1 (9991)
Version 5 flow records, peer-as
1136 flows exported in 917 udp datagrams
0 flows exported in 0 udp datagrams
0 flows failed due to lack of export packet
0 export packets were sent up to process level
0 export packets were dropped due to no fib
0 export packets were dropped due to adjacency issues
0 export packets were dropped enqueuing for the RP
0 export packets were dropped due to IPC rate limiting

Related Commands

Command Description

cache

Configures aggregation cache operational parameters.

export destination

Enables aggregation cache export.

ip flow-aggregation cache

Enables aggregation cache configuration mode.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Mon Aug 2 15:49:57 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.