Configuring the sFlow agent and sFlow collector
information
Step
1.
Enter system
view.
2.
Configure an
IP address
for the sFlow
agent.
3.
Configure the
sFlow
collector
information.
4.
Specify the
source IP
address of
sFlow
packets.
Configuring flow sampling
Perform this task to configure flow sampling on an Ethernet interface. The sFlow agent samples
packets on that interface according to the configured parameters, encapsulates them into sFlow
packets, and sends them in UDP packets to the specified sFlow collector.
To configure flow sampling:
Step
1.
Enter system view.
2.
Enter Layer 2 or Layer 3
Ethernet interface view.
3.
Set the flow sampling mode.
4.
Specify the number of
packets out of which flow
sampling samples a packet
on the interface.
Command
system-view
sflow agent { ip ip-address |
ipv6 ipv6-address }
sflow collector collector-id
{ [ vpn-instance
vpn-instance-name ] { ip
ip-address | ipv6
ipv6-address } |
datagram-size size |
description text | port
port-number | time-out
seconds } *
sflow source { ip ip-address
| ipv6 ipv6-address } *
Command
system-view
interface interface-type
interface-number
sflow sampling-mode
{ determine | random }
sflow sampling-rate interval
Remarks
N/A
Optional.
Not specified by default. The device periodically
checks whether the sFlow agent has an IP address. If
the sFlow agent has no IP address configured, the
device automatically selects an interface IP address
for the sFlow agent but does not save the IP address.
NOTE:
•
Hewlett Packard Enterprise recommends that
you manually configure an IP address for the
sFlow agent.
•
Only one IP address can be specified for the
sFlow agent on the device.
By default, the device presets a certain number of
sFlow collectors.
Use display sflow to display the parameters of the
preset sFlow collectors.
Optional.
Not specified by default.
159
Remarks
N/A
N/A
Optional.
The default setting is random.
By default, packet sampling is
disabled.