
158
2.
With flow sampling enabled on an Ethernet interface, the sFlow agent samples packets and
encapsulates them into sFlow packets. For the configuration, see “
3.
With counter sampling enabled on an Ethernet interface, the sFlow agent periodically collects the
statistics of the interface and encapsulates the statistics into sFlow packets. For the configuration,
see “
.”
Configuring sFlow
Before configuring sFlow, complete the following tasks:
•
Configure the IP address, flow sampling, and counter sampling of the sFlow collector on the device.
•
Configure the sFlow collector.
Configuring the sFlow agent and sFlow collector
The sFlow feature enables the remote sFlow collector to monitor the network and analyze sFlow packet
statistics.
Follow these steps to configure the sFlow agent and sFlow collector:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Specify the IP
address for the
sFlow agent
sflow agent
{
ip
ip-address
|
ipv6
ipv6-address
}
Optional
Not specified by default. The device
periodically checks the existence of the sFlow
agent 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 selected IP address.
NOTE:
•
H3C recommends configuring an IP address
manually for the sFlow agent.
•
Only one IP address can be specified for the
sFlow agent on the device.
Configure the sFlow
collector
sflow collector
collector-id
{ {
ip
ip-address
|
ipv6
ipv6-address
}
|
datagram-size
size
|
description
text
| port
port-number
|
time-out
seconds
} *
Required
By default, the device presets a number of sFlow
collectors.
Use the
display sflow
command to display the
parameters of the preset sFlow collectors.
Specify the source IP
address of sent
sFlow packets
sflow source
{
ip
ip-address
|
ipv6
ipv6-address
} *
Optional
Not specified by default.
Configuring flow sampling
Follow these steps to configure flow sampling:
To do…
Use the command…
Remarks
Enter system view
system-view
—