How to configure sFlow sampling on a CE series switch

An sFlow agent provides two sampling modes: flow sampling and counter sampling.
1. Flow sampling: An sFlow agent samples and analyzes packets in a direction on a specified interface based on a sampling rate, encapsulates the analysis result into sFlow packets, and then sends the sFlow packets to an sFlow collector.
2. Counter sampling: An sFlow agent periodically collects traffic statistics on interfaces, processor, and memory, encapsulates collected information into sFlow packets, and sends the sFlow packets to an sFlow collector.
Flow sampling and counter sampling are independent of each other. Flow sampling obtains information about flows of a specified service, whereas counter sampling obtains traffic statistics on an interface.

# Set the flow sampling rate on 10GE1/0/1 to 32768.
system-view
[~HUAWEI] interface 10ge/0/1
[~HUAWEI-10GE1/0/1] sflow sampling collector 1 rate 32768 inbound outbound
[*HUAWEI-10GE1/0/1] commit
# Set the counter sampling interval on 10GE1/0/1 to 20s.
system-view
[~HUAWEI] interface 10ge/0/1
[~HUAWEI-10GE1/0/1] sflow counter collector 1
[*HUAWEI-10GE1/0/1] commit

Scroll to top