1) 将下载好的For Linux的安装文件FTP至Linux Server(Linux设定固定IP);
2) 配置系统;
配置Linux中的hosts文件,固定本机的机器名,环回IP和固定IP地址,如下:
[root@CentOS software]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 CentOS
192.168.1.50 CentOS
3) 改变文件权限;
进入Linux平台安装文件所在目录,然后改变权限,如下
[root@CentOS /]# cd software/
[root@CentOS software]# ls
FreeSMonitor ManageEngine_NetFlowAnalyzer_9500-32bit-Linux.bin
[root@CentOS software]# chmod a+x ManageEngine_NetFlowAnalyzer_9500-32bit-Linux.bin
登入Linux图行界面,并在命令行进入安装文件所在目录,进行安装,命令如下:
[root@CentOS software]# ./ManageEngine_NetFlowAnalyzer_9500-32bit-Linux.bin
在弹出图安装画面后一直Next即可,如果中间需要调整相应参数的话,可以进行调整,不过后期进入WEB页面时也可以调整。(此处因为我们先装了“飞思网巡”,被占用了9996Port,所以我们的NetFlow需要调整Listening Port为9999)
进入安装好之后的软件的bin目录,运行linkAsService.sh(前提条件是,此软件未运行),如下:
[root@CentOS software]# cd /root/ManageEngine/NetFlow/bin/
[root@CentOS bin]# ./linkAsService.sh
[root@CentOS bin]# /etc/init.d/netflowanalyzer start
[root@CentOS bin]# ./run.sh
所有命令都在bin目录下,如下:
[root@CentOS software]# cd /root/ManageEngine/NetFlow/bin/
[root@CentOS bin]# ls
about.txt jboss_init_suse.sh na_service shutdown.sh wrapper
DBConnProp.sh jndi.properties netflowananlyzer.pid startDB.sh wrapper.log
GetDiskSpace.vbs license reinitializeDB.sh startDB_utf8.sh
GetFreeSpace.vbs linkAsService.sh Restore_MySql5.sh stopDB.sh
ipv6asadump.fmt localhost.dtd run.sh UniqueIDLinux.sh
ipv6dump.fmt lock.file setcommonenv.sh UpdateManager.sh
在浏览器中输入NetFlow Server的地址并跟上设定好的Port即可,如下:
http://192.168.1.X:8080
初始用户名和密码为:admin/admin
示例配置
interface GigabitEthernet0/0
ip flow ingress 在接口上配置NetFlow采样
或(要看IOS支持)
ip route-cache flow 在接口上配置NetFlow采样
interface GigabitEthernet0/1
ip flow ingress
或(要看IOS支持)
ip route-cache flow
ip flow-cache timeout inactive 30 配置NetFlow失活时间,单位分钟
ip flow-cache timeout active 1 配置NetFlow更新包周期,单位分钟
ip flow-export source GigabitEthernet0/0 (LAN port) 指定发送NF包的源接口
ip flow-export version 5 指定NF的版本,现在常用的是V5和V9
ip flow-export destination 192.168.1.X 9999 指定NF Server的地址和Port
snmp-server community public RO 指定与NF Server通信用的SNMP,状态为只读
snmp-server ifindex persist 指定在NetFlow中显示Port别名
snmp-server host 192.168.1.X RO 指定SNMP通讯服务器
logging 192.168.1.X
router#sh ip flow export 显示当前的NetFlow配置,最需要注意的是“Exporting using source”
Flow export v5 is enabled for main cache
Exporting flows to 202.XX.XX.X (9996) 192.168.1.X (9999)
Exporting using source IP address 10.117.3.190
Version 5 flow records
175630 flows exported in 13850 udp datagrams
0 flows failed due to lack of export packet
0 export packets were sent up to process level
0 export packets were dropped due to no fib
0 export packets were dropped due to adjacency issues
0 export packets were dropped due to fragmentation failures
0 export packets were dropped due to encapsulation fixup failures
还有另外一个命令是:router#sh ip cache flow 可以看到当前活动流的信息,显示设备输出了多少NetFlow数据。