Monday, January 16, 2012

CONFIGURATION: CISCO NETFLOW

After going through a sea of documentation regarding Netflow, I wanted to come up with the basic guide of how to turn it on and apply it.

The first rule of netflow is that you can ONLY collect information on a routed interface

! Lock the SNMP ifIndex - prevents ifIndex drift after router reboot
snmp-server ifindex persist

! Make sure you have the correct community string
! This is mostly a NetQoS requirement; but it's usually required
! by any NetFlow collecting device that needs to verify the device
! it's collecting from.
snmp-server community community_name RO


! Enable NetFlow export globally
! Using loopback
ip flow-export version 5
ip flow-export source lo0
ip flow-cache timeout active 1

! Set export destination  and port to closest Netflow Collector. The port
! listed below is based on NetQOS product
! other Netflow collectors might use a different port
ip flow-export destination IP_ADDRESS 9995


! MLS commands are required for Sup720 running Native IOS ONLY
mls nde sender version 5
mls flow ip interface-full
mls nde interface
mls aging long 64
mls aging fast threshold 1 time 64


Now that Netflow is turned on we need to apply the commands to a routed interface.  The following are examples of interfaces where netflow is applied on:

int fa3/1
ip route-cache flow
int s2/0/0
ip route-cache flow
int gig4/0
ip route-cache flow
int vlan123
ip route-cache flow

No comments:

Post a Comment