Configuring Flexible NetFlow Export on a Cisco Device

     

    Flexible NetFlow consists of components that can be used together in several variations to perform traffic analysis and data export, and the new command-line interface (CLI) configuration follows the same traditional logic.In this user-defined flow records and the component structure of Flexible NetFlow make it easy to create various configurations for traffic analysis and data export on a networking device with a minimum number of configuration commands.To use Flexible NetFlow to its fullest potential or to monitor a specific network behavior, you should create your own customized records

     

    Flexible NetFlow export can be configured in three easy steps.

     

    Configuring Exporter

    Enter global configuration mode on the router or MSFC, and issue the following commands for creating the exporter:

    flow exporter {exporter_name}

    destination {destination_ip_address}

    Export-protocol version-9

    transport udp 9996 

    exit

    Tip

    Flow exporter can be configured with a unique name. Multiple Flow exporter profiles can be configured. Below is the configuration to configure Flow Exporter.

     

    Flow Monitor and Flow record Configuration

    ip flow monitor {monitor_name}

    record netflow-original

    exporter {exporter_name}

    cache timeout active 60

    cache timeout inactive 15

    exit


    Tip Flow record configuration defines the fields exported via NetFlow protocol. Flexible pre-defined flow records are based on the original NetFlow ingress or egress caches. Cisco provides a unique keyword to identify the pre-defined records and these records can associated with a Flexible NetFlow Flow record configuration. The Flexible NetFlow “netflow-original” and netflow ipv4 original-input are predefined records and these two records can be used interchangeably to export the basic key fields and time stamp fields. Flow monitors can also include packet sampling information if sampling is required.

     

    Associate Flow Monitor to interface

    Enter global configuration mode on the router or MSFC, and issue the following commands for each interface on which you want to enable NetFlow:

    interface {interface} {interface_number}

    ip flow monitor {onitor_name} input


    Tip

    Flow Monitor has to be attached to a specific physical or logical interface to export flow statistics for that particular interface. Above is the configuration to attach flow monitor to a specific interface.
     

     

    Verifying Device Configuration

    Issue the following commands in normal (not configuration) mode to verify whether NetFlow export has been configured correctly:

     

    impo

    Please note that NetFlow data export has to be enabled on all interfaces of a router in order to see accurate IN and OUT traffic. Suppose you have a router with interface A and B. Since NetFlow, by default, is done on an ingress basis, when you enable NetFlow data export on interface A, it will only export the IN traffic for interface A and OUT traffic for interface B. The OUT traffic for interface A will be contributed by the NetFlow data exported from interface B.

    Even if you are interested in managing only interface A, please enable NetFlow data export on A and B. You may subsequently unmanage interface B from the License Management link.

     

     

    Tip

    For further information on configuring your IOS device for NetFlow data export, refer Cisco's NetFlow commands documentation