Enable netflow statistics on a Cisco router: Difference between revisions

From wiki.comcert.com
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:
 
 


<span style="font-size:medium;"><span style="font-family:verdana,geneva,sans-serif;">Global Configuration Mode</span></span>
<span style="font-size:medium;"><span style="font-family:verdana,geneva,sans-serif;">Enter Global Configuration Mode</span></span>


<span style="font-size:small;"><span style="font-family:verdana,geneva,sans-serif;">Add the following commands to the global configuration section of the router:&nbsp;</span></span>
<span style="font-size:small;"><span style="font-family:verdana,geneva,sans-serif;">Add the following commands to the global configuration section of the router:&nbsp;</span></span>
Line 28: Line 28:
**<span style="font-size:small;"><span style="font-family:courier new,courier,monospace;">exit</span></span>  
**<span style="font-size:small;"><span style="font-family:courier new,courier,monospace;">exit</span></span>  


&nbsp;


*<span style="font-size:small;"><span style="font-family:courier new,courier,monospace;">wr mem</span></span>  
*<span style="font-size:small;"><span style="font-family:courier new,courier,monospace;">wr mem</span></span>  
Line 33: Line 35:
&nbsp;
&nbsp;


<span style="font-size:medium;"><span style="font-family:verdana,geneva,sans-serif;">Interface configuration mode</span></span>
<span style="font-size:medium;"><span style="font-family:verdana,geneva,sans-serif;">Enter Interface Configuration Mode</span></span>


''<span style="font-family:verdana,geneva,sans-serif;">Note:&nbsp;This is a general applicable but not the only way for enabling NetFlow exports per interface. &nbsp;Please read your Cisco documentation for more information on how to configure NetFlow.</span>''
''<span style="font-family:verdana,geneva,sans-serif;">Note:&nbsp;This is a general applicable but not the only way for enabling NetFlow exports per interface. &nbsp;Please read your Cisco documentation for more information on how to configure NetFlow.</span>''
Line 44: Line 46:
**<span style="font-family:courier new,courier,monospace;">exit</span>  
**<span style="font-family:courier new,courier,monospace;">exit</span>  


&nbsp;


*<span style="font-family:courier new,courier,monospace;">wr mem</span>  
*<span style="font-family:courier new,courier,monospace;">wr mem</span>  


<br/> &nbsp;
<br/> <span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:medium;">Debug</span></span>
 
<span style="font-size:medium;">Debugging</span><br/> &nbsp;


*<span style="font-size:small;"><span style="font-family:verdana,geneva,sans-serif;">Use the IOS command </span><span style="font-family:courier new,courier,monospace;">sh ip flow export</span><span style="font-family:verdana,geneva,sans-serif;">&nbsp;and check if any flows are exported</span></span>  
*<span style="font-size: small; font-family: verdana, geneva, sans-serif;">Use the IOS command sh ip flow export&nbsp;and check if any flows are exported</span>  
*<span style="font-size:small;"><span style="font-family:verdana,geneva,sans-serif;">Use the IOS command </span><span style="font-family:courier new,courier,monospace;">sh ip flow top-talkers</span><span style="font-family:verdana,geneva,sans-serif;">and check if the top-talker list is populated</span></span>  
*<span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:small;">Use the IOS command sh ip flow top-talkersand check if the top-talker list is populated</span></span>  


<br/> &nbsp;
<br/> &nbsp;

Revision as of 14:32, 15 October 2016

Introduction

OptiView XG is NOT a NetFlow collector, but it is possible to querry a Cisco routers for network flow based statistics.  The data (top-n) will be available under 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.

 

Enter Global Configuration Mode

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

Note: the flow export destination address is not important, but you must enable flow exports in order to populate the flow top-talker list. 

  • 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 127.0.0.1 2055
    • ip flow-top-talkers
    • top 100
    • sort-by bytes
    • cache-timeout 300000
    • exit


 

  • wr mem

 

Enter Interface Configuration Mode

Note: This is a general applicable but not the only way for enabling NetFlow exports per interface.  Please read your Cisco documentation for more information on how to configure NetFlow.

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 sub-interfaces, dialers or tunnels.  

  • conf t
    • interface <interface name>
    • ip flow egress
    • exit


 

  • wr mem


Debug

  • Use the IOS command sh ip flow export and check if any flows are exported
  • Use the IOS command sh ip flow top-talkersand check if the top-talker list is populated