
159
To do…
Use the command…
Remarks
Enter Layer 2 Ethernet interface
view
interface
interface-type
interface-number
—
Set the Flow sampling mode
sflow sampling-mode
{
determine
|
random
}
Optional
random
by default.
Set the interval for flow sampling
sflow sampling-rate
interval
Required
Not set by default.
Set the maximum copied length of
a sampled packet
sflow flow max-header
length
Optional
By default, up to 128 bytes of a sampled
packet can be copied. You are
recommended to use the default value.
Specify the sFlow collector for flow
sampling
sflow flow collector
collector-id
Required
No collector is specified for flow
sampling by default.
NOTE:
The switch does not support the flow sampling mode
determine
.
Configuring counter sampling
Follow these steps to configure counter sampling:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Layer 2 interface view
interface
interface-type
interface-number
—
Set the interval for counter
sampling
sflow counter interval
seconds
Required
Counter sampling is disabled by default.
Specify the sFlow collector
for counter sampling
sflow counter collector
collector-id
Required
No collector is specified for counter
sampling by default.
Displaying and maintaining sFlow
To do…
Use the command…
Remarks
Display sFlow configuration information
display sflow
[
slot
slot-number
] [
|
{
begin
|
exclude
|
include
}
regular-expression
]
Available in any view
sFlow configuration example
Network requirements
As shown in
, Host A is connected with Server through Device (sFlow agent).