Configure sFlow Sampling Mode
Configuration Condition
Before configuring the sFlow sampling mode, first complete the following task:
- Create the agent role
- Create the receiver role
Configure sampler Sampling Mode
In the sampler sampling mode, that is interface flow sampling, the switching chip samples the traffic received by the interface at random. After getting the sample packet, first copy the head information of the packet, resolve the copied content, get the desired sample information from it, and at last, encapsulate the sample information and send to the corresponding third-party receiver of the receiver role.
Table 6-4 Configure the interface sampler sampling mode
Step
|
Command
|
Description
|
Enter the global configuration mode
|
configure terminal
|
-
|
Enter the L2 Ethernet interface configuration mode
|
interface interface-name
|
-
|
Configure the sampler sampling mode
|
sflow sampler receiver receiver-index [ header-size header-size-value ] [ sample- rate sample-rate-value ] [ direction direction-value ] [ type type-value ]
|
Mandatory
By default, do not configure the sampler sampling mode.
|
Configure poller Sampling Mode
The poller sampling mode, that is interface regular polling sampling, is to regularly encapsulate the packet and traffic statistics information on the interface within the period and send to the corresponding third-party receiver of the receiver role.
Table 6-5 Configure the poller sampling mode
Step
|
Command
|
Description
|
Enter the global configuration mode
|
configure terminal
|
-
|
Enter the L2 Ethernet interface configuration mode
|
interface interface-name
|
-
|
Configure the poller sampling mode
|
sflow poller poller-index receiver receiver-index [ interval interval-value ] [ type type-value ]
|
Mandatory
By default, do not configure the poller sampling mode.
|