Configuring sFlow Agent and Collector Information
Context
The sFlow controller's address is the destination address of sFlow packets.
The IP addresses of the sFlow agent and collector must be valid addresses of device interfaces, which can be IPv4 unicast addresses or global IPv6 unicast addresses, but not link-local addresses.
Procedure
- Run system-view
The system view is displayed.
- (Optional) Run sflow agent { ip [ vpn-instance vpn-instance-name ] ip-address | ipv6 [ vpn-instance vpn-instance-name ] ipv6-address }
An IP address is configured for an sFlow agent.
By default, the source IP address is the agent's outbound interface address in the route pointing to the collector.
A maximum of two sFlow agents can be configured in the system. Each VPN instance of an address family supports only one agent. If you run the sflow agent command multiple times, only the latest configuration takes effect.
- Run 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 ]
Parameters are set for an sFlow collector.
When creating an sFlow collector, specify the ID and IP address. If the aging time of the sFlow collector is not set, the sFlow collector is not aged out by default and the aging time cannot be changed. A maximum of two sFlow collectors can be configured in the system.