Recently I was wondering what was the best way to analyze and monitor the traffic that passes the routers between sites \ offices.
Â
After researching the issue I found out the Cisco NetFlow protocol allows you to analyze the traffic that pass the router, Â however In order to get this done we need to
Configure our routers to do a few things:
Â
1.      Install Software that analyze NetFlow
2.      Enable NetFlow on the router
3.      Configure the router to send the logs to a netflow analyzer server (needs to be configure before)
Â
Once you got the server or PC up and running with a netflow software (there are a lot of free application, I used Manage Engine NetFlow Analyzer 6 which allows you to monitor 2 router for free) , We need to tell the router to send the NetFlow logs to the server, To do that here is the commands we need to type:
Â
Â
Router(config)# ip flow-export destination {hostname|ip_address} 9996Â Â Â Â
Router(config)# Â ip flow-export source {interface} {interface_number}Â Â Â Â
Router(config)#ip flow-export version 5Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
Router(config)# Â ip flow-export version 5
Router(config)# Â ip flow-cache timeout inactive 15
Router(config)# Â snmp-server ifindex persist
Â
Â
To monitor and Check that we configured the Router to send the logs type:
Â
Router# show ip flow export
Router#Â Â show ip cache flow
Router# Â show ip cache verbose flow
Â
Â
Configuration Sample:
Â
router#configure terminal
router(config)#interface FastEthernet 0/1
router(config-if)#ip route-cache flow
router(config-if)#exit
router(config)#ip flow-export destination 10.60.1.254 9996
router(config)#ip flow-export source FastEthernet 0/1
router(config)#ip flow-export version 5
router(config)#ip flow-cache timeout active 1
router(config)#ip flow-cache timeout inactive 15
router(config)#snmp-server ifindex persist
router(config)#^Z
router# copy run start
router#show ip flow export
router#show ip cache flow
Â
Â
Â
To Cancel NetFlow:
Â
no ip flow-export destination {hostname|ip_address} {port_number}
no ip route-cache flow
Â
Â