325
Syntax
sflow sampling-rate rate
undo sflow sampling-rate
Default
Flow sampling is disabled.
Views
Layer 2 Ethernet interface view
Predefined user roles
network-admin
Parameters
rate: Specifies the number of packets out of which flow sampling will sample a packet on the
interface. The value range for this argument is 1000 to 500000. As a best practice, set the sampling
interval to 2
n
that is greater than or equal to 8192, for example, 32768.
Examples
# Enable flow sampling to sample a packet out of 32768 packets on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] sflow sampling-rate 32768
Related commands
sflow sampling-mode
sflow source
Use sflow source to specify the source IP address of sent sFlow packets.
Use undo sflow source to restore the default.
Syntax
sflow source { ip ipv4-address | ipv6 ipv6-address } *
undo sflow source { ip | ipv6 } *
Default
The source IP address of sent sFlow packets is determined by routing.
Views
System view
Predefined user roles
network-admin
Parameters
ip ipv4-address: Specifies the source IPv4 address of sent sFlow packets.
ipv6 ipv6-address: Specifies the source IPv6 address of sent sFlow packets.
Examples
# Specify the source IPv4 address of sent sFlow packets as 10.0.0.1.
<Sysname> system-view
[Sysname] sflow source ip 10.0.0.1