This article applies as of PRTG 22
Configuration tips for Cisco routers and PRTG
This article includes several tips and tricks for your Cisco router configuration when you use PRTG with SNMP or Netflow.
SNMP-based monitoring
The following command makes sure that your Cisco router does not change the numbering of the interfaces when they are added or removed:
snmp-server ifindex persist
Setting up NetFlow v5, v9, or IPFIX on Cisco routers for PRTG
With the NetFlow protocol, you can monitor the bandwidth usage of all packets that go through a router. For each flow of data, the router sends a NetFlow packet with connection and bandwidth information to PRTG. In PRTG, you must create a collector that accepts these packets and does the accounting.
The advantage of NetFlow is that the CPU load is very light on the router and on the PRTG core server system. For example, 10,000 active flows create about 7% additional CPU load, and 45,000 active flows account for about 20% additional CPU load. This is much less than a Packet Sniffer sensor requires.
To enable NetFlow, edit your router's setup and save it as the new startup configuration:
- Log in to the router.
- Run the command enable to get admin access.
- Run the command configure.
Enabling NetFlow for each interface
To enable NetFlow for all interfaces, repeat the following command for all of them. 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. We recommend that you copy the script, edit it with your IP addresses, 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
To stop your router from sending NetFlow packets to a specific address, use the following command:
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
Sample NetFlow code
!
! Step 1: Enable NetFlow
!
! Note: For PRTG, you need NetFlow v5 or v9 or IPFIX.
! No other NetFlow versions are currently supported.
!
ip flow-export version 5
! or
! ip flow-export version 9
!
! Note: We recommend that you use 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: Set the target address for NetFlow packets:
!
! Replace 10.0.0.200 with the IP address of the PRTG core server system
! Replace 9991 with another port number of your choice if desired
!
ip flow-export destination 10.0.0.200 9991
!
! Step 3: Optionally, you can also send all NetFlow packets to one other system:
!
ip flow-export destination 10.0.0.201 9991
!
! Step 4: Create a "NetFlow sensor" in PRTG (7 or later) and enter the port number set above.
!
More
Add comment