sflow flow-sampling collector

Function

The sflow flow-sampling collector command enables flow sampling on an interface.

The undo sflow flow-sampling collector command disables flow sampling on an interface.

By default, flow sampling on an interface is disabled.

Format

sflow flow-sampling collector collector-id [ secondary secondary-collector-id ] { inbound | outbound }

undo sflow flow-sampling collector collector-id [ secondary secondary-collector-id ] { inbound | outbound }

Parameters

Parameter Description Value
collector-id

Specifies the ID of an sFlow collector.

The value is an integer ranging from 1 to 2.

secondary secondary-collector-id

Specifies the secondary ID of an sFlow collector.

The value is an integer ranging from 1 to 2.

inbound

Specifies to get inbound direction sampling packet.

-

outbound

Specifies to get inbound direction sampling packet.

-

Views

100GE interface view, 25GE interface view, 400GE interface view, 40GE interface view, 50GE interface view, GE interface view, GE electrical interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
sflow write

Usage Guidelines

Usage Scenario

When flow sampling is enabled on an interface, you can specify the inbound or outbound direction. Additionally, you can configure two sFlow collectors to back up each other.

Precautions

sFlow cannot be configured on a channelized sub-interface with network slicing configured.

Example

# Enable flow sampling in the inbound direction.
<HUAWEI> system-view
[*HUAWEI] sflow
[~HUAWEI-sflow] sflow collector 1
[~HUAWEI-sflow-collector-1] quit
[~HUAWEI-sflow] quit
[~HUAWEI] interface GigabitEthernet0/1/1
[*HUAWEI-GigabitEthernet0/1/1] sflow flow-sampling collector 1 inbound
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >