Knowledge Base

Configuration Tips for Cisco Routers and PRTG

Esta pagina no esta disponible en Español. Rogamos su comprension.

This article includes several tips&tricks for your Cisco router configuration when using PRTG Traffic Grapher with SNMP or NetFlow.

For SNMP based monitoring

The following command makes sure that the router does not change the numbering of the interfaces when interfaces are added or removed so you do not have to edit your PRTG sensor setup:

snmp-server ifindex persist

Setting up Netflow Version 5 on Cisco Routers for PRTG

Using the Netflow protocol you can monitor the bandwidth usage of all packets going through a router. For each flow of data the router sends a netflow packet with connection and bandwidth information to a monitoring system running PRTG. In PRTG you must create a Netflow Collector that accepts these packets and does the accounting.

The advantage of using NetFlow is that it only requires little CPU load on the router itself (e.g. 10.000 active flows create about 7% additional CPU load, 45.000 active flows account for about 20% additional CPU load, see Cisco's performance white paper) and also on the machine running PRTG, especially much less than a Packet Sniffing sensor.

You must edit your router's setup and save it as new startup configuration:

  • Log into the router
  • run "enable" command giving you admin access
  • run "configure" command

Enabling Netflow for each interface

The following command must be repeated for each single interface to enable Netflow for each one (replace "FastEthernet 0/1" with the names of the interfaces on your router):

interface FastEthernet 0/1
ip route-cache flow
exit

Setting Netflow Options

See the Code section below. You may want to copy the script, edit it with your IPs and paste it into your router telnet session. When you are done and have tested the new configuration remember to copy the new configuration to the startup configuration

copy running-config startup-config

Disabling Netflow

This command will tell the router not to send any netflow packets to the specified address:

no ip flow-export destination (address) (port)

To disable Netflow for a specific interface use these commands:

interface (interface) (interface number)
no ip route-cache flow
Exit

Links for more information about NetFlow

Sample Code

!
		! Step 1: Enabling Netflow
		!
		! Note: For PRTG we need Netflow Version 5, no other Netflow version is supported currently
		!
		ip flow-export version 5
		!
		! Note: we recommend these values for the timeouts
		!
		! timeout active value is in minutes
		ip flow-cache timeout active 5
		!
		! timeout inactive value is in seconds
		ip flow-cache timeout inactive 10 
		!
		! Step 2: Setting the target address for NetFlow Packets:
		!
		! Replace 10.0.0.200 with the IP address of your machine running PRTG
		! Replace 9991 with another port number of your choice if desired
		!
		ip flow-export destination 10.0.0.200 9991
		!
		! Step 3: You can optionally send all Netflow packets to one other machine, too
		!
		ip flow-export destination 10.0.0.201 9991
		!
		! Step 4: Create a "Netflow Collector" in PRTG (V4.3 or later) and enter the port number set above
		!
		! That's it
		

By Category

PRTG Traffic Grapher V6

Related Articles