Sampling IPv4 Flows

You can enable NetStream to sample and analyze the incoming or outgoing flows on an interface.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Configure a sampling mode and sampling ratio by performing at least one of the following steps:

    • Configure a sampling mode and sampling ratio globally.
      1. Run ip netstream sampler { fix-packets fix-packet-number | random-packets random-packet-number | fix-time fix-time-number } { inbound | outbound }

        A sampling mode and sampling ratio are configured globally.

      2. Run interface interface-type interface-number

        The interface view is displayed.

    • Configure a sampling mode and sampling ratio on an interface.
      1. Run interface interface-type interface-number

        The interface view is displayed.

      2. Run ip netstream sampler { fix-packets fix-packet-number | random-packets random-packet-number | fix-time fix-time-number } { inbound | outbound }

        A sampling mode and sampling ratio are configured on the interface.

        The sampling mode and sampling ratio configured in the system view are applicable to all interfaces on the device. The sampling mode and sampling ratio configured in the interface view take precedence over those configured in the system view.

  3. Run ip netstream { inbound | outbound }

    NetStream is enabled on the interface. Statistics about packets' BGP next-hop information can also be collected.

  4. (Optional) Run ip netstream statistics enable

    The traffic statistics diagnosis function is enabled so that you can compare the traffic statistics collected by the device with the traffic statistics collected by the NMS to determine the cause of inaccurate sampling.

  5. (Optional) Run ip netstream sampler except deny-action

    NetStream is not applied to traffic matching the ACL rule or traffic behavior that contains deny.

  6. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >