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