配置sFlow Agent和sFlow Collector信息
背景信息
在配置sFlow的任务中,必须创建一个sFlow Collector,并指定sFlow报文的输出目的地址。
sFlow Agent的IP地址和sFlow Collector的IP地址必须为设备接口上已存在的合法单播地址,IPv6地址必须为全球单播地址,不允许配置本地链路地址。
操作步骤
- 执行命令system-view,进入系统视图。
- (可选)执行命令sflow agent { ip [ vpn-instance vpn-instance-name ] ip-address | ipv6 [ vpn-instance vpn-instance-name ] ipv6-address },配置sFlow Agent的IP地址。
缺省情况下,Agent自动选择到Collector的路由出接口的IP地址作为sFlow协议报文的源IP地址。
Agent全局只支持配置2个。每个地址族每个VPN实例只允许配置一个Agent。对相同地址族和VPN实例进行操作,按最后一次配置生效。
- 执行命令sflow collector collector-id { ip [ vpn-instance vpn-instance-name ] ip-address | ipv6 [ vpn-instance vpn-instance-name ] ipv6-address } [datagram-size datagram-size | port port-num | time-out time ] * [ description description ],配置sFlow Collector相关参数。
创建Collector必须配置的参数为collector-id以及IP地址,如果需要配置time也必须在该阶段配置,否则默认不超时删除,并且后续无法修改。Collector全局支持配置2个。