Sampling IPv6 Flows

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

Context

If a NetStream-enabled interface is bound to a VPN instance, all packets in the VPN instance are sampled.

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 ipv6 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 ipv6 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.

        The ip netstream sampler command has the same function as the ipv6 netstream sampler command.
        • The execution of either command takes effect on all packets, and there is no need to configure both of them.
        • Packets are sampled at the set sampling ratio, regardless of packet types. For example, if the sampling ratio in fixed packet sampling mode is set to 1000:1, one packet will be sampled every 1000 packets, regardless of these packets are IPv4 or IPv6 packets.

  3. Run ipv6 netstream { inbound | outbound }

    NetStream is enabled on the interface.

    Statistics about packets' BGP next-hop information can also be collected. Original flows output in V5 format, however, cannot carry the BGP next-hop information.

  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. Run commit

    The configuration is committed.

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