< Home

ip netstream sampler

Function

The ip netstream sampler command configures the packet sampling function for IPv4 packets on an interface.

The undo ip netstream sampler command restores the default setting.

By default, an interface uses the packet-based regular sampling and the sampling ratio is 1000.

Format

ip netstream sampler fix-packets packet-interval { inbound | outbound }

undo ip netstream sampler [ fix-packets packet-interval ] { inbound | outbound }

Parameters

Parameter

Description

Value

fix-packets packet-interval

Indicates the sampling ratio for packet-based regular sampling.

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

NOTE:

For the S5730-HI, S5731-H, S5731-S, S5731S-H, and S5731S-S, setting the sampling ratio to 1 affects the forwarding performance and can be performed on a maximum of eight interfaces.

For details about how to calculate a sampling ratio, see NetStream Packet Sampling under the "NetStream Configuration" chapter in the S2720, S5700, and S6700 V200R019C10 Configuration Guide - Network Management and Monitoring.

inbound

Samples incoming traffic on an interface.

-

outbound

Samples outgoing traffic on an interface.

-

Views

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

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You can set an interval for sampling packets so that only statistics about sampled packets are collected. The statistics show the flow status on the entire network. The sampling function reduces NetStream impact on device performance.

Precautions

You must run the ip netstream sampler command together with the ip netstream command. If you run only the ip netstream sampler command, the command does not take effect.

If you run the ip netstream sampler command multiple times in the same view, only the latest configuration takes effect.

Example

# Set the packet-based regular sampling ratio for the incoming packets on GE0/0/1 to 1200.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] ip netstream sampler fix-packets 1200 inbound
[HUAWEI-GigabitEthernet0/0/1] ip netstream inbound
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >