ip netstream sampler(Traffic behavior view)

Function

The ip netstream sampler command enables the sampling of NetStream statistics.

The undo ip netstream sampler command disables the sampling of NetStream statistics.

By default, the sampling of NetStream statistics is disabled. That is, the system collects statistics about all packets.

Format

{ ip | ipv6 } netstream sampler { fix-packets packet-interval | fix-time time-interval | random-packets packet-interval }

undo { ip | ipv6 } netstream sampler [ fix-packets packet-interval | fix-time time-interval | random-packets packet-interval ]

Parameters

Parameter Description Value
ipv6

Specifies the IPv6 packets.

-

fix-packets packet-interval

Specifies the number of packets used as an interval for fixed packet sampling.

The value is an integer ranging from 1 to 65535.

fix-time time-interval

Specifies an interval for fixed packet sampling.

The value is an integer that ranges from 5 to 30000, in ms.

random-packets packet-interval

Enables random sampling and specifies the number of packets used as the interval for sampling.

The value is an integer that ranges from 1 to 65535.

Views

Traffic behavior view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
qos write

Usage Guidelines

Usage Scenario

To charge the subscribers or collect traffic statistics based on traffic classifiers, you can configure the traffic classifier and run this command to enable sampling of NetStream statistics. Then, you need to configure the traffic policy and apply the policy to interfaces.

Precautions

Traffic sampling using a share-mode traffic policy is not supported.

When downstream ACL-based sampling is configured on a VLANIF interface, the output packet sampling report and the sampling content obtained using the command show the upstream information.

Downstream ACL-based sampling on a VLANIF interface overwrites inbound interface-based and ACL-based sampling.

Example

# Specify an interval of 100 packets for fixed packet sampling of NetStream statistics in the traffic behavior c1.
<HUAWEI> system-view
[~HUAWEI] traffic behavior c1
[*HUAWEI-behavior-c1] ip netstream sampler fix-packets 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >