Enable netflow statistics on a Cisco router

From wiki.comcert.com
Revision as of 14:18, 15 October 2016 by Comcert (talk | contribs) (Created page with " <span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:large;">Introduction</span></span> <span style="font-family:verdana,geneva,sans-serif;">OptiView...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

OptiView XG is NOT a NetFlow collector, but it is possible to querry CISCO routers for network flow bases statistcal analysis (top-n counters).  The data is similar to what was obtainable by RMON .  The data will be available under the tab in Device Details or in Application Infrastrcture Tests.  In order to do so, the router first must be configured correctly.

Solution
This example has been tested with a CISCO router model 1911 running IOS version 15.  For more information about the commands used in this script, contact you CISCO partner.  
At this time, we consider that SNMP read-only access to the router has already been established and the community has sufficient view rights.

Global Configuration Mode

Add the following commands to the global configuration section of the router: 

<WRAP center round info 98%>
In our case, the source and destination addresses of the flow exports are not important, but you need to enable flow exports in order to populate the flow top-talker list. 
</WRAP>

  * conf t
  * ip flow-cache timeout active 1
  * ip flow-cache timeout inactive 14
  * ip flow-export source GigabitEthernet0/1
  * ip flow-export version 9
  * ip flow-export destination 1.1.1.1 2055
  * ip flow-top-talkers
  * top 100
  * sort-by bytes
  * cache-timeout 300000
  * exit
  * wr mem

\\
==== Interface configuration mode ====
Add the following command to the interface configuration section of __all interfaces carrying traffic__.  There are __at least two interfaces__ that carry traffic, one facing the network, one facing the site.  These may be physical interfaces or virtual interfaces like a sub-interfaces, dialers or tunnel interfaces.  

  * conf t
  * interface <interface name>
  * ip flow egress
  * exit
  * wr mem

<WRAP center round info 98%>
This is a general applicable but not the only way for enabling NetFlow exports per interface.  Please read your CISCO documentation for more information.
</WRAP>

\\
==== Debugging ====
  * Use the IOS command sh ip flow export and check if any flows are exported.
  * Use the IOS command sh ip flow top-talkers and check if the top-talker list is populated.

----

//Your feedback on this article is greatly appreciated - Please send feedback to <wiki@comcert.com>//