要执行Juniper路由器流配置,请遵循以下步骤:
要在这些路由器上启用NetFlow,须配置3个映射:
1) 导出器映射
2) 采样器映射
3) 流监视器映射
router(config)# flow exporter-map NFAEMrouter(config-NFAEM )# destination 192.168.1.1router(config-NFAEM )# source gi0/0router(config-NFAEM )# transport udp 9996router(config-NFAEM )# version v9router(config-NFAEM-ver)# template data timeout 60router(config-NFAEM -ver)# options interface-table timeout 60router(config-NFAEM -ver)# exit
router(config)# sampler-map NFASMrouter(config-NFASM )# random 1 out-of 65535router(config)# exit
请注意您前面创建的导出器映射与流监视器映射相关联。
outer(config)# flow monitor-map NFAMMrouter(config-NFAMM)# record ipv4 —> 配置IPv4、IPv6或MPLS的流记录映射名称。使用ipv4-ipv6-字段关键字在支持MPLS的NetFlow中收集IPv4和IPv6字段。router(config-NFAMM)# exporter NFAEM —> 在这里使用导出器映射的名称。router(config-NFAMM)# cache timeout active 60router(config-NFAMM)# cache timeout inactive 15router(config-NFAMM)# exit
下一步是将监视器映射和采样器映射应用到所有活动接口。在每个接口配置模式下应用以下命令:
router(config)# interface Gi0/0router(config-if)# flow ipv4 monitor NFAMM sampler NFASM ingressrouter(config-if)# exit
已完成,现在可以开始监控了。