< Home

sflow flow-sampling max-header

Function

The sflow flow-sampling max-header command sets the maximum bytes of data that can be copied from a sampled packet in flow sampling.

The undo sflow flow-sampling max-header command restores the default maximum bytes of data.

By default, a maximum of 64 bytes of data can be copied from a sampled packet in flow sampling.

Format

sflow flow-sampling max-header length

undo sflow flow-sampling max-header

Parameters

Parameter

Description

Value

length

Specifies the maximum bytes of data that can be copied from a sampled packet.

The unit is byte. The value is an integer that ranges from 18 to 512. The default value is 64.

Views

Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, MultiGE interface view, 40GE interface view, port group view

Default Level

3: Management level

Usage Guidelines

Usage scenario

An sFlow agent samples packets in a direction of an interface based on a sampling rate, analyzes packets, encapsulates sampled packets and analysis result into sFlow packets, and then sends the sFlow packets to an sFlow collector. The datagram size of sFlow packets is set using the sflow collector [ datagram-size datagram-size ] command. If only the information carried in the packet header is required, run the sflow flow-sampling max-header command to set the maximum length of data starting from the original packet header that can be copied from a sampled packet.

Precautions

The sflow flow-sampling rate command only applies to Layer 2 physical interfaces, but does not apply to Eth-Trunk or Layer 3 interfaces. However, this command takes effect on the Layer 3 interface which is switched from a Layer 2 interface using the undo portswitch command, and can take effect on Eth-Trunk member interfaces.

Example

# Set the maximum length of data starting from the original packet header that can be copied from a sampled packet to 256 bytes.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] sflow flow-sampling max-header 256

# Configure a port group pg1 that has member ports GE0/0/2 and GE0/0/3, and set the maximum length of data starting from the original packet header that can be copied from a sampled packet to 256 bytes for the port group pg1.

[HUAWEI] port-group pg1
[HUAWEI-port-group-pg1] group-member gigabitethernet 0/0/2
[HUAWEI-port-group-pg1] group-member gigabitethernet 0/0/3
[HUAWEI-port-group-pg1] sflow flow-sampling max-header 256
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >