357
•
The switch might sample multiple packets from the next 4000 packets.
•
The switch might sample no packets from the third 4000 packets.
However, the switch samples one packet from 4000 packets on average.
Examples
# Specify the random flow sampling mode on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] sflow sampling-mode random
Related commands
sflow sampling-rate
sflow sampling-rate
Use
sflow sampling-rate
to enable flow sampling and specify the number of packets out of which
flow sampling will sample a packet on an interface.
Use
undo sflow sampling-rate
to restore the default.
Syntax
sflow sampling-rate
rate
undo sflow sampling-rate
Default
Flow sampling is disabled.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Predefined user roles
network-admin
mdc-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.
Examples
# Enable flow sampling to sample a packet out of 4000 packets on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] sflow sampling-rate 4000
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.