两个开源的Netflow Collector
1、flow-tools: 附带一堆flow-filter flow-report flow-stat等很有用的工具,通过过简单的写配置文件和脚本操作就可以实现你想要的效果,唯一遗憾,不支持Netflow v9。官方主页:http://www.splintered.net/sw/flow-tools/
2、NFDUMP:这个软件支持Netflow v9,但是自带的工具就相对较少,要实现自己的功能或许需要多写一些脚本才行。官方主页:http://nfdump.sourceforge.net/ http://sourceforge.net/projects/nfsen/
在Cisco 配置Netflow的方法:
在需要收集Netflow的接口启用Netflow功能
interface fastethernet 0/0 ip route-cache flow
使用下面的命令告诉路由器发送Netflow数据
ip flow-export ip flow-export version 5 ip flow-cache timeout active 5
This breaks up long-lived flows into 5-minute segments. You can choose any number of minutes between 1 and 60, but should be equal or less than the file rotation period – typically 5 minutes,If you leave it at the default of 30 minutes your traffic reports will have spikes.
在Cisco 6500/7600系列中,确认已经使能”NDE(Netflow Data Export)”.
mls flow ip interface-full mls flow ipv6 interface-full mls nde sender version 5
注意IPv6 NDE还没有实现,但是你依然可以使用“show mls netflow ipv6”来查看目前活动的IPv6流数据。
在负载比较重的路由器上可以使用如下设置:
mls aging fast time 4 threshold 2 mls aging normal 32 mls aging long 900