277
Tasks at a glance
Perform at least one of the following tasks:
•
•
Configuring the sFlow agent and sFlow collector
information
Step
Command
Remarks
1.
Enter system view.
system-view
N/A
2.
(Optional.)
Configure an IP
address for the
sFlow agent.
sflow agent
{
ip ip-address
|
ipv6
ipv6-address
}
By default, no IP address is configured for the
sFlow agent. The switch periodically checks
whether the sFlow agent has an IP address. If
not, the switch automatically selects an IPv4
address for the sFlow agent but does not save
the IPv4 address in the configuration file.
NOTE:
•
As a best practice, manually configure an IP
address for the sFlow agent.
•
Only one IP address can be configured for
the sFlow agent on the switch, and a newly
configured IP address overwrites the
existing one.
3.
Configure the
sFlow collector
information.
sflow collector collector-id
[
vpn-instance
vpn-instance-name
] {
ip
ip-address
|
ipv6
ipv6-address
}
[
port
port-number
|
datagram-size
size
|
time
-
out seconds
|
description text
] *
By default, no sFlow collector information is
configured.
The value range for the
collector-id
argument is 1
to 10.
4.
(Optional.) Specify
the source IP
address of sFlow
packets.
sflow source
{
ip
ip-address
|
ipv6 ipv6-address
} *
By default, the source IP address is determined
by routing.
Configuring flow sampling
Perform this task to configure flow sampling on an Ethernet interface. The sFlow agent performs the
following tasks:
1.
Samples packets on that interface according to the configured parameters.
2.
Encapsulates the packets into sFlow packets.
3.
Encapsulates the sFlow packets in the UDP packets and sends the UDP packets to the
specified sFlow collector.
To configure flow sampling:
Step
Command
Remarks
1.
Enter system view.
system-view
N/A