交换机
园区网交换机
数据中心与云计算交换机
中小网络精简型交换机
工业交换机
意图网络指挥官
无线
放装型无线接入点
墙面型无线接入点
智分无线接入点
室外无线接入点
场景化无线
无线控制器
小锐A系列
统一运维
身份管理
服务产品
运营商
政府
金融
互联网
电力能源
制造业
高教/职教
医疗卫生
交通
地产酒店文旅·连锁服务
公共安全
采样基本配置:
ip flow-export destination 192.168.217.76 1111 //指定netflow服务器ip,必配
ip flow-export destination ipv6 2222::2222 2222 //指定netflow服务器ipv6地址,应用于ipv6采样时,选配
ip flow-export source loopback 0 //指定交换机的通信ip
ip flow-export version 10 //指定ipfix流的版本,通常是v9,v10,必配
ip flow-export template refresh-rate 200 //指定模板刷新时间,选配
ip flow-export template timeout-rate 60 //指定模板超时时间,选配
ip flow-cache entries 580000 //指定流缓存,选配
ip flow-cache timeout active 1 //指定活跃流的超时时间,选配
ip flow-cache timeout inactive 10 //指定非活跃流的超时时间,选配
ip flow-top-talkers //指定按照报文数多少来做流排列,显示前50的流,选配
Ruijie(config-flow-top-talkers)# top 50
Ruijie(config-flow-top-talkers)# sort-by packets
在全局采样的基本配置完成后,还需要进行接口相关的采样配置,根据需求的不同,通常分以下两种常见的采样模式:
1)输出流信息的接口类型为物理口的二、三层交换流采样配置
Ruijie# config terminal
Ruijie(config)# ip flow-export interface-type port //输出流信息接口类型为物理口
Ruijie(config)#ip flow layer2-switched enable //二层流也采集,默认只采样三层流
Ruijie(config)# interface gigabitEthernet 1/1
Ruijie(config-if)# ip flow ingress //接口1/1 参加输入采样
Ruijie(config)# interface gigabitEthernet 1/2
Ruijie(config-if)# ip flow ingress //接口1/2 参加输入采样
2)输出流信息的接口类型为VLAN 并且在VLAN 成员口上配置采样
示例:只统计三层流,gigabitEthernet 4/2-3(trunk口) 同时属于VLAN 10和VLAN20,只对从4/2 接口出,并且输出为SVI20 的报文进行1:1 采样,其它不采样,配
置如下:
Ruijie# config terminal
Ruijie# ip flow-export interface-type vlan //输出流信息接口类型为vlan口,必配
Ruijie(config)# interface gigabitEthernet 4/2
Ruijie(config-if)# ip flow egress //接口4/2 参加输出采样
Ruijie(config-if)# exit
Ruijie(config)# interface vlan 20
Ruijie(config-if)# ip flow egress //使能SVI 的输出流统计,采样率为1 比1
Ruijie(config-if)# exit
对SVI成员口采样,要求SVI及成员物理口都需要配置采样使能。